@pnpm/config.version-policy 1100.1.11 → 1100.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @pnpm/config.version-policy
2
2
 
3
+ ## 1100.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Added a new setting `minimumReleaseAgeExcludePrune`. When enabled, `pnpm add`, `pnpm update`, and `pnpm remove` prune the entries of `minimumReleaseAgeExclude` in `pnpm-workspace.yaml` that the freshly written lockfile no longer resolves: versions that are gone are dropped (an entry is removed once none of its versions remain), and entries for packages that are no longer in the lockfile are removed too. Name patterns (`@scope/*`) are always kept. The cleanup is skipped when the install's lockfile does not cover the whole workspace (`sharedWorkspaceLockfile: false`), since entries another project still needs would look stale.
8
+
9
+ Renamed `cleanupUnusedCatalogs` to `catalogPrune`, so that catalog pruning and release-age exclude pruning use one vocabulary. `cleanupUnusedCatalogs` continues to work; when both are set, `catalogPrune` wins.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies:
14
+ - @pnpm/error@1100.1.2
15
+
16
+ ## 1100.1.12
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies:
21
+ - @pnpm/error@1100.1.1
22
+ - @pnpm/types@1101.9.0
23
+
3
24
  ## 1100.1.11
4
25
 
5
26
  ### Patch Changes
package/lib/index.d.ts CHANGED
@@ -31,3 +31,8 @@ export declare function getPublishedByPolicy(opts: PublishedByPolicyOptions): Pu
31
31
  */
32
32
  export declare function mergePackageVersionSpecs(specs: string[]): string[];
33
33
  export declare function expandPackageVersionSpecs(specs: string[]): Set<string>;
34
+ export interface ParsedVersionPolicyRule {
35
+ packageName: string;
36
+ exactVersions: string[];
37
+ }
38
+ export declare function parseVersionPolicyRule(pattern: string): ParsedVersionPolicyRule;
package/lib/index.js CHANGED
@@ -106,7 +106,7 @@ function evaluateVersionPolicy(rules, pkgName) {
106
106
  }
107
107
  return matchedVersions ?? false;
108
108
  }
109
- function parseVersionPolicyRule(pattern) {
109
+ export function parseVersionPolicyRule(pattern) {
110
110
  const isScoped = pattern.startsWith('@');
111
111
  const atIndex = isScoped ? pattern.indexOf('@', 1) : pattern.indexOf('@');
112
112
  if (atIndex === -1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/config.version-policy",
3
- "version": "1100.1.11",
3
+ "version": "1100.2.0",
4
4
  "description": "Parses and evaluates package version policy specs and produces package-version matchers",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -28,14 +28,14 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@pnpm/config.matcher": "1100.0.2",
31
- "@pnpm/error": "1100.1.0",
32
- "@pnpm/types": "1101.8.0",
31
+ "@pnpm/error": "1100.1.2",
32
+ "@pnpm/types": "1101.9.0",
33
33
  "semver": "^7.8.5"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@jest/globals": "30.4.1",
37
- "@pnpm/config.version-policy": "1100.1.11",
38
- "@types/semver": "7.7.1"
37
+ "@pnpm/config.version-policy": "1100.2.0",
38
+ "@types/semver": "7.8.0"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=22.13"