summaryrefslogtreecommitdiff
path: root/deps/npm/lib/npm.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-08-21 15:29:03 -0700
committerisaacs <i@izs.me>2012-08-21 15:29:37 -0700
commit2bcb9ab7bcd474590f109bd04c43ba8e39a90dfa (patch)
tree225e7199ccab16b9d8fad19c5001a0a4991f5f07 /deps/npm/lib/npm.js
parentbadbd1af27f5f3fd07862b8ee7d0810e7ae9ef56 (diff)
downloadnode-new-2bcb9ab7bcd474590f109bd04c43ba8e39a90dfa.tar.gz
npm: Upgrade to 1.1.55
Diffstat (limited to 'deps/npm/lib/npm.js')
-rw-r--r--deps/npm/lib/npm.js44
1 files changed, 13 insertions, 31 deletions
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 0a321b284a..5728f7343b 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -101,6 +101,8 @@ var commandCache = {}
, "login": "adduser"
, "add-user": "adduser"
, "tst": "test"
+ , "find-dupes": "dedupe"
+ , "ddp": "dedupe"
}
, aliasNames = Object.keys(aliases)
@@ -116,6 +118,7 @@ var commandCache = {}
, "prune"
, "submodule"
, "pack"
+ , "dedupe"
, "rebuild"
, "link"
@@ -308,28 +311,7 @@ function load (npm, cli, cb) {
} catch (e) { token = null }
}
- npm.registry = new RegClient(
- { registry: npm.config.get("registry")
- , cache: npm.config.get("cache")
- , auth: npm.config.get("_auth")
- , token: token
- , alwaysAuth: npm.config.get("always-auth")
- , email: npm.config.get("email")
- , proxy: npm.config.get("proxy")
- , tag: npm.config.get("tag")
- , ca: npm.config.get("ca")
- , strictSSL: npm.config.get("strict-ssl")
- , userAgent: npm.config.get("user-agent")
- , E404: npm.E404
- , EPUBLISHCONFLICT: npm.EPUBLISHCONFLICT
- , log: log
- , retries: npm.config.get("fetch-retries")
- , retryFactor: npm.config.get("fetch-retry-factor")
- , retryMinTimeout: npm.config.get("fetch-retry-mintimeout")
- , retryMaxTimeout: npm.config.get("fetch-retry-maxtimeout")
- , cacheMin: npm.config.get("cache-min")
- , cacheMax: npm.config.get("cache-max")
- })
+ npm.registry = new RegClient(npm.config)
// save the token cookie in the config file
if (npm.registry.couchLogin) {
@@ -378,15 +360,15 @@ function loadPrefix (npm, conf, cb) {
}
})
- findPrefix(gp, function (er, gp) {
- Object.defineProperty(npm, "globalPrefix",
- { get : function () { return gp }
- , set : function (r) { return gp = r }
- , enumerable : true
- })
- // the prefix MUST exist, or else nothing works.
- mkdir(gp, next)
- })
+ gp = path.resolve(gp)
+ Object.defineProperty(npm, "globalPrefix",
+ { get : function () { return gp }
+ , set : function (r) { return gp = r }
+ , enumerable : true
+ })
+ // the prefix MUST exist, or else nothing works.
+ mkdir(gp, next)
+
var i = 2
, errState = null