Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2014-10-24 10:12:19 +0400
committerForrest L Norvell <forrest@npmjs.com>2014-10-31 11:18:12 +0300
commit7719cfdd8b204dfeccc41289707ea58b4d608905 (patch)
treed3638e35e4988a9ed789ad74ed4b5418fecb2255 /lib/dedupe.js
parent20a331ced6a52faac6ec242e3ffdf28bcd447c40 (diff)
use new npm-registry-client API
Makes a *lot* clearer when the CLI is doing something with auth implications, by explicitly pass auth to registry client. Moves lookup of credentials into mapRegistryToURI, which makes the code more consistent.
Diffstat (limited to 'lib/dedupe.js')
-rw-r--r--lib/dedupe.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dedupe.js b/lib/dedupe.js
index 74397d0cb..6a4abd730 100644
--- a/lib/dedupe.js
+++ b/lib/dedupe.js
@@ -240,10 +240,10 @@ function findVersions (npm, summary, cb) {
var versions = data.versions
var ranges = data.ranges
- mapToRegistry(name, npm.config, function (er, uri) {
+ mapToRegistry(name, npm.config, function (er, uri, auth) {
if (er) return cb(er)
- npm.registry.get(uri, null, next)
+ npm.registry.get(uri, { auth : auth }, next)
})
function next (er, data) {