Skip to content

Commit a29de4f

Browse files
committed
fix(api): pacote integration-related fixes
1 parent 2e5113a commit a29de4f

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

Diff for: config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ const RegFetchConfig = pudding({
9090
module.exports = config
9191
function config (opts) {
9292
opts = opts || {}
93-
return RegFetchConfig(opts, opts.config)
93+
return RegFetchConfig(opts, 'config' in opts && opts.config)
9494
}

Diff for: index.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ const getAuth = require('./auth.js')
88
const fetch = require('make-fetch-happen')
99
const npa = require('npm-package-arg')
1010
const qs = require('querystring')
11-
const silentLog = require('./silentlog.js')
1211
const url = require('url')
1312

1413
module.exports = regFetch
1514
function regFetch (uri, opts) {
16-
opts = config(Object.assign({
17-
log: silentLog
18-
}, opts))
15+
opts = config(opts)
1916
const registry = (
2017
(opts.get('spec') && pickRegistry(opts.get('spec'), opts)) ||
2118
opts.get('registry') ||
@@ -97,9 +94,6 @@ module.exports.pickRegistry = pickRegistry
9794
function pickRegistry (spec, opts) {
9895
spec = npa(spec)
9996
opts = config(opts)
100-
if (!spec.registry) {
101-
throw new Error(`${spec} is not a valid registry dependency spec`)
102-
}
10397
let registry = spec.scope &&
10498
opts.get(spec.scope.replace(/^@?/, '@') + ':registry')
10599

Diff for: package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"license": "ISC",
3131
"dependencies": {
3232
"bluebird": "^3.5.1",
33-
"figgy-pudding": "^3.0.0",
33+
"figgy-pudding": "^3.1.0",
3434
"lru-cache": "^4.1.2",
3535
"make-fetch-happen": "^3.0.0",
3636
"npm-package-arg": "^6.0.0",

0 commit comments

Comments
 (0)