@pnpm/config.version-policy 1100.1.7 → 1100.1.8
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 +7 -0
- package/package.json +3 -3
- package/lib/index.d.ts +0 -33
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pnpm/config.version-policy",
|
|
3
|
-
"version": "1100.1.
|
|
3
|
+
"version": "1100.1.8",
|
|
4
4
|
"description": "Parses and evaluates package version policy specs and produces package-version matchers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pnpm",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@pnpm/config.matcher": "1100.0.1",
|
|
31
31
|
"@pnpm/error": "1100.0.1",
|
|
32
|
-
"@pnpm/types": "1101.
|
|
32
|
+
"@pnpm/types": "1101.5.0",
|
|
33
33
|
"semver": "^7.8.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@jest/globals": "30.4.1",
|
|
37
|
-
"@pnpm/config.version-policy": "1100.1.
|
|
37
|
+
"@pnpm/config.version-policy": "1100.1.8",
|
|
38
38
|
"@types/semver": "7.7.1"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
package/lib/index.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { PackageVersionPolicy } from '@pnpm/types';
|
|
2
|
-
export declare function createPackageVersionPolicy(patterns: string[]): PackageVersionPolicy;
|
|
3
|
-
/**
|
|
4
|
-
* Like {@link createPackageVersionPolicy}, but rewraps parser errors with an
|
|
5
|
-
* `INVALID_<KEY>` PnpmError so the message points at the user-facing config key
|
|
6
|
-
* (e.g. `minimumReleaseAgeExclude`) instead of the internal parser code.
|
|
7
|
-
*/
|
|
8
|
-
export declare function createPackageVersionPolicyOrThrow(patterns: string[], key: string): PackageVersionPolicy;
|
|
9
|
-
export interface PublishedByPolicyOptions {
|
|
10
|
-
minimumReleaseAge?: number;
|
|
11
|
-
minimumReleaseAgeExclude?: string[];
|
|
12
|
-
}
|
|
13
|
-
export interface PublishedByPolicy {
|
|
14
|
-
publishedBy?: Date;
|
|
15
|
-
publishedByExclude?: PackageVersionPolicy;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Derives the resolver's `publishedBy` cutoff date and `publishedByExclude`
|
|
19
|
-
* policy from the user's `minimumReleaseAge` / `minimumReleaseAgeExclude`
|
|
20
|
-
* config. Centralized so every call site computes the cutoff at the same
|
|
21
|
-
* instant and surfaces invalid exclude patterns under the same error code.
|
|
22
|
-
*/
|
|
23
|
-
export declare function getPublishedByPolicy(opts: PublishedByPolicyOptions): PublishedByPolicy;
|
|
24
|
-
/**
|
|
25
|
-
* Merges a list of package version policy specs (e.g. `minimumReleaseAgeExclude`
|
|
26
|
-
* entries) into one canonical entry per package. Specs for the same package are
|
|
27
|
-
* combined: a bare name/pattern (no version) excludes every version and absorbs
|
|
28
|
-
* any version-specific specs for that package, otherwise the exact versions are
|
|
29
|
-
* deduplicated, sorted by semver, and joined into a single `name@v1 || v2` entry.
|
|
30
|
-
* Packages keep their first-seen order so the output is stable.
|
|
31
|
-
*/
|
|
32
|
-
export declare function mergePackageVersionSpecs(specs: string[]): string[];
|
|
33
|
-
export declare function expandPackageVersionSpecs(specs: string[]): Set<string>;
|