@williamthorsen/release-kit 16.1.2 → 17.0.0

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.
Files changed (86) hide show
  1. package/.meta/changelog.json +62 -0
  2. package/.readyup/kits/default.js +2 -2
  3. package/.readyup/kits/npm-auto-publish.js +1 -1
  4. package/.readyup/manifest.json +204 -16
  5. package/CHANGELOG.md +22 -0
  6. package/README.md +7 -2
  7. package/bin/release-kit.js +1 -1
  8. package/dist/esm/assertReleasesOnNpm.js +1 -2
  9. package/dist/esm/assertTarballsComplete.js +2 -3
  10. package/dist/esm/bin.d.ts +2 -0
  11. package/dist/esm/bin.js +1 -0
  12. package/dist/esm/changelogJsonUtils.js +2 -1
  13. package/dist/esm/cli/commandKit.d.ts +18 -0
  14. package/dist/esm/cli/commandKit.js +27 -0
  15. package/dist/esm/cli/maintenanceCommands.d.ts +6 -0
  16. package/dist/esm/cli/maintenanceCommands.js +129 -0
  17. package/dist/esm/cli/releaseCommands.d.ts +7 -0
  18. package/dist/esm/cli/releaseCommands.js +156 -0
  19. package/dist/esm/cli.js +4 -3
  20. package/dist/esm/commitCommand.d.ts +4 -1
  21. package/dist/esm/commitCommand.js +2 -6
  22. package/dist/esm/createGithubReleaseCommand.d.ts +10 -4
  23. package/dist/esm/createGithubReleaseCommand.js +2 -15
  24. package/dist/esm/deriveDirectoryConfig.js +1 -2
  25. package/dist/esm/deriveWorkspaceConfig.js +1 -2
  26. package/dist/esm/detectPackageManager.js +1 -1
  27. package/dist/esm/findMissingManifestPaths.js +1 -1
  28. package/dist/esm/hasPrettierConfig.js +1 -1
  29. package/dist/esm/init/parseJsonRecord.js +1 -1
  30. package/dist/esm/isPublishableManifest.js +1 -1
  31. package/dist/esm/loadChangelogOverrides.js +1 -1
  32. package/dist/esm/loadConfig.js +1 -2
  33. package/dist/esm/loadValidatedConfig.d.ts +6 -1
  34. package/dist/esm/loadValidatedConfig.js +11 -3
  35. package/dist/esm/npmRegistry.js +1 -1
  36. package/dist/esm/packFromCleanCheckout.js +1 -2
  37. package/dist/esm/parseChangeRecordBlock.js +1 -1
  38. package/dist/esm/prepareArgs.d.ts +1 -49
  39. package/dist/esm/prepareArgs.js +4 -51
  40. package/dist/esm/prepareCommand.d.ts +15 -3
  41. package/dist/esm/prepareCommand.js +15 -23
  42. package/dist/esm/publishCommand.d.ts +12 -3
  43. package/dist/esm/publishCommand.js +1 -16
  44. package/dist/esm/pushCommand.d.ts +12 -4
  45. package/dist/esm/pushCommand.js +2 -16
  46. package/dist/esm/resolveCommandTags.d.ts +3 -3
  47. package/dist/esm/resolveCommandTags.js +5 -7
  48. package/dist/esm/{resolveStylesOrExit.d.ts → resolveStyles.d.ts} +2 -2
  49. package/dist/esm/resolveStyles.js +10 -0
  50. package/dist/esm/route.d.ts +2 -0
  51. package/dist/esm/route.js +39 -0
  52. package/dist/esm/showTagPrefixesCommand.js +2 -1
  53. package/dist/esm/sync-labels/generateCommand.js +7 -6
  54. package/dist/esm/sync-labels/presets.js +1 -2
  55. package/dist/esm/sync-labels/retiredConfig.js +2 -1
  56. package/dist/esm/sync-labels/syncCommand.js +4 -3
  57. package/dist/esm/tagCommand.d.ts +8 -3
  58. package/dist/esm/tagCommand.js +1 -7
  59. package/dist/esm/typeGuards.d.ts +0 -2
  60. package/dist/esm/typeGuards.js +0 -3
  61. package/dist/esm/validateConfig.js +1 -1
  62. package/dist/esm/validateOverridesCommand.js +5 -4
  63. package/docs/configuration.md +1 -1
  64. package/docs/editorial-overrides.md +2 -0
  65. package/docs/labels.md +2 -0
  66. package/docs/releasing.md +1 -1
  67. package/package.json +3 -3
  68. package/dist/esm/configFlagSchema.d.ts +0 -12
  69. package/dist/esm/configFlagSchema.js +0 -3
  70. package/dist/esm/help/initHelp.d.ts +0 -4
  71. package/dist/esm/help/initHelp.js +0 -31
  72. package/dist/esm/help/overridesHelp.d.ts +0 -4
  73. package/dist/esm/help/overridesHelp.js +0 -32
  74. package/dist/esm/help/prepareHelp.d.ts +0 -7
  75. package/dist/esm/help/prepareHelp.js +0 -30
  76. package/dist/esm/help/releaseStepsHelp.d.ts +0 -12
  77. package/dist/esm/help/releaseStepsHelp.js +0 -91
  78. package/dist/esm/help/syncLabelsHelp.d.ts +0 -8
  79. package/dist/esm/help/syncLabelsHelp.js +0 -55
  80. package/dist/esm/help/usage.d.ts +0 -2
  81. package/dist/esm/help/usage.js +0 -29
  82. package/dist/esm/resolveConfigFlag.d.ts +0 -7
  83. package/dist/esm/resolveConfigFlag.js +0 -4
  84. package/dist/esm/resolveStylesOrExit.js +0 -10
  85. package/dist/esm/runCli.d.ts +0 -5
  86. package/dist/esm/runCli.js +0 -224
