summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/lib/remote.js
diff options
context:
space:
mode:
authornpm team <ops+robot@npmjs.com>2022-02-24 21:41:49 +0000
committerLuigi Pinca <luigipinca@gmail.com>2022-02-26 08:15:26 +0100
commit1b8300b238923822ea0934b196e3a9e97e0a0893 (patch)
tree474bd5d5a4ee73358f4feebd433cc3f67d65b6e2 /deps/npm/node_modules/pacote/lib/remote.js
parente84b635db49d629f119959c9f0a31762ac22770b (diff)
downloadnode-new-1b8300b238923822ea0934b196e3a9e97e0a0893.tar.gz
deps: upgrade npm to 8.5.2
PR-URL: https://github.com/nodejs/node/pull/42122 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Danielle Adams <adamzdanielle@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'deps/npm/node_modules/pacote/lib/remote.js')
-rw-r--r--deps/npm/node_modules/pacote/lib/remote.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/deps/npm/node_modules/pacote/lib/remote.js b/deps/npm/node_modules/pacote/lib/remote.js
index 727a8bfc8e..5cabfe4fcd 100644
--- a/deps/npm/node_modules/pacote/lib/remote.js
+++ b/deps/npm/node_modules/pacote/lib/remote.js
@@ -3,7 +3,6 @@ const FileFetcher = require('./file.js')
const _tarballFromResolved = Symbol.for('pacote.Fetcher._tarballFromResolved')
const pacoteVersion = require('../package.json').version
const fetch = require('npm-registry-fetch')
-const ssri = require('ssri')
const Minipass = require('minipass')
// The default registry URL is a string of great magic.
const magic = /^https?:\/\/registry\.npmjs\.org\//
@@ -14,8 +13,9 @@ class RemoteFetcher extends Fetcher {
constructor (spec, opts) {
super(spec, opts)
this.resolved = this.spec.fetchSpec
- if (magic.test(this.resolved) && !magic.test(this.registry + '/'))
+ if (magic.test(this.resolved) && !magic.test(this.registry + '/')) {
this.resolved = this.resolved.replace(magic, this.registry + '/')
+ }
// nam is a fermented pork sausage that is good to eat
const nameat = this.spec.name ? `${this.spec.name}@` : ''
@@ -35,7 +35,7 @@ class RemoteFetcher extends Fetcher {
headers: this[_headers](),
spec: this.spec,
integrity: this.integrity,
- algorithms: [ this.pickIntegrityAlgorithm() ],
+ algorithms: [this.pickIntegrityAlgorithm()],
}
fetch(this.resolved, fetchOpts).then(res => {
const hash = res.headers.get('x-local-cache-hash')
@@ -62,7 +62,7 @@ class RemoteFetcher extends Fetcher {
'pacote-req-type': 'tarball',
'pacote-pkg-id': this.pkgid,
...(this.integrity ? { 'pacote-integrity': String(this.integrity) }
- : {}),
+ : {}),
...(this.opts.headers || {}),
}
}