summaryrefslogtreecommitdiff
path: root/deps/npm/lib/npm.js
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2017-06-05 16:31:14 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2017-06-06 14:27:48 -0400
commita4444c546211cac0f5efba8b03a681546e3e184f (patch)
treea378b37fefd4fac786850c41f32eee8d07e339c7 /deps/npm/lib/npm.js
parentdf46fcb61a6f64cebffd26c8dbd4f24c8058fe25 (diff)
downloadnode-new-a4444c546211cac0f5efba8b03a681546e3e184f.tar.gz
deps: upgrade npm to 5.0.3
PR-URL: https://github.com/nodejs/node/pull/13487 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/lib/npm.js')
-rw-r--r--deps/npm/lib/npm.js30
1 files changed, 2 insertions, 28 deletions
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index dbd8e97150..990d8c5109 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -33,6 +33,7 @@
var rimraf = require('rimraf')
var lazyProperty = require('lazy-property')
var parseJSON = require('./utils/parse-json.js')
+ var clientConfig = require('./config/reg-client.js')
var aliases = require('./config/cmd-list').aliases
var cmdList = require('./config/cmd-list').cmdList
var plumbing = require('./config/cmd-list').plumbing
@@ -344,7 +345,7 @@
lazyProperty(npm, 'registry', function () {
registryLoaded = true
var RegClient = require('npm-registry-client')
- var registry = new RegClient(adaptClientConfig(npm.config))
+ var registry = new RegClient(clientConfig(npm, log, npm.config))
registry.version = npm.version
registry.refer = registryRefer
return registry
@@ -467,31 +468,4 @@
return ''
}
}
-
- function adaptClientConfig (config) {
- return {
- proxy: {
- http: config.get('proxy'),
- https: config.get('https-proxy'),
- localAddress: config.get('local-address')
- },
- ssl: {
- certificate: config.get('cert'),
- key: config.get('key'),
- ca: config.get('ca'),
- strict: config.get('strict-ssl')
- },
- retry: {
- retries: config.get('fetch-retries'),
- factor: config.get('fetch-retry-factor'),
- minTimeout: config.get('fetch-retry-mintimeout'),
- maxTimeout: config.get('fetch-retry-maxtimeout')
- },
- userAgent: config.get('user-agent'),
- log: log,
- defaultTag: config.get('tag'),
- maxSockets: config.get('maxsockets'),
- scope: npm.projectScope
- }
- }
})()