dsh-plugin-toolkit 0.20.11 → 0.20.12
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 +17 -2
- package/README.md +11 -2
- package/lib/cli.mjs +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
##
|
|
2
|
-
|
|
1
|
+
## 0.20.12
|
|
2
|
+
|
|
3
|
+
- **`dsh-plugin fix <owner>/<repo> --remote` treats an already-correct range as
|
|
4
|
+
success.** When `package.json` already declares an `engines.dsh` range that
|
|
5
|
+
clears the check, the command still prints `ok engines.dsh is already
|
|
6
|
+
"<range>"; nothing to apply` but now exits `0` instead of `1`, matching the
|
|
7
|
+
local `fix --engines` no-op and the documented exit-code contract. No diff or
|
|
8
|
+
patch file is written.
|
|
9
|
+
- **The remote repair keeps its diff and error paths.** A manifest with no
|
|
10
|
+
`engines.dsh` still prints the unified diff and exits `0`; an invalid target
|
|
11
|
+
and a network or HTTP read failure still exit `2`; and the command writes no
|
|
12
|
+
local file unless `--patch` asks for one. Regression tests pin those paths
|
|
13
|
+
beside the already-correct no-op.
|
|
14
|
+
- **The remote repair exit codes are covered at the process boundary.** `npm
|
|
15
|
+
test` now spawns the real CLI for a remote manifest that is missing
|
|
16
|
+
`engines.dsh` and one that already declares a valid range, asserting exit
|
|
17
|
+
`0` for both. The README Exit codes table states the same contract.
|
|
3
18
|
- **A malformed `package.json` in an ordinary dependency still stays out of
|
|
4
19
|
`audit`.** The unreadable-manifest exception only applies when the package
|
|
5
20
|
name is in `dsh.profile.bundles`; a package that is neither declared there nor
|
package/README.md
CHANGED
|
@@ -783,6 +783,11 @@ dsh-plugin fix: would write engines.dsh ">=0.2.0" (was missing) in PrismLean/dsh
|
|
|
783
783
|
remote repositories are read-only; nothing written; apply this diff in your checkout
|
|
784
784
|
```
|
|
785
785
|
|
|
786
|
+
When `package.json` already declares a range that clears the check, there is
|
|
787
|
+
nothing to apply: the command prints `ok engines.dsh is already "<range>";
|
|
788
|
+
nothing to apply` and exits `0`, the same no-op as `fix --engines` on a
|
|
789
|
+
checkout. No diff and no patch file is written.
|
|
790
|
+
|
|
786
791
|
To apply it, clone the repository, save that diff with `--patch`, and apply it
|
|
787
792
|
in the checkout:
|
|
788
793
|
|
|
@@ -985,9 +990,13 @@ merged
|
|
|
985
990
|
|
|
986
991
|
| Code | Meaning |
|
|
987
992
|
| --- | --- |
|
|
988
|
-
| 0 | Done, or nothing to complain about |
|
|
993
|
+
| 0 | Done, or nothing to complain about — including `fix --remote` when `engines.dsh` is already a valid range |
|
|
989
994
|
| 1 | A check failed, an installed plugin was not loaded by the running app, or the release stopped (the failing stage is named) |
|
|
990
|
-
| 2 | Unknown command |
|
|
995
|
+
| 2 | Unknown command, invalid usage, or a remote request that could not be completed |
|
|
996
|
+
|
|
997
|
+
`fix <owner>/<repo> --remote` exits `0` both when it prints a diff for a missing
|
|
998
|
+
`engines.dsh` and when the manifest already declares a range that clears the
|
|
999
|
+
check; the second case prints `ok ... nothing to apply` and writes no diff.
|
|
991
1000
|
|
|
992
1001
|
## What is not here yet
|
|
993
1002
|
|
package/lib/cli.mjs
CHANGED
|
@@ -358,9 +358,12 @@ export async function run(argv, io = console, deps = {}) {
|
|
|
358
358
|
return 2;
|
|
359
359
|
}
|
|
360
360
|
if (result.changed !== true) {
|
|
361
|
+
// A manifest that already declares a range clearing the check is a
|
|
362
|
+
// successful repair plan, exactly like the local `fix --engines` no-op:
|
|
363
|
+
// there is no failure to report, so the documented exit code is 0.
|
|
361
364
|
io.log(`ok engines.dsh is already "${result.range}"; nothing to apply`);
|
|
362
365
|
if (typeof result.why === 'string' && result.why.length > 0) io.log(` ${result.why}`);
|
|
363
|
-
return
|
|
366
|
+
return 0;
|
|
364
367
|
}
|
|
365
368
|
const was = result.before === null ? 'missing' : `"${result.before}"`;
|
|
366
369
|
io.log(`dsh-plugin fix: would write engines.dsh "${result.range}" (was ${was}) in ${result.target.slug}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.12",
|
|
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": {
|