-
-
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(plugin-pnpm): various improvements #3681
Merged
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
arcanis
reviewed
Nov 3, 2021
arcanis
reviewed
Nov 3, 2021
arcanis
reviewed
Nov 3, 2021
arcanis
reviewed
Nov 4, 2021
arcanis
reviewed
Nov 4, 2021
I saw this PR when I was going to submit my own PR. It seems that all issues I encountered will be fixed by this PR. Look forward to it! |
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What's the problem this PR addresses?
PnpmLinker
didn't install transitive dependencies in such a way that they can require themselvesPnpmLinker
didn't support running binaries of soft linksPnpmLinker
didn't remove the scope folder (e.g.node_modules/@yarnpkg
) after removing a scoped dependencyPnpmLinker
didn't remove folders that looked like scopesHow did you fix it?
Made it copy the package sources toThe sources will now be copied tonode_modules/.store/<hash>/node_modules/<ident>
and use that as the symlink source so that self-references work. There is a special edge-case though: when a package depends on a different version of itself. Both pnp and nm get that right (though pnpm doesn't), so I made it skip generating self-references in that case (i.e. made it keep copying the sources tonode_modules/.store/<hash>
so that the dependency can be put insidenode_modules/.store/<hash>/node_modules/<ident>
.node_modules/.store/<hash>/node_modules/<ident>
and dependencies will be symlinked tonode_modules/.store/<hash>/node_modules/<ident>/node_modules
.packageLocations
(now renamed topathByLocator
) inside the install state and madefindPackageLocation
query thatChecklist