diff --git a/lib/install/actions.js b/lib/install/actions.js index face4b457bced..00141813ba277 100644 --- a/lib/install/actions.js +++ b/lib/install/actions.js @@ -63,7 +63,7 @@ function andHandleOptionalDepErrors (pkg, next) { return function (er) { if (!er) return next.apply(null, arguments) markAsFailed(pkg) - var anyFatal = pkg.directlyRequested || !pkg.parent + var anyFatal = pkg.userRequired || !pkg.parent for (var ii = 0; ii < pkg.requiredBy.length; ++ii) { var parent = pkg.requiredBy[ii] var isFatal = failedDependency(parent, pkg) diff --git a/lib/install/deps.js b/lib/install/deps.js index beb108e680f37..39c37476c98b8 100644 --- a/lib/install/deps.js +++ b/lib/install/deps.js @@ -201,7 +201,7 @@ exports.loadRequestedDeps = function (args, tree, saveToDependencies, log, next) tree.package.dependencies[childName] = child.package._requested.rawSpec || child.package._requested.spec } - child.directlyRequested = true + child.userRequired = true child.save = saveToDependencies // For things the user asked to install, that aren't a dependency (or @@ -209,7 +209,6 @@ exports.loadRequestedDeps = function (args, tree, saveToDependencies, log, next) // themselves, so we don't remove it as a dep that no longer exists if (!addRequiredDep(tree, child)) { replaceModuleName(child.package, '_requiredBy', '#USER') - child.directlyRequested = true } depLoaded(null, child, tracker) })) diff --git a/lib/install/diff-trees.js b/lib/install/diff-trees.js index 59567bf3193be..13ee54c5880c5 100644 --- a/lib/install/diff-trees.js +++ b/lib/install/diff-trees.js @@ -134,7 +134,7 @@ function diffTrees (oldTree, newTree) { if (npm.config.get('rebuild-bundle')) differences.push(['rebuild', pkg]) if (pkg.oldPkg) differences.push(['remove', pkg]) } else if (pkg.oldPkg) { - if (!pkg.directlyRequested && pkgAreEquiv(pkg.oldPkg.package, pkg.package)) return + if (!pkg.userRequired && pkgAreEquiv(pkg.oldPkg.package, pkg.package)) return if (!pkg.isInLink && (isLink(pkg.oldPkg) || isLink(pkg))) { differences.push(['update-linked', pkg]) } else {