summaryrefslogtreecommitdiff
path: root/deps/npm/lib/prune.js
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2017-05-09 14:46:02 -0700
committerAnna Henningsen <anna@addaleax.net>2017-05-23 19:39:43 +0200
commitc0d858f8bb8ba5212548da2fba6a7bc02db0462b (patch)
tree99f043ec5aec3f5150a2aed0f62597234b158140 /deps/npm/lib/prune.js
parent994617370e8e66f3ea9488fec32fd912e7902396 (diff)
downloadandroid-node-v8-c0d858f8bb8ba5212548da2fba6a7bc02db0462b.tar.gz
android-node-v8-c0d858f8bb8ba5212548da2fba6a7bc02db0462b.tar.bz2
android-node-v8-c0d858f8bb8ba5212548da2fba6a7bc02db0462b.zip
deps: upgrade npm beta to 5.0.0-beta.56
PR-URL: https://github.com/nodejs/node/pull/12936 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'deps/npm/lib/prune.js')
-rw-r--r--deps/npm/lib/prune.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js
index 6d103fc508..39d1c8ffb7 100644
--- a/deps/npm/lib/prune.js
+++ b/deps/npm/lib/prune.js
@@ -15,6 +15,7 @@ var isDev = require('./install/is-dev-dep.js')
var removeDeps = require('./install/deps.js').removeDeps
var loadExtraneous = require('./install/deps.js').loadExtraneous
var chain = require('slide').chain
+var computeMetadata = require('./install/deps.js').computeMetadata
prune.completion = require('./utils/completion/installed-deep.js')
@@ -29,11 +30,12 @@ function Pruner (where, dryrun, args) {
util.inherits(Pruner, Installer)
Pruner.prototype.loadAllDepsIntoIdealTree = function (cb) {
- log.silly('uninstall', 'loadAllDepsIntoIdealtree')
+ log.silly('uninstall', 'loadAllDepsIntoIdealTree')
- var cg = this.progress.loadAllDepsIntoIdealTree
+ var cg = this.progress['loadIdealTree:loadAllDepsIntoIdealTree']
var steps = []
+ computeMetadata(this.idealTree)
var self = this
var excludeDev = npm.config.get('production') || /^prod(uction)?$/.test(npm.config.get('only'))
function shouldPrune (child) {
@@ -54,7 +56,7 @@ Pruner.prototype.loadAllDepsIntoIdealTree = function (cb) {
function nameObj (name) {
return {name: name}
}
- var toPrune = this.currentTree.children.filter(shouldPrune).map(getModuleName).filter(matchesArg).map(nameObj)
+ var toPrune = this.idealTree.children.filter(shouldPrune).map(getModuleName).filter(matchesArg).map(nameObj)
steps.push(
[removeDeps, toPrune, this.idealTree, null, cg.newGroup('removeDeps')],