diff options
author | isaacs <i@izs.me> | 2014-01-19 21:13:20 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-01-19 21:13:20 -0800 |
commit | f645c40fcd92ca929e03e65d8a8f4ebb05e2cea2 (patch) | |
tree | 5e8ba8fcd49f3989c8dd71de106e43a7679c644b /deps/npm/lib/prune.js | |
parent | 1d57a5caa4dc2994906c2160eaa31ca700dff39c (diff) | |
download | node-new-f645c40fcd92ca929e03e65d8a8f4ebb05e2cea2.tar.gz |
npm: Upgrade to v1.3.24
Diffstat (limited to 'deps/npm/lib/prune.js')
-rw-r--r-- | deps/npm/lib/prune.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/deps/npm/lib/prune.js b/deps/npm/lib/prune.js index dbe8790b9d..0e13da13be 100644 --- a/deps/npm/lib/prune.js +++ b/deps/npm/lib/prune.js @@ -13,19 +13,19 @@ var readInstalled = require("read-installed") prune.completion = require("./utils/completion/installed-deep.js") function prune (args, cb) { + //check if is a valid package.json file var jsonFile = path.resolve(npm.dir, "..", "package.json" ) - readJson(jsonFile, log.warn, function (er, packageData) { + readJson(jsonFile, log.warn, function (er, data) { if (er) return cb(er) + next() + }) + + function next() { readInstalled(npm.prefix, npm.config.get("depth"), function (er, data) { if (er) return cb(er) - if (npm.config.get("production")) { - Object.keys(packageData.devDependencies || {}).forEach(function (k) { - if (data.dependencies[k]) data.dependencies[k].extraneous = true - }) - } prune_(args, data, cb) }) - }) + } } function prune_ (args, data, cb) { |