Skip to content

Commit 8710ff8

Browse files
committedJun 19, 2023
deps: pacote@15.2.0
1 parent 0cb539d commit 8710ff8

File tree

6 files changed

+16
-9
lines changed

6 files changed

+16
-9
lines changed
 

‎node_modules/pacote/lib/fetcher.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ class FetcherBase {
6161
// by adding/modifying the integrity value.
6262
this.opts = { ...opts }
6363

64-
this.cache = opts.cache || cacheDir()
64+
this.cache = opts.cache || cacheDir().cacache
65+
this.tufCache = opts.tufCache || cacheDir().tufcache
6566
this.resolved = opts.resolved || null
6667

6768
// default to caching/verifying with sha512, that's what we usually have

‎node_modules/pacote/lib/registry.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,10 @@ class RegistryFetcher extends Fetcher {
295295
//
296296
// Publish attestations are signed with a keyid so we need to
297297
// specify a public key from the keys endpoint: `registry-host.tld/-/npm/v1/keys`
298-
const options = { keySelector: publicKey ? () => publicKey.pemkey : undefined }
298+
const options = {
299+
tufCachePath: this.tufCache,
300+
keySelector: publicKey ? () => publicKey.pemkey : undefined,
301+
}
299302
await sigstore.verify(bundle, null, options)
300303
} catch (e) {
301304
throw Object.assign(new Error(

‎node_modules/pacote/lib/util/cache-dir.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ module.exports = (fakePlatform = false) => {
88
const platform = fakePlatform || process.platform
99
const cacheExtra = platform === 'win32' ? 'npm-cache' : '.npm'
1010
const cacheRoot = (platform === 'win32' && process.env.LOCALAPPDATA) || home
11-
return resolve(cacheRoot, cacheExtra, '_cacache')
11+
return {
12+
cacache: resolve(cacheRoot, cacheExtra, '_cacache'),
13+
tufcache: resolve(cacheRoot, cacheExtra, '_tuf'),
14+
}
1215
}

‎node_modules/pacote/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pacote",
3-
"version": "15.1.3",
3+
"version": "15.2.0",
44
"description": "JavaScript package downloader",
55
"author": "GitHub Inc.",
66
"bin": {

‎package-lock.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"npm-user-validate": "^2.0.0",
135135
"npmlog": "^7.0.1",
136136
"p-map": "^4.0.0",
137-
"pacote": "^15.1.3",
137+
"pacote": "^15.2.0",
138138
"parse-conflict-json": "^3.0.1",
139139
"proc-log": "^3.0.0",
140140
"qrcode-terminal": "^0.12.0",
@@ -10098,9 +10098,9 @@
1009810098
}
1009910099
},
1010010100
"node_modules/pacote": {
10101-
"version": "15.1.3",
10102-
"resolved": "https://registry.npmjs.org/pacote/-/pacote-15.1.3.tgz",
10103-
"integrity": "sha512-aRts8cZqxiJVDitmAh+3z+FxuO3tLNWEmwDRPEpDDiZJaRz06clP4XX112ynMT5uF0QNoMPajBBHnaStUEPJXA==",
10101+
"version": "15.2.0",
10102+
"resolved": "https://registry.npmjs.org/pacote/-/pacote-15.2.0.tgz",
10103+
"integrity": "sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA==",
1010410104
"inBundle": true,
1010510105
"dependencies": {
1010610106
"@npmcli/git": "^4.0.0",

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"npm-user-validate": "^2.0.0",
102102
"npmlog": "^7.0.1",
103103
"p-map": "^4.0.0",
104-
"pacote": "^15.1.3",
104+
"pacote": "^15.2.0",
105105
"parse-conflict-json": "^3.0.1",
106106
"proc-log": "^3.0.0",
107107
"qrcode-terminal": "^0.12.0",

0 commit comments

Comments
 (0)
Please sign in to comment.