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:
Diffstat (limited to 'lib/install/diff-trees.js')
-rw-r--r--lib/install/diff-trees.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/install/diff-trees.js b/lib/install/diff-trees.js
index 3363e33c5..e52d950bf 100644
--- a/lib/install/diff-trees.js
+++ b/lib/install/diff-trees.js
@@ -62,7 +62,6 @@ function requiredByAllLinked (node) {
var sortActions = module.exports.sortActions = function (differences) {
var actions = {}
differences.forEach(function (action) {
- var cmd = action[0]
var child = action[1]
actions[child.package._location] = action
})
@@ -107,16 +106,15 @@ function diffTrees (oldTree, newTree) {
Object.keys(flatNewTree).forEach(function (path) {
var pkg = flatNewTree[path]
pkg.oldPkg = flatOldTree[path]
- pkg.isInLink = (pkg.oldPkg && isLink(pkg.oldPkg.parent))
- || (pkg.parent && isLink(pkg.parent))
- || requiredByAllLinked(pkg)
+ pkg.isInLink = (pkg.oldPkg && isLink(pkg.oldPkg.parent)) ||
+ (pkg.parent && isLink(pkg.parent)) ||
+ requiredByAllLinked(pkg)
if (pkg.fromBundle) return
if (pkg.oldPkg) {
if (!pkg.directlyRequested && pkgAreEquiv(pkg.oldPkg.package, pkg.package)) return
if (!pkg.isInLink && (isLink(pkg.oldPkg) || isLink(pkg))) {
differences.push(['update-linked', pkg])
- }
- else {
+ } else {
differences.push(['update', pkg])
}
} else {