This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: treat top-level global packages as "top" nodes
When working with the global install space, such as /usr/local/lib/node_modules, we create a "project root" at the parent of the node_modules directory, and then more or less proceed normally, with the globalStyle install strategy. The main difference, of course, is that in such a case, we should not ever place *peers* of a top-level global dependency in that same global space. This is part of the root cause of npm/cli#3457, where a peer dependency of the globally installed package was placed as a top-level globally installed package, instead of being nested under its dependent. Note that this _also_ could result in an `ERESOLVE` if multiple globally-installed packages depended upon conflicting versions of a peer dep, or worse yet, quietly replacing that peerDep in such a way that it breaks a previously-installed globally installed package. With this change, peer dependencies of a global top-level package will always be nested under their dependent, removing any chance that they might collide with anything else in the top level of the global install space. Fix: npm/cli#3457
- Loading branch information
Showing
3 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
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
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
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