From 23fab365362e51a328f7d20c8d39766ee7906fad Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 18 Apr 2011 17:25:27 -0700 Subject: #817 Update adds missing deps, and downgrades if necessary --- lib/update.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/update.js') 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) }) -- cgit v1.2.3