@williamthorsen/release-kit 16.1.1 → 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.
- package/.meta/changelog.json +79 -0
- package/.readyup/kits/default.js +2 -2
- package/.readyup/kits/npm-auto-publish.js +1 -1
- package/.readyup/manifest.json +204 -16
- package/CHANGELOG.md +28 -0
- package/README.md +7 -2
- package/bin/release-kit.js +1 -1
- package/dist/esm/assertCleanWorkingTree.js +14 -7
- package/dist/esm/assertReleasesOnNpm.js +11 -3
- package/dist/esm/assertTaggedBaseline.js +2 -1
- package/dist/esm/assertTarballsComplete.js +16 -5
- package/dist/esm/bin.d.ts +2 -0
- package/dist/esm/bin.js +1 -0
- package/dist/esm/buildChangelogEntries.js +2 -2
- package/dist/esm/buildDependencyGraph.js +5 -4
- package/dist/esm/bumpVersion.js +3 -2
- package/dist/esm/changelogJsonUtils.js +2 -1
- package/dist/esm/changelogOverrides.js +3 -2
- package/dist/esm/cli/commandKit.d.ts +18 -0
- package/dist/esm/cli/commandKit.js +27 -0
- package/dist/esm/cli/maintenanceCommands.d.ts +6 -0
- package/dist/esm/cli/maintenanceCommands.js +129 -0
- package/dist/esm/cli/releaseCommands.d.ts +7 -0
- package/dist/esm/cli/releaseCommands.js +156 -0
- package/dist/esm/cli.js +9 -237
- package/dist/esm/commitCommand.d.ts +4 -1
- package/dist/esm/commitCommand.js +12 -10
- package/dist/esm/compareVersions.js +2 -1
- package/dist/esm/createGithubRelease.js +7 -1
- package/dist/esm/createGithubReleaseCommand.d.ts +10 -4
- package/dist/esm/createGithubReleaseCommand.js +4 -18
- package/dist/esm/createTags.js +6 -4
- package/dist/esm/deleteFileIfExists.js +2 -1
- package/dist/esm/deriveDirectoryConfig.js +7 -7
- package/dist/esm/deriveWorkspaceConfig.js +4 -4
- package/dist/esm/detectPackageManager.js +1 -1
- package/dist/esm/enterRepoRoot.js +2 -1
- package/dist/esm/enumerateReleaseWindows.js +2 -2
- package/dist/esm/findMissingManifestPaths.js +1 -1
- package/dist/esm/hasPrettierConfig.js +1 -1
- package/dist/esm/init/initCommand.js +10 -1
- package/dist/esm/init/parseJsonRecord.js +1 -1
- package/dist/esm/init/updateTemplatesCommand.js +10 -1
- package/dist/esm/isPublishableManifest.js +1 -1
- package/dist/esm/loadChangelogOverrides.js +1 -1
- package/dist/esm/loadConfig.js +6 -6
- package/dist/esm/loadValidatedConfig.d.ts +6 -1
- package/dist/esm/loadValidatedConfig.js +11 -3
- package/dist/esm/mergeConfig.js +5 -4
- package/dist/esm/monorepoConfigAssertions.js +6 -5
- package/dist/esm/npmRegistry.js +1 -1
- package/dist/esm/packFromCleanCheckout.js +12 -4
- package/dist/esm/parseChangeRecordBlock.js +1 -1
- package/dist/esm/planVersionBump.js +6 -5
- package/dist/esm/prepareArgs.d.ts +1 -49
- package/dist/esm/prepareArgs.js +4 -51
- package/dist/esm/prepareCommand.d.ts +15 -3
- package/dist/esm/prepareCommand.js +26 -44
- package/dist/esm/prepareComposite.js +2 -1
- package/dist/esm/prepareRunContext.js +2 -2
- package/dist/esm/previewTagPrefixes.js +2 -2
- package/dist/esm/publish.js +7 -1
- package/dist/esm/publishCommand.d.ts +12 -3
- package/dist/esm/publishCommand.js +4 -33
- package/dist/esm/pushCommand.d.ts +12 -4
- package/dist/esm/pushCommand.js +6 -27
- package/dist/esm/pushRelease.js +18 -6
- package/dist/esm/releaseFiles.js +2 -2
- package/dist/esm/releasePlan.js +2 -2
- package/dist/esm/resolveCommandTags.d.ts +4 -4
- package/dist/esm/resolveCommandTags.js +8 -12
- package/dist/esm/resolveReleaseDeclaration.js +9 -8
- package/dist/esm/resolveReleaseTags.js +11 -4
- package/dist/esm/resolveReleaseTargets.js +2 -1
- package/dist/esm/{resolveStylesOrExit.d.ts → resolveStyles.d.ts} +2 -2
- package/dist/esm/resolveStyles.js +10 -0
- package/dist/esm/route.d.ts +2 -0
- package/dist/esm/route.js +39 -0
- package/dist/esm/showTagPrefixesCommand.js +6 -3
- package/dist/esm/sync-labels/generateCommand.js +11 -7
- package/dist/esm/sync-labels/initCommand.js +7 -1
- package/dist/esm/sync-labels/presets.js +7 -8
- package/dist/esm/sync-labels/resolveLabels.js +4 -3
- package/dist/esm/sync-labels/retiredConfig.js +2 -1
- package/dist/esm/sync-labels/syncCommand.js +4 -3
- package/dist/esm/sync-labels/templates.js +2 -2
- package/dist/esm/tagCommand.d.ts +8 -3
- package/dist/esm/tagCommand.js +2 -15
- package/dist/esm/typeGuards.d.ts +0 -2
- package/dist/esm/typeGuards.js +0 -3
- package/dist/esm/user-error-chaining.d.ts +13 -0
- package/dist/esm/user-error-chaining.js +11 -0
- package/dist/esm/validateConfig.js +1 -1
- package/dist/esm/validateOverridesCommand.js +12 -5
- package/docs/configuration.md +1 -1
- package/docs/editorial-overrides.md +2 -0
- package/docs/labels.md +2 -0
- package/docs/releasing.md +1 -1
- package/package.json +3 -3
- package/dist/esm/configFlagSchema.d.ts +0 -12
- package/dist/esm/configFlagSchema.js +0 -3
- package/dist/esm/help/initHelp.d.ts +0 -4
- package/dist/esm/help/initHelp.js +0 -31
- package/dist/esm/help/overridesHelp.d.ts +0 -4
- package/dist/esm/help/overridesHelp.js +0 -32
- package/dist/esm/help/prepareHelp.d.ts +0 -7
- package/dist/esm/help/prepareHelp.js +0 -30
- package/dist/esm/help/releaseStepsHelp.d.ts +0 -12
- package/dist/esm/help/releaseStepsHelp.js +0 -91
- package/dist/esm/help/syncLabelsHelp.d.ts +0 -8
- package/dist/esm/help/syncLabelsHelp.js +0 -55
- package/dist/esm/help/usage.d.ts +0 -2
- package/dist/esm/help/usage.js +0 -29
- package/dist/esm/resolveConfigFlag.d.ts +0 -7
- package/dist/esm/resolveConfigFlag.js +0 -4
- package/dist/esm/resolveStylesOrExit.js +0 -10
package/dist/esm/bumpVersion.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { UserError } from '@williamthorsen/nmr-core';
|
|
1
2
|
export function bumpVersion(version, releaseType) {
|
|
2
3
|
const match = version.match(/^(\d+)\.(\d+)\.(\d+)$/);
|
|
3
4
|
if (!match) {
|
|
4
|
-
throw new
|
|
5
|
+
throw new UserError(`Invalid semver version: '${version}'`);
|
|
5
6
|
}
|
|
6
7
|
const major = match[1];
|
|
7
8
|
const minor = match[2];
|
|
8
9
|
const patch = match[3];
|
|
9
10
|
if (major === undefined || minor === undefined || patch === undefined) {
|
|
10
|
-
throw new
|
|
11
|
+
throw new UserError(`Invalid semver version: '${version}'`);
|
|
11
12
|
}
|
|
12
13
|
const majorNumber = Number.parseInt(major, 10);
|
|
13
14
|
const minorNumber = Number.parseInt(minor, 10);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { isRecord
|
|
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' &&
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
+
import { UserError } from '@williamthorsen/nmr-core';
|
|
2
3
|
import { applyChangelogOverrides, formatStaleOverrideKeyWarning } from "./applyChangelogOverrides.js";
|
|
3
4
|
import { loadChangelogOverrides } from "./loadChangelogOverrides.js";
|
|
4
5
|
const OVERRIDES_FILENAME = '.meta/changelog-overrides.json';
|
|
@@ -8,7 +9,7 @@ export function applyWorkspaceOverrides(newEntries, workspacePath, overrideConte
|
|
|
8
9
|
const composedOverrides = composeOverrides(projectOverrides, workspaceOverrides);
|
|
9
10
|
const appliedResult = applyChangelogOverrides(newEntries, composedOverrides);
|
|
10
11
|
if (appliedResult.errors.length > 0) {
|
|
11
|
-
throw new
|
|
12
|
+
throw new UserError(`Changelog override application failed:\n - ${appliedResult.errors.join('\n - ')}`);
|
|
12
13
|
}
|
|
13
14
|
overrideWarnings.push(...appliedResult.warnings);
|
|
14
15
|
const matchedSet = new Set(appliedResult.matchedKeys);
|
|
@@ -38,7 +39,7 @@ export function composeOverrides(rootEntries, workspaceEntries) {
|
|
|
38
39
|
export function createOverrideContext(workspacePaths) {
|
|
39
40
|
const result = loadOverridesForScopes({ projectPath: '.', workspaces: [...workspacePaths] });
|
|
40
41
|
if (result.errors.length > 0) {
|
|
41
|
-
throw new
|
|
42
|
+
throw new UserError(`Failed to load changelog overrides:\n - ${result.errors.join('\n - ')}`);
|
|
42
43
|
}
|
|
43
44
|
return {
|
|
44
45
|
projectOverrides: result.projectOverrides,
|
|
@@ -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>;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import process from 'node:process';
|
|
2
|
+
import { createCli } from '@williamthorsen/nmr-core/cli';
|
|
3
|
+
import { enterRepoRoot } from "../enterRepoRoot.js";
|
|
4
|
+
import { initCommand } from "../init/initCommand.js";
|
|
5
|
+
import { updateTemplatesCommand } from "../init/updateTemplatesCommand.js";
|
|
6
|
+
import { showTagPrefixesCommand } from "../showTagPrefixesCommand.js";
|
|
7
|
+
import { generateCommand } from "../sync-labels/generateCommand.js";
|
|
8
|
+
import { syncLabelsInitCommand } from "../sync-labels/initCommand.js";
|
|
9
|
+
import { syncLabelsCommand } from "../sync-labels/syncCommand.js";
|
|
10
|
+
import { validateOverridesCommand } from "../validateOverridesCommand.js";
|
|
11
|
+
import { CONFIG_FLAG, runReportingFailures } from "./commandKit.js";
|
|
12
|
+
const { defineCommand, defineGroup } = createCli();
|
|
13
|
+
export const showTagPrefixes = defineCommand({
|
|
14
|
+
summary: 'Show derived and declared legacy tag prefixes per workspace',
|
|
15
|
+
description: 'Print a per-workspace table of derived tag prefixes, tag counts, and declared legacy tag prefixes. Reports any release-shaped tags whose prefix is neither a derived prefix nor declared in `legacyIdentities`, with a copy-pasteable config snippet.',
|
|
16
|
+
flags: CONFIG_FLAG,
|
|
17
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, () => {
|
|
18
|
+
enterRepoRoot();
|
|
19
|
+
return showTagPrefixesCommand(context.styles, flags.config);
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
export const init = defineCommand({
|
|
23
|
+
summary: 'Initialize release-kit in the current repository',
|
|
24
|
+
description: 'Initialize release-kit in the current repository. By default, scaffolds only the GitHub Actions workflow files. When every package is private, skips publish.yaml and create-github-release.yaml.',
|
|
25
|
+
flags: {
|
|
26
|
+
shouldScaffoldConfig: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
long: 'with-config',
|
|
29
|
+
description: 'Also scaffold .config/release-kit.config.ts',
|
|
30
|
+
},
|
|
31
|
+
shouldForce: { type: 'boolean', long: 'force', description: 'Overwrite existing files instead of skipping them' },
|
|
32
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview changes without writing files' },
|
|
33
|
+
},
|
|
34
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, () => {
|
|
35
|
+
enterRepoRoot();
|
|
36
|
+
return initCommand({
|
|
37
|
+
isDryRun: flags.isDryRun,
|
|
38
|
+
shouldForce: flags.shouldForce,
|
|
39
|
+
shouldScaffoldConfig: flags.shouldScaffoldConfig,
|
|
40
|
+
styles: context.styles,
|
|
41
|
+
});
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
export const updateTemplates = defineCommand({
|
|
45
|
+
summary: 'Update the scaffolded workflows to the current templates',
|
|
46
|
+
description: "Update the GitHub Actions workflows that release-kit scaffolds to the templates of the installed version, showing what changed in each file. Creates a missing workflow that `init` would create, and refreshes sync-labels.yaml only when it exists. When every package is private, refreshes publish.yaml and create-github-release.yaml only when they exist. Keeps publish.yaml's provenance setting. Never touches config files.",
|
|
47
|
+
flags: {
|
|
48
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview changes without writing files' },
|
|
49
|
+
},
|
|
50
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, () => {
|
|
51
|
+
enterRepoRoot();
|
|
52
|
+
return updateTemplatesCommand({ isDryRun: flags.isDryRun, styles: context.styles });
|
|
53
|
+
}),
|
|
54
|
+
});
|
|
55
|
+
const overridesValidate = defineCommand({
|
|
56
|
+
summary: 'Validate every `.meta/changelog-overrides.json` file across all scopes',
|
|
57
|
+
description: 'Validate every `.meta/changelog-overrides.json` file across the project and per-workspace scopes. Reports schema/parse errors, ambiguous-prefix errors, conflicting-key errors, and stale-key warnings.',
|
|
58
|
+
flags: CONFIG_FLAG,
|
|
59
|
+
epilog: `Exit codes:
|
|
60
|
+
0 Clean: no errors, no stale keys
|
|
61
|
+
1 Stale-key warnings only (no errors)
|
|
62
|
+
2 Schema/parse, ambiguous-prefix, or conflicting-key errors (errors take precedence)`,
|
|
63
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, async () => {
|
|
64
|
+
enterRepoRoot();
|
|
65
|
+
const result = await validateOverridesCommand(context.styles, flags.config);
|
|
66
|
+
if (result.exitCode === 0) {
|
|
67
|
+
process.stdout.write(`${result.message}\n`);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
process.stderr.write(`${result.message}\n`);
|
|
71
|
+
}
|
|
72
|
+
return result.exitCode;
|
|
73
|
+
}),
|
|
74
|
+
});
|
|
75
|
+
export const overrides = defineGroup({
|
|
76
|
+
summary: 'Manage editorial changelog overrides',
|
|
77
|
+
commands: { validate: overridesValidate },
|
|
78
|
+
});
|
|
79
|
+
const syncLabelsInit = defineCommand({
|
|
80
|
+
summary: 'Scaffold caller workflow and config, then generate labels',
|
|
81
|
+
description: 'Scaffold the sync-labels caller workflow and seed the repoLabels block of .config/release-kit.config.ts with scope labels discovered from workspaces and retired packages, then generate .github/labels.yaml. When the config file already exists, print the block for manual paste instead of rewriting the file.',
|
|
82
|
+
flags: {
|
|
83
|
+
...CONFIG_FLAG,
|
|
84
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview changes without writing files' },
|
|
85
|
+
shouldForce: { type: 'boolean', long: 'force', description: 'Overwrite existing files instead of skipping them' },
|
|
86
|
+
},
|
|
87
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, () => {
|
|
88
|
+
enterRepoRoot();
|
|
89
|
+
return syncLabelsInitCommand({
|
|
90
|
+
...(flags.config !== undefined && { configPath: flags.config }),
|
|
91
|
+
isDryRun: flags.isDryRun,
|
|
92
|
+
shouldForce: flags.shouldForce,
|
|
93
|
+
styles: context.styles,
|
|
94
|
+
});
|
|
95
|
+
}),
|
|
96
|
+
});
|
|
97
|
+
const syncLabelsGenerate = defineCommand({
|
|
98
|
+
summary: 'Regenerate .github/labels.yaml from config',
|
|
99
|
+
description: 'Regenerate .github/labels.yaml from the repoLabels block of .config/release-kit.config.ts.',
|
|
100
|
+
flags: {
|
|
101
|
+
shouldCheck: {
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
long: 'check',
|
|
104
|
+
description: 'Report whether .github/labels.yaml is stale instead of writing it',
|
|
105
|
+
},
|
|
106
|
+
...CONFIG_FLAG,
|
|
107
|
+
},
|
|
108
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, () => {
|
|
109
|
+
enterRepoRoot();
|
|
110
|
+
return generateCommand({
|
|
111
|
+
shouldCheck: flags.shouldCheck,
|
|
112
|
+
...(flags.config !== undefined && { configPath: flags.config }),
|
|
113
|
+
styles: context.styles,
|
|
114
|
+
});
|
|
115
|
+
}),
|
|
116
|
+
});
|
|
117
|
+
const syncLabelsSync = defineCommand({
|
|
118
|
+
summary: 'Trigger the sync-labels workflow via gh CLI',
|
|
119
|
+
description: 'Trigger the sync-labels GitHub Actions workflow via the gh CLI.',
|
|
120
|
+
run: ({ context }) => runReportingFailures(context.styles, () => {
|
|
121
|
+
enterRepoRoot();
|
|
122
|
+
return syncLabelsCommand();
|
|
123
|
+
}),
|
|
124
|
+
});
|
|
125
|
+
export const syncLabels = defineGroup({
|
|
126
|
+
summary: 'Manage GitHub label synchronization',
|
|
127
|
+
description: 'Manage GitHub label synchronization via preset and custom label definitions.',
|
|
128
|
+
commands: { init: syncLabelsInit, generate: syncLabelsGenerate, sync: syncLabelsSync },
|
|
129
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CommandContext } from './commandKit.js';
|
|
2
|
+
export declare const prepare: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
|
|
3
|
+
export declare const commit: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
|
|
4
|
+
export declare const tag: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
|
|
5
|
+
export declare const push: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
|
|
6
|
+
export declare const publish: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
|
|
7
|
+
export declare const createGithubRelease: import("@williamthorsen/nmr-core/cli").Command<CommandContext>;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { createCli } from '@williamthorsen/nmr-core/cli';
|
|
2
|
+
import { commitCommand } from "../commitCommand.js";
|
|
3
|
+
import { createGithubReleaseCommand } from "../createGithubReleaseCommand.js";
|
|
4
|
+
import { enterRepoRoot } from "../enterRepoRoot.js";
|
|
5
|
+
import { parseRequestedTags } from "../parseRequestedTags.js";
|
|
6
|
+
import { prepareCommand } from "../prepareCommand.js";
|
|
7
|
+
import { publishCommand } from "../publishCommand.js";
|
|
8
|
+
import { pushCommand } from "../pushCommand.js";
|
|
9
|
+
import { tagCommand } from "../tagCommand.js";
|
|
10
|
+
import { CONFIG_FLAG, runReportingFailures } from "./commandKit.js";
|
|
11
|
+
const { defineCommand } = createCli();
|
|
12
|
+
const TAGS_FLAG = {
|
|
13
|
+
type: 'string',
|
|
14
|
+
valueHint: 'tag1,tag2',
|
|
15
|
+
};
|
|
16
|
+
export const prepare = defineCommand({
|
|
17
|
+
summary: 'Run release preparation (auto-discovers workspaces)',
|
|
18
|
+
description: 'Run release preparation with automatic workspace discovery.',
|
|
19
|
+
flags: {
|
|
20
|
+
...CONFIG_FLAG,
|
|
21
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Run without modifying any files' },
|
|
22
|
+
bump: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'Set the level of every release that happens; does not trigger one',
|
|
25
|
+
choices: ['major', 'minor', 'patch'],
|
|
26
|
+
},
|
|
27
|
+
setVersion: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
long: 'set-version',
|
|
30
|
+
description: "Set an explicit version; bypasses the changelog-derived bump. In monorepo mode, name each workspace or directory target: --set-version=arrays@1.0.0[,strings@2.0.0]. Rejected when a composite (a 'project' block or a releases composite) is configured.",
|
|
31
|
+
valueHint: 'X.Y.Z',
|
|
32
|
+
},
|
|
33
|
+
shouldForce: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
long: 'force',
|
|
36
|
+
description: 'Release even when the last tag is not followed by any commits, or by any bump-worthy ones. Defaults to patch when --bump is not given; use --bump=X for a different level.',
|
|
37
|
+
},
|
|
38
|
+
shouldSkipGitChecks: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
long: 'no-git-checks',
|
|
41
|
+
description: 'Skip the clean-working-tree check',
|
|
42
|
+
short: 'n',
|
|
43
|
+
},
|
|
44
|
+
only: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: "Release only the named release targets and their dependents (comma-separated, monorepo only). A composite declared under 'releases' releases only when named; a 'project' block's release is skipped.",
|
|
47
|
+
valueHint: 'name1,name2',
|
|
48
|
+
},
|
|
49
|
+
shouldIncludeReleaseNotes: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
long: 'with-release-notes',
|
|
52
|
+
description: 'Also write per-workspace release-notes previews under <workspacePath>/docs/ (docs/README.v<version>.md and docs/RELEASE_NOTES.v<version>.md). Recommended .gitignore entry: packages/*/docs/*.v*.md (or docs/*.v*.md).',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, async () => {
|
|
56
|
+
enterRepoRoot();
|
|
57
|
+
await prepareCommand({
|
|
58
|
+
bumpOverride: flags.bump,
|
|
59
|
+
configPath: flags.config,
|
|
60
|
+
isDryRun: flags.isDryRun,
|
|
61
|
+
onlyNames: flags.only?.split(','),
|
|
62
|
+
setVersion: flags.setVersion,
|
|
63
|
+
shouldForce: flags.shouldForce,
|
|
64
|
+
shouldIncludeReleaseNotes: flags.shouldIncludeReleaseNotes,
|
|
65
|
+
shouldSkipGitChecks: flags.shouldSkipGitChecks,
|
|
66
|
+
styles: context.styles,
|
|
67
|
+
});
|
|
68
|
+
}),
|
|
69
|
+
});
|
|
70
|
+
export const commit = defineCommand({
|
|
71
|
+
summary: 'Stage changes and create the release commit',
|
|
72
|
+
description: 'Stage all changes and create the release commit using the tags and summary produced by `prepare`.',
|
|
73
|
+
flags: {
|
|
74
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview the commit message without creating it' },
|
|
75
|
+
},
|
|
76
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, () => {
|
|
77
|
+
enterRepoRoot();
|
|
78
|
+
commitCommand({ isDryRun: flags.isDryRun });
|
|
79
|
+
}),
|
|
80
|
+
});
|
|
81
|
+
export const tag = defineCommand({
|
|
82
|
+
summary: 'Create annotated git tags from the tags file',
|
|
83
|
+
description: 'Create annotated git tags from the tags file produced by `prepare`.',
|
|
84
|
+
flags: {
|
|
85
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview without creating tags' },
|
|
86
|
+
shouldSkipGitChecks: { type: 'boolean', long: 'no-git-checks', description: 'Skip the dirty-working-tree check' },
|
|
87
|
+
},
|
|
88
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, () => {
|
|
89
|
+
enterRepoRoot();
|
|
90
|
+
tagCommand({ isDryRun: flags.isDryRun, shouldSkipGitChecks: flags.shouldSkipGitChecks, styles: context.styles });
|
|
91
|
+
}),
|
|
92
|
+
});
|
|
93
|
+
export const push = defineCommand({
|
|
94
|
+
summary: 'Push the release commit and tags (one push per tag)',
|
|
95
|
+
description: 'Push the release commit and each tag individually, so that GitHub Actions starts a separate workflow run for each tag.',
|
|
96
|
+
flags: {
|
|
97
|
+
...CONFIG_FLAG,
|
|
98
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview without pushing' },
|
|
99
|
+
tags: { ...TAGS_FLAG, description: 'Only push the named tags (comma-separated, full tag names)' },
|
|
100
|
+
tagsOnly: { type: 'boolean', description: 'Skip the branch push (push tags only)' },
|
|
101
|
+
},
|
|
102
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, async () => {
|
|
103
|
+
enterRepoRoot();
|
|
104
|
+
await pushCommand({
|
|
105
|
+
configPath: flags.config,
|
|
106
|
+
isDryRun: flags.isDryRun,
|
|
107
|
+
tags: parseRequestedTags(flags.tags),
|
|
108
|
+
tagsOnly: flags.tagsOnly,
|
|
109
|
+
styles: context.styles,
|
|
110
|
+
});
|
|
111
|
+
}),
|
|
112
|
+
});
|
|
113
|
+
export const publish = defineCommand({
|
|
114
|
+
summary: 'Publish packages with release tags on HEAD',
|
|
115
|
+
description: 'Publish packages that have release tags on HEAD. Operates only on workspaces whose package.json#private is absent or false. Without --tags, unpublishable workspaces are silently filtered out. With --tags, an unpublishable tag is skipped with a warning while any publishable tags are still published. A project tag is never published.',
|
|
116
|
+
flags: {
|
|
117
|
+
...CONFIG_FLAG,
|
|
118
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview without publishing' },
|
|
119
|
+
shouldSkipGitChecks: { type: 'boolean', long: 'no-git-checks', description: 'Skip the clean-working-tree check' },
|
|
120
|
+
tags: { ...TAGS_FLAG, description: 'Only publish the named tags (comma-separated, full tag names)' },
|
|
121
|
+
shouldGenerateProvenance: {
|
|
122
|
+
type: 'boolean',
|
|
123
|
+
long: 'provenance',
|
|
124
|
+
description: 'Generate a provenance statement (requires OIDC; not supported by classic yarn)',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, async () => {
|
|
128
|
+
enterRepoRoot();
|
|
129
|
+
await publishCommand({
|
|
130
|
+
configPath: flags.config,
|
|
131
|
+
isDryRun: flags.isDryRun,
|
|
132
|
+
shouldGenerateProvenance: flags.shouldGenerateProvenance,
|
|
133
|
+
shouldSkipGitChecks: flags.shouldSkipGitChecks,
|
|
134
|
+
tags: parseRequestedTags(flags.tags),
|
|
135
|
+
styles: context.styles,
|
|
136
|
+
});
|
|
137
|
+
}),
|
|
138
|
+
});
|
|
139
|
+
export const createGithubRelease = defineCommand({
|
|
140
|
+
summary: 'Create GitHub Releases from changelog.json for tags on HEAD',
|
|
141
|
+
description: "Create GitHub Releases from changelog.json for tags on HEAD. Private (package.json#private) workspaces are skipped with a warning, and the command doesn't create a Release for them. A project tag gets a Release even when the root package is private.",
|
|
142
|
+
flags: {
|
|
143
|
+
...CONFIG_FLAG,
|
|
144
|
+
isDryRun: { type: 'boolean', long: 'dry-run', description: 'Preview without creating releases' },
|
|
145
|
+
tags: { ...TAGS_FLAG, description: 'Only create releases for the named tags (comma-separated, full tag names)' },
|
|
146
|
+
},
|
|
147
|
+
run: ({ flags, context }) => runReportingFailures(context.styles, async () => {
|
|
148
|
+
enterRepoRoot();
|
|
149
|
+
await createGithubReleaseCommand({
|
|
150
|
+
configPath: flags.config,
|
|
151
|
+
isDryRun: flags.isDryRun,
|
|
152
|
+
tags: parseRequestedTags(flags.tags),
|
|
153
|
+
styles: context.styles,
|
|
154
|
+
});
|
|
155
|
+
}),
|
|
156
|
+
});
|
package/dist/esm/cli.js
CHANGED
|
@@ -1,240 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { showInitHelp, showUpdateTemplatesHelp } from "./help/initHelp.js";
|
|
9
|
-
import { showOverridesHelp, showOverridesValidateHelp } from "./help/overridesHelp.js";
|
|
10
|
-
import { showPrepareHelp } from "./help/prepareHelp.js";
|
|
11
|
-
import { showCommitHelp, showCreateGithubReleaseHelp, showPublishHelp, showPushHelp, showShowTagPrefixesHelp, showTagHelp, } from "./help/releaseStepsHelp.js";
|
|
12
|
-
import { showSyncLabelsGenerateHelp, showSyncLabelsHelp, showSyncLabelsInitHelp, showSyncLabelsSyncHelp, } from "./help/syncLabelsHelp.js";
|
|
13
|
-
import { showUsage } from "./help/usage.js";
|
|
14
|
-
import { initCommand } from "./init/initCommand.js";
|
|
15
|
-
import { updateTemplatesCommand } from "./init/updateTemplatesCommand.js";
|
|
16
|
-
import { prepareCommand } from "./prepareCommand.js";
|
|
17
|
-
import { publishCommand } from "./publishCommand.js";
|
|
18
|
-
import { pushCommand } from "./pushCommand.js";
|
|
19
|
-
import { resolveConfigFlag } from "./resolveConfigFlag.js";
|
|
20
|
-
import { resolveStylesOrExit } from "./resolveStylesOrExit.js";
|
|
21
|
-
import { showTagPrefixesCommand } from "./showTagPrefixesCommand.js";
|
|
22
|
-
import { generateCommand } from "./sync-labels/generateCommand.js";
|
|
23
|
-
import { syncLabelsInitCommand } from "./sync-labels/initCommand.js";
|
|
24
|
-
import { syncLabelsCommand } from "./sync-labels/syncCommand.js";
|
|
25
|
-
import { tagCommand } from "./tagCommand.js";
|
|
26
|
-
import { validateOverridesCommand } from "./validateOverridesCommand.js";
|
|
27
|
-
const VERSION = resolveSelfVersion(import.meta.url);
|
|
28
|
-
function enterRepoRootOrExit() {
|
|
29
|
-
try {
|
|
30
|
-
return enterRepoRoot();
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
reportError(describeError(error));
|
|
34
|
-
process.exit(1);
|
|
35
|
-
}
|
|
2
|
+
import process from 'node:process';
|
|
3
|
+
import { reportFailure } from '@williamthorsen/nmr-core';
|
|
4
|
+
import { BIN } from "./bin.js";
|
|
5
|
+
import { routeCommand } from "./route.js";
|
|
6
|
+
try {
|
|
7
|
+
process.exitCode = await routeCommand(process.argv.slice(2));
|
|
36
8
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
console.info(VERSION);
|
|
41
|
-
process.exit(0);
|
|
9
|
+
catch (error) {
|
|
10
|
+
reportFailure(BIN, error);
|
|
11
|
+
process.exitCode = 1;
|
|
42
12
|
}
|
|
43
|
-
if (command === undefined || ['--help', '-h'].includes(command)) {
|
|
44
|
-
showUsage();
|
|
45
|
-
process.exit(0);
|
|
46
|
-
}
|
|
47
|
-
const flags = args.slice(1);
|
|
48
|
-
const styles = resolveStylesOrExit({
|
|
49
|
-
env: process.env,
|
|
50
|
-
stderrIsTty: process.stderr.isTTY,
|
|
51
|
-
stdoutIsTty: process.stdout.isTTY,
|
|
52
|
-
});
|
|
53
|
-
if (command === 'prepare') {
|
|
54
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
55
|
-
showPrepareHelp();
|
|
56
|
-
process.exit(0);
|
|
57
|
-
}
|
|
58
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
59
|
-
await prepareCommand(flags, styles, invocationDir);
|
|
60
|
-
process.exit(0);
|
|
61
|
-
}
|
|
62
|
-
if (command === 'commit') {
|
|
63
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
64
|
-
showCommitHelp();
|
|
65
|
-
process.exit(0);
|
|
66
|
-
}
|
|
67
|
-
enterRepoRootOrExit();
|
|
68
|
-
try {
|
|
69
|
-
commitCommand(flags);
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
reportError(describeError(error));
|
|
73
|
-
process.exit(1);
|
|
74
|
-
}
|
|
75
|
-
process.exit(0);
|
|
76
|
-
}
|
|
77
|
-
if (command === 'tag') {
|
|
78
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
79
|
-
showTagHelp();
|
|
80
|
-
process.exit(0);
|
|
81
|
-
}
|
|
82
|
-
enterRepoRootOrExit();
|
|
83
|
-
tagCommand(flags, styles);
|
|
84
|
-
process.exit(0);
|
|
85
|
-
}
|
|
86
|
-
if (command === 'push') {
|
|
87
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
88
|
-
showPushHelp();
|
|
89
|
-
process.exit(0);
|
|
90
|
-
}
|
|
91
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
92
|
-
await pushCommand(flags, styles, invocationDir);
|
|
93
|
-
process.exit(0);
|
|
94
|
-
}
|
|
95
|
-
if (command === 'create-github-release') {
|
|
96
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
97
|
-
showCreateGithubReleaseHelp();
|
|
98
|
-
process.exit(0);
|
|
99
|
-
}
|
|
100
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
101
|
-
await createGithubReleaseCommand(flags, styles, invocationDir);
|
|
102
|
-
process.exit(0);
|
|
103
|
-
}
|
|
104
|
-
if (command === 'publish') {
|
|
105
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
106
|
-
showPublishHelp();
|
|
107
|
-
process.exit(0);
|
|
108
|
-
}
|
|
109
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
110
|
-
await publishCommand(flags, styles, invocationDir);
|
|
111
|
-
process.exit(0);
|
|
112
|
-
}
|
|
113
|
-
if (command === 'show-tag-prefixes') {
|
|
114
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
115
|
-
showShowTagPrefixesHelp();
|
|
116
|
-
process.exit(0);
|
|
117
|
-
}
|
|
118
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
119
|
-
const { config } = parseArgsOrExit(flags, configFlagSchema).flags;
|
|
120
|
-
const exitCode = await showTagPrefixesCommand(styles, resolveConfigFlag(config, invocationDir));
|
|
121
|
-
process.exit(exitCode);
|
|
122
|
-
}
|
|
123
|
-
if (command === 'init') {
|
|
124
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
125
|
-
showInitHelp();
|
|
126
|
-
process.exit(0);
|
|
127
|
-
}
|
|
128
|
-
enterRepoRootOrExit();
|
|
129
|
-
const initFlagSchema = {
|
|
130
|
-
isDryRun: { long: '--dry-run', type: 'boolean' },
|
|
131
|
-
shouldForce: { long: '--force', type: 'boolean' },
|
|
132
|
-
shouldScaffoldConfig: { long: '--with-config', type: 'boolean' },
|
|
133
|
-
};
|
|
134
|
-
const { isDryRun, shouldForce, shouldScaffoldConfig } = parseArgsOrExit(flags, initFlagSchema).flags;
|
|
135
|
-
const exitCode = initCommand({ isDryRun, shouldForce, styles, shouldScaffoldConfig });
|
|
136
|
-
process.exit(exitCode);
|
|
137
|
-
}
|
|
138
|
-
if (command === 'update-templates') {
|
|
139
|
-
if (flags.some((f) => f === '--help' || f === '-h')) {
|
|
140
|
-
showUpdateTemplatesHelp();
|
|
141
|
-
process.exit(0);
|
|
142
|
-
}
|
|
143
|
-
enterRepoRootOrExit();
|
|
144
|
-
const updateTemplatesFlagSchema = {
|
|
145
|
-
isDryRun: { long: '--dry-run', type: 'boolean' },
|
|
146
|
-
};
|
|
147
|
-
const { isDryRun } = parseArgsOrExit(flags, updateTemplatesFlagSchema).flags;
|
|
148
|
-
const exitCode = updateTemplatesCommand({ isDryRun, styles });
|
|
149
|
-
process.exit(exitCode);
|
|
150
|
-
}
|
|
151
|
-
if (command === 'sync-labels') {
|
|
152
|
-
const subcommand = flags[0];
|
|
153
|
-
if (subcommand === undefined || ['--help', '-h'].includes(subcommand)) {
|
|
154
|
-
showSyncLabelsHelp();
|
|
155
|
-
process.exit(0);
|
|
156
|
-
}
|
|
157
|
-
const subflags = flags.slice(1);
|
|
158
|
-
if (subcommand === 'init') {
|
|
159
|
-
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
160
|
-
showSyncLabelsInitHelp();
|
|
161
|
-
process.exit(0);
|
|
162
|
-
}
|
|
163
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
164
|
-
const syncLabelsInitFlagSchema = {
|
|
165
|
-
...configFlagSchema,
|
|
166
|
-
isDryRun: { long: '--dry-run', type: 'boolean' },
|
|
167
|
-
shouldForce: { long: '--force', type: 'boolean' },
|
|
168
|
-
};
|
|
169
|
-
const { config, isDryRun, shouldForce } = parseArgsOrExit(subflags, syncLabelsInitFlagSchema).flags;
|
|
170
|
-
const configPath = resolveConfigFlag(config, invocationDir);
|
|
171
|
-
const exitCode = await syncLabelsInitCommand({
|
|
172
|
-
...(configPath !== undefined && { configPath }),
|
|
173
|
-
isDryRun,
|
|
174
|
-
shouldForce,
|
|
175
|
-
styles,
|
|
176
|
-
});
|
|
177
|
-
process.exit(exitCode);
|
|
178
|
-
}
|
|
179
|
-
if (subcommand === 'generate') {
|
|
180
|
-
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
181
|
-
showSyncLabelsGenerateHelp();
|
|
182
|
-
process.exit(0);
|
|
183
|
-
}
|
|
184
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
185
|
-
const generateFlagSchema = {
|
|
186
|
-
...configFlagSchema,
|
|
187
|
-
shouldCheck: { long: '--check', type: 'boolean' },
|
|
188
|
-
};
|
|
189
|
-
const { shouldCheck, config } = parseArgsOrExit(subflags, generateFlagSchema).flags;
|
|
190
|
-
const configPath = resolveConfigFlag(config, invocationDir);
|
|
191
|
-
const exitCode = await generateCommand({ shouldCheck, ...(configPath !== undefined && { configPath }), styles });
|
|
192
|
-
process.exit(exitCode);
|
|
193
|
-
}
|
|
194
|
-
if (subcommand === 'sync') {
|
|
195
|
-
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
196
|
-
showSyncLabelsSyncHelp();
|
|
197
|
-
process.exit(0);
|
|
198
|
-
}
|
|
199
|
-
if (subflags.length > 0) {
|
|
200
|
-
reportError(`Unknown option: ${subflags[0]}`);
|
|
201
|
-
process.exit(1);
|
|
202
|
-
}
|
|
203
|
-
enterRepoRootOrExit();
|
|
204
|
-
const exitCode = syncLabelsCommand();
|
|
205
|
-
process.exit(exitCode);
|
|
206
|
-
}
|
|
207
|
-
reportError(`Unknown subcommand: ${subcommand}`);
|
|
208
|
-
showSyncLabelsHelp();
|
|
209
|
-
process.exit(1);
|
|
210
|
-
}
|
|
211
|
-
if (command === 'overrides') {
|
|
212
|
-
const subcommand = flags[0];
|
|
213
|
-
if (subcommand === undefined || ['--help', '-h'].includes(subcommand)) {
|
|
214
|
-
showOverridesHelp();
|
|
215
|
-
process.exit(0);
|
|
216
|
-
}
|
|
217
|
-
const subflags = flags.slice(1);
|
|
218
|
-
if (subcommand === 'validate') {
|
|
219
|
-
if (subflags.some((f) => f === '--help' || f === '-h')) {
|
|
220
|
-
showOverridesValidateHelp();
|
|
221
|
-
process.exit(0);
|
|
222
|
-
}
|
|
223
|
-
const { invocationDir } = enterRepoRootOrExit();
|
|
224
|
-
const { config } = parseArgsOrExit(subflags, configFlagSchema).flags;
|
|
225
|
-
const result = await validateOverridesCommand(styles, resolveConfigFlag(config, invocationDir));
|
|
226
|
-
if (result.exitCode === 0) {
|
|
227
|
-
console.info(result.message);
|
|
228
|
-
}
|
|
229
|
-
else {
|
|
230
|
-
process.stderr.write(`${result.message}\n`);
|
|
231
|
-
}
|
|
232
|
-
process.exit(result.exitCode);
|
|
233
|
-
}
|
|
234
|
-
reportError(`Unknown subcommand: ${subcommand}`);
|
|
235
|
-
showOverridesHelp();
|
|
236
|
-
process.exit(1);
|
|
237
|
-
}
|
|
238
|
-
reportError(`Unknown command: ${command}`);
|
|
239
|
-
showUsage();
|
|
240
|
-
process.exit(1);
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
export interface CommitCommandOptions {
|
|
2
|
+
isDryRun: boolean;
|
|
3
|
+
}
|
|
1
4
|
/**
|
|
2
5
|
* Runs the CLI `commit` command: reads the tags and summary files written by `prepare`, stages all changes, and
|
|
3
6
|
* creates the release commit.
|
|
4
7
|
*/
|
|
5
|
-
export declare function commitCommand(
|
|
8
|
+
export declare function commitCommand({ isDryRun }: CommitCommandOptions): void;
|