@pnpm/resolving.resolver-base 1101.1.0 → 1101.2.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.
- package/CHANGELOG.md +22 -0
- package/lib/index.d.ts +6 -4
- package/lib/index.js +13 -12
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @pnpm/resolver-base
|
|
2
2
|
|
|
3
|
+
## 1101.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added explicit registry revision selection with `<version>+rN` and `pnpm update --patches` for refreshing revision artifacts without changing package versions. Registry-backed lockfile policy checks recognize historical revisions, and pnpr now preserves safe revision histories from upstream registries.
|
|
8
|
+
|
|
9
|
+
- Added support for registry replacement tarballs using standard integrity values, explicit revision fields, registry routing from the `registries` setting, non-redirecting integrity-addressed URLs, canonical safe-integer revision numbers, and pnpr proxying for immutable upstream revision artifacts.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies:
|
|
14
|
+
- @pnpm/types@1102.1.0
|
|
15
|
+
|
|
16
|
+
## 1101.1.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- A runtime installed through `devEngines.runtime` now matches the host when `supportedArchitectures` lists several platforms. Listing `os: [darwin, linux]` and `cpu: [x64, arm64]` used to install the runtime built for the first entry of each list, so a machine running Linux on arm64 got a macOS x64 Node.js that could not execute [#13898](https://github.com/pnpm/pnpm/issues/13898).
|
|
21
|
+
|
|
22
|
+
- Updated dependencies:
|
|
23
|
+
- @pnpm/types@1102.0.0
|
|
24
|
+
|
|
3
25
|
## 1101.1.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export interface TarballResolution {
|
|
|
7
7
|
type?: undefined;
|
|
8
8
|
tarball: string;
|
|
9
9
|
integrity?: string;
|
|
10
|
+
revision?: number;
|
|
10
11
|
path?: string;
|
|
11
12
|
/**
|
|
12
13
|
* True for tarballs sourced from a git host (codeload.github.com /
|
|
@@ -162,10 +163,10 @@ export interface PlatformSelector {
|
|
|
162
163
|
}
|
|
163
164
|
/**
|
|
164
165
|
* Resolve a {@link PlatformSelector} from the user's supportedArchitectures config
|
|
165
|
-
* and the host's own platform/arch/libc.
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
166
|
+
* and the host's own platform/arch/libc. Exactly one (os, cpu, libc) triplet is
|
|
167
|
+
* installed, so each axis prefers the host's own value: a variant built for
|
|
168
|
+
* another platform cannot run here.
|
|
169
|
+
* @see https://github.com/pnpm/pnpm/issues/13898
|
|
169
170
|
*/
|
|
170
171
|
export declare function resolvePlatformSelector(supportedArchitectures: SupportedArchitectures | undefined, host: {
|
|
171
172
|
platform: string;
|
|
@@ -241,6 +242,7 @@ export interface ResolveOptions {
|
|
|
241
242
|
preferWorkspacePackages?: boolean;
|
|
242
243
|
workspacePackages?: WorkspacePackages;
|
|
243
244
|
update?: false | 'compatible' | 'latest';
|
|
245
|
+
updatePatches?: boolean;
|
|
244
246
|
/**
|
|
245
247
|
* True only when this specific package matches the user's update target
|
|
246
248
|
* (e.g. `pnpm up <name>`). Unlike `update`, this is false for unrelated
|
package/lib/index.js
CHANGED
|
@@ -87,16 +87,16 @@ export function classifyResolution(resolution) {
|
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Resolve a {@link PlatformSelector} from the user's supportedArchitectures config
|
|
90
|
-
* and the host's own platform/arch/libc.
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
90
|
+
* and the host's own platform/arch/libc. Exactly one (os, cpu, libc) triplet is
|
|
91
|
+
* installed, so each axis prefers the host's own value: a variant built for
|
|
92
|
+
* another platform cannot run here.
|
|
93
|
+
* @see https://github.com/pnpm/pnpm/issues/13898
|
|
94
94
|
*/
|
|
95
95
|
export function resolvePlatformSelector(supportedArchitectures, host) {
|
|
96
96
|
return {
|
|
97
|
-
os:
|
|
98
|
-
cpu:
|
|
99
|
-
libc:
|
|
97
|
+
os: pickSupported(supportedArchitectures?.os, host.platform),
|
|
98
|
+
cpu: pickSupported(supportedArchitectures?.cpu, host.arch),
|
|
99
|
+
libc: pickSupported(supportedArchitectures?.libc, host.libc),
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
@@ -118,11 +118,12 @@ function libcMatches(variantLibc, requestedLibc) {
|
|
|
118
118
|
}
|
|
119
119
|
return variantLibc === requestedLibc;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
if (requirements?.length
|
|
123
|
-
return
|
|
124
|
-
|
|
125
|
-
|
|
121
|
+
function pickSupported(requirements, hostValue) {
|
|
122
|
+
if (!requirements?.length)
|
|
123
|
+
return hostValue;
|
|
124
|
+
if (requirements.some((requirement) => requirement === 'current' || requirement === hostValue))
|
|
125
|
+
return hostValue;
|
|
126
|
+
return requirements[0];
|
|
126
127
|
}
|
|
127
128
|
// This weight is set for selectors that are used on direct dependencies.
|
|
128
129
|
// It is important to give a bigger weight to direct dependencies.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/resolving.resolver-base",
|
|
3
|
-
"version": "1101.
|
|
3
|
+
"version": "1101.2.0",
|
|
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": "
|
|
31
|
+
"@pnpm/types": "1102.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@jest/globals": "30.4.1",
|
|
35
|
-
"@pnpm/resolving.resolver-base": "1101.
|
|
35
|
+
"@pnpm/resolving.resolver-base": "1101.2.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=22.13"
|