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:
authorisaacs <i@izs.me>2011-04-19 04:25:27 +0400
committerisaacs <i@izs.me>2011-04-19 04:49:09 +0400
commit23fab365362e51a328f7d20c8d39766ee7906fad (patch)
tree9b7b07b42c50a16d060af1393d53d54a5d7f3b1e /lib/update.js
parentc97d874289abc3d013f3a9c566fc11ce765fbd89 (diff)
#817 Update adds missing deps, and downgrades if necessary
Diffstat (limited to 'lib/update.js')
-rw-r--r--lib/update.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/update.js b/lib/update.js
index fd9e963f4..6416435e4 100644
--- a/lib/update.js
+++ b/lib/update.js
@@ -20,10 +20,15 @@ function update (args, cb) {
npm.commands.outdated(args, true, function (er, outdated) {
log(outdated, "outdated updating")
if (er) return cb(er)
+
asyncMap(outdated, function (ww, cb) {
+ // [[ dir, dep, has, want ]]
var where = ww[0]
- , what = ww[1]
- log([where, what], "updating")
+ , dep = ww[1]
+ , want = ww[3]
+ , what = dep + "@" + want
+
+ log.warn([where, what], "updating")
npm.commands.install(where, what, cb)
}, cb)
})