-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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(gatsby): fix PNP resolving from the .cache folder #31732
Conversation
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
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.
Thanks!
if (!(process.versions as ProcessWithPNP).pnp) { | ||
return | ||
} |
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.
Sorry if I'm missing some context here but shouldn't it always do this regardless if PnP is enabled or not? Otherwise it's relying on hoisting quite a lot - https://yarnpkg.com/advanced/rulebook#packages-should-only-ever-require-what-they-formally-list-in-their-dependencies
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.
It should but it could be a subtle breaking change for some so I made sure to only fix it for pnp in v3
Description
Add an extra resolver to route dependencies used in the .cache folder from "gatsby" package to actually route properly through PNP.
Related Issues
Fixes #30114 #19316
[ch32208]