-
Notifications
You must be signed in to change notification settings - Fork 21
fix(legacy-json): reduce diff #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #524 +/- ##
=======================================
Coverage 79.86% 79.86%
=======================================
Files 121 121
Lines 11995 11995
Branches 839 839
=======================================
Hits 9580 9580
Misses 2412 2412
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR attempts to fix the order of changes to match the legacy implementation by reversing the sort order. The changes modify the sorting logic to return newest-first order directly, eliminating the need for a separate .reverse() call.
Key changes:
- Modified
sortChangesfunction to swap comparison arguments, changing from ascending to descending sort order - Removed
.reverse()call inbuildContent.mjssince the sort order is now inverted at the source
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/utils/generators.mjs |
Swapped comparison arguments in sortChanges to produce descending order (newest first) instead of ascending |
src/generators/jsx-ast/utils/buildContent.mjs |
Removed .reverse() call since sortChanges now returns newest-first order directly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Note: The comparator could not run for this PR, as the diff (20k+ lines) was simply too large for a comment: |
ovflowd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM!
|
@ovflowd Would you like me to make seperate PRs, or have all my changes regarding lessening the diff here? |
Nah, one by one, easier to review! |
|
In that case, I'm fast-tracking this |
Please keep in mind you cannot self-fast-track PRs!!! |
Ref: https://gist.github.com/avivkeller/6bcb5fc17d72a3bed77744d4094949bd
The changes are backwards compared to the legacy implementation.