diff options
author | Nathan Fritz <fritzy@github.com> | 2022-08-17 21:46:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 21:46:57 +0300 |
commit | 4e08d71e76fb2355dc93fcd7695e1ae20d6446af (patch) | |
tree | a27111efd532d07ef735f925a1325d5cc20339a2 | |
parent | 41d0f51c34b24659d080beff0d53905975d34213 (diff) |
deps: pacote@13.6.2 (#5315)
-rwxr-xr-x | node_modules/pacote/lib/bin.js | 11 | ||||
-rw-r--r-- | node_modules/pacote/lib/fetcher.js | 6 | ||||
-rw-r--r-- | node_modules/pacote/lib/git.js | 17 | ||||
-rw-r--r-- | node_modules/pacote/lib/remote.js | 1 | ||||
-rw-r--r-- | node_modules/pacote/package.json | 2 | ||||
-rw-r--r-- | package-lock.json | 8 | ||||
-rw-r--r-- | package.json | 2 |
7 files changed, 28 insertions, 19 deletions
diff --git a/node_modules/pacote/lib/bin.js b/node_modules/pacote/lib/bin.js index 4a1f911e4..f35b62ca7 100755 --- a/node_modules/pacote/lib/bin.js +++ b/node_modules/pacote/lib/bin.js @@ -18,10 +18,15 @@ const run = conf => { case 'tarball': if (!conf._[2] || conf._[2] === '-') { return pacote.tarball.stream(conf._[1], stream => { - stream.pipe(conf.testStdout || - /* istanbul ignore next */ process.stdout) + stream.pipe( + conf.testStdout || + /* istanbul ignore next */ + process.stdout + ) // make sure it resolves something falsey - return stream.promise().then(() => {}) + return stream.promise().then(() => { + return false + }) }, conf) } else { return pacote.tarball.file(conf._[1], conf._[2], conf) diff --git a/node_modules/pacote/lib/fetcher.js b/node_modules/pacote/lib/fetcher.js index 5f93e703b..95b6d3ee4 100644 --- a/node_modules/pacote/lib/fetcher.js +++ b/node_modules/pacote/lib/fetcher.js @@ -254,6 +254,7 @@ class FetcherBase { cstream.on('error', err => stream.emit('error', err)) stream.pipe(cstream) + // eslint-disable-next-line promise/catch-or-return cstream.promise().catch(() => {}).then(() => middleStream.end()) return middleStream } @@ -269,7 +270,10 @@ class FetcherBase { } // override the types getter - get types () {} + get types () { + return false + } + [_assertType] () { if (this.types && !this.types.includes(this.spec.type)) { throw new TypeError(`Wrong spec type (${ diff --git a/node_modules/pacote/lib/git.js b/node_modules/pacote/lib/git.js index 9d84d95fa..c4819b4fd 100644 --- a/node_modules/pacote/lib/git.js +++ b/node_modules/pacote/lib/git.js @@ -239,7 +239,7 @@ class GitFetcher extends Fetcher { tarballOk = tarballOk && h && resolved === repoUrl(h, { noCommittish: false }) && h.tarball - return cacache.tmp.withTmp(this.cache, o, tmp => { + return cacache.tmp.withTmp(this.cache, o, async tmp => { // if we're resolved, and have a tarball url, shell out to RemoteFetcher if (tarballOk) { const nameat = this.spec.name ? `${this.spec.name}@` : '' @@ -259,16 +259,15 @@ class GitFetcher extends Fetcher { }) } - return ( + const sha = await ( h ? this[_cloneHosted](ref, tmp) : this[_cloneRepo](this.spec.fetchSpec, ref, tmp) - ).then(sha => { - this.resolvedSha = sha - if (!this.resolved) { - this[_addGitSha](sha) - } - }) - .then(() => handler(tmp)) + ) + this.resolvedSha = sha + if (!this.resolved) { + await this[_addGitSha](sha) + } + return handler(tmp) }) } diff --git a/node_modules/pacote/lib/remote.js b/node_modules/pacote/lib/remote.js index 6759dbba3..a361a9e89 100644 --- a/node_modules/pacote/lib/remote.js +++ b/node_modules/pacote/lib/remote.js @@ -41,6 +41,7 @@ class RemoteFetcher extends Fetcher { algorithms: [this.pickIntegrityAlgorithm()], } + // eslint-disable-next-line promise/always-return fetch(this.resolved, fetchOpts).then(res => { res.body.on('error', /* istanbul ignore next - exceedingly rare and hard to simulate */ diff --git a/node_modules/pacote/package.json b/node_modules/pacote/package.json index 696c925d3..960530ec0 100644 --- a/node_modules/pacote/package.json +++ b/node_modules/pacote/package.json @@ -1,6 +1,6 @@ { "name": "pacote", - "version": "13.6.1", + "version": "13.6.2", "description": "JavaScript package downloader", "author": "GitHub Inc.", "bin": { diff --git a/package-lock.json b/package-lock.json index 9bb2d7a44..3f7197488 100644 --- a/package-lock.json +++ b/package-lock.json @@ -140,7 +140,7 @@ "npmlog": "^6.0.2", "opener": "^1.5.2", "p-map": "^4.0.0", - "pacote": "^13.6.1", + "pacote": "^13.6.2", "parse-conflict-json": "^2.0.2", "proc-log": "^2.0.1", "qrcode-terminal": "^0.12.0", @@ -5598,9 +5598,9 @@ } }, "node_modules/pacote": { - "version": "13.6.1", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.1.tgz", - "integrity": "sha512-L+2BI1ougAPsFjXRyBhcKmfT016NscRFLv6Pz5EiNf1CCFJFU0pSKKQwsZTyAQB+sTuUL4TyFyp6J1Ork3dOqw==", + "version": "13.6.2", + "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.2.tgz", + "integrity": "sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg==", "inBundle": true, "dependencies": { "@npmcli/git": "^3.0.0", diff --git a/package.json b/package.json index 3641c1475..f95332f26 100644 --- a/package.json +++ b/package.json @@ -108,7 +108,7 @@ "npmlog": "^6.0.2", "opener": "^1.5.2", "p-map": "^4.0.0", - "pacote": "^13.6.1", + "pacote": "^13.6.2", "parse-conflict-json": "^2.0.2", "proc-log": "^2.0.1", "qrcode-terminal": "^0.12.0", |