@pnpm/installing.deps-installer 1101.8.0 → 1101.9.0
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.
|
@@ -8,10 +8,10 @@ import { recordVerification, tryLockfileVerificationCache, } from './verifyLockf
|
|
|
8
8
|
// (e.g. a poisoned lockfile) doesn't flood the terminal / CI log; the full
|
|
9
9
|
// count is in the header and the remainder is summarized at the end.
|
|
10
10
|
const MAX_VIOLATIONS_TO_PRINT = 20;
|
|
11
|
-
//
|
|
12
|
-
// (Math.min(
|
|
11
|
+
// 64 mirrors the floor of pnpm's package-requester network-concurrency
|
|
12
|
+
// (Math.min(96, Math.max(workers*3, 64))); keep them aligned so the
|
|
13
13
|
// verification pass doesn't push past what the rest of the install respects.
|
|
14
|
-
const DEFAULT_CONCURRENCY =
|
|
14
|
+
const DEFAULT_CONCURRENCY = 64;
|
|
15
15
|
export const RESOLUTION_SHAPE_MISMATCH_VIOLATION_CODE = 'RESOLUTION_SHAPE_MISMATCH';
|
|
16
16
|
const RESOLUTION_SHAPE_CACHE_IDENTITY = {
|
|
17
17
|
policy: { resolutionShapeCheck: true },
|
|
@@ -80,14 +80,27 @@ export async function verifyLockfileResolutions(lockfile, verifiers, options) {
|
|
|
80
80
|
verifiers: cacheVerifiers,
|
|
81
81
|
hashLockfile,
|
|
82
82
|
});
|
|
83
|
-
if (result.hit)
|
|
83
|
+
if (result.hit) {
|
|
84
|
+
// A silent short-circuit looks like the policy gate never ran
|
|
85
|
+
// (pnpm/pnpm#12324), so surface the reused verdict — but only
|
|
86
|
+
// when policy verifiers are active; the shape-only run that
|
|
87
|
+
// every install performs stays quiet.
|
|
88
|
+
if (verifiers.length > 0) {
|
|
89
|
+
lockfileVerificationLogger.debug({
|
|
90
|
+
status: 'cached',
|
|
91
|
+
verifiedAt: result.verifiedAt,
|
|
92
|
+
lockfilePath: options?.lockfilePath,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
84
95
|
return;
|
|
96
|
+
}
|
|
85
97
|
cachePrecomputed = result.precomputed;
|
|
86
98
|
}
|
|
87
99
|
// Emit started/done around the actual verification pass — the
|
|
88
100
|
// round-trip can be slow on a cold registry cache, and the cached
|
|
89
|
-
// short-circuit above
|
|
90
|
-
// sees these messages on installs that are doing
|
|
101
|
+
// short-circuit above announces itself with its own `cached` event,
|
|
102
|
+
// so a user only sees these messages on installs that are doing
|
|
103
|
+
// real work.
|
|
91
104
|
// A degenerate lockfile where every snapshot fails the
|
|
92
105
|
// name/version extraction (so candidates is empty) skips emission
|
|
93
106
|
// entirely — no work, no noise.
|
|
@@ -9,6 +9,13 @@ import type { ResolutionVerifier } from '@pnpm/resolving.resolver-base';
|
|
|
9
9
|
export type VerifierCacheIdentity = Pick<ResolutionVerifier, 'policy' | 'canTrustPastCheck'>;
|
|
10
10
|
export interface CacheLookupResult {
|
|
11
11
|
hit: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* ISO-8601 timestamp of the verification run the hit is reusing.
|
|
14
|
+
* Set only on a hit, and only when the record carries a usable
|
|
15
|
+
* timestamp (records written before the field existed normalize to
|
|
16
|
+
* an empty string and surface as `undefined` here).
|
|
17
|
+
*/
|
|
18
|
+
verifiedAt?: string;
|
|
12
19
|
/**
|
|
13
20
|
* stat + hash already computed during the lookup. When the caller
|
|
14
21
|
* follows up with {@link recordVerification} after running the gate,
|
|
@@ -159,8 +159,10 @@ export function tryLockfileVerificationCache(cacheDir, key) {
|
|
|
159
159
|
// hash without reading the file. Microseconds.
|
|
160
160
|
const byPathRecord = indexes.byPath.get(key.lockfilePath);
|
|
161
161
|
if (byPathRecord && statMatches(stat, byPathRecord.lockfile)) {
|
|
162
|
+
const hit = everyVerifierTrustsCachedRun(byPathRecord, key.verifiers);
|
|
162
163
|
return {
|
|
163
|
-
hit
|
|
164
|
+
hit,
|
|
165
|
+
verifiedAt: hit ? byPathRecord.verifiedAt || undefined : undefined,
|
|
164
166
|
// The stat-match implies the file content is unchanged since the
|
|
165
167
|
// cached record was written, so its hash is still correct. Pass
|
|
166
168
|
// it through to skip hashing on the miss-then-record path.
|
|
@@ -190,7 +192,7 @@ export function tryLockfileVerificationCache(cacheDir, key) {
|
|
|
190
192
|
...byHashRecord,
|
|
191
193
|
lockfile: { ...byHashRecord.lockfile, path: key.lockfilePath, size: stat.size, mtimeNs: stat.mtimeNs, inode: stat.inode },
|
|
192
194
|
});
|
|
193
|
-
return { hit: true, precomputed: { stat, hash } };
|
|
195
|
+
return { hit: true, verifiedAt: byHashRecord.verifiedAt || undefined, precomputed: { stat, hash } };
|
|
194
196
|
}
|
|
195
197
|
function everyVerifierTrustsCachedRun(record, verifiers) {
|
|
196
198
|
for (const verifier of verifiers) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.deps-installer",
|
|
3
|
-
"version": "1101.
|
|
3
|
+
"version": "1101.9.0",
|
|
4
4
|
"description": "Fast, disk space efficient installation engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -65,61 +65,61 @@
|
|
|
65
65
|
"ramda": "npm:@pnpm/ramda@0.28.1",
|
|
66
66
|
"run-groups": "^5.0.0",
|
|
67
67
|
"semver": "^7.8.1",
|
|
68
|
-
"@pnpm/bins.linker": "1100.0.
|
|
69
|
-
"@pnpm/building.after-install": "1101.0.
|
|
70
|
-
"@pnpm/
|
|
71
|
-
"@pnpm/building.during-install": "1101.0.17",
|
|
68
|
+
"@pnpm/bins.linker": "1100.0.13",
|
|
69
|
+
"@pnpm/building.after-install": "1101.0.21",
|
|
70
|
+
"@pnpm/building.during-install": "1101.0.18",
|
|
72
71
|
"@pnpm/building.policy": "1100.0.9",
|
|
73
|
-
"@pnpm/catalogs.types": "1100.0.0",
|
|
74
72
|
"@pnpm/catalogs.resolver": "1100.0.0",
|
|
75
|
-
"@pnpm/
|
|
76
|
-
"@pnpm/
|
|
77
|
-
"@pnpm/
|
|
73
|
+
"@pnpm/catalogs.types": "1100.0.0",
|
|
74
|
+
"@pnpm/catalogs.protocol-parser": "1100.0.0",
|
|
75
|
+
"@pnpm/config.parse-overrides": "1100.0.1",
|
|
78
76
|
"@pnpm/constants": "1100.0.0",
|
|
79
|
-
"@pnpm/
|
|
77
|
+
"@pnpm/config.matcher": "1100.0.1",
|
|
78
|
+
"@pnpm/config.normalize-registries": "1100.0.7",
|
|
79
|
+
"@pnpm/core-loggers": "1100.2.0",
|
|
80
80
|
"@pnpm/deps.graph-hasher": "1100.2.4",
|
|
81
|
-
"@pnpm/crypto.
|
|
81
|
+
"@pnpm/crypto.hash": "1100.0.1",
|
|
82
82
|
"@pnpm/deps.graph-sequencer": "1100.0.0",
|
|
83
|
-
"@pnpm/config.parse-overrides": "1100.0.1",
|
|
84
83
|
"@pnpm/error": "1100.0.0",
|
|
85
|
-
"@pnpm/
|
|
86
|
-
"@pnpm/exec.lifecycle": "1100.0.
|
|
87
|
-
"@pnpm/fs.symlink-dependency": "1100.0.
|
|
84
|
+
"@pnpm/deps.path": "1100.0.7",
|
|
85
|
+
"@pnpm/exec.lifecycle": "1100.0.17",
|
|
86
|
+
"@pnpm/fs.symlink-dependency": "1100.0.9",
|
|
87
|
+
"@pnpm/crypto.object-hasher": "1100.0.0",
|
|
88
88
|
"@pnpm/hooks.read-package-hook": "1100.0.7",
|
|
89
|
-
"@pnpm/installing.deps-restorer": "1101.1.10",
|
|
90
89
|
"@pnpm/hooks.types": "1100.0.11",
|
|
91
|
-
"@pnpm/installing.
|
|
92
|
-
"@pnpm/
|
|
93
|
-
"@pnpm/installing.
|
|
94
|
-
"@pnpm/
|
|
95
|
-
"@pnpm/installing.
|
|
96
|
-
"@pnpm/installing.linking.
|
|
97
|
-
"@pnpm/
|
|
90
|
+
"@pnpm/installing.deps-resolver": "1100.2.2",
|
|
91
|
+
"@pnpm/bins.remover": "1100.0.9",
|
|
92
|
+
"@pnpm/installing.context": "1100.0.17",
|
|
93
|
+
"@pnpm/installing.linking.hoist": "1100.0.13",
|
|
94
|
+
"@pnpm/installing.deps-restorer": "1101.1.11",
|
|
95
|
+
"@pnpm/installing.linking.modules-cleaner": "1100.1.7",
|
|
96
|
+
"@pnpm/installing.linking.direct-dep-linker": "1100.0.9",
|
|
98
97
|
"@pnpm/installing.modules-yaml": "1100.0.8",
|
|
98
|
+
"@pnpm/lockfile.filtering": "1100.1.6",
|
|
99
99
|
"@pnpm/lockfile.fs": "1100.1.4",
|
|
100
|
-
"@pnpm/installing.package-requester": "1101.0
|
|
101
|
-
"@pnpm/lockfile.
|
|
102
|
-
"@pnpm/
|
|
103
|
-
"@pnpm/lockfile.
|
|
104
|
-
"@pnpm/lockfile.filtering": "1100.1.5",
|
|
100
|
+
"@pnpm/installing.package-requester": "1101.1.0",
|
|
101
|
+
"@pnpm/lockfile.preferred-versions": "1100.0.15",
|
|
102
|
+
"@pnpm/fs.read-modules-dir": "1100.0.1",
|
|
103
|
+
"@pnpm/lockfile.settings-checker": "1100.0.17",
|
|
105
104
|
"@pnpm/lockfile.to-pnp": "1100.0.13",
|
|
106
|
-
"@pnpm/lockfile.
|
|
105
|
+
"@pnpm/lockfile.pruner": "1100.0.10",
|
|
107
106
|
"@pnpm/lockfile.utils": "1100.0.12",
|
|
108
107
|
"@pnpm/lockfile.walker": "1100.0.10",
|
|
109
108
|
"@pnpm/network.auth-header": "1101.1.1",
|
|
110
|
-
"@pnpm/
|
|
111
|
-
"@pnpm/pkg-manifest.utils": "1100.2.3",
|
|
109
|
+
"@pnpm/lockfile.verification": "1100.0.17",
|
|
112
110
|
"@pnpm/patching.config": "1100.0.7",
|
|
113
111
|
"@pnpm/pnpr.client": "1.2.0",
|
|
114
|
-
"@pnpm/
|
|
112
|
+
"@pnpm/pkg-manifest.utils": "1100.2.4",
|
|
115
113
|
"@pnpm/store.controller-types": "1100.1.4",
|
|
116
|
-
"@pnpm/workspace.project-manifest-reader": "1100.0.11",
|
|
117
114
|
"@pnpm/store.index": "1100.1.0",
|
|
118
|
-
"@pnpm/
|
|
115
|
+
"@pnpm/resolving.resolver-base": "1100.4.1",
|
|
116
|
+
"@pnpm/types": "1101.3.1",
|
|
117
|
+
"@pnpm/resolving.parse-wanted-dependency": "1100.0.1",
|
|
118
|
+
"@pnpm/workspace.project-manifest-reader": "1100.0.12"
|
|
119
119
|
},
|
|
120
120
|
"peerDependencies": {
|
|
121
121
|
"@pnpm/logger": "^1001.0.1",
|
|
122
|
-
"@pnpm/worker": "^1100.1.
|
|
122
|
+
"@pnpm/worker": "^1100.1.11"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
125
|
"@jest/globals": "30.3.0",
|
|
@@ -141,22 +141,22 @@
|
|
|
141
141
|
"symlink-dir": "^10.0.1",
|
|
142
142
|
"write-json-file": "^7.0.0",
|
|
143
143
|
"write-yaml-file": "^6.0.0",
|
|
144
|
-
"@pnpm/assert-project": "1100.0.
|
|
145
|
-
"@pnpm/
|
|
146
|
-
"@pnpm/installing.deps-installer": "1101.
|
|
147
|
-
"@pnpm/assert-store": "1100.0.14",
|
|
148
|
-
"@pnpm/network.git-utils": "1100.0.1",
|
|
144
|
+
"@pnpm/assert-project": "1100.0.15",
|
|
145
|
+
"@pnpm/assert-store": "1100.0.15",
|
|
146
|
+
"@pnpm/installing.deps-installer": "1101.9.0",
|
|
149
147
|
"@pnpm/logger": "1100.0.0",
|
|
150
|
-
"@pnpm/
|
|
148
|
+
"@pnpm/network.git-utils": "1100.0.1",
|
|
149
|
+
"@pnpm/lockfile.types": "1100.0.10",
|
|
151
150
|
"@pnpm/resolving.registry.types": "1100.1.2",
|
|
152
|
-
"@pnpm/
|
|
153
|
-
"@pnpm/test-fixtures": "1100.0.0",
|
|
151
|
+
"@pnpm/pkg-manifest.reader": "1100.0.7",
|
|
154
152
|
"@pnpm/store.cafs": "1100.1.9",
|
|
155
|
-
"@pnpm/testing.mock-agent": "1101.0.1",
|
|
156
|
-
"@pnpm/test-ipc-server": "1100.0.0",
|
|
157
153
|
"@pnpm/store.path": "1100.0.1",
|
|
158
|
-
"@pnpm/
|
|
159
|
-
"@pnpm/
|
|
154
|
+
"@pnpm/prepare": "1100.0.15",
|
|
155
|
+
"@pnpm/test-ipc-server": "1100.0.0",
|
|
156
|
+
"@pnpm/test-fixtures": "1100.0.0",
|
|
157
|
+
"@pnpm/testing.mock-agent": "1101.0.2",
|
|
158
|
+
"@pnpm/testing.temp-store": "1100.1.8",
|
|
159
|
+
"@pnpm/testing.registry-mock": "1100.0.5"
|
|
160
160
|
},
|
|
161
161
|
"engines": {
|
|
162
162
|
"node": ">=22.13"
|