Skip to content

Commit 4e08d71

Browse files
authored
1 parent 41d0f51 commit 4e08d71

File tree

7 files changed

+28
-19
lines changed

7 files changed

+28
-19
lines changed

node_modules/pacote/lib/bin.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,15 @@ const run = conf => {
1818
case 'tarball':
1919
if (!conf._[2] || conf._[2] === '-') {
2020
return pacote.tarball.stream(conf._[1], stream => {
21-
stream.pipe(conf.testStdout ||
22-
/* istanbul ignore next */ process.stdout)
21+
stream.pipe(
22+
conf.testStdout ||
23+
/* istanbul ignore next */
24+
process.stdout
25+
)
2326
// make sure it resolves something falsey
24-
return stream.promise().then(() => {})
27+
return stream.promise().then(() => {
28+
return false
29+
})
2530
}, conf)
2631
} else {
2732
return pacote.tarball.file(conf._[1], conf._[2], conf)

node_modules/pacote/lib/fetcher.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class FetcherBase {
254254
cstream.on('error', err => stream.emit('error', err))
255255
stream.pipe(cstream)
256256

257+
// eslint-disable-next-line promise/catch-or-return
257258
cstream.promise().catch(() => {}).then(() => middleStream.end())
258259
return middleStream
259260
}
@@ -269,7 +270,10 @@ class FetcherBase {
269270
}
270271

271272
// override the types getter
272-
get types () {}
273+
get types () {
274+
return false
275+
}
276+
273277
[_assertType] () {
274278
if (this.types && !this.types.includes(this.spec.type)) {
275279
throw new TypeError(`Wrong spec type (${

node_modules/pacote/lib/git.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class GitFetcher extends Fetcher {
239239
tarballOk = tarballOk &&
240240
h && resolved === repoUrl(h, { noCommittish: false }) && h.tarball
241241

242-
return cacache.tmp.withTmp(this.cache, o, tmp => {
242+
return cacache.tmp.withTmp(this.cache, o, async tmp => {
243243
// if we're resolved, and have a tarball url, shell out to RemoteFetcher
244244
if (tarballOk) {
245245
const nameat = this.spec.name ? `${this.spec.name}@` : ''
@@ -259,16 +259,15 @@ class GitFetcher extends Fetcher {
259259
})
260260
}
261261

262-
return (
262+
const sha = await (
263263
h ? this[_cloneHosted](ref, tmp)
264264
: this[_cloneRepo](this.spec.fetchSpec, ref, tmp)
265-
).then(sha => {
266-
this.resolvedSha = sha
267-
if (!this.resolved) {
268-
this[_addGitSha](sha)
269-
}
270-
})
271-
.then(() => handler(tmp))
265+
)
266+
this.resolvedSha = sha
267+
if (!this.resolved) {
268+
await this[_addGitSha](sha)
269+
}
270+
return handler(tmp)
272271
})
273272
}
274273

node_modules/pacote/lib/remote.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class RemoteFetcher extends Fetcher {
4141
algorithms: [this.pickIntegrityAlgorithm()],
4242
}
4343

44+
// eslint-disable-next-line promise/always-return
4445
fetch(this.resolved, fetchOpts).then(res => {
4546
res.body.on('error',
4647
/* istanbul ignore next - exceedingly rare and hard to simulate */

node_modules/pacote/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pacote",
3-
"version": "13.6.1",
3+
"version": "13.6.2",
44
"description": "JavaScript package downloader",
55
"author": "GitHub Inc.",
66
"bin": {

package-lock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"npmlog": "^6.0.2",
141141
"opener": "^1.5.2",
142142
"p-map": "^4.0.0",
143-
"pacote": "^13.6.1",
143+
"pacote": "^13.6.2",
144144
"parse-conflict-json": "^2.0.2",
145145
"proc-log": "^2.0.1",
146146
"qrcode-terminal": "^0.12.0",
@@ -5598,9 +5598,9 @@
55985598
}
55995599
},
56005600
"node_modules/pacote": {
5601-
"version": "13.6.1",
5602-
"resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.1.tgz",
5603-
"integrity": "sha512-L+2BI1ougAPsFjXRyBhcKmfT016NscRFLv6Pz5EiNf1CCFJFU0pSKKQwsZTyAQB+sTuUL4TyFyp6J1Ork3dOqw==",
5601+
"version": "13.6.2",
5602+
"resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.2.tgz",
5603+
"integrity": "sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg==",
56045604
"inBundle": true,
56055605
"dependencies": {
56065606
"@npmcli/git": "^3.0.0",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"npmlog": "^6.0.2",
109109
"opener": "^1.5.2",
110110
"p-map": "^4.0.0",
111-
"pacote": "^13.6.1",
111+
"pacote": "^13.6.2",
112112
"parse-conflict-json": "^2.0.2",
113113
"proc-log": "^2.0.1",
114114
"qrcode-terminal": "^0.12.0",

0 commit comments

Comments
 (0)