diff options
author | isaacs <i@izs.me> | 2012-10-11 14:11:38 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-10-11 14:11:38 -0700 |
commit | 218f08dbdeb2a5181cd562deb8783a64bb8e7e62 (patch) | |
tree | 14a767138bf35f59d1fe979ee8c9550e4a3d0ff6 /deps/npm/lib | |
parent | 99b2368a6cd408e75850ac73585de8800e2a10a1 (diff) | |
download | node-218f08dbdeb2a5181cd562deb8783a64bb8e7e62.tar.gz |
npm: Upgrade to 1.1.63
Diffstat (limited to 'deps/npm/lib')
-rw-r--r-- | deps/npm/lib/npm.js | 1 | ||||
-rw-r--r-- | deps/npm/lib/publish.js | 8 | ||||
-rw-r--r-- | deps/npm/lib/view.js | 7 |
3 files changed, 14 insertions, 2 deletions
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 41f4ddeec..f0096079c 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -87,6 +87,7 @@ var commandCache = {} , "ll" : "ls" , "ln" : "link" , "i" : "install" + , "isntall" : "install" , "up" : "update" , "c" : "config" , "info" : "view" diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index a84b59786..bb6a4cede 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -65,7 +65,13 @@ function publish_ (arg, data, isRetry, cachedir, cb) { var registry = npm.registry if (data.publishConfig) { var pubConf = new Conf(npm.config) - pubConf.unshift(data.publishConfig) + + // don't modify the actual publishConfig object, in case we have + // to set a login token or some other data. + pubConf.unshift(Object.keys(data.publishConfig).reduce(function (s, k) { + s[k] = data.publishConfig[k] + return s + }, {})) registry = new RegClient(pubConf) } diff --git a/deps/npm/lib/view.js b/deps/npm/lib/view.js index 592d83d4c..b88f98a09 100644 --- a/deps/npm/lib/view.js +++ b/deps/npm/lib/view.js @@ -189,7 +189,12 @@ function printData (data, name, cb) { fields.forEach(function (f) { var d = cleanup(data[v][f]) if (showVersions || showFields || typeof d !== "string") { - d = util.inspect(cleanup(data[v][f]), false, 5, npm.color) + d = cleanup(data[v][f]) + d = npm.config.get("json") + ? JSON.stringify(d, null, 2) + : util.inspect(d, false, 5, npm.color) + } else if (typeof d === "string" && npm.config.get("json")) { + d = JSON.stringify(d) } if (f && showFields) f += " = " if (d.indexOf("\n") !== -1) d = "\n" + d |