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:
-rw-r--r--lib/install.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/install.js b/lib/install.js
index 38aa7c1df..650a9e156 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -197,6 +197,10 @@ function install (args, cb) {
// just like installMany, but also add the existing packages in
// where/node_modules to the previously object.
+//
+// TODO: If where/package.json exists, and "what" is a package name
+// without a specific version, then limit to the version in the
+// dependencies hash.
function installManyTop (what, where, previously, explicit, cb) {
var nm = path.resolve(where, "node_modules")
, names = explicit
@@ -333,6 +337,9 @@ function checkCycle (target, previously, cb) {
//
// Solution: Simply flat-out refuse to install any name@version
// that is already in the prototype tree of the previously object.
+ // A more correct, but more complex, solution would be to symlink
+ // the deeper thing into the new location.
+ // Will do that if anyone whines about this irl.
var p = Object.getPrototypeOf(previously)
, name = target.name