@vltpkg/semver 1.0.0-rc.2 → 1.0.0-rc.23
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/package.json +35 -46
- package/dist/esm/comparator.d.ts +0 -76
- package/dist/esm/comparator.d.ts.map +0 -1
- package/dist/esm/comparator.js +0 -514
- package/dist/esm/comparator.js.map +0 -1
- package/dist/esm/index.d.ts +0 -204
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -458
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/dist/esm/range.d.ts +0 -35
- package/dist/esm/range.d.ts.map +0 -1
- package/dist/esm/range.js +0 -102
- package/dist/esm/range.js.map +0 -1
- package/dist/esm/version.d.ts +0 -132
- package/dist/esm/version.d.ts.map +0 -1
- package/dist/esm/version.js +0 -367
- package/dist/esm/version.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,78 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/semver",
|
|
3
3
|
"description": "The semantic version parser used by vlt",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.23",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
8
8
|
"directory": "src/semver"
|
|
9
9
|
},
|
|
10
|
-
"author":
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
"liveDev": true,
|
|
14
|
-
"dialects": [
|
|
15
|
-
"esm"
|
|
16
|
-
],
|
|
17
|
-
"exports": {
|
|
18
|
-
"./package.json": "./package.json",
|
|
19
|
-
".": "./src/index.ts"
|
|
20
|
-
}
|
|
10
|
+
"author": {
|
|
11
|
+
"name": "vlt technology inc.",
|
|
12
|
+
"email": "support@vlt.sh"
|
|
21
13
|
},
|
|
22
14
|
"dependencies": {
|
|
23
|
-
"@vltpkg/
|
|
24
|
-
"@vltpkg/
|
|
25
|
-
"@vltpkg/types": "1.0.0-rc.
|
|
15
|
+
"@vltpkg/error-cause": "1.0.0-rc.23",
|
|
16
|
+
"@vltpkg/fast-split": "1.0.0-rc.23",
|
|
17
|
+
"@vltpkg/types": "1.0.0-rc.23"
|
|
26
18
|
},
|
|
27
19
|
"devDependencies": {
|
|
28
|
-
"@eslint/js": "^9.
|
|
29
|
-
"@std/semver": "
|
|
30
|
-
"@types/node": "^22.
|
|
31
|
-
"@types/semver": "^7.7.
|
|
32
|
-
"eslint": "^9.
|
|
33
|
-
"prettier": "^3.
|
|
34
|
-
"semver": "^7.7.
|
|
35
|
-
"tap": "^21.
|
|
36
|
-
"tshy": "^3.0.2",
|
|
20
|
+
"@eslint/js": "^9.39.1",
|
|
21
|
+
"@std/semver": "jsr:^1.0.6",
|
|
22
|
+
"@types/node": "^22.19.2",
|
|
23
|
+
"@types/semver": "^7.7.1",
|
|
24
|
+
"eslint": "^9.39.1",
|
|
25
|
+
"prettier": "^3.7.4",
|
|
26
|
+
"semver": "^7.7.3",
|
|
27
|
+
"tap": "^21.5.0",
|
|
37
28
|
"typedoc": "~0.27.9",
|
|
38
29
|
"typescript": "5.7.3",
|
|
39
|
-
"typescript-eslint": "^8.
|
|
30
|
+
"typescript-eslint": "^8.49.0"
|
|
40
31
|
},
|
|
41
32
|
"license": "BSD-2-Clause-Patent",
|
|
42
33
|
"engines": {
|
|
43
|
-
"node": ">=22"
|
|
34
|
+
"node": ">=22.22.0"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"benchmark": "./test/fixtures/vs-node-semver.ts",
|
|
38
|
+
"benchmark:bun": "hyperfine --warmup 3 'bun ./benchmarks/bun.js' 'bun ./benchmarks/npm.js' 'bun ./benchmarks/this.js'",
|
|
39
|
+
"benchmark:node": "hyperfine --warmup 3 'node ./benchmarks/deno.js' 'node ./benchmarks/npm.js' 'node ./benchmarks/this.js'",
|
|
40
|
+
"format": "prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache",
|
|
41
|
+
"format:check": "prettier --check . --ignore-path ../../.prettierignore --cache",
|
|
42
|
+
"lint": "eslint . --fix",
|
|
43
|
+
"lint:check": "eslint .",
|
|
44
|
+
"prepack": "tsc -p tsconfig.publish.json && ../../scripts/update-dist-exports.ts",
|
|
45
|
+
"snap": "tap",
|
|
46
|
+
"test": "tap",
|
|
47
|
+
"posttest": "tsc --noEmit",
|
|
48
|
+
"typecheck": "tsc --noEmit"
|
|
44
49
|
},
|
|
45
50
|
"tap": {
|
|
46
51
|
"extends": "../../tap-config.yaml"
|
|
47
52
|
},
|
|
48
53
|
"prettier": "../../.prettierrc.js",
|
|
49
|
-
"module": "./dist/
|
|
54
|
+
"module": "./dist/index.js",
|
|
50
55
|
"type": "module",
|
|
51
56
|
"exports": {
|
|
52
57
|
"./package.json": "./package.json",
|
|
53
58
|
".": {
|
|
54
59
|
"import": {
|
|
55
|
-
"
|
|
56
|
-
"default": "./dist/esm/index.js"
|
|
60
|
+
"default": "./dist/index.js"
|
|
57
61
|
}
|
|
58
62
|
}
|
|
59
63
|
},
|
|
60
64
|
"files": [
|
|
61
65
|
"dist"
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
"prebenchmark": "pnpm -F '@vltpkg/semver...' exec pnpm pack",
|
|
65
|
-
"benchmark": "./test/fixtures/vs-node-semver.ts",
|
|
66
|
-
"benchmark:bun": "hyperfine --warmup 3 'bun ./benchmarks/bun.js' 'bun ./benchmarks/npm.js' 'bun ./benchmarks/this.js'",
|
|
67
|
-
"benchmark:node": "hyperfine --warmup 3 'node ./benchmarks/deno.js' 'node ./benchmarks/npm.js' 'node ./benchmarks/this.js'",
|
|
68
|
-
"format": "prettier --write . --log-level warn --ignore-path ../../.prettierignore --cache",
|
|
69
|
-
"format:check": "prettier --check . --ignore-path ../../.prettierignore --cache",
|
|
70
|
-
"lint": "eslint . --fix",
|
|
71
|
-
"lint:check": "eslint .",
|
|
72
|
-
"snap": "tap",
|
|
73
|
-
"test": "tap",
|
|
74
|
-
"posttest": "tsc --noEmit",
|
|
75
|
-
"tshy": "tshy",
|
|
76
|
-
"typecheck": "tsc --noEmit"
|
|
77
|
-
}
|
|
78
|
-
}
|
|
66
|
+
]
|
|
67
|
+
}
|
package/dist/esm/comparator.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { Version } from './version.ts';
|
|
2
|
-
/** all comparators are expressed in terms of these operators */
|
|
3
|
-
export type SimpleOperator = '' | '<' | '<=' | '>' | '>=';
|
|
4
|
-
/** operators that are expanded to simpler forms */
|
|
5
|
-
export type ComplexOperator = '^' | '~' | '~>';
|
|
6
|
-
/** comparator expressed as a [operator,version] tuple */
|
|
7
|
-
export type OVTuple = [SimpleOperator, Version];
|
|
8
|
-
/**
|
|
9
|
-
* The result of parsing a version value that might be either a full
|
|
10
|
-
* version like `1.2.3` or an X-Range like `1.2.x`
|
|
11
|
-
*/
|
|
12
|
-
export type ParsedXRange = ParsedXMajor | ParsedXMinor | ParsedXPatch | ParsedXVersion;
|
|
13
|
-
/**
|
|
14
|
-
* a {@link ParsedXRange} that is just a `*`
|
|
15
|
-
*/
|
|
16
|
-
export type ParsedXMajor = [];
|
|
17
|
-
/**
|
|
18
|
-
* a {@link ParsedXRange} that is just a major version
|
|
19
|
-
*/
|
|
20
|
-
export type ParsedXMinor = [number];
|
|
21
|
-
/**
|
|
22
|
-
* a {@link ParsedXRange} that is just a major and minor version
|
|
23
|
-
*/
|
|
24
|
-
export type ParsedXPatch = [number, number];
|
|
25
|
-
/**
|
|
26
|
-
* a {@link ParsedXRange} that is a full version
|
|
27
|
-
*/
|
|
28
|
-
export type ParsedXVersion = [
|
|
29
|
-
M: number,
|
|
30
|
-
m: number,
|
|
31
|
-
p: number,
|
|
32
|
-
pr?: string | undefined,
|
|
33
|
-
b?: string | undefined
|
|
34
|
-
];
|
|
35
|
-
/**
|
|
36
|
-
* Class used to parse the `||` separated portions
|
|
37
|
-
* of a range, and evaluate versions against it.
|
|
38
|
-
*
|
|
39
|
-
* This does most of the heavy lifting of range testing, and provides
|
|
40
|
-
* little affordance for improperly formatted strings. It should be
|
|
41
|
-
* considered an internal class, and usually not accessed directly.
|
|
42
|
-
*/
|
|
43
|
-
export declare class Comparator {
|
|
44
|
-
#private;
|
|
45
|
-
/**
|
|
46
|
-
* does this range include prereleases, even when they do not
|
|
47
|
-
* match the tuple in the comparator?
|
|
48
|
-
*/
|
|
49
|
-
includePrerelease: boolean;
|
|
50
|
-
/** raw string used to create this comparator */
|
|
51
|
-
raw: string;
|
|
52
|
-
/** tokens extracted from the raw string input */
|
|
53
|
-
tokens: string[];
|
|
54
|
-
/**
|
|
55
|
-
* Either the `any` comparator, the `none` comparator, or an operator
|
|
56
|
-
* and a {@link ParsedXRange}
|
|
57
|
-
*/
|
|
58
|
-
tuples: (Comparator | OVTuple)[];
|
|
59
|
-
/** true if this comparator can not match anything */
|
|
60
|
-
isNone: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* true if this comparator is a `'*'` type of range.
|
|
63
|
-
*
|
|
64
|
-
* Note that it still will not match versions with a prerelease value,
|
|
65
|
-
* unless the tuple in the version matches the tuple provided to the
|
|
66
|
-
* comparator, and the comparator version also has a prerelease value,
|
|
67
|
-
* unless `includePrerelease` is set.
|
|
68
|
-
*/
|
|
69
|
-
isAny: boolean;
|
|
70
|
-
/** the canonical strict simplified parsed form of this constructor */
|
|
71
|
-
toString(): string;
|
|
72
|
-
constructor(comp: string, includePrerelease?: boolean);
|
|
73
|
-
/** return true if the version is a match for this comparator */
|
|
74
|
-
test(v: Version): boolean;
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=comparator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comparator.d.ts","sourceRoot":"","sources":["../../src/comparator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,gEAAgE;AAChE,MAAM,MAAM,cAAc,GAAG,EAAE,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