-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Fix] order
: ensure arcane imports do not cause undefined behavior
#3128
Draft
Xunnamius
wants to merge
4
commits into
import-js:main
Choose a base branch
from
Xunnamius:contrib-nan-bugfix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+637
−35
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Xunnamius
changed the title
[New]
[Fix] Dec 23, 2024
order
: ensure arcane imports do not cause undefined behaviororder
: ensure arcane imports do not cause undefined behavior
Xunnamius
force-pushed
the
contrib-nan-bugfix
branch
from
December 31, 2024 00:57
d929108
to
400fb1a
Compare
ljharb
reviewed
Dec 31, 2024
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.
seems good overall, assuming the test fails without the fix :-)
Xunnamius
force-pushed
the
contrib-nan-bugfix
branch
from
December 31, 2024 07:21
853d7b6
to
321c79c
Compare
Xunnamius
force-pushed
the
contrib-nan-bugfix
branch
2 times, most recently
from
January 22, 2025 00:19
64ccfb5
to
a77d6b4
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3128 +/- ##
==========================================
+ Coverage 95.62% 95.65% +0.02%
==========================================
Files 83 83
Lines 3636 3658 +22
Branches 1284 1305 +21
==========================================
+ Hits 3477 3499 +22
Misses 159 159 ☔ View full report in Codecov by Sentry. |
This comment was marked as resolved.
This comment was marked as resolved.
Xunnamius
force-pushed
the
contrib-nan-bugfix
branch
from
January 26, 2025 05:02
e96ee80
to
903f0ea
Compare
…oup sorting of type-only imports Closes import-js#2912 Closes import-js#2347 Closes import-js#2441 Subsumes import-js#2615
Xunnamius
force-pushed
the
contrib-nan-bugfix
branch
from
January 26, 2025 05:09
903f0ea
to
02d0ab1
Compare
Xunnamius
force-pushed
the
contrib-nan-bugfix
branch
from
January 26, 2025 07:20
02d0ab1
to
40cf277
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #3127
This PR implements in
import/order
: a fix to ensureNaN
is never passed into rank-computing functions, which can result in undefined behavior.A demo package containing this fix is temporarily available for easy testing:
Ensure strange imports do not cause strange behavior
There are certain edge cases where a
NaN
rank gets passed around, such as using an import with an absolute specifier under certain configurations. The fix concerns thecomputeRank
function.This PR includes a unit test to catch potential regressions.