@pnpm/resolving.resolver-base 1100.5.1 → 1100.5.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 +772 -0
- package/package.json +3 -3
- package/lib/index.d.ts +0 -296
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,772 @@
|
|
|
1
|
+
# @pnpm/resolver-base
|
|
2
|
+
|
|
3
|
+
## 1100.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies:
|
|
8
|
+
- @pnpm/types@1101.5.0
|
|
9
|
+
|
|
10
|
+
## 1100.5.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies:
|
|
15
|
+
- @pnpm/types@1101.4.0
|
|
16
|
+
|
|
17
|
+
## 1100.5.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- dcabb78: Fixed `pnpm up <pkg>` producing a different result than a fresh install of the same manifests would. The resolver now distinguishes `updateRequested` (true only for packages that match the user's update target) from the broader `update` flag, and for the targeted package ignores only its own lockfile-derived preferred-version pins — so the target re-resolves exactly as if its lockfile entries were deleted and `pnpm install` ran. Preferred versions a fresh install applies (manifest pins, versions propagated down the dependency chain, and the vulnerability-avoidance penalties of `pnpm audit --fix`) stay in effect, so an update never installs duplicate versions that a reinstall from scratch would not reproduce. When a preferred version holds the update target below the newest version its range admits, pnpm now prints a warning explaining that reaching the newer version everywhere requires an override.
|
|
22
|
+
|
|
23
|
+
## 1100.5.0
|
|
24
|
+
|
|
25
|
+
### Minor Changes
|
|
26
|
+
|
|
27
|
+
- bae694f: Some registries generate tarballs on-demand and cannot provide an integrity checksum in their package metadata. In that case pnpm now computes the integrity from the downloaded tarball and stores it in the lockfile, so the entry is verifiable on subsequent installs instead of being written without an integrity (which would fail the next install). This also applies to `--lockfile-only`: the tarball is downloaded so its integrity can be computed. A lockfile entry that is still missing its integrity is rejected as a `ERR_PNPM_MISSING_TARBALL_INTEGRITY` lockfile verification violation (the install fails closed) rather than being silently re-fetched.
|
|
28
|
+
|
|
29
|
+
## 1100.4.2
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies [681b593]
|
|
34
|
+
- @pnpm/types@1101.3.2
|
|
35
|
+
|
|
36
|
+
## 1100.4.1
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [bf1b731]
|
|
41
|
+
- @pnpm/types@1101.3.1
|
|
42
|
+
|
|
43
|
+
## 1100.4.0
|
|
44
|
+
|
|
45
|
+
### Minor Changes
|
|
46
|
+
|
|
47
|
+
- 6d17b66: The lockfile verifier now checks that a registry entry pinning an explicit `tarball` URL points at the artifact the registry's own metadata lists for that `name@version`. Previously a tampered lockfile could pair a trusted `name@version` with an attacker-chosen tarball URL (and a matching integrity for those bytes), so the install fetched the attacker's bytes. A mismatch — or any entry that can't be confirmed against the registry — is rejected with `ERR_PNPM_TARBALL_URL_MISMATCH`. Non-registry resolutions (`file:`, git-hosted, etc.) and registry entries without an explicit tarball URL (the URL is reconstructed from name+version+registry, so it is inherently bound) are unaffected; non-standard registry tarball URLs (npm Enterprise, GitHub Packages) still pass because they match the metadata.
|
|
48
|
+
|
|
49
|
+
This binding is unconditional — it runs regardless of `minimumReleaseAge`/`trustPolicy` and is not narrowed by their exclude lists, since it guards integrity rather than maturity/trust. It is **fail-closed**: an entry passes only when the registry metadata affirmatively lists the version with a matching tarball URL. If the metadata can't be fetched, doesn't list the version, or omits `dist.tarball`, the entry is rejected. As a result, an install that re-verifies a lockfile (any install whose lockfile content changed since the last verified run, where the verification cache no longer applies) now requires the configured registry to be reachable. `trustLockfile` is the opt-out for environments that treat the on-disk lockfile as already trusted.
|
|
50
|
+
|
|
51
|
+
The `minimumReleaseAge`/`trustPolicy` verification also no longer applies to URL-keyed tarball dependencies (e.g. `https:` tarballs) that carry a semver `version` copied from their manifest — those are deliberate non-registry dependencies.
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies [a017bf3]
|
|
56
|
+
- @pnpm/types@1101.3.0
|
|
57
|
+
|
|
58
|
+
## 1100.3.1
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [35d2355]
|
|
63
|
+
- @pnpm/types@1101.2.0
|
|
64
|
+
|
|
65
|
+
## 1100.3.0
|
|
66
|
+
|
|
67
|
+
### Minor Changes
|
|
68
|
+
|
|
69
|
+
- 1627943: `pnpm outdated` and `pnpm update --interactive` now report Node.js, Deno, and Bun runtimes installed as project dependencies (`runtime:` specifiers). Previously these were silently skipped because the npm specifier parser did not understand the `runtime:` protocol, so runtime versions never appeared in the outdated table or the interactive update picker.
|
|
70
|
+
|
|
71
|
+
Internally, the outdated check is now resolver-driven: `@pnpm/resolving.resolver-base` defines a `ResolveLatestFunction` shape (with `LatestQuery` input — `{ wantedDependency, compatible? }` — and `LatestInfo` result — `{ latestManifest? }`), and every protocol resolver (npm, jsr, named-registry, git, tarball, local, node/bun/deno runtimes) exports its own `resolveLatest*` function alongside its `resolve*`. `@pnpm/resolving.default-resolver` composes them into a single dispatcher, exposed through `@pnpm/installing.client` as `createResolver(...).resolveLatest`.
|
|
72
|
+
|
|
73
|
+
Each resolver decides whether it owns the dep and what "latest" means for its protocol; the outdated command derives `current` / `wanted` display values from the lockfile snapshot (`pkgSnapshot.version` for semver protocols, raw ref for URL-shaped ones) and uses raw ref equality for the "lockfile changed" check, so protocol knowledge stays inside each resolver instead of the command.
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Updated dependencies [64afc92]
|
|
78
|
+
- @pnpm/types@1101.1.1
|
|
79
|
+
|
|
80
|
+
## 1100.2.0
|
|
81
|
+
|
|
82
|
+
### Minor Changes
|
|
83
|
+
|
|
84
|
+
- 4195766: Tightened the `minimumReleaseAge` story so the bypass becomes explicit on disk instead of silent, and removed the discover-by-loop dance for strict-mode users:
|
|
85
|
+
|
|
86
|
+
1. Fresh resolutions in loose mode (`minimumReleaseAgeStrict: false`) that fall back to a version newer than the cutoff auto-collect the picked `name@version` into the workspace manifest's `minimumReleaseAgeExclude`. A single info message lists the additions; entries already on the list are left alone.
|
|
87
|
+
2. The post-resolution lockfile verifier introduced in #11583 now runs in loose mode too — every accepted-immature pin must be on `minimumReleaseAgeExclude`, just like strict mode requires. A lockfile produced under a weaker (or absent) policy that still has immature entries is rejected the same way strict mode would reject it.
|
|
88
|
+
3. **Strict mode (interactive)** no longer aborts on the first immature pick. The resolver gathers every immature direct _and_ transitive in one pass; before peer-dependency resolution runs, pnpm prompts the user with the full list and asks whether to add them all to `minimumReleaseAgeExclude` and proceed. Approve → install continues and the workspace manifest is written at the end. Decline → resolution aborts before the lockfile or package.json is touched (tarballs already in the store stay, since the store is idempotent). This closes the [#10488](https://github.com/pnpm/pnpm/issues/10488) loop where security bumps to packages with platform-specific transitives (e.g. `next` + the `@next/swc-*` shims) made users re-run `pnpm add` once per transitive.
|
|
89
|
+
4. **Strict mode (non-interactive / CI)** now aborts with the full immature set in the error message instead of the first pick. The resolver always collects every immature direct + transitive; the install command then throws `ERR_PNPM_NO_MATURE_MATCHING_VERSION` listing each entry's `name@version` and publish time. Deterministic CI behavior is preserved (same exit code, same error code), but the error pinpoints every offending entry instead of forcing the discover-by-loop dance. The expected workflow is interactive approval locally → the lockfile + workspace manifest get committed → CI runs cleanly against the populated exclude list.
|
|
90
|
+
|
|
91
|
+
5. **The lockfile verifier now also covers `trustPolicy: 'no-downgrade'`.** The same post-resolution gate that re-checks `minimumReleaseAge` on lockfile entries now re-runs `failIfTrustDowngraded` for every npm-registry entry whose name isn't on `trustPolicyExclude`. The two checks share a single full-metadata fetch per package, so the extra coverage doesn't cost an extra round trip when both policies are active. Resolver-time trust checks still run as before — this just closes the gap when an entry bypasses resolution (peek path, `--frozen-lockfile`, restored CI cache).
|
|
92
|
+
|
|
93
|
+
Pacquet parity: not ported — pacquet's `minimumReleaseAge` policy is itself only stubbed today (see `pnpm/crates/package-manager/src/version_policy.rs`). The auto-exclude, loose-mode verifier, prompt, and the new trust-policy verifier check will travel with the broader policy port whenever that happens.
|
|
94
|
+
|
|
95
|
+
- 31538bf: Restructured the `minimumReleaseAge` lockfile revalidation gate around a generic `ResolutionVerifier` interface. Each resolver may now export a sibling verifier factory (today: `createNpmResolutionVerifier`) that re-checks an already-resolved lockfile entry against its policies; the resolver chain returns the verifier list as `resolutionVerifiers` and the install side fans out across it. A `ResolutionVerifier` carries `verify` plus `policy` and `canTrustPastCheck` — the cache contract that lets repeat installs against an unchanged lockfile skip the per-package registry round trip entirely.
|
|
96
|
+
|
|
97
|
+
Verification results are memoized in JSON Lines at `<cacheDir>/lockfile-verified.jsonl`: a stat-only fast path matches on lockfile size, mtime, and inode, falling back to a content hash when those drift (typical after a CI checkout). Every active verifier's policy contribution is merged into a single `policy` bag on the record; the gate runs in full whenever the lockfile changes, any verifier rejects the cached policy, or no record exists [#11687](https://github.com/pnpm/pnpm/issues/11687).
|
|
98
|
+
|
|
99
|
+
## 1100.1.3
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- Updated dependencies [b61e268]
|
|
104
|
+
- @pnpm/types@1101.1.0
|
|
105
|
+
|
|
106
|
+
## 1100.1.2
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- 27425d7: Pin the integrity of git-hosted tarballs (codeload.github.com, gitlab.com, bitbucket.org) in the lockfile so that subsequent installs detect a tampered or substituted tarball and refuse to install it. Previously the lockfile only stored the tarball URL for git dependencies, so a compromised git host or a man-in-the-middle could serve arbitrary code on later installs without lockfile changes.
|
|
111
|
+
|
|
112
|
+
A new `gitHosted: true` field is recorded on git-hosted tarball resolutions in the lockfile, letting every reader/writer route them by a single typed check instead of pattern-matching the tarball URL in each call site. Lockfiles written by older pnpm versions are enriched on load (URL fallback) so the field can be relied on uniformly across the codebase.
|
|
113
|
+
|
|
114
|
+
## 1100.1.1
|
|
115
|
+
|
|
116
|
+
### Patch Changes
|
|
117
|
+
|
|
118
|
+
- 184ce26: Fix the package name in README.md.
|
|
119
|
+
|
|
120
|
+
## 1100.1.0
|
|
121
|
+
|
|
122
|
+
### Minor Changes
|
|
123
|
+
|
|
124
|
+
- 72c1e05: Fix: different platform variants of the same runtime (e.g. `node@runtime:25.9.0` glibc vs. musl) no longer share a single global-virtual-store entry. The virtual store path now incorporates the selected variant's integrity, so installs with different `--os`/`--cpu`/`--libc` end up in separate directories and `pnpm add --libc=musl node@runtime:<v>` reliably fetches the musl binary even when the glibc variant is already cached.
|
|
125
|
+
|
|
126
|
+
## 1100.0.1
|
|
127
|
+
|
|
128
|
+
### Patch Changes
|
|
129
|
+
|
|
130
|
+
- Updated dependencies [ff28085]
|
|
131
|
+
- @pnpm/types@1101.0.0
|
|
132
|
+
|
|
133
|
+
## 1006.0.0
|
|
134
|
+
|
|
135
|
+
### Major Changes
|
|
136
|
+
|
|
137
|
+
- 491a84f: This package is now pure ESM.
|
|
138
|
+
- 7d2fd48: Node.js v18, 19, 20, and 21 support discontinued.
|
|
139
|
+
|
|
140
|
+
### Minor Changes
|
|
141
|
+
|
|
142
|
+
- facdd71: Adding `trustPolicyIgnoreAfter` allows you to ignore trust policy checks for packages published more than a specified time ago[#10352](https://github.com/pnpm/pnpm/issues/10352).
|
|
143
|
+
- 10bc391: Added a new setting: `trustPolicy`.
|
|
144
|
+
- 38b8e35: Support for custom resolvers and fetchers.
|
|
145
|
+
- 9d3f00b: Added support for `trustPolicyExclude` [#10164](https://github.com/pnpm/pnpm/issues/10164).
|
|
146
|
+
|
|
147
|
+
You can now list one or more specific packages or versions that pnpm should allow to install, even if those packages don't satisfy the trust policy requirement. For example:
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
trustPolicy: no-downgrade
|
|
151
|
+
trustPolicyExclude:
|
|
152
|
+
- chokidar@4.0.3
|
|
153
|
+
- webpack@4.47.0 || 5.102.1
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Patch Changes
|
|
157
|
+
|
|
158
|
+
- 9b0a460: Fixed a resolution bug that could cause `pnpm dedupe --check` to fail unexpectedly.
|
|
159
|
+
|
|
160
|
+
When adding new dependencies to `package.json`, pnpm generally reuses existing versions in the `pnpm-lock.yaml` if they are satisfied by the version range specifier. There was an edge case where pnpm would instead resolve to a newly released version of a dependency. This is particularly problematic for `pnpm dedupe --check`, since a new version of a dependency published to the NPM registry could cause this check to suddenly fail. For details of this bug, see [#10626](https://github.com/pnpm/pnpm/issues/10626). This bug has been fixed.
|
|
161
|
+
|
|
162
|
+
The fix necessitated a behavioral change: In some cases, pnpm was previously able to automatically dedupe a newly used dependency deep in the dependency graph without needing to run `pnpm dedupe`. This behavior was supported by the non-determinism that is now corrected. We believe fixing this non-determinism is more important than preserving an automatic dedupe heuristic that didn't handle all cases. The `pnpm dedupe` command can still be used to clean up dependencies that aren't automatically deduped on `pnpm install`.
|
|
163
|
+
|
|
164
|
+
- 50fbeca: Added `getNodeBinsForCurrentOS` to `@pnpm/constants` which returns a `Record<string, string>` with paths for `node`, `npm`, and `npx` within the Node.js package. This record is now used as `BinaryResolution.bin` (type widened from `string` to `string | Record<string, string>`) and as `manifest.bin` in the node resolver, so pnpm's bin-linker creates all three shims automatically when installing a Node.js runtime.
|
|
165
|
+
- Updated dependencies [76718b3]
|
|
166
|
+
- Updated dependencies [a8f016c]
|
|
167
|
+
- Updated dependencies [cc1b8e3]
|
|
168
|
+
- Updated dependencies [491a84f]
|
|
169
|
+
- Updated dependencies [7d2fd48]
|
|
170
|
+
- Updated dependencies [efb48dc]
|
|
171
|
+
- Updated dependencies [cb367b9]
|
|
172
|
+
- Updated dependencies [7b1c189]
|
|
173
|
+
- Updated dependencies [8ffb1a7]
|
|
174
|
+
- Updated dependencies [05fb1ae]
|
|
175
|
+
- Updated dependencies [71de2b3]
|
|
176
|
+
- Updated dependencies [10bc391]
|
|
177
|
+
- Updated dependencies [2df8b71]
|
|
178
|
+
- Updated dependencies [15549a9]
|
|
179
|
+
- Updated dependencies [cc7c0d2]
|
|
180
|
+
- Updated dependencies [efb48dc]
|
|
181
|
+
- @pnpm/types@1001.0.0
|
|
182
|
+
|
|
183
|
+
## 1005.1.0
|
|
184
|
+
|
|
185
|
+
### Minor Changes
|
|
186
|
+
|
|
187
|
+
- 7c1382f: The npm resolver supports `publishedByExclude` now.
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- Updated dependencies [7c1382f]
|
|
192
|
+
- Updated dependencies [dee39ec]
|
|
193
|
+
- @pnpm/types@1000.9.0
|
|
194
|
+
|
|
195
|
+
## 1005.0.1
|
|
196
|
+
|
|
197
|
+
### Patch Changes
|
|
198
|
+
|
|
199
|
+
- Updated dependencies [e792927]
|
|
200
|
+
- @pnpm/types@1000.8.0
|
|
201
|
+
|
|
202
|
+
## 1005.0.0
|
|
203
|
+
|
|
204
|
+
### Major Changes
|
|
205
|
+
|
|
206
|
+
- d1edf73: Rename Resolution to AtomicResolution. Add support for binary resolution.
|
|
207
|
+
- f91922c: Changed how the integrity of the node.js artifact is stored in the lockfile.
|
|
208
|
+
|
|
209
|
+
### Minor Changes
|
|
210
|
+
|
|
211
|
+
- 86b33e9: Added support for installing Bun runtime.
|
|
212
|
+
|
|
213
|
+
## 1004.1.0
|
|
214
|
+
|
|
215
|
+
### Minor Changes
|
|
216
|
+
|
|
217
|
+
- 1a07b8f: Added support for resolving and downloading the Node.js runtime specified in the [devEngines](https://github.com/openjs-foundation/package-metadata-interoperability-collab-space/issues/15) field of `package.json`.
|
|
218
|
+
|
|
219
|
+
Usage example:
|
|
220
|
+
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"devEngines": {
|
|
224
|
+
"runtime": {
|
|
225
|
+
"name": "node",
|
|
226
|
+
"version": "^24.4.0",
|
|
227
|
+
"onFail": "download"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
When running `pnpm install`, pnpm will resolve Node.js to the latest version that satisfies the specified range and install it as a dependency of the project. As a result, when running scripts, the locally installed Node.js version will be used.
|
|
234
|
+
|
|
235
|
+
Unlike the existing options, `useNodeVersion` and `executionEnv.nodeVersion`, this new field supports version ranges, which are locked to exact versions during installation. The resolved version is stored in the pnpm lockfile, along with an integrity checksum for future validation of the Node.js content's validity.
|
|
236
|
+
|
|
237
|
+
Related PR: [#9755](https://github.com/pnpm/pnpm/pull/9755).
|
|
238
|
+
|
|
239
|
+
### Patch Changes
|
|
240
|
+
|
|
241
|
+
- Updated dependencies [1a07b8f]
|
|
242
|
+
- @pnpm/types@1000.7.0
|
|
243
|
+
|
|
244
|
+
## 1004.0.0
|
|
245
|
+
|
|
246
|
+
### Major Changes
|
|
247
|
+
|
|
248
|
+
- 2721291: Create different resolver result types which provide more information.
|
|
249
|
+
- 6acf819: Remove the blanket variant from the `Resolution` type, making it stricter and more useful.
|
|
250
|
+
|
|
251
|
+
## 1003.0.1
|
|
252
|
+
|
|
253
|
+
### Patch Changes
|
|
254
|
+
|
|
255
|
+
- Updated dependencies [5ec7255]
|
|
256
|
+
- @pnpm/types@1000.6.0
|
|
257
|
+
|
|
258
|
+
## 1003.0.0
|
|
259
|
+
|
|
260
|
+
### Major Changes
|
|
261
|
+
|
|
262
|
+
- 8a9f3a4: `pref` renamed to `bareSpecifier`.
|
|
263
|
+
- 5b73df1: Renamed `normalizedPref` to `specifiers`.
|
|
264
|
+
|
|
265
|
+
### Minor Changes
|
|
266
|
+
|
|
267
|
+
- 9c3dd03: **Added support for installing JSR packages.** You can now install JSR packages using the following syntax:
|
|
268
|
+
|
|
269
|
+
```
|
|
270
|
+
pnpm add jsr:<pkg_name>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
or with a version range:
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
pnpm add jsr:<pkg_name>@<range>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
For example, running:
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
pnpm add jsr:@foo/bar
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
will add the following entry to your `package.json`:
|
|
286
|
+
|
|
287
|
+
```json
|
|
288
|
+
{
|
|
289
|
+
"dependencies": {
|
|
290
|
+
"@foo/bar": "jsr:^0.1.2"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
When publishing, this entry will be transformed into a format compatible with npm, older versions of Yarn, and previous pnpm versions:
|
|
296
|
+
|
|
297
|
+
```json
|
|
298
|
+
{
|
|
299
|
+
"dependencies": {
|
|
300
|
+
"@foo/bar": "npm:@jsr/foo__bar@^0.1.2"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Related issue: [#8941](https://github.com/pnpm/pnpm/issues/8941).
|
|
306
|
+
|
|
307
|
+
Note: The `@jsr` scope defaults to <https://npm.jsr.io/> if the `@jsr:registry` setting is not defined.
|
|
308
|
+
|
|
309
|
+
### Patch Changes
|
|
310
|
+
|
|
311
|
+
- Updated dependencies [5b73df1]
|
|
312
|
+
- @pnpm/types@1000.5.0
|
|
313
|
+
|
|
314
|
+
## 1002.0.0
|
|
315
|
+
|
|
316
|
+
### Major Changes
|
|
317
|
+
|
|
318
|
+
- 81f441c: `updateToLatest` replaced with `update` field.
|
|
319
|
+
|
|
320
|
+
## 1001.0.0
|
|
321
|
+
|
|
322
|
+
### Major Changes
|
|
323
|
+
|
|
324
|
+
- 72cff38: The resolving function now takes a `registries` object, so it finds the required registry itself instead of receiving it from package requester.
|
|
325
|
+
|
|
326
|
+
### Patch Changes
|
|
327
|
+
|
|
328
|
+
- Updated dependencies [750ae7d]
|
|
329
|
+
- @pnpm/types@1000.4.0
|
|
330
|
+
|
|
331
|
+
## 1000.2.1
|
|
332
|
+
|
|
333
|
+
### Patch Changes
|
|
334
|
+
|
|
335
|
+
- Updated dependencies [5f7be64]
|
|
336
|
+
- Updated dependencies [5f7be64]
|
|
337
|
+
- @pnpm/types@1000.3.0
|
|
338
|
+
|
|
339
|
+
## 1000.2.0
|
|
340
|
+
|
|
341
|
+
### Minor Changes
|
|
342
|
+
|
|
343
|
+
- 3d52365: The `@pnpm/npm-resolver` package can now return `workspace` in the `resolvedVia` field of its results. This will be the case if the resolved package was requested through the `workspace:` protocol or if the wanted dependency's name and specifier match a package in the workspace. Previously, the `resolvedVia` field was always set to `local-filesystem` for workspace packages.
|
|
344
|
+
|
|
345
|
+
## 1000.1.4
|
|
346
|
+
|
|
347
|
+
### Patch Changes
|
|
348
|
+
|
|
349
|
+
- Updated dependencies [a5e4965]
|
|
350
|
+
- @pnpm/types@1000.2.1
|
|
351
|
+
|
|
352
|
+
## 1000.1.3
|
|
353
|
+
|
|
354
|
+
### Patch Changes
|
|
355
|
+
|
|
356
|
+
- Updated dependencies [8fcc221]
|
|
357
|
+
- @pnpm/types@1000.2.0
|
|
358
|
+
|
|
359
|
+
## 1000.1.2
|
|
360
|
+
|
|
361
|
+
### Patch Changes
|
|
362
|
+
|
|
363
|
+
- Updated dependencies [b562deb]
|
|
364
|
+
- @pnpm/types@1000.1.1
|
|
365
|
+
|
|
366
|
+
## 1000.1.1
|
|
367
|
+
|
|
368
|
+
### Patch Changes
|
|
369
|
+
|
|
370
|
+
- Updated dependencies [9591a18]
|
|
371
|
+
- @pnpm/types@1000.1.0
|
|
372
|
+
|
|
373
|
+
## 1000.1.0
|
|
374
|
+
|
|
375
|
+
### Minor Changes
|
|
376
|
+
|
|
377
|
+
- 6483b64: A new setting, `inject-workspace-packages`, has been added to allow hard-linking all local workspace dependencies instead of symlinking them. Previously, this behavior was achievable via the [`dependenciesMeta[].injected`](https://pnpm.io/package_json#dependenciesmetainjected) setting, which remains supported [#8836](https://github.com/pnpm/pnpm/pull/8836).
|
|
378
|
+
|
|
379
|
+
## 13.0.4
|
|
380
|
+
|
|
381
|
+
### Patch Changes
|
|
382
|
+
|
|
383
|
+
- Updated dependencies [d500d9f]
|
|
384
|
+
- @pnpm/types@12.2.0
|
|
385
|
+
|
|
386
|
+
## 13.0.3
|
|
387
|
+
|
|
388
|
+
### Patch Changes
|
|
389
|
+
|
|
390
|
+
- Updated dependencies [7ee59a1]
|
|
391
|
+
- @pnpm/types@12.1.0
|
|
392
|
+
|
|
393
|
+
## 13.0.2
|
|
394
|
+
|
|
395
|
+
### Patch Changes
|
|
396
|
+
|
|
397
|
+
- Updated dependencies [cb006df]
|
|
398
|
+
- @pnpm/types@12.0.0
|
|
399
|
+
|
|
400
|
+
## 13.0.1
|
|
401
|
+
|
|
402
|
+
### Patch Changes
|
|
403
|
+
|
|
404
|
+
- Updated dependencies [0ef168b]
|
|
405
|
+
- @pnpm/types@11.1.0
|
|
406
|
+
|
|
407
|
+
## 13.0.0
|
|
408
|
+
|
|
409
|
+
### Major Changes
|
|
410
|
+
|
|
411
|
+
- dd00eeb: Renamed dir to rootDir in the Project object.
|
|
412
|
+
|
|
413
|
+
### Patch Changes
|
|
414
|
+
|
|
415
|
+
- Updated dependencies [dd00eeb]
|
|
416
|
+
- Updated dependencies
|
|
417
|
+
- @pnpm/types@11.0.0
|
|
418
|
+
|
|
419
|
+
## 12.0.2
|
|
420
|
+
|
|
421
|
+
### Patch Changes
|
|
422
|
+
|
|
423
|
+
- Updated dependencies [13e55b2]
|
|
424
|
+
- @pnpm/types@10.1.1
|
|
425
|
+
|
|
426
|
+
## 12.0.1
|
|
427
|
+
|
|
428
|
+
### Patch Changes
|
|
429
|
+
|
|
430
|
+
- Updated dependencies [45f4262]
|
|
431
|
+
- @pnpm/types@10.1.0
|
|
432
|
+
|
|
433
|
+
## 12.0.0
|
|
434
|
+
|
|
435
|
+
### Major Changes
|
|
436
|
+
|
|
437
|
+
- 43cdd87: Node.js v16 support dropped. Use at least Node.js v18.12.
|
|
438
|
+
|
|
439
|
+
### Minor Changes
|
|
440
|
+
|
|
441
|
+
- b13d2dc: It is now possible to install only a subdirectory from a Git repository.
|
|
442
|
+
|
|
443
|
+
For example, `pnpm add github:user/repo#path:packages/foo` will add a dependency from the `packages/foo` subdirectory.
|
|
444
|
+
|
|
445
|
+
This new parameter may be combined with other supported parameters separated by `&`. For instance, the next command will install the same package from the `dev` branch: `pnpm add github:user/repo#dev&path:packages/bar`.
|
|
446
|
+
|
|
447
|
+
Related issue: [#4765](https://github.com/pnpm/pnpm/issues/4765).
|
|
448
|
+
Related PR: [#7487](https://github.com/pnpm/pnpm/pull/7487).
|
|
449
|
+
|
|
450
|
+
### Patch Changes
|
|
451
|
+
|
|
452
|
+
- Updated dependencies [7733f3a]
|
|
453
|
+
- Updated dependencies [43cdd87]
|
|
454
|
+
- Updated dependencies [730929e]
|
|
455
|
+
- @pnpm/types@10.0.0
|
|
456
|
+
|
|
457
|
+
## 11.1.0
|
|
458
|
+
|
|
459
|
+
### Minor Changes
|
|
460
|
+
|
|
461
|
+
- 31054a63e: Running `pnpm update -r --latest` will no longer downgrade prerelease dependencies [#7436](https://github.com/pnpm/pnpm/issues/7436).
|
|
462
|
+
|
|
463
|
+
## 11.0.2
|
|
464
|
+
|
|
465
|
+
### Patch Changes
|
|
466
|
+
|
|
467
|
+
- Updated dependencies [4d34684f1]
|
|
468
|
+
- @pnpm/types@9.4.2
|
|
469
|
+
|
|
470
|
+
## 11.0.1
|
|
471
|
+
|
|
472
|
+
### Patch Changes
|
|
473
|
+
|
|
474
|
+
- Updated dependencies
|
|
475
|
+
- @pnpm/types@9.4.1
|
|
476
|
+
|
|
477
|
+
## 11.0.0
|
|
478
|
+
|
|
479
|
+
### Major Changes
|
|
480
|
+
|
|
481
|
+
- 4c2450208: (Important) Tarball resolutions in `pnpm-lock.yaml` will no longer contain a `registry` field. This field has been unused for a long time. This change should not cause any issues besides backward compatible modifications to the lockfile [#7262](https://github.com/pnpm/pnpm/pull/7262).
|
|
482
|
+
|
|
483
|
+
## 10.0.4
|
|
484
|
+
|
|
485
|
+
### Patch Changes
|
|
486
|
+
|
|
487
|
+
- Updated dependencies [43ce9e4a6]
|
|
488
|
+
- @pnpm/types@9.4.0
|
|
489
|
+
|
|
490
|
+
## 10.0.3
|
|
491
|
+
|
|
492
|
+
### Patch Changes
|
|
493
|
+
|
|
494
|
+
- Updated dependencies [d774a3196]
|
|
495
|
+
- @pnpm/types@9.3.0
|
|
496
|
+
|
|
497
|
+
## 10.0.2
|
|
498
|
+
|
|
499
|
+
### Patch Changes
|
|
500
|
+
|
|
501
|
+
- Updated dependencies [aa2ae8fe2]
|
|
502
|
+
- @pnpm/types@9.2.0
|
|
503
|
+
|
|
504
|
+
## 10.0.1
|
|
505
|
+
|
|
506
|
+
### Patch Changes
|
|
507
|
+
|
|
508
|
+
- Updated dependencies [a9e0b7cbf]
|
|
509
|
+
- @pnpm/types@9.1.0
|
|
510
|
+
|
|
511
|
+
## 10.0.0
|
|
512
|
+
|
|
513
|
+
### Major Changes
|
|
514
|
+
|
|
515
|
+
- eceaa8b8b: Node.js 14 support dropped.
|
|
516
|
+
|
|
517
|
+
### Patch Changes
|
|
518
|
+
|
|
519
|
+
- Updated dependencies [eceaa8b8b]
|
|
520
|
+
- @pnpm/types@9.0.0
|
|
521
|
+
|
|
522
|
+
## 9.2.0
|
|
523
|
+
|
|
524
|
+
### Minor Changes
|
|
525
|
+
|
|
526
|
+
- 029143cff: Version selectors may have weights optionally.
|
|
527
|
+
|
|
528
|
+
### Patch Changes
|
|
529
|
+
|
|
530
|
+
- 029143cff: When resolving dependencies, prefer versions that are already used in the root of the project. This is important to minimize the number of packages that will be nested during hoisting [#6054](https://github.com/pnpm/pnpm/pull/6054).
|
|
531
|
+
|
|
532
|
+
## 9.1.5
|
|
533
|
+
|
|
534
|
+
### Patch Changes
|
|
535
|
+
|
|
536
|
+
- Updated dependencies [b77651d14]
|
|
537
|
+
- @pnpm/types@8.10.0
|
|
538
|
+
|
|
539
|
+
## 9.1.4
|
|
540
|
+
|
|
541
|
+
### Patch Changes
|
|
542
|
+
|
|
543
|
+
- Updated dependencies [702e847c1]
|
|
544
|
+
- @pnpm/types@8.9.0
|
|
545
|
+
|
|
546
|
+
## 9.1.3
|
|
547
|
+
|
|
548
|
+
### Patch Changes
|
|
549
|
+
|
|
550
|
+
- Updated dependencies [844e82f3a]
|
|
551
|
+
- @pnpm/types@8.8.0
|
|
552
|
+
|
|
553
|
+
## 9.1.2
|
|
554
|
+
|
|
555
|
+
### Patch Changes
|
|
556
|
+
|
|
557
|
+
- Updated dependencies [d665f3ff7]
|
|
558
|
+
- @pnpm/types@8.7.0
|
|
559
|
+
|
|
560
|
+
## 9.1.1
|
|
561
|
+
|
|
562
|
+
### Patch Changes
|
|
563
|
+
|
|
564
|
+
- Updated dependencies [156cc1ef6]
|
|
565
|
+
- @pnpm/types@8.6.0
|
|
566
|
+
|
|
567
|
+
## 9.1.0
|
|
568
|
+
|
|
569
|
+
### Minor Changes
|
|
570
|
+
|
|
571
|
+
- 23984abd1: Add hook for adding custom fetchers.
|
|
572
|
+
|
|
573
|
+
## 9.0.6
|
|
574
|
+
|
|
575
|
+
### Patch Changes
|
|
576
|
+
|
|
577
|
+
- Updated dependencies [c90798461]
|
|
578
|
+
- @pnpm/types@8.5.0
|
|
579
|
+
|
|
580
|
+
## 9.0.5
|
|
581
|
+
|
|
582
|
+
### Patch Changes
|
|
583
|
+
|
|
584
|
+
- Updated dependencies [8e5b77ef6]
|
|
585
|
+
- @pnpm/types@8.4.0
|
|
586
|
+
|
|
587
|
+
## 9.0.4
|
|
588
|
+
|
|
589
|
+
### Patch Changes
|
|
590
|
+
|
|
591
|
+
- Updated dependencies [2a34b21ce]
|
|
592
|
+
- @pnpm/types@8.3.0
|
|
593
|
+
|
|
594
|
+
## 9.0.3
|
|
595
|
+
|
|
596
|
+
### Patch Changes
|
|
597
|
+
|
|
598
|
+
- Updated dependencies [fb5bbfd7a]
|
|
599
|
+
- @pnpm/types@8.2.0
|
|
600
|
+
|
|
601
|
+
## 9.0.2
|
|
602
|
+
|
|
603
|
+
### Patch Changes
|
|
604
|
+
|
|
605
|
+
- Updated dependencies [4d39e4a0c]
|
|
606
|
+
- @pnpm/types@8.1.0
|
|
607
|
+
|
|
608
|
+
## 9.0.1
|
|
609
|
+
|
|
610
|
+
### Patch Changes
|
|
611
|
+
|
|
612
|
+
- Updated dependencies [18ba5e2c0]
|
|
613
|
+
- @pnpm/types@8.0.1
|
|
614
|
+
|
|
615
|
+
## 9.0.0
|
|
616
|
+
|
|
617
|
+
### Major Changes
|
|
618
|
+
|
|
619
|
+
- 542014839: Node.js 12 is not supported.
|
|
620
|
+
|
|
621
|
+
### Patch Changes
|
|
622
|
+
|
|
623
|
+
- Updated dependencies [d504dc380]
|
|
624
|
+
- Updated dependencies [542014839]
|
|
625
|
+
- @pnpm/types@8.0.0
|
|
626
|
+
|
|
627
|
+
## 8.1.6
|
|
628
|
+
|
|
629
|
+
### Patch Changes
|
|
630
|
+
|
|
631
|
+
- Updated dependencies [b138d048c]
|
|
632
|
+
- @pnpm/types@7.10.0
|
|
633
|
+
|
|
634
|
+
## 8.1.5
|
|
635
|
+
|
|
636
|
+
### Patch Changes
|
|
637
|
+
|
|
638
|
+
- Updated dependencies [26cd01b88]
|
|
639
|
+
- @pnpm/types@7.9.0
|
|
640
|
+
|
|
641
|
+
## 8.1.4
|
|
642
|
+
|
|
643
|
+
### Patch Changes
|
|
644
|
+
|
|
645
|
+
- Updated dependencies [b5734a4a7]
|
|
646
|
+
- @pnpm/types@7.8.0
|
|
647
|
+
|
|
648
|
+
## 8.1.3
|
|
649
|
+
|
|
650
|
+
### Patch Changes
|
|
651
|
+
|
|
652
|
+
- Updated dependencies [6493e0c93]
|
|
653
|
+
- @pnpm/types@7.7.1
|
|
654
|
+
|
|
655
|
+
## 8.1.2
|
|
656
|
+
|
|
657
|
+
### Patch Changes
|
|
658
|
+
|
|
659
|
+
- Updated dependencies [ba9b2eba1]
|
|
660
|
+
- @pnpm/types@7.7.0
|
|
661
|
+
|
|
662
|
+
## 8.1.1
|
|
663
|
+
|
|
664
|
+
### Patch Changes
|
|
665
|
+
|
|
666
|
+
- Updated dependencies [302ae4f6f]
|
|
667
|
+
- @pnpm/types@7.6.0
|
|
668
|
+
|
|
669
|
+
## 8.1.0
|
|
670
|
+
|
|
671
|
+
### Minor Changes
|
|
672
|
+
|
|
673
|
+
- 4ab87844a: New optional property added to `WantedDependency`: `injected`.
|
|
674
|
+
|
|
675
|
+
### Patch Changes
|
|
676
|
+
|
|
677
|
+
- Updated dependencies [4ab87844a]
|
|
678
|
+
- @pnpm/types@7.5.0
|
|
679
|
+
|
|
680
|
+
## 8.0.4
|
|
681
|
+
|
|
682
|
+
### Patch Changes
|
|
683
|
+
|
|
684
|
+
- Updated dependencies [b734b45ea]
|
|
685
|
+
- @pnpm/types@7.4.0
|
|
686
|
+
|
|
687
|
+
## 8.0.3
|
|
688
|
+
|
|
689
|
+
### Patch Changes
|
|
690
|
+
|
|
691
|
+
- Updated dependencies [8e76690f4]
|
|
692
|
+
- @pnpm/types@7.3.0
|
|
693
|
+
|
|
694
|
+
## 8.0.2
|
|
695
|
+
|
|
696
|
+
### Patch Changes
|
|
697
|
+
|
|
698
|
+
- Updated dependencies [724c5abd8]
|
|
699
|
+
- @pnpm/types@7.2.0
|
|
700
|
+
|
|
701
|
+
## 8.0.1
|
|
702
|
+
|
|
703
|
+
### Patch Changes
|
|
704
|
+
|
|
705
|
+
- Updated dependencies [97c64bae4]
|
|
706
|
+
- @pnpm/types@7.1.0
|
|
707
|
+
|
|
708
|
+
## 8.0.0
|
|
709
|
+
|
|
710
|
+
### Major Changes
|
|
711
|
+
|
|
712
|
+
- 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work.
|
|
713
|
+
|
|
714
|
+
### Patch Changes
|
|
715
|
+
|
|
716
|
+
- Updated dependencies [97b986fbc]
|
|
717
|
+
- @pnpm/types@7.0.0
|
|
718
|
+
|
|
719
|
+
## 7.1.1
|
|
720
|
+
|
|
721
|
+
### Patch Changes
|
|
722
|
+
|
|
723
|
+
- Updated dependencies [9ad8c27bf]
|
|
724
|
+
- @pnpm/types@6.4.0
|
|
725
|
+
|
|
726
|
+
## 7.1.0
|
|
727
|
+
|
|
728
|
+
### Minor Changes
|
|
729
|
+
|
|
730
|
+
- 8698a7060: New option added: preferWorkspacePackages. When it is `true`, dependencies are linked from the workspace even, when there are newer version available in the registry.
|
|
731
|
+
|
|
732
|
+
## 7.0.5
|
|
733
|
+
|
|
734
|
+
### Patch Changes
|
|
735
|
+
|
|
736
|
+
- Updated dependencies [b5d694e7f]
|
|
737
|
+
- @pnpm/types@6.3.1
|
|
738
|
+
|
|
739
|
+
## 7.0.4
|
|
740
|
+
|
|
741
|
+
### Patch Changes
|
|
742
|
+
|
|
743
|
+
- Updated dependencies [d54043ee4]
|
|
744
|
+
- @pnpm/types@6.3.0
|
|
745
|
+
|
|
746
|
+
## 7.0.3
|
|
747
|
+
|
|
748
|
+
### Patch Changes
|
|
749
|
+
|
|
750
|
+
- Updated dependencies [db17f6f7b]
|
|
751
|
+
- @pnpm/types@6.2.0
|
|
752
|
+
|
|
753
|
+
## 7.0.2
|
|
754
|
+
|
|
755
|
+
### Patch Changes
|
|
756
|
+
|
|
757
|
+
- Updated dependencies [71a8c8ce3]
|
|
758
|
+
- @pnpm/types@6.1.0
|
|
759
|
+
|
|
760
|
+
## 7.0.1
|
|
761
|
+
|
|
762
|
+
### Patch Changes
|
|
763
|
+
|
|
764
|
+
- Updated dependencies [da091c711]
|
|
765
|
+
- @pnpm/types@6.0.0
|
|
766
|
+
|
|
767
|
+
## 7.0.1-alpha.0
|
|
768
|
+
|
|
769
|
+
### Patch Changes
|
|
770
|
+
|
|
771
|
+
- Updated dependencies [da091c71]
|
|
772
|
+
- @pnpm/types@6.0.0-alpha.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/resolving.resolver-base",
|
|
3
|
-
"version": "1100.5.
|
|
3
|
+
"version": "1100.5.3",
|
|
4
4
|
"description": "Types for pnpm-compatible resolvers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"!*.map"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@pnpm/types": "1101.
|
|
31
|
+
"@pnpm/types": "1101.5.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jest/globals": "30.4.1",
|
|
35
|
-
"@pnpm/resolving.resolver-base": "1100.5.
|
|
35
|
+
"@pnpm/resolving.resolver-base": "1100.5.3"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=22.13"
|
package/lib/index.d.ts
DELETED
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import type { DependencyManifest, PackageManifest, PackageVersionPolicy, PinnedVersion, PkgResolutionId, ProjectRootDir, SupportedArchitectures, TrustPolicy } from '@pnpm/types';
|
|
2
|
-
export { type PkgResolutionId };
|
|
3
|
-
/**
|
|
4
|
-
* tarball hosted remotely
|
|
5
|
-
*/
|
|
6
|
-
export interface TarballResolution {
|
|
7
|
-
type?: undefined;
|
|
8
|
-
tarball: string;
|
|
9
|
-
integrity?: string;
|
|
10
|
-
path?: string;
|
|
11
|
-
/**
|
|
12
|
-
* True for tarballs sourced from a git host (codeload.github.com /
|
|
13
|
-
* gitlab.com / bitbucket.org). Such tarballs need preparation
|
|
14
|
-
* (preparePackage / packlist) on extraction, and their cached content
|
|
15
|
-
* depends on whether build scripts ran, so they're addressed by
|
|
16
|
-
* gitHostedStoreIndexKey rather than the integrity-based key.
|
|
17
|
-
*/
|
|
18
|
-
gitHosted?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export interface BinaryResolution {
|
|
21
|
-
type: 'binary';
|
|
22
|
-
archive: 'tarball' | 'zip';
|
|
23
|
-
url: string;
|
|
24
|
-
integrity: string;
|
|
25
|
-
bin: string | Record<string, string>;
|
|
26
|
-
prefix?: string;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* directory on a file system
|
|
30
|
-
*/
|
|
31
|
-
export interface DirectoryResolution {
|
|
32
|
-
type: 'directory';
|
|
33
|
-
directory: string;
|
|
34
|
-
}
|
|
35
|
-
export interface GitResolution {
|
|
36
|
-
commit: string;
|
|
37
|
-
repo: string;
|
|
38
|
-
path?: string;
|
|
39
|
-
type: 'git';
|
|
40
|
-
}
|
|
41
|
-
export interface CustomResolution {
|
|
42
|
-
type: `custom:${string}`;
|
|
43
|
-
[key: string]: unknown;
|
|
44
|
-
}
|
|
45
|
-
export interface PlatformAssetTarget {
|
|
46
|
-
os: string;
|
|
47
|
-
cpu: string;
|
|
48
|
-
libc?: 'musl';
|
|
49
|
-
}
|
|
50
|
-
export interface PlatformAssetResolution {
|
|
51
|
-
resolution: AtomicResolution;
|
|
52
|
-
targets: PlatformAssetTarget[];
|
|
53
|
-
}
|
|
54
|
-
export type AtomicResolution = TarballResolution | DirectoryResolution | GitResolution | BinaryResolution | CustomResolution;
|
|
55
|
-
export interface VariationsResolution {
|
|
56
|
-
type: 'variations';
|
|
57
|
-
variants: PlatformAssetResolution[];
|
|
58
|
-
}
|
|
59
|
-
export type Resolution = AtomicResolution | VariationsResolution;
|
|
60
|
-
/**
|
|
61
|
-
* A tarball URL is git-hosted when it points at a known git provider's immutable
|
|
62
|
-
* archive endpoint. The result gates integrity exemptions, so the match is
|
|
63
|
-
* limited to provider-specific path shapes whose ref is a full commit SHA.
|
|
64
|
-
*/
|
|
65
|
-
export declare function isGitHostedTarballUrl(url: string): boolean;
|
|
66
|
-
export type ResolutionKind = 'localTarball' | 'gitHostedTarball' | 'remoteTarball' | 'directory' | 'git' | 'binary' | 'custom';
|
|
67
|
-
/**
|
|
68
|
-
* Classifies a resolution for fetcher selection. Lockfile-provided flags are
|
|
69
|
-
* treated as hints; integrity exemptions depend on the resolved source shape.
|
|
70
|
-
*/
|
|
71
|
-
export declare function classifyResolution(resolution: Resolution): ResolutionKind;
|
|
72
|
-
/**
|
|
73
|
-
* Outcome of asking a `ResolutionVerifier` whether a (name, version,
|
|
74
|
-
* resolution) entry from a lockfile is acceptable under whatever policies
|
|
75
|
-
* the resolver chain has been configured with. Resolvers that don't have
|
|
76
|
-
* an opinion on a given resolution should return `{ ok: true }`.
|
|
77
|
-
*/
|
|
78
|
-
export type ResolutionVerification = {
|
|
79
|
-
ok: true;
|
|
80
|
-
} | {
|
|
81
|
-
ok: false;
|
|
82
|
-
code: string;
|
|
83
|
-
reason: string;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Optional companion to a resolver factory.
|
|
87
|
-
*
|
|
88
|
-
* `verify` inspects the `resolution` shape to decide whether the entry
|
|
89
|
-
* is within its protocol; for entries outside its protocol it should
|
|
90
|
-
* return `{ ok: true }`. The install side fans out across the verifier
|
|
91
|
-
* list rather than asking a combinator to dispatch.
|
|
92
|
-
*
|
|
93
|
-
* `policy` and `canTrustPastCheck` describe the verifier's cache
|
|
94
|
-
* contract. Policies from every active verifier are merged into a
|
|
95
|
-
* single shared bag stored alongside the lockfile hash; the
|
|
96
|
-
* install-side verification cache reads them to decide if a previous
|
|
97
|
-
* run on the same lockfile is still trustworthy under today's policy
|
|
98
|
-
* without re-issuing the registry round-trips that `verify` would.
|
|
99
|
-
* Verifiers that check the same logical policy (e.g. minimumReleaseAge
|
|
100
|
-
* across registries) name it the same and share the cache slot.
|
|
101
|
-
*/
|
|
102
|
-
export interface ResolutionVerifier {
|
|
103
|
-
/**
|
|
104
|
-
* `ctx.nonSemverVersion` is set when the lockfile entry is keyed by a
|
|
105
|
-
* non-semver reference (URL tarball, git, etc.) rather than a registry
|
|
106
|
-
* `name@version`. Verifiers that only police registry entries use it to
|
|
107
|
-
* skip deliberate non-registry deps, which can still carry a semver
|
|
108
|
-
* `version` copied from the resolved manifest.
|
|
109
|
-
*/
|
|
110
|
-
verify: (resolution: Resolution, ctx: {
|
|
111
|
-
name: string;
|
|
112
|
-
version: string;
|
|
113
|
-
nonSemverVersion?: string;
|
|
114
|
-
}) => Promise<ResolutionVerification>;
|
|
115
|
-
/**
|
|
116
|
-
* Snapshot of the policy fields this verifier enforces. Merged with
|
|
117
|
-
* every other active verifier's `policy` into the cache record. A
|
|
118
|
-
* field shared across verifiers (same key) should carry the same
|
|
119
|
-
* value; if it doesn't, the last verifier in the list wins.
|
|
120
|
-
*/
|
|
121
|
-
policy: Record<string, unknown>;
|
|
122
|
-
/**
|
|
123
|
-
* Returns true when the previously cached policy (the merged snapshot
|
|
124
|
-
* from the last successful run) can be trusted to still satisfy what
|
|
125
|
-
* this verifier currently demands. Reads whichever fields the
|
|
126
|
-
* verifier owns; missing or non-conforming values (e.g. an older
|
|
127
|
-
* record shape) should return false. A loosened policy can trust a
|
|
128
|
-
* stricter cached run; a tightened policy cannot.
|
|
129
|
-
*/
|
|
130
|
-
canTrustPastCheck: (cachedPolicy: Record<string, unknown>) => boolean;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* A `ResolutionVerifier`'s rejection materialized for one (name,
|
|
134
|
-
* version, resolution) entry. The install side aggregates these across
|
|
135
|
-
* every active verifier on the freshly-resolved tree and either prompts
|
|
136
|
-
* the user, persists them (e.g. into `minimumReleaseAgeExclude`), or
|
|
137
|
-
* aborts. Code is the verifier-defined error code
|
|
138
|
-
* (`MINIMUM_RELEASE_AGE_VIOLATION`, `TRUST_DOWNGRADE`, etc.) — the
|
|
139
|
-
* install command filters by code to decide downstream UX. Lifted here
|
|
140
|
-
* (rather than in deps-installer) so both deps-resolver and
|
|
141
|
-
* deps-installer can share one shape; future resolver packages plug in
|
|
142
|
-
* without needing the deps-installer dependency.
|
|
143
|
-
*/
|
|
144
|
-
export interface ResolutionPolicyViolation {
|
|
145
|
-
name: string;
|
|
146
|
-
version: string;
|
|
147
|
-
resolution: Resolution;
|
|
148
|
-
code: string;
|
|
149
|
-
reason: string;
|
|
150
|
-
}
|
|
151
|
-
/** Concrete platform selector used when picking a variant from a VariationsResolution. */
|
|
152
|
-
export interface PlatformSelector {
|
|
153
|
-
os: string;
|
|
154
|
-
cpu: string;
|
|
155
|
-
/** Name of the libc family requested. Omit (or leave `null`) for the default (glibc on Linux, n/a elsewhere). */
|
|
156
|
-
libc?: string | null;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Resolve a {@link PlatformSelector} from the user's supportedArchitectures config
|
|
160
|
-
* and the host's own platform/arch/libc. When `supportedArchitectures.xxx` is set
|
|
161
|
-
* and its first entry is not `"current"`, that entry wins; otherwise the host's
|
|
162
|
-
* value is used. Additional entries beyond the first are ignored — variant
|
|
163
|
-
* selection picks exactly one (os, cpu, libc) triplet per install.
|
|
164
|
-
*/
|
|
165
|
-
export declare function resolvePlatformSelector(supportedArchitectures: SupportedArchitectures | undefined, host: {
|
|
166
|
-
platform: string;
|
|
167
|
-
arch: string;
|
|
168
|
-
libc: string | null | undefined;
|
|
169
|
-
}): PlatformSelector;
|
|
170
|
-
/**
|
|
171
|
-
* Pick the variant whose target matches the given selector, or `undefined` if
|
|
172
|
-
* none does. A variant with no `libc` represents the "default" build — glibc on
|
|
173
|
-
* Linux, irrelevant on macOS/Windows. A non-default libc (e.g. `musl`) is a
|
|
174
|
-
* separate, non-interchangeable artifact; an exact libc match is required in
|
|
175
|
-
* that case so the glibc/default variant doesn't silently win (its `target.libc`
|
|
176
|
-
* is nullish).
|
|
177
|
-
*/
|
|
178
|
-
export declare function selectPlatformVariant(variants: PlatformAssetResolution[], selector: PlatformSelector): PlatformAssetResolution | undefined;
|
|
179
|
-
export interface ResolveResult {
|
|
180
|
-
id: PkgResolutionId;
|
|
181
|
-
latest?: string;
|
|
182
|
-
publishedAt?: string;
|
|
183
|
-
manifest?: DependencyManifest;
|
|
184
|
-
resolution: Resolution;
|
|
185
|
-
resolvedVia: string;
|
|
186
|
-
normalizedBareSpecifier?: string;
|
|
187
|
-
alias?: string;
|
|
188
|
-
/**
|
|
189
|
-
* Set when the resolver picked this version despite a policy
|
|
190
|
-
* violation (e.g. immature relative to `publishedBy`, trust
|
|
191
|
-
* downgrade detected by `failIfTrustDowngraded`). The resolver
|
|
192
|
-
* already has the metadata it needs to decide, so reporting inline
|
|
193
|
-
* here avoids the install layer having to re-scan the tree and
|
|
194
|
-
* re-fetch the same metadata. The deps-resolver aggregates these
|
|
195
|
-
* across every resolve call into a single set the install command
|
|
196
|
-
* can react to.
|
|
197
|
-
*
|
|
198
|
-
* `resolution` on the violation is the same `resolution` field
|
|
199
|
-
* above — supplied for symmetry with `ResolutionPolicyViolation`
|
|
200
|
-
* entries that flow out of `verifyLockfileResolutions` for
|
|
201
|
-
* lockfile-only paths.
|
|
202
|
-
*/
|
|
203
|
-
policyViolation?: ResolutionPolicyViolation;
|
|
204
|
-
}
|
|
205
|
-
export interface WorkspacePackage {
|
|
206
|
-
rootDir: ProjectRootDir;
|
|
207
|
-
manifest: DependencyManifest;
|
|
208
|
-
}
|
|
209
|
-
export type WorkspacePackagesByVersion = Map<string, WorkspacePackage>;
|
|
210
|
-
export type WorkspacePackages = Map<string, WorkspacePackagesByVersion>;
|
|
211
|
-
export declare const DIRECT_DEP_SELECTOR_WEIGHT = 1000;
|
|
212
|
-
export declare const EXISTING_VERSION_SELECTOR_WEIGHT = 1000000;
|
|
213
|
-
export type VersionSelectorType = 'version' | 'range' | 'tag';
|
|
214
|
-
export interface VersionSelectors {
|
|
215
|
-
[selector: string]: VersionSelectorWithWeight | VersionSelectorType;
|
|
216
|
-
}
|
|
217
|
-
export interface VersionSelectorWithWeight {
|
|
218
|
-
selectorType: VersionSelectorType;
|
|
219
|
-
weight: number;
|
|
220
|
-
}
|
|
221
|
-
export interface PreferredVersions {
|
|
222
|
-
[packageName: string]: VersionSelectors;
|
|
223
|
-
}
|
|
224
|
-
export interface ResolveOptions {
|
|
225
|
-
alwaysTryWorkspacePackages?: boolean;
|
|
226
|
-
trustPolicy?: TrustPolicy;
|
|
227
|
-
trustPolicyExclude?: PackageVersionPolicy;
|
|
228
|
-
trustPolicyIgnoreAfter?: number;
|
|
229
|
-
defaultTag?: string;
|
|
230
|
-
pickLowestVersion?: boolean;
|
|
231
|
-
publishedBy?: Date;
|
|
232
|
-
publishedByExclude?: PackageVersionPolicy;
|
|
233
|
-
projectDir: string;
|
|
234
|
-
lockfileDir: string;
|
|
235
|
-
preferredVersions: PreferredVersions;
|
|
236
|
-
preferWorkspacePackages?: boolean;
|
|
237
|
-
workspacePackages?: WorkspacePackages;
|
|
238
|
-
update?: false | 'compatible' | 'latest';
|
|
239
|
-
/**
|
|
240
|
-
* True only when this specific package matches the user's update target
|
|
241
|
-
* (e.g. `pnpm up <name>`). Unlike `update`, this is false for unrelated
|
|
242
|
-
* packages that get re-resolved as a side effect of an update, so it can
|
|
243
|
-
* be used to bypass preferred-version propagation without forcing
|
|
244
|
-
* unrelated transitives to jump to their latest versions.
|
|
245
|
-
*/
|
|
246
|
-
updateRequested?: boolean;
|
|
247
|
-
updateChecksums?: boolean;
|
|
248
|
-
injectWorkspacePackages?: boolean;
|
|
249
|
-
calcSpecifier?: boolean;
|
|
250
|
-
pinnedVersion?: PinnedVersion;
|
|
251
|
-
currentPkg?: {
|
|
252
|
-
id: PkgResolutionId;
|
|
253
|
-
name?: string;
|
|
254
|
-
version?: string;
|
|
255
|
-
resolution: Resolution;
|
|
256
|
-
publishedAt?: string;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
export type WantedDependency = {
|
|
260
|
-
injected?: boolean;
|
|
261
|
-
prevSpecifier?: string;
|
|
262
|
-
} & ({
|
|
263
|
-
alias?: string;
|
|
264
|
-
bareSpecifier: string;
|
|
265
|
-
} | {
|
|
266
|
-
alias: string;
|
|
267
|
-
bareSpecifier?: string;
|
|
268
|
-
});
|
|
269
|
-
export type ResolveFunction = (wantedDependency: WantedDependency & {
|
|
270
|
-
optional?: boolean;
|
|
271
|
-
}, opts: ResolveOptions) => Promise<ResolveResult>;
|
|
272
|
-
/**
|
|
273
|
-
* Input to a resolver's `resolveLatest` function. The resolver decides
|
|
274
|
-
* whether it owns this dep purely from `wantedDependency` (its alias and
|
|
275
|
-
* manifest specifier) — the lockfile-resolved ref is the caller's
|
|
276
|
-
* concern, not the resolver's.
|
|
277
|
-
*/
|
|
278
|
-
export interface LatestQuery {
|
|
279
|
-
wantedDependency: WantedDependency;
|
|
280
|
-
compatible?: boolean;
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Result of a resolver's `resolveLatest` call.
|
|
284
|
-
*
|
|
285
|
-
* - `undefined` means "this resolver does not handle this dep — try
|
|
286
|
-
* the next one".
|
|
287
|
-
* - An object (even without a `latestManifest`) means "I claim this
|
|
288
|
-
* dep, but I can't tell you what's latest" (e.g. policy blocked,
|
|
289
|
-
* network unavailable, no concept of latest for this protocol).
|
|
290
|
-
* The caller still surfaces a ref-mismatch report if the lockfile
|
|
291
|
-
* shifted.
|
|
292
|
-
*/
|
|
293
|
-
export interface LatestInfo {
|
|
294
|
-
latestManifest?: PackageManifest;
|
|
295
|
-
}
|
|
296
|
-
export type ResolveLatestFunction = (query: LatestQuery, opts: ResolveOptions) => Promise<LatestInfo | undefined>;
|