diff options
author | isaacs <i@izs.me> | 2013-11-08 13:41:21 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-11-08 13:41:24 -0800 |
commit | 8f221bc43d02d86da94186d5290c29a426039d15 (patch) | |
tree | cbe4299bf89e6c15202c4aa696089cce14a9c452 /deps/npm/lib | |
parent | 0be5a94c56534c0debaf5416eac42d48c9617404 (diff) | |
download | node-new-8f221bc43d02d86da94186d5290c29a426039d15.tar.gz |
npm: Upgrade to 1.3.14
Diffstat (limited to 'deps/npm/lib')
-rw-r--r-- | deps/npm/lib/cache.js | 6 | ||||
-rw-r--r-- | deps/npm/lib/config.js | 14 | ||||
-rw-r--r-- | deps/npm/lib/utils/error-handler.js | 8 |
3 files changed, 23 insertions, 5 deletions
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js index a2f4502c7f..9487534c69 100644 --- a/deps/npm/lib/cache.js +++ b/deps/npm/lib/cache.js @@ -712,12 +712,14 @@ function installTargetsError (requested, data) { requested = data.name + (requested ? "@'" + requested + "'" : "") targets = targets.length - ? "Valid install targets:\n" + JSON.stringify(targets) + ? "Valid install targets:\n" + JSON.stringify(targets) + "\n" : "No valid targets found.\n" + "Perhaps not compatible with your version of node?" - return new Error( "No compatible version found: " + var er = new Error( "No compatible version found: " + requested + "\n" + targets) + er.code = "ETARGET" + return er } function addNameVersion (name, v, data, cb) { diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index 12879440eb..7d9776379a 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -83,9 +83,17 @@ function edit (cb) { , ";;;;" ] ) - .concat(Object.keys(npmconf.defaults).map(function (k) { - return "; " + k + " = " + npmconf.defaults[k] - })) + .concat(Object.keys(npmconf.defaults).reduce(function (arr, key) { + var obj = {}; + obj[key] = npmconf.defaults[key] + if (key === "logstream") return arr + return arr.concat( + ini.stringify(obj) + .replace(/\n$/m, '') + .replace(/^/g, '; ') + .replace(/\n/g, '\n; ') + .split('\n')) + }, [])) .concat([""]) .join(os.EOL) fs.writeFile diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index a4725a31f9..5b33546a76 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -243,6 +243,14 @@ function errorHandler (er) { ].join("\n")) break + case "ETARGET": + log.error("notarget", [er.message + ,"This is most likely not a problem with npm itself." + ,"In most cases you or one of your dependencies are requesting" + ,"a package version that doesn't exist." + ].join("\n")) + break + case "ENOTSUP": if (er.required) { log.error("notsup", [er.message |