@pnpm/crypto.shasums-file 1100.2.2 → 1100.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/lib/diskCache.d.ts +2 -0
- package/lib/diskCache.js +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @pnpm/crypto.shasums-file
|
|
2
2
|
|
|
3
|
+
## 1100.2.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Authenticate Node.js runtime downloads from `nodeDownloadMirrors` with URL-scoped npm registry credentials, including bearer tokens, basic auth, and `tokenHelper` [pnpm/pnpm#14334](https://github.com/pnpm/pnpm/issues/14334).
|
|
8
|
+
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- @pnpm/error@1100.1.4
|
|
11
|
+
|
|
3
12
|
## 1100.2.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/lib/diskCache.d.ts
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
* (their bodies were project-controllable before the cache existed), and
|
|
23
23
|
* the musl list's download URLs are derived from the hardcoded
|
|
24
24
|
* unofficial-builds base, never from the cached body.
|
|
25
|
+
* - Authenticated responses bypass this cache because the URL does not
|
|
26
|
+
* identify the credential context that produced the body.
|
|
25
27
|
*
|
|
26
28
|
* The `<trust>` path segment keeps the two classes in disjoint subtrees so
|
|
27
29
|
* their read policies cannot be confused.
|
package/lib/diskCache.js
CHANGED
|
@@ -25,6 +25,8 @@ import { threadId } from 'node:worker_threads';
|
|
|
25
25
|
* (their bodies were project-controllable before the cache existed), and
|
|
26
26
|
* the musl list's download URLs are derived from the hardcoded
|
|
27
27
|
* unofficial-builds base, never from the cached body.
|
|
28
|
+
* - Authenticated responses bypass this cache because the URL does not
|
|
29
|
+
* identify the credential context that produced the body.
|
|
28
30
|
*
|
|
29
31
|
* The `<trust>` path segment keeps the two classes in disjoint subtrees so
|
|
30
32
|
* their read policies cannot be confused.
|
package/lib/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare function fetchShasumsFile(fetch: FetchFromRegistry, shasumsUrl: s
|
|
|
16
16
|
export declare function fetchVerifiedNodeShasumsFile(fetch: FetchFromRegistry, shasumsUrl: string): Promise<ShasumsFileItem[]>;
|
|
17
17
|
export interface FetchShasumsFileCachedOpts {
|
|
18
18
|
cacheDir?: string;
|
|
19
|
+
skipCache?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export interface FetchVerifiedNodeShasumsFileCachedOpts extends FetchShasumsFileCachedOpts {
|
|
21
22
|
trustedKeys?: readonly ArmoredKey[];
|
package/lib/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export async function fetchVerifiedNodeShasumsFile(fetch, shasumsUrl) {
|
|
|
25
25
|
* the cache.
|
|
26
26
|
*/
|
|
27
27
|
export async function fetchVerifiedNodeShasumsFileCached(fetch, shasumsUrl, opts) {
|
|
28
|
-
const cacheOpts = { cacheDir: opts?.cacheDir, trust: 'verified' };
|
|
28
|
+
const cacheOpts = { cacheDir: opts?.skipCache === true ? undefined : opts?.cacheDir, trust: 'verified' };
|
|
29
29
|
const signatureUrl = `${shasumsUrl}.sig`;
|
|
30
30
|
const [cachedBody, cachedSignature] = await Promise.all([
|
|
31
31
|
readCachedShasums(shasumsUrl, cacheOpts),
|
|
@@ -50,7 +50,7 @@ export async function fetchVerifiedNodeShasumsFileCached(fetch, shasumsUrl, opts
|
|
|
50
50
|
* the cache.
|
|
51
51
|
*/
|
|
52
52
|
export async function fetchShasumsFileCached(fetch, shasumsUrl, opts) {
|
|
53
|
-
const cacheOpts = { cacheDir: opts?.cacheDir, trust: 'unverified' };
|
|
53
|
+
const cacheOpts = { cacheDir: opts?.skipCache === true ? undefined : opts?.cacheDir, trust: 'unverified' };
|
|
54
54
|
const cached = await readCachedShasums(shasumsUrl, cacheOpts);
|
|
55
55
|
if (cached != null)
|
|
56
56
|
return parseShasumsFile(cached);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/crypto.shasums-file",
|
|
3
|
-
"version": "1100.2.
|
|
3
|
+
"version": "1100.2.3",
|
|
4
4
|
"description": "Utils for working with shasums files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@pnpm/crypto.hash": "1100.0.3",
|
|
33
|
-
"@pnpm/error": "1100.1.
|
|
33
|
+
"@pnpm/error": "1100.1.4",
|
|
34
34
|
"@pnpm/fetching.types": "1100.0.3",
|
|
35
35
|
"openpgp": "^6.3.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@jest/globals": "30.4.1",
|
|
39
39
|
"@openpgp/web-stream-tools": "0.3.1",
|
|
40
|
-
"@pnpm/crypto.shasums-file": "1100.2.
|
|
40
|
+
"@pnpm/crypto.shasums-file": "1100.2.3"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=22.13"
|