@pnpm/installing.deps-resolver 1100.2.0 → 1100.2.2
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/resolvePeers.js +11 -1
- package/package.json +21 -21
package/lib/resolvePeers.js
CHANGED
|
@@ -152,7 +152,17 @@ function deduplicateAll(depGraph, duplicates) {
|
|
|
152
152
|
return depPathsMap;
|
|
153
153
|
}
|
|
154
154
|
function deduplicateDepPaths(duplicates, depGraph) {
|
|
155
|
-
|
|
155
|
+
// The dep paths arrive in resolution order, which varies between platforms.
|
|
156
|
+
// Tie-break equal dependency counts on the dep path itself so the chosen
|
|
157
|
+
// collapse target is the same everywhere — when a variant is a subset of
|
|
158
|
+
// several incompatible larger variants, the winner must not hinge on
|
|
159
|
+
// iteration order, or the lockfile becomes machine-dependent.
|
|
160
|
+
const depCountSorter = (depPath1, depPath2) => {
|
|
161
|
+
const countDiff = nodeDepsCount(depGraph[depPath1]) - nodeDepsCount(depGraph[depPath2]);
|
|
162
|
+
if (countDiff !== 0)
|
|
163
|
+
return countDiff;
|
|
164
|
+
return depPath1 < depPath2 ? -1 : depPath1 > depPath2 ? 1 : 0;
|
|
165
|
+
};
|
|
156
166
|
const depPathsMap = {};
|
|
157
167
|
const remainingDuplicates = [];
|
|
158
168
|
for (const depPaths of duplicates) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/installing.deps-resolver",
|
|
3
|
-
"version": "1100.2.
|
|
3
|
+
"version": "1100.2.2",
|
|
4
4
|
"description": "Resolves dependency graph of a package",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -45,28 +45,28 @@
|
|
|
45
45
|
"version-selector-type": "^3.0.0",
|
|
46
46
|
"@pnpm/catalogs.types": "1100.0.0",
|
|
47
47
|
"@pnpm/catalogs.resolver": "1100.0.0",
|
|
48
|
-
"@pnpm/config.version-policy": "1100.1.
|
|
48
|
+
"@pnpm/config.version-policy": "1100.1.4",
|
|
49
|
+
"@pnpm/core-loggers": "1100.2.0",
|
|
49
50
|
"@pnpm/constants": "1100.0.0",
|
|
50
|
-
"@pnpm/
|
|
51
|
-
"@pnpm/deps.path": "1100.0.
|
|
52
|
-
"@pnpm/deps.graph-hasher": "1100.2.3",
|
|
53
|
-
"@pnpm/error": "1100.0.0",
|
|
51
|
+
"@pnpm/deps.graph-hasher": "1100.2.4",
|
|
52
|
+
"@pnpm/deps.path": "1100.0.7",
|
|
54
53
|
"@pnpm/deps.peer-range": "1100.0.1",
|
|
55
|
-
"@pnpm/
|
|
56
|
-
"@pnpm/
|
|
57
|
-
"@pnpm/
|
|
58
|
-
"@pnpm/lockfile.preferred-versions": "1100.0.
|
|
59
|
-
"@pnpm/
|
|
60
|
-
"@pnpm/lockfile.utils": "1100.0.
|
|
61
|
-
"@pnpm/
|
|
62
|
-
"@pnpm/
|
|
54
|
+
"@pnpm/error": "1100.0.0",
|
|
55
|
+
"@pnpm/fetching.pick-fetcher": "1100.0.11",
|
|
56
|
+
"@pnpm/hooks.types": "1100.0.11",
|
|
57
|
+
"@pnpm/lockfile.preferred-versions": "1100.0.15",
|
|
58
|
+
"@pnpm/lockfile.pruner": "1100.0.10",
|
|
59
|
+
"@pnpm/lockfile.utils": "1100.0.12",
|
|
60
|
+
"@pnpm/lockfile.types": "1100.0.10",
|
|
61
|
+
"@pnpm/patching.config": "1100.0.7",
|
|
63
62
|
"@pnpm/patching.types": "1100.0.0",
|
|
64
|
-
"@pnpm/
|
|
65
|
-
"@pnpm/
|
|
66
|
-
"@pnpm/
|
|
67
|
-
"@pnpm/types": "
|
|
68
|
-
"@pnpm/resolving.
|
|
69
|
-
"@pnpm/
|
|
63
|
+
"@pnpm/pkg-manifest.reader": "1100.0.7",
|
|
64
|
+
"@pnpm/pkg-manifest.utils": "1100.2.4",
|
|
65
|
+
"@pnpm/resolving.npm-resolver": "1101.5.2",
|
|
66
|
+
"@pnpm/store.controller-types": "1100.1.4",
|
|
67
|
+
"@pnpm/resolving.resolver-base": "1100.4.1",
|
|
68
|
+
"@pnpm/types": "1101.3.1",
|
|
69
|
+
"@pnpm/workspace.spec-parser": "1100.0.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@pnpm/logger": "^1001.0.1"
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@types/semver": "7.7.1",
|
|
79
79
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
80
80
|
"@pnpm/logger": "1100.0.0",
|
|
81
|
-
"@pnpm/installing.deps-resolver": "1100.2.
|
|
81
|
+
"@pnpm/installing.deps-resolver": "1100.2.2"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=22.13"
|