@pnpm/fetching.tarball-fetcher 1102.0.1 → 1102.0.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/lib/index.js +11 -1
- package/package.json +14 -14
package/lib/index.js
CHANGED
|
@@ -21,6 +21,10 @@ export function createTarballFetcher(fetchFromRegistry, getAuthHeader, opts) {
|
|
|
21
21
|
offline: opts.offline,
|
|
22
22
|
storeIndex: opts.storeIndex,
|
|
23
23
|
});
|
|
24
|
+
// Missing integrity is the only remote-tarball case that must fetch before store reuse.
|
|
25
|
+
remoteTarballFetcher.resolutionNeedsFetch = (resolution) => {
|
|
26
|
+
return getExpectedIntegrity(resolution) == null;
|
|
27
|
+
};
|
|
24
28
|
return {
|
|
25
29
|
localTarball: createLocalTarballFetcher(opts.storeIndex),
|
|
26
30
|
remoteTarball: remoteTarballFetcher,
|
|
@@ -35,7 +39,7 @@ async function fetchFromTarball(ctx, cafs, resolution, opts) {
|
|
|
35
39
|
getAuthHeaderByURI: ctx.getAuthHeaderByURI,
|
|
36
40
|
cafs,
|
|
37
41
|
storeIndex: ctx.storeIndex,
|
|
38
|
-
integrity: resolution
|
|
42
|
+
integrity: getExpectedIntegrity(resolution),
|
|
39
43
|
readManifest: opts.readManifest,
|
|
40
44
|
onProgress: opts.onProgress,
|
|
41
45
|
onStart: opts.onStart,
|
|
@@ -46,4 +50,10 @@ async function fetchFromTarball(ctx, cafs, resolution, opts) {
|
|
|
46
50
|
ignoreFilePattern: opts.ignoreFilePattern,
|
|
47
51
|
});
|
|
48
52
|
}
|
|
53
|
+
function getExpectedIntegrity(resolution) {
|
|
54
|
+
const integrity = resolution.integrity;
|
|
55
|
+
return typeof integrity === 'string' && integrity.length > 0
|
|
56
|
+
? integrity
|
|
57
|
+
: undefined;
|
|
58
|
+
}
|
|
49
59
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/fetching.tarball-fetcher",
|
|
3
|
-
"version": "1102.0.
|
|
3
|
+
"version": "1102.0.3",
|
|
4
4
|
"description": "Fetcher for packages hosted as tarballs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"funding": "https://opencollective.com/pnpm",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "https://github.com/pnpm/pnpm/tree/main/fetching/tarball-fetcher"
|
|
15
|
+
"url": "https://github.com/pnpm/pnpm/tree/main/pnpm11/fetching/tarball-fetcher"
|
|
16
16
|
},
|
|
17
|
-
"homepage": "https://github.com/pnpm/pnpm/tree/main/fetching/tarball-fetcher#readme",
|
|
17
|
+
"homepage": "https://github.com/pnpm/pnpm/tree/main/pnpm11/fetching/tarball-fetcher#readme",
|
|
18
18
|
"bugs": {
|
|
19
19
|
"url": "https://github.com/pnpm/pnpm/issues"
|
|
20
20
|
},
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"lodash.throttle": "4.1.1",
|
|
34
34
|
"p-map-values": "^0.1.0",
|
|
35
35
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
36
|
-
"@pnpm/error": "1100.0.0",
|
|
37
36
|
"@pnpm/core-loggers": "1100.2.1",
|
|
38
|
-
"@pnpm/
|
|
37
|
+
"@pnpm/error": "1100.0.1",
|
|
38
|
+
"@pnpm/exec.prepare-package": "1100.0.21",
|
|
39
|
+
"@pnpm/fetching.fetcher-base": "1100.2.1",
|
|
39
40
|
"@pnpm/fetching.types": "1100.0.2",
|
|
40
|
-
"@pnpm/fs.graceful-fs": "1100.1.0",
|
|
41
41
|
"@pnpm/fs.packlist": "1100.0.1",
|
|
42
|
-
"@pnpm/
|
|
43
|
-
"@pnpm/
|
|
44
|
-
"@pnpm/
|
|
42
|
+
"@pnpm/store.index": "1100.2.1",
|
|
43
|
+
"@pnpm/fs.graceful-fs": "1100.1.0",
|
|
44
|
+
"@pnpm/types": "1101.3.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@pnpm/logger": "^1100.0.0",
|
|
48
|
-
"@pnpm/worker": "^1100.2.
|
|
48
|
+
"@pnpm/worker": "^1100.2.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@jest/globals": "30.4.1",
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"ssri": "13.0.1",
|
|
58
58
|
"tempy": "3.0.0",
|
|
59
59
|
"undici": "^7.27.2",
|
|
60
|
+
"@pnpm/fetching.tarball-fetcher": "1102.0.3",
|
|
60
61
|
"@pnpm/logger": "1100.0.0",
|
|
61
|
-
"@pnpm/
|
|
62
|
-
"@pnpm/test-fixtures": "1100.0.0",
|
|
63
|
-
"@pnpm/network.fetch": "1100.1.3",
|
|
64
|
-
"@pnpm/store.create-cafs-store": "1100.0.15",
|
|
62
|
+
"@pnpm/network.fetch": "1100.1.4",
|
|
65
63
|
"@pnpm/types": "1101.3.2",
|
|
64
|
+
"@pnpm/test-fixtures": "1100.0.0",
|
|
65
|
+
"@pnpm/store.create-cafs-store": "1100.0.17",
|
|
66
66
|
"@pnpm/store.cafs-types": "1100.0.1"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|