@williamthorsen/release-kit 6.0.0 → 7.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.
- package/CHANGELOG.md +8 -0
- package/README.md +3 -3
- package/dist/esm/.cache +1 -1
- package/dist/esm/assertCleanWorkingTree.js +9 -14
- package/dist/esm/bin/release-kit.js +200 -199
- package/dist/esm/buildChangelogEntries.d.ts +2 -2
- package/dist/esm/buildChangelogEntries.js +142 -149
- package/dist/esm/buildDependencyGraph.d.ts +1 -1
- package/dist/esm/buildDependencyGraph.js +60 -59
- package/dist/esm/buildEmptyReleaseEntry.d.ts +1 -1
- package/dist/esm/buildEmptyReleaseEntry.js +12 -15
- package/dist/esm/buildReleaseSummary.d.ts +1 -1
- package/dist/esm/buildReleaseSummary.js +23 -26
- package/dist/esm/buildSyntheticChangelogEntry.d.ts +1 -1
- package/dist/esm/buildSyntheticChangelogEntry.js +9 -12
- package/dist/esm/bumpAllVersions.d.ts +1 -1
- package/dist/esm/bumpAllVersions.js +51 -52
- package/dist/esm/bumpVersion.d.ts +1 -1
- package/dist/esm/bumpVersion.js +25 -28
- package/dist/esm/changelogJsonFile.d.ts +1 -1
- package/dist/esm/changelogJsonFile.js +59 -62
- package/dist/esm/changelogJsonUtils.d.ts +1 -1
- package/dist/esm/changelogJsonUtils.js +35 -32
- package/dist/esm/changelogOverrides.d.ts +1 -1
- package/dist/esm/changelogOverrides.js +374 -377
- package/dist/esm/checkWorkTypesDrift.js +104 -102
- package/dist/esm/collectPolicyViolations.d.ts +2 -2
- package/dist/esm/collectPolicyViolations.js +11 -14
- package/dist/esm/commitCommand.js +48 -46
- package/dist/esm/compareVersions.js +20 -23
- package/dist/esm/createGithubRelease.js +56 -59
- package/dist/esm/createGithubReleaseCommand.js +21 -23
- package/dist/esm/createTags.js +57 -56
- package/dist/esm/decideRelease.d.ts +2 -2
- package/dist/esm/decideRelease.js +27 -41
- package/dist/esm/defaults.d.ts +3 -3
- package/dist/esm/defaults.js +36 -48
- package/dist/esm/deleteFileIfExists.js +10 -12
- package/dist/esm/deriveWorkspaceConfig.d.ts +1 -1
- package/dist/esm/deriveWorkspaceConfig.js +34 -36
- package/dist/esm/detectPackageManager.js +35 -37
- package/dist/esm/detectUndeclaredTagPrefixes.js +41 -40
- package/dist/esm/determineBumpFromCommits.d.ts +2 -2
- package/dist/esm/determineBumpFromCommits.js +25 -29
- package/dist/esm/determineBumpType.d.ts +1 -1
- package/dist/esm/determineBumpType.js +31 -32
- package/dist/esm/discoverWorkspaces.js +38 -40
- package/dist/esm/format.js +6 -11
- package/dist/esm/generateChangelogs.d.ts +1 -1
- package/dist/esm/generateChangelogs.js +13 -17
- package/dist/esm/getCommitsSinceTarget.d.ts +1 -1
- package/dist/esm/getCommitsSinceTarget.js +54 -55
- package/dist/esm/hasPrettierConfig.js +33 -35
- package/dist/esm/help/prepareHelp.js +4 -8
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +2 -8
- package/dist/esm/init/checks.js +28 -32
- package/dist/esm/init/detectRepoType.js +12 -15
- package/dist/esm/init/initCommand.js +60 -54
- package/dist/esm/init/parseJsonRecord.js +9 -11
- package/dist/esm/init/scaffold.d.ts +1 -1
- package/dist/esm/init/scaffold.js +32 -38
- package/dist/esm/init/templates.d.ts +1 -1
- package/dist/esm/init/templates.js +16 -22
- package/dist/esm/injectReleaseNotesIntoReadme.js +42 -49
- package/dist/esm/injectSection.js +17 -27
- package/dist/esm/loadConfig.d.ts +1 -1
- package/dist/esm/loadConfig.js +206 -225
- package/dist/esm/parseCommitMessage.d.ts +1 -1
- package/dist/esm/parseCommitMessage.js +72 -76
- package/dist/esm/parseRequestedTags.js +6 -9
- package/dist/esm/prepareCommand.d.ts +1 -1
- package/dist/esm/prepareCommand.js +225 -235
- package/dist/esm/previewTagPrefixes.d.ts +1 -1
- package/dist/esm/previewTagPrefixes.js +101 -96
- package/dist/esm/propagateBumps.d.ts +2 -2
- package/dist/esm/propagateBumps.js +48 -50
- package/dist/esm/publish.d.ts +2 -2
- package/dist/esm/publish.js +22 -28
- package/dist/esm/publishCommand.js +75 -80
- package/dist/esm/pushCommand.js +33 -34
- package/dist/esm/pushRelease.d.ts +1 -1
- package/dist/esm/pushRelease.js +21 -24
- package/dist/esm/readCurrentVersion.js +13 -17
- package/dist/esm/releasePrepare.d.ts +1 -1
- package/dist/esm/releasePrepare.js +213 -231
- package/dist/esm/releasePrepareMono.d.ts +2 -2
- package/dist/esm/releasePrepareMono.js +434 -494
- package/dist/esm/releasePrepareProject.d.ts +2 -2
- package/dist/esm/releasePrepareProject.js +143 -153
- package/dist/esm/renderChangelogMarkdown.d.ts +1 -1
- package/dist/esm/renderChangelogMarkdown.js +20 -24
- package/dist/esm/renderReleaseNotes.d.ts +1 -1
- package/dist/esm/renderReleaseNotes.js +50 -55
- package/dist/esm/reportPrepare.d.ts +1 -1
- package/dist/esm/reportPrepare.js +230 -231
- package/dist/esm/resolveCliffConfigPath.js +18 -23
- package/dist/esm/resolveCommandTags.d.ts +1 -1
- package/dist/esm/resolveCommandTags.js +47 -45
- package/dist/esm/resolveReleaseNotesConfig.d.ts +1 -1
- package/dist/esm/resolveReleaseNotesConfig.js +39 -43
- package/dist/esm/resolveReleaseTags.d.ts +1 -1
- package/dist/esm/resolveReleaseTags.js +39 -40
- package/dist/esm/runGitCliff.js +27 -30
- package/dist/esm/showTagPrefixesCommand.js +48 -70
- package/dist/esm/stripEmojiPrefix.js +2 -5
- package/dist/esm/stripScope.js +18 -21
- package/dist/esm/sync-labels/generateCommand.d.ts +1 -1
- package/dist/esm/sync-labels/generateCommand.js +51 -53
- package/dist/esm/sync-labels/initCommand.js +46 -48
- package/dist/esm/sync-labels/loadSyncLabelsConfig.d.ts +1 -1
- package/dist/esm/sync-labels/loadSyncLabelsConfig.js +46 -52
- package/dist/esm/sync-labels/presets.d.ts +1 -1
- package/dist/esm/sync-labels/presets.js +40 -43
- package/dist/esm/sync-labels/resolveLabels.d.ts +1 -1
- package/dist/esm/sync-labels/resolveLabels.js +28 -35
- package/dist/esm/sync-labels/syncCommand.js +30 -31
- package/dist/esm/sync-labels/templates.d.ts +1 -1
- package/dist/esm/sync-labels/templates.js +23 -26
- package/dist/esm/sync-labels/types.js +1 -0
- package/dist/esm/syncWorkTypes.js +83 -84
- package/dist/esm/tagCommand.js +12 -14
- package/dist/esm/typeGuards.js +4 -8
- package/dist/esm/types.js +66 -60
- package/dist/esm/validateConfig.d.ts +1 -1
- package/dist/esm/validateConfig.js +109 -115
- package/dist/esm/validateOnlyExcludesStrandedDependents.d.ts +2 -2
- package/dist/esm/validateOnlyExcludesStrandedDependents.js +97 -91
- package/dist/esm/validateOverridesCommand.d.ts +2 -2
- package/dist/esm/validateOverridesCommand.js +110 -111
- package/dist/esm/workTypesData.js +57 -60
- package/dist/esm/workTypesUtils.js +16 -21
- package/dist/esm/writeReleaseNotesPreviews.js +55 -57
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 7.0.0 — 2026-07-01
|
|
6
|
+
|
|
7
|
+
### 🎉 Features
|
|
8
|
+
|
|
9
|
+
- 🚨 **Breaking:** Rebuild nmr-compile on a unified tsc emit (#455)
|
|
10
|
+
|
|
11
|
+
`nmr` now compiles a package's JavaScript and type declarations in one step, rewriting every import form — static, re-export, dynamic `import()`, bare side-effect, and tsconfig `paths` aliases — to runnable `.js` in both outputs. It now requires TypeScript 5.7 or newer as a peer dependency.
|
|
12
|
+
|
|
5
13
|
## 6.0.0 — 2026-06-30
|
|
6
14
|
|
|
7
15
|
### 🎉 Features
|
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ Version-bumping and changelog-generation toolkit for release workflows.
|
|
|
5
5
|
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 `git-cliff --context` output rendered in-process (with optional [editorial overrides](#editorial-overrides)).
|
|
6
6
|
|
|
7
7
|
<!-- section:release-notes -->
|
|
8
|
-
## Release notes —
|
|
8
|
+
## Release notes — v7.0.0 (2026-07-01)
|
|
9
9
|
|
|
10
10
|
### 🎉 Features
|
|
11
11
|
|
|
12
|
-
- 🚨 **Breaking:**
|
|
12
|
+
- 🚨 **Breaking:** Rebuild nmr-compile on a unified tsc emit (#455)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`nmr` now compiles a package's JavaScript and type declarations in one step, rewriting every import form — static, re-export, dynamic `import()`, bare side-effect, and tsconfig `paths` aliases — to runnable `.js` in both outputs. It now requires TypeScript 5.7 or newer as a peer dependency.
|
|
15
15
|
<!-- /section:release-notes -->
|
|
16
16
|
|
|
17
17
|
## Installation
|
package/dist/esm/.cache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
bdf7751e6eabd018a208cdf137b867bd284af3f4ee3beea07ca4d1a39197e00e
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { execFileSync } from
|
|
2
|
-
function assertCleanWorkingTree() {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
);
|
|
11
|
-
}
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
export function assertCleanWorkingTree() {
|
|
3
|
+
const status = execFileSync('git', ['status', '--porcelain'], {
|
|
4
|
+
encoding: 'utf8',
|
|
5
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
6
|
+
}).trim();
|
|
7
|
+
if (status.length > 0) {
|
|
8
|
+
throw new Error('Working tree has uncommitted changes. Commit or stash them, or use --no-git-checks to bypass this check.');
|
|
9
|
+
}
|
|
12
10
|
}
|
|
13
|
-
export {
|
|
14
|
-
assertCleanWorkingTree
|
|
15
|
-
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { parseArgsOrExit, readPackageVersion, reportError } from
|
|
2
|
+
import { parseArgsOrExit, readPackageVersion, reportError } from '@williamthorsen/nmr-core';
|
|
3
3
|
import { checkWorkTypesDrift } from "../checkWorkTypesDrift.js";
|
|
4
4
|
import { commitCommand } from "../commitCommand.js";
|
|
5
5
|
import { createGithubReleaseCommand } from "../createGithubReleaseCommand.js";
|
|
@@ -17,7 +17,7 @@ import { tagCommand } from "../tagCommand.js";
|
|
|
17
17
|
import { validateOverridesCommand } from "../validateOverridesCommand.js";
|
|
18
18
|
const VERSION = readPackageVersion(import.meta.url);
|
|
19
19
|
function showUsage() {
|
|
20
|
-
|
|
20
|
+
console.info(`
|
|
21
21
|
Usage: release-kit <command> [options]
|
|
22
22
|
|
|
23
23
|
Commands:
|
|
@@ -39,7 +39,7 @@ Options:
|
|
|
39
39
|
`);
|
|
40
40
|
}
|
|
41
41
|
function showSyncLabelsHelp() {
|
|
42
|
-
|
|
42
|
+
console.info(`
|
|
43
43
|
Usage: release-kit sync-labels <subcommand> [options]
|
|
44
44
|
|
|
45
45
|
Manage GitHub label synchronization via preset and custom label definitions.
|
|
@@ -54,7 +54,7 @@ Options:
|
|
|
54
54
|
`);
|
|
55
55
|
}
|
|
56
56
|
function showSyncLabelsInitHelp() {
|
|
57
|
-
|
|
57
|
+
console.info(`
|
|
58
58
|
Usage: release-kit sync-labels init [options]
|
|
59
59
|
|
|
60
60
|
Scaffold the sync-labels caller workflow and config file, auto-discover workspaces
|
|
@@ -67,7 +67,7 @@ Options:
|
|
|
67
67
|
`);
|
|
68
68
|
}
|
|
69
69
|
function showSyncLabelsGenerateHelp() {
|
|
70
|
-
|
|
70
|
+
console.info(`
|
|
71
71
|
Usage: release-kit sync-labels generate
|
|
72
72
|
|
|
73
73
|
Regenerate .github/labels.yaml from .config/sync-labels.config.ts.
|
|
@@ -77,7 +77,7 @@ Options:
|
|
|
77
77
|
`);
|
|
78
78
|
}
|
|
79
79
|
function showSyncLabelsSyncHelp() {
|
|
80
|
-
|
|
80
|
+
console.info(`
|
|
81
81
|
Usage: release-kit sync-labels sync
|
|
82
82
|
|
|
83
83
|
Trigger the sync-labels GitHub Actions workflow via the gh CLI.
|
|
@@ -87,7 +87,7 @@ Options:
|
|
|
87
87
|
`);
|
|
88
88
|
}
|
|
89
89
|
function showInitHelp() {
|
|
90
|
-
|
|
90
|
+
console.info(`
|
|
91
91
|
Usage: release-kit init [options]
|
|
92
92
|
|
|
93
93
|
Initialize release-kit in the current repository.
|
|
@@ -101,7 +101,7 @@ Options:
|
|
|
101
101
|
`);
|
|
102
102
|
}
|
|
103
103
|
function showCommitHelp() {
|
|
104
|
-
|
|
104
|
+
console.info(`
|
|
105
105
|
Usage: release-kit commit [options]
|
|
106
106
|
|
|
107
107
|
Stage all changes and create the release commit using tags and summary
|
|
@@ -113,7 +113,7 @@ Options:
|
|
|
113
113
|
`);
|
|
114
114
|
}
|
|
115
115
|
function showTagHelp() {
|
|
116
|
-
|
|
116
|
+
console.info(`
|
|
117
117
|
Usage: release-kit tag [options]
|
|
118
118
|
|
|
119
119
|
Create annotated git tags from the tags file produced by \`prepare\`.
|
|
@@ -125,7 +125,7 @@ Options:
|
|
|
125
125
|
`);
|
|
126
126
|
}
|
|
127
127
|
function showPushHelp() {
|
|
128
|
-
|
|
128
|
+
console.info(`
|
|
129
129
|
Usage: release-kit push [options]
|
|
130
130
|
|
|
131
131
|
Push the release commit and each tag individually, ensuring GitHub Actions
|
|
@@ -139,7 +139,7 @@ Options:
|
|
|
139
139
|
`);
|
|
140
140
|
}
|
|
141
141
|
function showCreateGithubReleaseHelp() {
|
|
142
|
-
|
|
142
|
+
console.info(`
|
|
143
143
|
Usage: release-kit create-github-release [options]
|
|
144
144
|
|
|
145
145
|
Create GitHub Releases from changelog.json for tags on HEAD.
|
|
@@ -151,7 +151,7 @@ Options:
|
|
|
151
151
|
`);
|
|
152
152
|
}
|
|
153
153
|
function showShowTagPrefixesHelp() {
|
|
154
|
-
|
|
154
|
+
console.info(`
|
|
155
155
|
Usage: release-kit show-tag-prefixes [options]
|
|
156
156
|
|
|
157
157
|
Print a per-workspace table of derived tag prefixes, tag counts, and declared
|
|
@@ -164,7 +164,7 @@ Options:
|
|
|
164
164
|
`);
|
|
165
165
|
}
|
|
166
166
|
function showOverridesHelp() {
|
|
167
|
-
|
|
167
|
+
console.info(`
|
|
168
168
|
Usage: release-kit overrides <subcommand> [options]
|
|
169
169
|
|
|
170
170
|
Manage editorial changelog overrides.
|
|
@@ -177,14 +177,14 @@ Options:
|
|
|
177
177
|
`);
|
|
178
178
|
}
|
|
179
179
|
function showOverridesValidateHelp() {
|
|
180
|
-
|
|
180
|
+
console.info(`
|
|
181
181
|
Usage: release-kit overrides validate
|
|
182
182
|
|
|
183
183
|
Validate every \`.meta/changelog-overrides.json\` file across the project and per-workspace
|
|
184
184
|
scopes. Reports schema/parse errors, ambiguous-prefix errors, and stale-key warnings.
|
|
185
185
|
|
|
186
186
|
Exit codes:
|
|
187
|
-
0 Clean
|
|
187
|
+
0 Clean — no errors, no stale keys
|
|
188
188
|
1 Stale-key warnings only (no errors)
|
|
189
189
|
2 Schema/parse or ambiguous-prefix errors (errors dominate)
|
|
190
190
|
|
|
@@ -193,7 +193,7 @@ Options:
|
|
|
193
193
|
`);
|
|
194
194
|
}
|
|
195
195
|
function showWorkTypesHelp() {
|
|
196
|
-
|
|
196
|
+
console.info(`
|
|
197
197
|
Usage: release-kit work-types <subcommand>
|
|
198
198
|
|
|
199
199
|
Manage the canonical work-types taxonomy used by changelog and release-notes generation.
|
|
@@ -203,7 +203,7 @@ Subcommands:
|
|
|
203
203
|
sync Overwrite the local work-types.json with the upstream contents
|
|
204
204
|
|
|
205
205
|
Exit codes (check):
|
|
206
|
-
0 Match (or upstream missing
|
|
206
|
+
0 Match (or upstream missing — transitional warning printed)
|
|
207
207
|
1 Drift detected
|
|
208
208
|
2 Network error
|
|
209
209
|
3 Schema mismatch
|
|
@@ -213,7 +213,7 @@ Options:
|
|
|
213
213
|
`);
|
|
214
214
|
}
|
|
215
215
|
function showWorkTypesCheckHelp() {
|
|
216
|
-
|
|
216
|
+
console.info(`
|
|
217
217
|
Usage: release-kit work-types check
|
|
218
218
|
|
|
219
219
|
Compare the local work-types.json against the upstream codeassembly canonical and report
|
|
@@ -225,7 +225,7 @@ Options:
|
|
|
225
225
|
`);
|
|
226
226
|
}
|
|
227
227
|
function showWorkTypesSyncHelp() {
|
|
228
|
-
|
|
228
|
+
console.info(`
|
|
229
229
|
Usage: release-kit work-types sync
|
|
230
230
|
|
|
231
231
|
Fetch the upstream work-types.json, validate its top-level shape, and overwrite the local
|
|
@@ -236,7 +236,7 @@ Options:
|
|
|
236
236
|
`);
|
|
237
237
|
}
|
|
238
238
|
function showPublishHelp() {
|
|
239
|
-
|
|
239
|
+
console.info(`
|
|
240
240
|
Usage: release-kit publish [options]
|
|
241
241
|
|
|
242
242
|
Publish packages that have release tags on HEAD. Operates only on workspaces where
|
|
@@ -254,216 +254,217 @@ Options:
|
|
|
254
254
|
const args = process.argv.slice(2);
|
|
255
255
|
const command = args[0];
|
|
256
256
|
const flags = args.slice(1);
|
|
257
|
-
if (command ===
|
|
258
|
-
|
|
259
|
-
process.exit(0);
|
|
260
|
-
}
|
|
261
|
-
if (command === "--help" || command === "-h" || command === void 0) {
|
|
262
|
-
showUsage();
|
|
263
|
-
process.exit(0);
|
|
264
|
-
}
|
|
265
|
-
if (command === "prepare") {
|
|
266
|
-
if (flags.some((f) => f === "--help" || f === "-h")) {
|
|
267
|
-
showPrepareHelp();
|
|
257
|
+
if (command === '--version' || command === '-V') {
|
|
258
|
+
console.info(VERSION);
|
|
268
259
|
process.exit(0);
|
|
269
|
-
}
|
|
270
|
-
await prepareCommand(flags);
|
|
271
|
-
process.exit(0);
|
|
272
260
|
}
|
|
273
|
-
if (command ===
|
|
274
|
-
|
|
275
|
-
showCommitHelp();
|
|
261
|
+
if (command === '--help' || command === '-h' || command === undefined) {
|
|
262
|
+
showUsage();
|
|
276
263
|
process.exit(0);
|
|
277
|
-
}
|
|
278
|
-
try {
|
|
279
|
-
commitCommand(flags);
|
|
280
|
-
} catch (error) {
|
|
281
|
-
reportError(error instanceof Error ? error.message : String(error));
|
|
282
|
-
process.exit(1);
|
|
283
|
-
}
|
|
284
|
-
process.exit(0);
|
|
285
264
|
}
|
|
286
|
-
if (command ===
|
|
287
|
-
|
|
288
|
-
|
|
265
|
+
if (command === 'prepare') {
|
|
266
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
267
|
+
showPrepareHelp();
|
|
268
|
+
process.exit(0);
|
|
269
|
+
}
|
|
270
|
+
await prepareCommand(flags);
|
|
289
271
|
process.exit(0);
|
|
290
|
-
}
|
|
291
|
-
tagCommand(flags);
|
|
292
|
-
process.exit(0);
|
|
293
272
|
}
|
|
294
|
-
if (command ===
|
|
295
|
-
|
|
296
|
-
|
|
273
|
+
if (command === 'commit') {
|
|
274
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
275
|
+
showCommitHelp();
|
|
276
|
+
process.exit(0);
|
|
277
|
+
}
|
|
278
|
+
try {
|
|
279
|
+
commitCommand(flags);
|
|
280
|
+
}
|
|
281
|
+
catch (error) {
|
|
282
|
+
reportError(error instanceof Error ? error.message : String(error));
|
|
283
|
+
process.exit(1);
|
|
284
|
+
}
|
|
297
285
|
process.exit(0);
|
|
298
|
-
}
|
|
299
|
-
await pushCommand(flags);
|
|
300
|
-
process.exit(0);
|
|
301
286
|
}
|
|
302
|
-
if (command ===
|
|
303
|
-
|
|
304
|
-
|
|
287
|
+
if (command === 'tag') {
|
|
288
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
289
|
+
showTagHelp();
|
|
290
|
+
process.exit(0);
|
|
291
|
+
}
|
|
292
|
+
tagCommand(flags);
|
|
305
293
|
process.exit(0);
|
|
306
|
-
}
|
|
307
|
-
await createGithubReleaseCommand(flags);
|
|
308
|
-
process.exit(0);
|
|
309
294
|
}
|
|
310
|
-
if (command ===
|
|
311
|
-
|
|
312
|
-
|
|
295
|
+
if (command === 'push') {
|
|
296
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
297
|
+
showPushHelp();
|
|
298
|
+
process.exit(0);
|
|
299
|
+
}
|
|
300
|
+
await pushCommand(flags);
|
|
313
301
|
process.exit(0);
|
|
314
|
-
}
|
|
315
|
-
await publishCommand(flags);
|
|
316
|
-
process.exit(0);
|
|
317
302
|
}
|
|
318
|
-
if (command ===
|
|
319
|
-
|
|
320
|
-
|
|
303
|
+
if (command === 'create-github-release') {
|
|
304
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
305
|
+
showCreateGithubReleaseHelp();
|
|
306
|
+
process.exit(0);
|
|
307
|
+
}
|
|
308
|
+
await createGithubReleaseCommand(flags);
|
|
321
309
|
process.exit(0);
|
|
322
|
-
}
|
|
323
|
-
if (flags.length > 0) {
|
|
324
|
-
reportError(`Unknown option: ${flags[0]}`);
|
|
325
|
-
process.exit(1);
|
|
326
|
-
}
|
|
327
|
-
const exitCode = await showTagPrefixesCommand();
|
|
328
|
-
process.exit(exitCode);
|
|
329
310
|
}
|
|
330
|
-
if (command ===
|
|
331
|
-
|
|
332
|
-
|
|
311
|
+
if (command === 'publish') {
|
|
312
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
313
|
+
showPublishHelp();
|
|
314
|
+
process.exit(0);
|
|
315
|
+
}
|
|
316
|
+
await publishCommand(flags);
|
|
333
317
|
process.exit(0);
|
|
334
|
-
}
|
|
335
|
-
const initFlagSchema = {
|
|
336
|
-
dryRun: { long: "--dry-run", type: "boolean" },
|
|
337
|
-
force: { long: "--force", type: "boolean" },
|
|
338
|
-
withConfig: { long: "--with-config", type: "boolean" }
|
|
339
|
-
};
|
|
340
|
-
const { dryRun, force, withConfig } = parseArgsOrExit(flags, initFlagSchema).flags;
|
|
341
|
-
const exitCode = initCommand({ dryRun, force, withConfig });
|
|
342
|
-
process.exit(exitCode);
|
|
343
318
|
}
|
|
344
|
-
if (command ===
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
showSyncLabelsHelp();
|
|
349
|
-
process.exit(0);
|
|
350
|
-
}
|
|
351
|
-
if (subcommand === "init") {
|
|
352
|
-
if (subflags.some((f) => f === "--help" || f === "-h")) {
|
|
353
|
-
showSyncLabelsInitHelp();
|
|
354
|
-
process.exit(0);
|
|
319
|
+
if (command === 'show-tag-prefixes') {
|
|
320
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
321
|
+
showShowTagPrefixesHelp();
|
|
322
|
+
process.exit(0);
|
|
355
323
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
};
|
|
360
|
-
const { dryRun, force } = parseArgsOrExit(subflags, syncLabelsInitFlagSchema).flags;
|
|
361
|
-
const exitCode = await syncLabelsInitCommand({ dryRun, force });
|
|
362
|
-
process.exit(exitCode);
|
|
363
|
-
}
|
|
364
|
-
if (subcommand === "generate") {
|
|
365
|
-
if (subflags.some((f) => f === "--help" || f === "-h")) {
|
|
366
|
-
showSyncLabelsGenerateHelp();
|
|
367
|
-
process.exit(0);
|
|
324
|
+
if (flags.length > 0) {
|
|
325
|
+
reportError(`Unknown option: ${flags[0]}`);
|
|
326
|
+
process.exit(1);
|
|
368
327
|
}
|
|
369
|
-
|
|
370
|
-
reportError(`Unknown option: ${subflags[0]}`);
|
|
371
|
-
process.exit(1);
|
|
372
|
-
}
|
|
373
|
-
const exitCode = await generateCommand();
|
|
328
|
+
const exitCode = await showTagPrefixesCommand();
|
|
374
329
|
process.exit(exitCode);
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
if (
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
if (subflags.length > 0) {
|
|
382
|
-
reportError(`Unknown option: ${subflags[0]}`);
|
|
383
|
-
process.exit(1);
|
|
330
|
+
}
|
|
331
|
+
if (command === 'init') {
|
|
332
|
+
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
333
|
+
showInitHelp();
|
|
334
|
+
process.exit(0);
|
|
384
335
|
}
|
|
385
|
-
const
|
|
336
|
+
const initFlagSchema = {
|
|
337
|
+
dryRun: { long: '--dry-run', type: 'boolean' },
|
|
338
|
+
force: { long: '--force', type: 'boolean' },
|
|
339
|
+
withConfig: { long: '--with-config', type: 'boolean' },
|
|
340
|
+
};
|
|
341
|
+
const { dryRun, force, withConfig } = parseArgsOrExit(flags, initFlagSchema).flags;
|
|
342
|
+
const exitCode = initCommand({ dryRun, force, withConfig });
|
|
386
343
|
process.exit(exitCode);
|
|
387
|
-
}
|
|
388
|
-
reportError(`Unknown subcommand: ${subcommand}`);
|
|
389
|
-
showSyncLabelsHelp();
|
|
390
|
-
process.exit(1);
|
|
391
344
|
}
|
|
392
|
-
if (command ===
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}
|
|
399
|
-
if (subcommand === "validate") {
|
|
400
|
-
if (subflags.some((f) => f === "--help" || f === "-h")) {
|
|
401
|
-
showOverridesValidateHelp();
|
|
402
|
-
process.exit(0);
|
|
345
|
+
if (command === 'sync-labels') {
|
|
346
|
+
const subcommand = flags[0];
|
|
347
|
+
const subflags = flags.slice(1);
|
|
348
|
+
if (subcommand === '--help' || subcommand === '-h' || subcommand === undefined) {
|
|
349
|
+
showSyncLabelsHelp();
|
|
350
|
+
process.exit(0);
|
|
403
351
|
}
|
|
404
|
-
if (
|
|
405
|
-
|
|
406
|
-
|
|
352
|
+
if (subcommand === 'init') {
|
|
353
|
+
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
354
|
+
showSyncLabelsInitHelp();
|
|
355
|
+
process.exit(0);
|
|
356
|
+
}
|
|
357
|
+
const syncLabelsInitFlagSchema = {
|
|
358
|
+
dryRun: { long: '--dry-run', type: 'boolean' },
|
|
359
|
+
force: { long: '--force', type: 'boolean' },
|
|
360
|
+
};
|
|
361
|
+
const { dryRun, force } = parseArgsOrExit(subflags, syncLabelsInitFlagSchema).flags;
|
|
362
|
+
const exitCode = await syncLabelsInitCommand({ dryRun, force });
|
|
363
|
+
process.exit(exitCode);
|
|
407
364
|
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
365
|
+
if (subcommand === 'generate') {
|
|
366
|
+
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
367
|
+
showSyncLabelsGenerateHelp();
|
|
368
|
+
process.exit(0);
|
|
369
|
+
}
|
|
370
|
+
if (subflags.length > 0) {
|
|
371
|
+
reportError(`Unknown option: ${subflags[0]}`);
|
|
372
|
+
process.exit(1);
|
|
373
|
+
}
|
|
374
|
+
const exitCode = await generateCommand();
|
|
375
|
+
process.exit(exitCode);
|
|
414
376
|
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
process.exit(0);
|
|
427
|
-
}
|
|
428
|
-
if (subcommand === "check") {
|
|
429
|
-
if (subflags.some((f) => f === "--help" || f === "-h")) {
|
|
430
|
-
showWorkTypesCheckHelp();
|
|
431
|
-
process.exit(0);
|
|
377
|
+
if (subcommand === 'sync') {
|
|
378
|
+
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
379
|
+
showSyncLabelsSyncHelp();
|
|
380
|
+
process.exit(0);
|
|
381
|
+
}
|
|
382
|
+
if (subflags.length > 0) {
|
|
383
|
+
reportError(`Unknown option: ${subflags[0]}`);
|
|
384
|
+
process.exit(1);
|
|
385
|
+
}
|
|
386
|
+
const exitCode = syncLabelsCommand();
|
|
387
|
+
process.exit(exitCode);
|
|
432
388
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
389
|
+
reportError(`Unknown subcommand: ${subcommand}`);
|
|
390
|
+
showSyncLabelsHelp();
|
|
391
|
+
process.exit(1);
|
|
392
|
+
}
|
|
393
|
+
if (command === 'overrides') {
|
|
394
|
+
const subcommand = flags[0];
|
|
395
|
+
const subflags = flags.slice(1);
|
|
396
|
+
if (subcommand === '--help' || subcommand === '-h' || subcommand === undefined) {
|
|
397
|
+
showOverridesHelp();
|
|
398
|
+
process.exit(0);
|
|
436
399
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
400
|
+
if (subcommand === 'validate') {
|
|
401
|
+
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
402
|
+
showOverridesValidateHelp();
|
|
403
|
+
process.exit(0);
|
|
404
|
+
}
|
|
405
|
+
if (subflags.length > 0) {
|
|
406
|
+
reportError(`Unknown option: ${subflags[0]}`);
|
|
407
|
+
process.exit(1);
|
|
408
|
+
}
|
|
409
|
+
const result = await validateOverridesCommand();
|
|
410
|
+
if (result.exitCode === 0) {
|
|
411
|
+
console.info(result.message);
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
process.stderr.write(`${result.message}\n`);
|
|
415
|
+
}
|
|
416
|
+
process.exit(result.exitCode);
|
|
443
417
|
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
418
|
+
reportError(`Unknown subcommand: ${subcommand}`);
|
|
419
|
+
showOverridesHelp();
|
|
420
|
+
process.exit(1);
|
|
421
|
+
}
|
|
422
|
+
if (command === 'work-types') {
|
|
423
|
+
const subcommand = flags[0];
|
|
424
|
+
const subflags = flags.slice(1);
|
|
425
|
+
if (subcommand === '--help' || subcommand === '-h' || subcommand === undefined) {
|
|
426
|
+
showWorkTypesHelp();
|
|
427
|
+
process.exit(0);
|
|
450
428
|
}
|
|
451
|
-
if (
|
|
452
|
-
|
|
453
|
-
|
|
429
|
+
if (subcommand === 'check') {
|
|
430
|
+
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
431
|
+
showWorkTypesCheckHelp();
|
|
432
|
+
process.exit(0);
|
|
433
|
+
}
|
|
434
|
+
if (subflags.length > 0) {
|
|
435
|
+
reportError(`Unknown option: ${subflags[0]}`);
|
|
436
|
+
process.exit(1);
|
|
437
|
+
}
|
|
438
|
+
const result = await checkWorkTypesDrift();
|
|
439
|
+
if (result.exitCode === 0) {
|
|
440
|
+
console.info(result.message);
|
|
441
|
+
}
|
|
442
|
+
else {
|
|
443
|
+
process.stderr.write(`${result.message}\n`);
|
|
444
|
+
}
|
|
445
|
+
process.exit(result.exitCode);
|
|
454
446
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
447
|
+
if (subcommand === 'sync') {
|
|
448
|
+
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
449
|
+
showWorkTypesSyncHelp();
|
|
450
|
+
process.exit(0);
|
|
451
|
+
}
|
|
452
|
+
if (subflags.length > 0) {
|
|
453
|
+
reportError(`Unknown option: ${subflags[0]}`);
|
|
454
|
+
process.exit(1);
|
|
455
|
+
}
|
|
456
|
+
const result = await syncWorkTypes();
|
|
457
|
+
if (result.exitCode === 0) {
|
|
458
|
+
console.info(result.message);
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
process.stderr.write(`${result.message}\n`);
|
|
462
|
+
}
|
|
463
|
+
process.exit(result.exitCode);
|
|
461
464
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
showWorkTypesHelp();
|
|
466
|
-
process.exit(1);
|
|
465
|
+
reportError(`Unknown subcommand: ${subcommand}`);
|
|
466
|
+
showWorkTypesHelp();
|
|
467
|
+
process.exit(1);
|
|
467
468
|
}
|
|
468
469
|
reportError(`Unknown command: ${command}`);
|
|
469
470
|
showUsage();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GenerateChangelogOptions } from './generateChangelogs.
|
|
2
|
-
import type { ChangelogEntry, ReleaseConfig } from './types.
|
|
1
|
+
import type { GenerateChangelogOptions } from './generateChangelogs.js';
|
|
2
|
+
import type { ChangelogEntry, ReleaseConfig } from './types.js';
|
|
3
3
|
export declare function stripGroupDecorations(group: string): string;
|
|
4
4
|
export declare function buildChangelogEntries(config: Pick<ReleaseConfig, 'cliffConfigPath' | 'changelogJson'>, tag: string, options?: GenerateChangelogOptions): ChangelogEntry[];
|