diff options
author | Kat Marchán <kzm@zkat.tech> | 2019-01-29 14:43:00 -0800 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2019-02-12 00:06:29 -0800 |
commit | 43dd49c9782848c25e5b03448c8a0f923f13c158 (patch) | |
tree | f7ac5d645019b2b844f26be66c291bbae734d097 /deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js | |
parent | b361f9577fbd72e518438d3fa0b01f7d34d814a5 (diff) | |
download | android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.tar.gz android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.tar.bz2 android-node-v8-43dd49c9782848c25e5b03448c8a0f923f13c158.zip |
deps: upgrade npm to 6.7.0
PR-URL: https://github.com/nodejs/node/pull/25804
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js')
-rw-r--r-- | deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js index 7239981279..134153280e 100644 --- a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js +++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js @@ -2,18 +2,17 @@ const BB = require('bluebird') -const fetch = require('./fetch') +const fetch = require('npm-registry-fetch') const manifest = require('./manifest') const optCheck = require('../../util/opt-check') const PassThrough = require('stream').PassThrough -const pickRegistry = require('./pick-registry') const ssri = require('ssri') const url = require('url') module.exports = tarball function tarball (spec, opts) { opts = optCheck(opts) - const registry = pickRegistry(spec, opts) + const registry = fetch.pickRegistry(spec, opts) const stream = new PassThrough() let mani if ( @@ -49,11 +48,11 @@ function tarball (spec, opts) { module.exports.fromManifest = fromManifest function fromManifest (manifest, spec, opts) { opts = optCheck(opts) - opts.scope = spec.scope || opts.scope + if (spec.scope) { opts = opts.concat({ scope: spec.scope }) } const stream = new PassThrough() - const registry = pickRegistry(spec, opts) + const registry = fetch.pickRegistry(spec, opts) const uri = getTarballUrl(spec, registry, manifest, opts) - fetch(uri, registry, Object.assign({ + fetch(uri, opts.concat({ headers: { 'pacote-req-type': 'tarball', 'pacote-pkg-id': `registry:${manifest.name}@${uri}` |