@pnpm/resolving.resolver-base 1005.1.0 → 1100.0.1

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/index.d.ts CHANGED
@@ -66,6 +66,7 @@ export interface WorkspacePackage {
66
66
  export type WorkspacePackagesByVersion = Map<string, WorkspacePackage>;
67
67
  export type WorkspacePackages = Map<string, WorkspacePackagesByVersion>;
68
68
  export declare const DIRECT_DEP_SELECTOR_WEIGHT = 1000;
69
+ export declare const EXISTING_VERSION_SELECTOR_WEIGHT = 1000000;
69
70
  export type VersionSelectorType = 'version' | 'range' | 'tag';
70
71
  export interface VersionSelectors {
71
72
  [selector: string]: VersionSelectorWithWeight | VersionSelectorType;
package/lib/index.js CHANGED
@@ -2,4 +2,13 @@ export {};
2
2
  // This weight is set for selectors that are used on direct dependencies.
3
3
  // It is important to give a bigger weight to direct dependencies.
4
4
  export const DIRECT_DEP_SELECTOR_WEIGHT = 1000;
5
+ // This weight is set for concrete versions of dependencies preexisting in the
6
+ // wanted lockfile. When adding a dependency, prefer existing versions first.
7
+ //
8
+ // This needs to be a higher weight than DIRECT_DEP_SELECTOR_WEIGHT since direct
9
+ // dependency specifiers can match a range of versions. Versions on the registry
10
+ // not present in the lockfile should be considered at a lower weight than
11
+ // matching pre-existing versions. If this is not the case, pnpm could suddenly
12
+ // introduce a new version in the lockfile when an existing version works.
13
+ export const EXISTING_VERSION_SELECTOR_WEIGHT = 1_000_000;
5
14
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/resolving.resolver-base",
3
- "version": "1005.1.0",
3
+ "version": "1100.0.1",
4
4
  "description": "Types for pnpm-compatible resolvers",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -25,10 +25,10 @@
25
25
  "!*.map"
26
26
  ],
27
27
  "dependencies": {
28
- "@pnpm/types": "1000.9.0"
28
+ "@pnpm/types": "1101.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@pnpm/resolving.resolver-base": "1005.1.0"
31
+ "@pnpm/resolving.resolver-base": "1100.0.1"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=22.13"
@@ -39,7 +39,7 @@
39
39
  "scripts": {
40
40
  "start": "tsgo --watch",
41
41
  "lint": "eslint \"src/**/*.ts\"",
42
- "test": "pnpm run compile",
43
- "compile": "tsgo --build && pnpm run lint --fix"
42
+ "test": "pn compile",
43
+ "compile": "tsgo --build && pn lint --fix"
44
44
  }
45
45
  }