@@ -1,4 +1,66 @@
1
1
  [
2
+ {
3
+ "version": "17.0.0",
4
+ "date": "2026-11-08",
5
+ "sections": [
6
+ {
7
+ "title": "🎉 Features",
8
+ "audience": "all",
9
+ "items": [
10
+ {
11
+ "description": "Routes `release-kit` commands through the `toolbelt.cli` command parser, which renders help from each command's options and makes a usage error, such as an invalid `RELEASE_KIT_OUTPUT_STYLE` or a stray argument to `sync-labels sync`, exit 2 with a `Try` line instead of exit 1, and makes a bare `release-kit`, `release-kit overrides`, or `release-kit sync-labels` exit 2 instead of printing help and exiting 0. (#1186)",
12
+ "breaking": true,
13
+ "migration": "Update any script that checks for exit code 1 from a `release-kit` usage error to check for 2, and replace a bare `release-kit`, `release-kit overrides`, or `release-kit sync-labels` with the same command followed by `--help`; note that `release-kit overrides validate` already exits 2 for a schema or parse error, so a script cannot tell that error from a usage error by its exit code alone.",
14
+ "hash": "343c0f97b212aa710c49baf61fce118256da6db7",
15
+ "entry": 1
16
+ },
17
+ {
18
+ "description": "Prefixes each handled error line written by `nmr` and its other bins, `release-kit`, and `v11y-check` with the name of the program that wrote it, as `<bin>: <message>` in place of `Error: <message>`, for usage errors such as an unknown command or option as well, and names `v11y` for both of the bins in `v11y-check`. (#1190)",
19
+ "hash": "b7634734032c508e45388b7752b7b6905071273e",
20
+ "entry": 1
21
+ }
22
+ ]
23
+ },
24
+ {
25
+ "title": "🐛 Bug fixes",
26
+ "audience": "all",
27
+ "items": [
28
+ {
29
+ "description": "Fixes the issue that the tarball refusal from `release-kit prepare` and `release-kit publish` pointed to a `prepack` script, even though the check builds the package through its `prepublishOnly` script, and makes the refusal and `docs/releasing.md` name `\"prepublishOnly\": \"nmr build\"` instead. (#1193)",
30
+ "hash": "916c4dcf90766d43721feaad4d6d443f89533902",
31
+ "entry": 1
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "title": "♻️ Refactoring",
37
+ "audience": "dev",
38
+ "items": [
39
+ {
40
+ "description": "Replaces nmr's `isObject`, release-kit's `isRecord`, and the private copies in nmr-core's `workspace.ts` and an nmr test with one `isRecord` guard exported from the root entry of `@williamthorsen/nmr-core`. (#1194)",
41
+ "hash": "6c66148170145ccf5628c95d27e7783ef26d97e9",
42
+ "entry": 1
43
+ },
44
+ {
45
+ "description": "Group nmr-core's source by role (#1196)",
46
+ "body": "Groups `nmr-core`'s source modules into `cache`, `errors`, `files`, `git`, `portable`, and `workspace` directories by role, retiring `helpers/`, and moves the write-outcome reporters out of `terminal.ts` into `files/report-write-outcomes.ts`. The package's exports, including the `./workspace` subpath, resolve to the same modules at their new paths.",
47
+ "hash": "bddeaf8cdad251c681808688be3d459c60fc2bdb"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "title": "📚 Documentation",
53
+ "audience": "dev",
54
+ "items": [
55
+ {
56
+ "description": "Documents for each shipped JSON Schema the `node_modules` path, such as `../node_modules/v11y-check/schemas/config.json`, that a project listing the package as a direct dependency can use as `$schema`, and states that the path does not resolve when the package is installed through another package or run through `pnpm dlx` or `npx`. (#1206)",
57
+ "hash": "cf19a9037ab15a24548ecc9cebe27c06f262ad6a",
58
+ "entry": 3
59
+ }
60
+ ]
61
+ }
62
+ ]
63
+ },
2
64
  {
3
65
  "version": "16.1.2",
4
66
  "date": "2026-11-06",
@@ -18,7 +18,7 @@ import {
18
18
  // src/init/detectRepoType.ts
19
19
  import { existsSync, readFileSync } from "node:fs";
20
20
 
21
- // src/typeGuards.ts
21
+ // ../nmr-core/dist/esm/portable/isRecord.js
22
22
  function isRecord(value) {
23
23
  return typeof value === "object" && value !== null && !Array.isArray(value);
24
24
  }
@@ -234,7 +234,7 @@ var CREATE_GITHUB_RELEASE_WORKFLOW_HASH_SINGLE = "d6de961de913c67b08dfa7e07f7349
234
234
 
235
235
  // .readyup/kits/default.ts
236
236
  function getMinVersion() {
237
- const picked = { "version": "16.1.2" };
237
+ const picked = { "version": "17.0.0" };
238
238
  if (typeof picked["version"] !== "string") {
239
239
  throw new TypeError("release-kit/package.json: 'version' must be a string");
240
240
  }
@@ -20,7 +20,7 @@ import {
20
20
  // src/npmRegistry.ts
21
21
  import { execFileSync } from "node:child_process";
22
22
 
23
- // src/typeGuards.ts
23
+ // ../nmr-core/dist/esm/portable/isRecord.js
24
24
  function isRecord(value) {
25
25
  return typeof value === "object" && value !== null && !Array.isArray(value);
26
26
  }
@@ -2,12 +2,31 @@
2
2
  "version": 1,
3
3
  "kits": [
4
4
  {
5
+ "bundledDependencies": {
6
+ "@williamthorsen/toolbelt.datetime": "4.1.0",
7
+ "@williamthorsen/toolbelt.errors": "0.9.0",
8
+ "@williamthorsen/toolbelt.filesystem": "0.10.0",
9
+ "@williamthorsen/toolbelt.numbers": "7.3.0",
10
+ "@williamthorsen/toolbelt.objects": "4.4.0",
11
+ "@williamthorsen/toolbelt.packaging": "0.7.0",
12
+ "@williamthorsen/toolbelt.terminal": "0.3.0",
13
+ "ansi-regex": "6.5.0",
14
+ "ansi-styles": "6.2.3",
15
+ "cli-truncate": "6.1.1",
16
+ "diff": "9.0.0",
17
+ "get-east-asian-width": "1.7.0",
18
+ "is-fullwidth-code-point": "5.1.0",
19
+ "slice-ansi": "9.0.1",
20
+ "string-width": "8.3.0",
21
+ "strip-ansi": "7.2.0",
22
+ "wrap-ansi": "10.0.2"
23
+ },
5
24
  "checklistChecks": [
6
25
  {
7
26
  "checklist": "release-kit",
8
27
  "checks": [
9
28
  "@williamthorsen/release-kit in devDependencies",
10
- "@williamthorsen/release-kit >= 16.1.2",
29
+ "@williamthorsen/release-kit >= 17.0.0",
11
30
  "release.yaml workflow exists",
12
31
  "release.yaml matches template",
13
32
  "release.yaml does not reference deprecated tag ref",
@@ -42,6 +61,86 @@
42
61
  ],
43
62
  "esbuildVersion": "0.28.2",
44
63
  "inputs": [
64
+ {
65
+ "hash": "bf29a9a3",
66
+ "kind": "module",
67
+ "path": "../../nmr-core/dist/esm/cache/cache-store.js"
68
+ },
69
+ {
70
+ "hash": "6b7d0243",
71
+ "kind": "module",
72
+ "path": "../../nmr-core/dist/esm/errors/hasErrnoCode.js"
73
+ },
74
+ {
75
+ "hash": "85d76864",
76
+ "kind": "module",
77
+ "path": "../../nmr-core/dist/esm/errors/isAnticipatedFailure.js"
78
+ },
79
+ {
80
+ "hash": "e02e0a74",
81
+ "kind": "module",
82
+ "path": "../../nmr-core/dist/esm/errors/UserError.js"
83
+ },
84
+ {
85
+ "hash": "77aa59f7",
86
+ "kind": "module",
87
+ "path": "../../nmr-core/dist/esm/files/report-write-outcomes.js"
88
+ },
89
+ {
90
+ "hash": "5ae3e980",
91
+ "kind": "module",
92
+ "path": "../../nmr-core/dist/esm/files/updateManagedFile.js"
93
+ },
94
+ {
95
+ "hash": "d377c37c",
96
+ "kind": "module",
97
+ "path": "../../nmr-core/dist/esm/files/writeFileWithCheck.js"
98
+ },
99
+ {
100
+ "hash": "bc0baa4a",
101
+ "kind": "module",
102
+ "path": "../../nmr-core/dist/esm/git/collectChangedPaths.js"
103
+ },
104
+ {
105
+ "hash": "70d519e7",
106
+ "kind": "module",
107
+ "path": "../../nmr-core/dist/esm/git/gitObjects.js"
108
+ },
109
+ {
110
+ "hash": "d5a89448",
111
+ "kind": "module",
112
+ "path": "../../nmr-core/dist/esm/git/gitOutputLimit.js"
113
+ },
114
+ {
115
+ "hash": "62be92c4",
116
+ "kind": "module",
117
+ "path": "../../nmr-core/dist/esm/git/hashWorkingTree.js"
118
+ },
119
+ {
120
+ "hash": "6734717f",
121
+ "kind": "module",
122
+ "path": "../../nmr-core/dist/esm/git/runGit.js"
123
+ },
124
+ {
125
+ "hash": "fe9fd44c",
126
+ "kind": "module",
127
+ "path": "../../nmr-core/dist/esm/index.js"
128
+ },
129
+ {
130
+ "hash": "1d74f646",
131
+ "kind": "module",
132
+ "path": "../../nmr-core/dist/esm/portable/isRecord.js"
133
+ },
134
+ {
135
+ "hash": "b88a9126",
136
+ "kind": "module",
137
+ "path": "../../nmr-core/dist/esm/terminal.js"
138
+ },
139
+ {
140
+ "hash": "85afaf3e",
141
+ "kind": "module",
142
+ "path": "../../nmr-core/dist/esm/timer.js"
143
+ },
45
144
  {
46
145
  "hash": "56566d0b",
47
146
  "kind": "module",
@@ -63,7 +162,7 @@
63
162
  "path": "lib/workflow-hashes.ts"
64
163
  },
65
164
  {
66
- "hash": "ff1fde3d",
165
+ "hash": "8df94cba",
67
166
  "kind": "inline",
68
167
  "path": "../package.json",
69
168
  "paths": [
@@ -81,7 +180,7 @@
81
180
  "path": "../src/init/detectRepoType.ts"
82
181
  },
83
182
  {
84
- "hash": "9ca0f6bf",
183
+ "hash": "133be525",
85
184
  "kind": "module",
86
185
  "path": "../src/init/parseJsonRecord.ts"
87
186
  },
@@ -89,11 +188,6 @@
89
188
  "hash": "2210df36",
90
189
  "kind": "module",
91
190
  "path": "../src/packsPath.ts"
92
- },
93
- {
94
- "hash": "1424b343",
95
- "kind": "module",
96
- "path": "../src/typeGuards.ts"
97
191
  }
98
192
  ],
99
193
  "name": "default",
@@ -101,9 +195,28 @@
101
195
  "readyupVersion": "0.45.0",
102
196
  "source": "kits/default.ts",
103
197
  "sourceHash": "56566d0b",
104
- "targetHash": "6a43de10"
198
+ "targetHash": "060f7720"
105
199
  },
106
200
  {
201
+ "bundledDependencies": {
202
+ "@williamthorsen/toolbelt.datetime": "4.1.0",
203
+ "@williamthorsen/toolbelt.errors": "0.9.0",
204
+ "@williamthorsen/toolbelt.filesystem": "0.10.0",
205
+ "@williamthorsen/toolbelt.numbers": "7.3.0",
206
+ "@williamthorsen/toolbelt.objects": "4.4.0",
207
+ "@williamthorsen/toolbelt.packaging": "0.7.0",
208
+ "@williamthorsen/toolbelt.terminal": "0.3.0",
209
+ "ansi-regex": "6.5.0",
210
+ "ansi-styles": "6.2.3",
211
+ "cli-truncate": "6.1.1",
212
+ "diff": "9.0.0",
213
+ "get-east-asian-width": "1.7.0",
214
+ "is-fullwidth-code-point": "5.1.0",
215
+ "slice-ansi": "9.0.1",
216
+ "string-width": "8.3.0",
217
+ "strip-ansi": "7.2.0",
218
+ "wrap-ansi": "10.0.2"
219
+ },
107
220
  "checklistChecks": [
108
221
  {
109
222
  "checklist": "repo",
@@ -129,6 +242,86 @@
129
242
  ],
130
243
  "esbuildVersion": "0.28.2",
131
244
  "inputs": [
245
+ {
246
+ "hash": "bf29a9a3",
247
+ "kind": "module",
248
+ "path": "../../nmr-core/dist/esm/cache/cache-store.js"
249
+ },
250
+ {
251
+ "hash": "6b7d0243",
252
+ "kind": "module",
253
+ "path": "../../nmr-core/dist/esm/errors/hasErrnoCode.js"
254
+ },
255
+ {
256
+ "hash": "85d76864",
257
+ "kind": "module",
258
+ "path": "../../nmr-core/dist/esm/errors/isAnticipatedFailure.js"
259
+ },
260
+ {
261
+ "hash": "e02e0a74",
262
+ "kind": "module",
263
+ "path": "../../nmr-core/dist/esm/errors/UserError.js"
264
+ },
265
+ {
266
+ "hash": "77aa59f7",
267
+ "kind": "module",
268
+ "path": "../../nmr-core/dist/esm/files/report-write-outcomes.js"
269
+ },
270
+ {
271
+ "hash": "5ae3e980",
272
+ "kind": "module",
273
+ "path": "../../nmr-core/dist/esm/files/updateManagedFile.js"
274
+ },
275
+ {
276
+ "hash": "d377c37c",
277
+ "kind": "module",
278
+ "path": "../../nmr-core/dist/esm/files/writeFileWithCheck.js"
279
+ },
280
+ {
281
+ "hash": "bc0baa4a",
282
+ "kind": "module",
283
+ "path": "../../nmr-core/dist/esm/git/collectChangedPaths.js"
284
+ },
285
+ {
286
+ "hash": "70d519e7",
287
+ "kind": "module",
288
+ "path": "../../nmr-core/dist/esm/git/gitObjects.js"
289
+ },
290
+ {
291
+ "hash": "d5a89448",
292
+ "kind": "module",
293
+ "path": "../../nmr-core/dist/esm/git/gitOutputLimit.js"
294
+ },
295
+ {
296
+ "hash": "62be92c4",
297
+ "kind": "module",
298
+ "path": "../../nmr-core/dist/esm/git/hashWorkingTree.js"
299
+ },
300
+ {
301
+ "hash": "6734717f",
302
+ "kind": "module",
303
+ "path": "../../nmr-core/dist/esm/git/runGit.js"
304
+ },
305
+ {
306
+ "hash": "fe9fd44c",
307
+ "kind": "module",
308
+ "path": "../../nmr-core/dist/esm/index.js"
309
+ },
310
+ {
311
+ "hash": "1d74f646",
312
+ "kind": "module",
313
+ "path": "../../nmr-core/dist/esm/portable/isRecord.js"
314
+ },
315
+ {
316
+ "hash": "b88a9126",
317
+ "kind": "module",
318
+ "path": "../../nmr-core/dist/esm/terminal.js"
319
+ },
320
+ {
321
+ "hash": "85afaf3e",
322
+ "kind": "module",
323
+ "path": "../../nmr-core/dist/esm/timer.js"
324
+ },
132
325
  {
133
326
  "hash": "682fdd4a",
134
327
  "kind": "module",
@@ -145,14 +338,9 @@
145
338
  "path": "../src/init/hasProvenance.ts"
146
339
  },
147
340
  {
148
- "hash": "bb8746b3",
341
+ "hash": "4f6456ae",
149
342
  "kind": "module",
150
343
  "path": "../src/npmRegistry.ts"
151
- },
152
- {
153
- "hash": "1424b343",
154
- "kind": "module",
155
- "path": "../src/typeGuards.ts"
156
344
  }
157
345
  ],
158
346
  "name": "npm-auto-publish",
@@ -160,7 +348,7 @@
160
348
  "readyupVersion": "0.45.0",
161
349
  "source": "kits/npm-auto-publish.ts",
162
350
  "sourceHash": "682fdd4a",
163
- "targetHash": "52d15648"
351
+ "targetHash": "bdd314ac"
164
352
  }
165
353
  ]
166
354
  }
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 17.0.0 — 2026-11-08
6
+
7
+ ### 🎉 Features
8
+
9
+ - 🚨 **Breaking:** Routes `release-kit` commands through the `toolbelt.cli` command parser, which renders help from each command's options and makes a usage error, such as an invalid `RELEASE_KIT_OUTPUT_STYLE` or a stray argument to `sync-labels sync`, exit 2 with a `Try` line instead of exit 1, and makes a bare `release-kit`, `release-kit overrides`, or `release-kit sync-labels` exit 2 instead of printing help and exiting 0. (#1186)
10
+ - Prefixes each handled error line written by `nmr` and its other bins, `release-kit`, and `v11y-check` with the name of the program that wrote it, as `<bin>: <message>` in place of `Error: <message>`, for usage errors such as an unknown command or option as well, and names `v11y` for both of the bins in `v11y-check`. (#1190)
11
+
12
+ ### 🐛 Bug fixes
13
+
14
+ - Fixes the issue that the tarball refusal from `release-kit prepare` and `release-kit publish` pointed to a `prepack` script, even though the check builds the package through its `prepublishOnly` script, and makes the refusal and `docs/releasing.md` name `"prepublishOnly": "nmr build"` instead. (#1193)
15
+
16
+ ### ♻️ Refactoring
17
+
18
+ - Replaces nmr's `isObject`, release-kit's `isRecord`, and the private copies in nmr-core's `workspace.ts` and an nmr test with one `isRecord` guard exported from the root entry of `@williamthorsen/nmr-core`. (#1194)
19
+ - Group nmr-core's source by role (#1196)
20
+
21
+ Groups `nmr-core`'s source modules into `cache`, `errors`, `files`, `git`, `portable`, and `workspace` directories by role, retiring `helpers/`, and moves the write-outcome reporters out of `terminal.ts` into `files/report-write-outcomes.ts`. The package's exports, including the `./workspace` subpath, resolve to the same modules at their new paths.
22
+
23
+ ### 📚 Documentation
24
+
25
+ - Documents for each shipped JSON Schema the `node_modules` path, such as `../node_modules/v11y-check/schemas/config.json`, that a project listing the package as a direct dependency can use as `$schema`, and states that the path does not resolve when the package is installed through another package or run through `pnpm dlx` or `npx`. (#1206)
26
+
5
27
  ## 16.1.2 — 2026-11-06
6
28
 
7
29
  ### 🐛 Bug fixes
package/README.md CHANGED
@@ -7,11 +7,16 @@ Version-bumping and changelog-generation toolkit for release workflows.
7
7
  Provides a self-contained CLI that auto-discovers workspaces from `pnpm-workspace.yaml`, parses conventional commits, determines version bumps, updates `package.json` files, and generates changelogs from the same commit history that decides each bump (with optional [editorial overrides](docs/editorial-overrides.md)).
8
8
 
9
9
  <!-- section:release-notes -->
10
- ## Release notes — v16.1.2 (2026-11-06)
10
+ ## Release notes — v17.0.0 (2026-11-08)
11
+
12
+ ### 🎉 Features
13
+
14
+ - 🚨 **Breaking:** Routes `release-kit` commands through the `toolbelt.cli` command parser, which renders help from each command's options and makes a usage error, such as an invalid `RELEASE_KIT_OUTPUT_STYLE` or a stray argument to `sync-labels sync`, exit 2 with a `Try` line instead of exit 1, and makes a bare `release-kit`, `release-kit overrides`, or `release-kit sync-labels` exit 2 instead of printing help and exiting 0. (#1186)
15
+ - Prefixes each handled error line written by `nmr` and its other bins, `release-kit`, and `v11y-check` with the name of the program that wrote it, as `<bin>: <message>` in place of `Error: <message>`, for usage errors such as an unknown command or option as well, and names `v11y` for both of the bins in `v11y-check`. (#1190)
11
16
 
12
17
  ### 🐛 Bug fixes
13
18
 
14
- - Fixes the issue that `release-kit` printed a bug in its own code as an ordinary `Error: <message>`, which it now prints as `release-kit: internal error: <message>` followed by the stack, while a failure in the user's input, config, or environment, including a failed `git`, `gh`, or `npm` call, keeps the `Error: <message>` form. (#1158)
19
+ - Fixes the issue that the tarball refusal from `release-kit prepare` and `release-kit publish` pointed to a `prepack` script, even though the check builds the package through its `prepublishOnly` script, and makes the refusal and `docs/releasing.md` name `"prepublishOnly": "nmr build"` instead. (#1193)
15
20
  <!-- /section:release-notes -->
16
21
 
17
22
  ## Installation
@@ -11,5 +11,5 @@ try {
11
11
  const frames = firstFrame === -1 ? '' : `${lines.slice(firstFrame).join('\n')}\n`;
12
12
  process.stderr.write(`release-kit: internal error: ${message}\n${frames}`);
13
13
  }
14
- process.exit(1);
14
+ process.exitCode = 1;
15
15
  }
@@ -1,9 +1,8 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
- import { UserError } from '@williamthorsen/nmr-core';
3
+ import { isRecord, UserError } from '@williamthorsen/nmr-core';
4
4
  import { isPublishableManifest } from "./isPublishableManifest.js";
5
5
  import { lookUpNpmPackage } from "./npmRegistry.js";
6
- import { isRecord } from "./typeGuards.js";
7
6
  import { chainUserError } from "./user-error-chaining.js";
8
7
  export function assertReleasesOnNpm(workspacePaths) {
9
8
  const unpublishedCandidates = [];
@@ -1,12 +1,11 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
- import { isAnticipatedFailure, UserError } from '@williamthorsen/nmr-core';
3
+ import { isAnticipatedFailure, isRecord, UserError } from '@williamthorsen/nmr-core';
4
4
  import { describeError } from '@williamthorsen/toolbelt.errors';
5
5
  import { detectPackageManager } from "./detectPackageManager.js";
6
6
  import { findMissingManifestPaths } from "./findMissingManifestPaths.js";
7
7
  import { isPublishableManifest } from "./isPublishableManifest.js";
8
8
  import { packFromCleanCheckout } from "./packFromCleanCheckout.js";
9
- import { isRecord } from "./typeGuards.js";
10
9
  import { chainUserError } from "./user-error-chaining.js";
11
10
  export function assertTarballsComplete(workspacePaths, devExportConditions, pack = packFromCleanCheckout) {
12
11
  const candidates = workspacePaths
@@ -47,7 +46,7 @@ function describeRefusal(incompletePackages) {
47
46
  ...missingPaths.map(({ location, path }) => ` - ${path} (${location})`),
48
47
  ].join('\n'));
49
48
  }
50
- sections.push('Build these files in the package\'s publish lifecycle, such as in a "prepack" script. ' +
49
+ sections.push('Build these files in the package\'s prepublishOnly script, usually "prepublishOnly": "nmr build". ' +
51
50
  'If an export condition is for development only, list it in the "devExportConditions" config key.');
52
51
  return sections.join('\n\n');
53
52
  }
@@ -0,0 +1,2 @@
1
+ /** The program name that release-kit's errors and help name. */
2
+ export declare const BIN = "release-kit";
@@ -0,0 +1 @@
1
+ export const BIN = 'release-kit';
@@ -1,5 +1,6 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
- import { isRecord, isUnknownArray } from "./typeGuards.js";
2
+ import { isRecord } from '@williamthorsen/nmr-core';
3
+ import { isUnknownArray } from "./typeGuards.js";
3
4
  export function isChangelogEntry(value) {
4
5
  return (isRecord(value) &&
5
6
  typeof value['version'] === 'string' &&
@@ -0,0 +1,18 @@
1
+ import { type StreamStyles } from '@williamthorsen/nmr-core';
2
+ /** The context that every `release-kit` command receives from the root group. */
3
+ export interface CommandContext {
4
+ styles: StreamStyles;
5
+ }
6
+ /** The `--config` flag of every command that reads the config file. */
7
+ export declare const CONFIG_FLAG: {
8
+ config: {
9
+ type: "path";
10
+ description: string;
11
+ valueHint: string;
12
+ };
13
+ };
14
+ /**
15
+ * Runs a command and resolves to its exit code, 0 when it returns nothing. Reports an unusable config in its own form
16
+ * and any other anticipated failure as `<bin>: <message>`, each with exit code 1, and rethrows anything else.
17
+ */
18
+ export declare function runReportingFailures(styles: StreamStyles, runCommand: () => number | undefined | Promise<number | undefined>): Promise<number>;
@@ -0,0 +1,27 @@
1
+ import { isAnticipatedFailure, reportError } from '@williamthorsen/nmr-core';
2
+ import { describeError } from '@williamthorsen/toolbelt.errors';
3
+ import { BIN } from "../bin.js";
4
+ import { ConfigProblemError, reportConfigProblem } from "../loadValidatedConfig.js";
5
+ export const CONFIG_FLAG = {
6
+ config: {
7
+ type: 'path',
8
+ description: 'Config file, relative to the current directory (default: .config/release-kit.config.ts at the repo root)',
9
+ valueHint: 'path',
10
+ },
11
+ };
12
+ export async function runReportingFailures(styles, runCommand) {
13
+ try {
14
+ return (await runCommand()) ?? 0;
15
+ }
16
+ catch (error) {
17
+ if (error instanceof ConfigProblemError) {
18
+ reportConfigProblem(error.problem, styles.stderr);
19
+ return 1;
20
+ }
21
+ if (!isAnticipatedFailure(error)) {
22
+ throw error;
23
+ }
24
+ reportError(BIN, describeError(error));
25
+ return 1;
26
+ }
27
+ }
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from './commandKit.js';
2
+ export declare const showTagPrefixes: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
3
+ export declare const init: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
4
+ export declare const updateTemplates: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
5
+ export declare const overrides: import("@williamthorsen/nmr-core/cli").Group<CommandContext>;
6
+ export declare const syncLabels: import("@williamthorsen/nmr-core/cli").Group<CommandContext>;