-
Notifications
You must be signed in to change notification settings - Fork 190
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: give precedence to pnp over node_modules, close #288 #289
Conversation
Codecov Report
@@ Coverage Diff @@
## master #289 +/- ##
=======================================
Coverage 94.93% 94.93%
=======================================
Files 39 39
Lines 1579 1581 +2
=======================================
+ Hits 1499 1501 +2
Misses 80 80
Continue to review full report at Codecov.
|
hm, why developers have |
It happens when using the https://github.com/vercel/next.js/blob/15133b47ec7bfc413aa068d92fb678626cf47571/test-pnp.sh#L40 |
Another example which prompted this PR/issue: At my work we have 2 projects. Project A using yarn pnp and Project M using node_modules. Project M is a monorepo. Right now if you try to link a package from Project M into Project A, the peer dependencies of the Project M package are resolved using Project M's node_modules, rather than Project A's dependencies. If the peer deps include React, you get singleton issues preventing React hooks from working, among other features. |
Since Next.js started using webpack 5 by default this is also affecting their e2e tests https://github.com/vercel/next.js/runs/2373726821#step:5:222, applying the change in this PR fixes their e2e tests cc @sokra |
Thanks |
Fixes the e2e PnP tests by updating `enhanced-resolve` to get the fix in webpack/enhanced-resolve#289, the tests started failing in #23810 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes
Fixes the e2e PnP tests by updating `enhanced-resolve` to get the fix in webpack/enhanced-resolve#289, the tests started failing in vercel#23810 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes
Fixes #288.
Ideally, node_modules should not even be considered if the pnp api is enabled, however it looks like that's intentional according to #273