dsh-plugin-toolkit 0.20.6 → 0.20.7
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 +9 -0
- package/README.md +6 -2
- package/lib/cli.mjs +21 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 0.20.7
|
|
2
|
+
|
|
3
|
+
- **`dsh-plugin release --budget` rejects a value that is not a positive
|
|
4
|
+
number of seconds.** `--budget 8m`, `--budget 0`, `--budget -1` and a
|
|
5
|
+
missing value now stop during flag parsing with `--budget needs a positive
|
|
6
|
+
number of seconds`, exit `2`, and create neither a local nor a remote tag,
|
|
7
|
+
instead of pushing the tag and then waiting on a nonsensical interval. A
|
|
8
|
+
positive value still reaches the registry wait.
|
|
9
|
+
|
|
1
10
|
## 0.20.6
|
|
2
11
|
|
|
3
12
|
- **`dsh-plugin doctor` reads `files` globs the way `npm pack` does.** A
|
package/README.md
CHANGED
|
@@ -965,8 +965,12 @@ Honest list, so nobody plans around a feature that does not exist:
|
|
|
965
965
|
## Changelog
|
|
966
966
|
|
|
967
967
|
[`CHANGELOG.md`](CHANGELOG.md) lists what changed in each release, including
|
|
968
|
-
the `0.20.
|
|
969
|
-
`
|
|
968
|
+
the `0.20.7` fix: `release --budget` rejects a value that is not a positive
|
|
969
|
+
number of seconds — `8m`, `0`, `-1` or a missing value — with exit `2` before
|
|
970
|
+
any local or remote tag is created, instead of pushing the tag and then waiting.
|
|
971
|
+
The `0.20.6` fixes are recorded too: `doctor` reads a `files` glob the way
|
|
972
|
+
`npm pack` does, so a `"files": ["*.js"]` entry no longer hides a nested
|
|
973
|
+
`exports["./client"]`, and
|
|
970
974
|
`doctor --remote`/`audit --remote` apply the same files-list check instead of
|
|
971
975
|
printing `clean`. The `0.20.5` fixes are recorded too: `doctor` reads a
|
|
972
976
|
`package.json` saved with a UTF-8 BOM instead of failing with a bare
|
package/lib/cli.mjs
CHANGED
|
@@ -100,7 +100,7 @@ Flags
|
|
|
100
100
|
--market <dir> with release: a checkout of the repository that holds the index
|
|
101
101
|
--publish with release: run npm publish here, for repos without a publish workflow
|
|
102
102
|
--tag-prefix <prefix> default plugin-v
|
|
103
|
-
--budget <seconds> how long to wait for npm, default 480
|
|
103
|
+
--budget <seconds> how long to wait for npm, a positive number, default 480
|
|
104
104
|
--pr commit the index on a branch, push it, open the pull request
|
|
105
105
|
--merge with --pr: wait for checks, then squash-merge
|
|
106
106
|
--base <branch> base branch for the pull request, default main
|
|
@@ -127,7 +127,18 @@ function flags(argv) {
|
|
|
127
127
|
else if (token === '--log') parsed.log = argv[++index];
|
|
128
128
|
else if (token === '--index') parsed.index = argv[++index];
|
|
129
129
|
else if (token === '--tag-prefix') parsed.tagPrefix = argv[++index];
|
|
130
|
-
else if (token === '--budget')
|
|
130
|
+
else if (token === '--budget') {
|
|
131
|
+
// A budget of `8m`, `0`, or `-1` is not a wait, and by the time the
|
|
132
|
+
// registry loop notices, the tag is already pushed. Validate the flag
|
|
133
|
+
// here, before any command can reach `git tag`.
|
|
134
|
+
const raw = argv[++index];
|
|
135
|
+
const seconds = Number(raw);
|
|
136
|
+
if (raw === undefined || String(raw).trim() === '' || Number.isFinite(seconds) === false || seconds <= 0) {
|
|
137
|
+
parsed.budgetError = raw;
|
|
138
|
+
} else {
|
|
139
|
+
parsed.budget = seconds;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
131
142
|
else if (token === '--slot') parsed.slot = argv[++index];
|
|
132
143
|
else if (token === '--surface') parsed.surface = argv[++index];
|
|
133
144
|
else if (token === '--html') parsed.html = true;
|
|
@@ -200,6 +211,14 @@ export async function run(argv, io = console, deps = {}) {
|
|
|
200
211
|
const options = flags(rest);
|
|
201
212
|
const dir = path.resolve(options.positional[0] ?? '.');
|
|
202
213
|
|
|
214
|
+
// `--budget` is validated while parsing, so an invalid value stops here:
|
|
215
|
+
// before the release sequence reads the manifest, tags, or pushes anything.
|
|
216
|
+
if (Object.prototype.hasOwnProperty.call(options, 'budgetError') === true) {
|
|
217
|
+
const got = options.budgetError === undefined ? 'nothing' : JSON.stringify(options.budgetError);
|
|
218
|
+
io.error(`dsh-plugin: --budget needs a positive number of seconds, got ${got}`);
|
|
219
|
+
return 2;
|
|
220
|
+
}
|
|
221
|
+
|
|
203
222
|
if (command === undefined || command === 'help' || command === '--help') {
|
|
204
223
|
io.log(HELP);
|
|
205
224
|
return 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-toolkit",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.7",
|
|
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": {
|