diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2015-03-13 10:18:43 +0300 |
---|---|---|
committer | Forrest L Norvell <forrest@npmjs.com> | 2015-03-13 10:18:43 +0300 |
commit | 051c4738486a826300f205b71590781ce7744f01 (patch) | |
tree | 7a9371088bf73ea894adcad740a349c80208202a /node_modules/rimraf | |
parent | 7bc4cf3dbc0cdbf1de5287ddd5468a53089c6a66 (diff) |
install: track bundled dependencies in context
Fixes #7552.
The npm@<3 installer uses an elaborate data tree built in-memory as the
install process runs to track which dependencies have already been seen
in the tree. This allows the installer to determine whether a parent
dependency satisfies the current semver requirement.
However, if one version of a dependency is specified at one level of the
tree, and then a child of that level includes that same dependency
bundled at a different version, and one of *that dependency's* children
depends on this same dependency at yet another version, it will end up
matching against the version _above_ the bundled dependency. This can
lead anyone trying to figure out what's going on into a phantasmagorical
wonderland where nothing is real, and can also produce an inconsistent
installed tree.
The solution is to ensure that the bundled dependency versions are added
to the tree, but in order to do this, we need to know exactly which
version got bundled. This requires a call to readInstalled, because the
version that was bundled isn't included anywhere in the package
metadata. Since readInstalled is slow, installMany will only call it if
it knows there are bundledDependencies for the current package.
Diffstat (limited to 'node_modules/rimraf')
0 files changed, 0 insertions, 0 deletions