@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.
Files changed (2) hide show
  1. package/lib/resolvePeers.js +11 -1
  2. package/package.json +21 -21
@@ -152,7 +152,17 @@ function deduplicateAll(depGraph, duplicates) {
152
152
  return depPathsMap;
153
153
  }
154
154
  function deduplicateDepPaths(duplicates, depGraph) {
155
- const depCountSorter = (depPath1, depPath2) => nodeDepsCount(depGraph[depPath1]) - nodeDepsCount(depGraph[depPath2]);
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.0",
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.3",
48
+ "@pnpm/config.version-policy": "1100.1.4",
49
+ "@pnpm/core-loggers": "1100.2.0",
49
50
  "@pnpm/constants": "1100.0.0",
50
- "@pnpm/core-loggers": "1100.1.3",
51
- "@pnpm/deps.path": "1100.0.6",
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/fetching.pick-fetcher": "1100.0.10",
56
- "@pnpm/lockfile.types": "1100.0.9",
57
- "@pnpm/patching.config": "1100.0.6",
58
- "@pnpm/lockfile.preferred-versions": "1100.0.13",
59
- "@pnpm/pkg-manifest.utils": "1100.2.2",
60
- "@pnpm/lockfile.utils": "1100.0.11",
61
- "@pnpm/resolving.resolver-base": "1100.4.0",
62
- "@pnpm/pkg-manifest.reader": "1100.0.6",
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/hooks.types": "1100.0.10",
65
- "@pnpm/lockfile.pruner": "1100.0.9",
66
- "@pnpm/workspace.spec-parser": "1100.0.0",
67
- "@pnpm/types": "1101.3.0",
68
- "@pnpm/resolving.npm-resolver": "1101.5.0",
69
- "@pnpm/store.controller-types": "1100.1.3"
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.0"
81
+ "@pnpm/installing.deps-resolver": "1100.2.2"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=22.13"