-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: pnpm collection of optional dependencies #8957
fix: pnpm collection of optional dependencies #8957
Conversation
🦋 Changeset detectedLatest commit: 96f263e The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
node-module-collector should not expect optional dependencies to be present on disk. If `require('dep/package.json')` throws for optional dependency - it is completley safe to continue as if it was never installed.
d07cfec
to
d63dda5
Compare
Sorry, it was supposed to be a patch release. I messed up the changeset at first |
Can you elaborate on this? I'm not sure I follow why it's safe to continue
|
The way pnpm module collector is written right now is that it will iterate through all dependencies both optional and not, and will |
Oh crap, that totally makes sense! Thanks for flagging this! I wonder if we'll have the same issue with yarn/npm then with optional dependencies? I'll need to take a deeper look at the code now that my laptop has been repaired |
node-module-collector should not expect optional dependencies to be present on disk. If
require('dep/package.json')
throws for optional dependency - it is completley safe to continue as if it was never installed.