-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(pnp): use exports implementation from Node.js #5331
Conversation
cc @GeoffreyBooth - that's the kind of thing where Node.js helpers would be very valuable |
Pull requests are welcome! |
releases: | ||
"@yarnpkg/cli": patch | ||
"@yarnpkg/plugin-pnp": patch | ||
"@yarnpkg/pnp": patch |
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.
Is there a risk in shipping it as a patch? Entirely changing the implementation may cause a couple of behaviours that people rely on to change.
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.
Yes, this is a breaking change but PRs making PnP match the Node.js behaviour usually aren't marked as such even though all of them are breaking changes.
Our current implementation doesn't match any version of Node.js while this new version doesn't match versions before v18, the former seems worse.
https://xkcd.com/1172 comes to mind.
* fix(pnp): use exports implementation from node * test: remove test for removed feature * test: fix paths * chore: remove `resolve.exports` * test: error codes * chore: build * chore: versions * chore: lint
What's the problem this PR addresses?
The way
@yarnpkg/pnp
handles theexports
field doesn't match Node.js.Fixes #3740
Fixes #4803
How did you fix it?
Replace
resolve.exports
with the implementation from Node.js.Checklist