-
Notifications
You must be signed in to change notification settings - Fork 334
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 package resolution in Node.js 17+ for support/4.x
#3817
Merged
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
For context Sass does not resolve package.json fields or exports sass/sass#2739 But bundlers like webpack use “style” and “sass” fields using loaders: https://www.npmjs.com/package/css-loader https://www.npmjs.com/package/sass-loader Note: With “exports” present in package.json the stylesheet exports must appear there too to maintain both backwards and forwards compatibility
We hadn’t realised that support for “subpath exports” with trailing slashes (not asterisks) was deprecated in Node.js 16 and removed in Node.js 17 https://nodejs.org/docs/latest-v18.x/api/deprecations.html#dep0148-folder-mappings-in-exports-trailing- But fully switching to “subpath patterns” requires Node.js 12.20+ so both flavours will be needed for backwards compatibility Fixes: #3755
colinrotherham
added
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
javascript
labels
Jun 16, 2023
colinrotherham
changed the title
Fix Node.js >= 17 require + import (for v4.6.x)
Fix package resolution in Node.js 17+
Jun 16, 2023
colinrotherham
force-pushed
the
node-require-v4
branch
from
June 16, 2023 13:24
7bf91e5
to
946991e
Compare
colinrotherham
changed the title
Fix package resolution in Node.js 17+
Fix package resolution in Node.js 17+ in Jun 16, 2023
support/4.6.x
colinrotherham
force-pushed
the
node-require-v4
branch
from
June 16, 2023 13:32
946991e
to
4e49b4c
Compare
This was referenced Jun 16, 2023
colinrotherham
changed the title
Fix package resolution in Node.js 17+ in
Fix package resolution in Node.js 17+ for Jun 16, 2023
support/4.6.x
support/4.6.x
Does this need changing to target |
I've held off doing it to save time but if we're 100% sure then I'll proceed 🚀 |
colinrotherham
changed the title
Fix package resolution in Node.js 17+ for
Fix package resolution in Node.js 17+ for Jun 19, 2023
support/4.6.x
support/4.x
Target branch changed |
romaricpascal
approved these changes
Jun 22, 2023
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.
Good to have the opportunity to release that one in 4.7.0 🥳
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
javascript
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.
As described in #3755 this PR fixes point 1)
This may also fix issues with bundlers that also follow Node.js package exports resolution