dsh-plugin-toolkit 0.20.14 → 0.20.15
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 +12 -0
- package/lib/compat.mjs +17 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 0.20.15
|
|
2
|
+
|
|
3
|
+
- **A strict comparison against a wildcard major matches nothing.** `audit
|
|
4
|
+
--remote <owner/repo> --host <version>` treated `>*`, `>x`, `<*` and `<x` as
|
|
5
|
+
"any version" and called every host compatible, while npm reads them as an
|
|
6
|
+
empty set that no release satisfies. The host-range parser now reports
|
|
7
|
+
`incompatible` for those spellings; the inclusive `>=*` and `<=*` forms still
|
|
8
|
+
span every stable host. Regression tests pin the parser, the printed CLI
|
|
9
|
+
verdict and the `--json` row, including the major-only `>1`/`<=1` boundary:
|
|
10
|
+
`>1` rejects 1.2.3 and `<=1` accepts it, in both the text line and
|
|
11
|
+
`compatibility`.
|
|
12
|
+
|
|
1
13
|
## 0.20.14
|
|
2
14
|
|
|
3
15
|
- **The `--jobs` benchmark asserts work, not wall-clock speed.** The throughput
|
package/lib/compat.mjs
CHANGED
|
@@ -120,6 +120,21 @@ function comparator(op, version) {
|
|
|
120
120
|
return { op, version };
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/**
|
|
124
|
+
* A comparator set no version can satisfy. npm reads a strict comparison
|
|
125
|
+
* against a wildcard major (`>*`, `<*`, `>x`, `<x`) as `<0.0.0-0`: there is no
|
|
126
|
+
* boundary to start from, so the set is empty rather than unconstrained. An
|
|
127
|
+
* empty comparator array would mean "any version", which is the opposite
|
|
128
|
+
* answer and would call every host compatible.
|
|
129
|
+
*
|
|
130
|
+
* `<0.0.0` is enough to match nothing here: the parser only accepts versions at
|
|
131
|
+
* or above 0.0.0, and the pre-release rule already refuses to let a pre-release
|
|
132
|
+
* host satisfy a comparator that does not name a pre-release of its own tuple.
|
|
133
|
+
*/
|
|
134
|
+
function noVersion() {
|
|
135
|
+
return [comparator('<', full(0, 0, 0))];
|
|
136
|
+
}
|
|
137
|
+
|
|
123
138
|
function lowerBounds(partial, inclusive) {
|
|
124
139
|
const version = filled(partial);
|
|
125
140
|
if (inclusive === true) return [comparator('>=', version)];
|
|
@@ -199,9 +214,9 @@ function expandToken(token) {
|
|
|
199
214
|
}
|
|
200
215
|
if (operator === '=') return plainBounds(partial);
|
|
201
216
|
if (operator === '>=') return partial.major === null ? [] : [comparator('>=', filled(partial))];
|
|
202
|
-
if (operator === '>') return partial.major === null ?
|
|
217
|
+
if (operator === '>') return partial.major === null ? noVersion() : lowerBounds(partial, false);
|
|
203
218
|
if (operator === '<=') return partial.major === null ? [] : upperBounds(partial, true);
|
|
204
|
-
if (operator === '<') return partial.major === null ?
|
|
219
|
+
if (operator === '<') return partial.major === null ? noVersion() : upperBounds(partial, false);
|
|
205
220
|
return null;
|
|
206
221
|
}
|
|
207
222
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.15",
|
|
4
4
|
"description": "Preflight, release and test DeepSeek Harness plugins: check a folder or any GitHub repository, wait for npm to actually serve the version, and keep the market index honest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|