Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2015-03-13 10:18:43 +0300
committerForrest L Norvell <forrest@npmjs.com>2015-03-13 10:18:43 +0300
commit051c4738486a826300f205b71590781ce7744f01 (patch)
tree7a9371088bf73ea894adcad740a349c80208202a /node_modules/rimraf
parent7bc4cf3dbc0cdbf1de5287ddd5468a53089c6a66 (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