@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.
- package/.meta/changelog.json +62 -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 +22 -0
- package/README.md +7 -2
- package/bin/release-kit.js +1 -1
- package/dist/esm/assertReleasesOnNpm.js +1 -2
- package/dist/esm/assertTarballsComplete.js +2 -3
- package/dist/esm/bin.d.ts +2 -0
- package/dist/esm/bin.js +1 -0
- package/dist/esm/changelogJsonUtils.js +2 -1
- 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 +4 -3
- package/dist/esm/commitCommand.d.ts +4 -1
- package/dist/esm/commitCommand.js +2 -6
- package/dist/esm/createGithubReleaseCommand.d.ts +10 -4
- package/dist/esm/createGithubReleaseCommand.js +2 -15
- package/dist/esm/deriveDirectoryConfig.js +1 -2
- package/dist/esm/deriveWorkspaceConfig.js +1 -2
- package/dist/esm/detectPackageManager.js +1 -1
- package/dist/esm/findMissingManifestPaths.js +1 -1
- package/dist/esm/hasPrettierConfig.js +1 -1
- package/dist/esm/init/parseJsonRecord.js +1 -1
- package/dist/esm/isPublishableManifest.js +1 -1
- package/dist/esm/loadChangelogOverrides.js +1 -1
- package/dist/esm/loadConfig.js +1 -2
- package/dist/esm/loadValidatedConfig.d.ts +6 -1
- package/dist/esm/loadValidatedConfig.js +11 -3
- package/dist/esm/npmRegistry.js +1 -1
- package/dist/esm/packFromCleanCheckout.js +1 -2
- package/dist/esm/parseChangeRecordBlock.js +1 -1
- 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 +15 -23
- package/dist/esm/publishCommand.d.ts +12 -3
- package/dist/esm/publishCommand.js +1 -16
- package/dist/esm/pushCommand.d.ts +12 -4
- package/dist/esm/pushCommand.js +2 -16
- package/dist/esm/resolveCommandTags.d.ts +3 -3
- package/dist/esm/resolveCommandTags.js +5 -7
- 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 +2 -1
- package/dist/esm/sync-labels/generateCommand.js +7 -6
- package/dist/esm/sync-labels/presets.js +1 -2
- package/dist/esm/sync-labels/retiredConfig.js +2 -1
- package/dist/esm/sync-labels/syncCommand.js +4 -3
- package/dist/esm/tagCommand.d.ts +8 -3
- package/dist/esm/tagCommand.js +1 -7
- package/dist/esm/typeGuards.d.ts +0 -2
- package/dist/esm/typeGuards.js +0 -3
- package/dist/esm/validateConfig.js +1 -1
- package/dist/esm/validateOverridesCommand.js +5 -4
- 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/runCli.d.ts +0 -5
- package/dist/esm/runCli.js +0 -224
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { formatErrorLine, formatStatusLine, isAnticipatedFailure, } from '@williamthorsen/nmr-core';
|
|
2
2
|
import { describeError } from '@williamthorsen/toolbelt.errors';
|
|
3
|
+
import { BIN } from "./bin.js";
|
|
3
4
|
import { buildChangelogEntries } from "./buildChangelogEntries.js";
|
|
4
5
|
import { resolveOverridePath } from "./changelogOverrides.js";
|
|
5
6
|
import { describeEmptyWorkspace, discoverWorkspaces } from "./discoverWorkspaces.js";
|
|
@@ -26,12 +27,12 @@ export async function validateOverridesCommand(styles, configPath, dependencies
|
|
|
26
27
|
if (!isAnticipatedFailure(error)) {
|
|
27
28
|
throw error;
|
|
28
29
|
}
|
|
29
|
-
return { exitCode: 2, message: formatErrorLine(`Failed to discover workspaces: ${describeError(error)}`) };
|
|
30
|
+
return { exitCode: 2, message: formatErrorLine(BIN, `Failed to discover workspaces: ${describeError(error)}`) };
|
|
30
31
|
}
|
|
31
32
|
if (workspace.kind === 'empty') {
|
|
32
33
|
return {
|
|
33
34
|
exitCode: 2,
|
|
34
|
-
message: formatErrorLine(`No workspace package to validate. ${describeEmptyWorkspace(workspace)}`),
|
|
35
|
+
message: formatErrorLine(BIN, `No workspace package to validate. ${describeEmptyWorkspace(workspace)}`),
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
38
|
let inputs;
|
|
@@ -42,7 +43,7 @@ export async function validateOverridesCommand(styles, configPath, dependencies
|
|
|
42
43
|
if (!isAnticipatedFailure(error)) {
|
|
43
44
|
throw error;
|
|
44
45
|
}
|
|
45
|
-
return { exitCode: 2, message: formatErrorLine(`Failed to resolve overrides scope: ${describeError(error)}`) };
|
|
46
|
+
return { exitCode: 2, message: formatErrorLine(BIN, `Failed to resolve overrides scope: ${describeError(error)}`) };
|
|
46
47
|
}
|
|
47
48
|
const result = validate(inputs);
|
|
48
49
|
return formatValidateOverridesResult(result, styles.stderr);
|
|
@@ -90,7 +91,7 @@ function flattenEntriesToItems(entries) {
|
|
|
90
91
|
}
|
|
91
92
|
function formatConfigProblem(problem) {
|
|
92
93
|
return problem.kind === 'load'
|
|
93
|
-
? formatErrorLine(`Failed to load config: ${problem.message}`)
|
|
94
|
+
? formatErrorLine(BIN, `Failed to load config: ${problem.message}`)
|
|
94
95
|
: `Invalid config:\n - ${problem.errors.join('\n - ')}`;
|
|
95
96
|
}
|
|
96
97
|
function buildValidationInputs({ targets, settings }, buildEntries) {
|
package/docs/configuration.md
CHANGED
|
@@ -193,7 +193,7 @@ The `RELEASE_KIT_OUTPUT_STYLE` environment variable sets the style for every com
|
|
|
193
193
|
| `plain` | Print plain on both streams. |
|
|
194
194
|
| `rich` | Print rich on both streams, even in a pipe or under CI. |
|
|
195
195
|
|
|
196
|
-
Any other value is a usage error: release-kit reports it and exits with code
|
|
196
|
+
Any other value is a usage error: release-kit reports it and exits with code 2.
|
|
197
197
|
|
|
198
198
|
The variable outranks detection. Under `auto`, release-kit defers to detection, which reads `CI`, then the stream, then `TERM`. A stream is plain when any of these holds, and rich otherwise:
|
|
199
199
|
|
|
@@ -162,6 +162,8 @@ An override file references it from its top-level `$schema` key:
|
|
|
162
162
|
}
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
+
release-kit also ships the schema in its package. A project that lists `@williamthorsen/release-kit` as a direct dependency can reference the installed version by a path relative to the override file: `../node_modules/@williamthorsen/release-kit/schemas/changelog-overrides.json` from `.meta/changelog-overrides.json`, and `../../../node_modules/@williamthorsen/release-kit/schemas/changelog-overrides.json` from a workspace's `packages/<ws>/.meta/changelog-overrides.json`. pnpm links only direct dependencies into a project's `node_modules`, so the path does not resolve when release-kit runs through `pnpm dlx` or `npx`.
|
|
166
|
+
|
|
165
167
|
The schema states the key form and the entry fields. It accepts `audience` values `'all'` and `'dev'`, which the file format declares; the loader still rejects them (see below).
|
|
166
168
|
|
|
167
169
|
## Audience semantics: v1 supports `'skip'` only
|
package/docs/labels.md
CHANGED
|
@@ -125,4 +125,6 @@ Consumers reference it from the top of their `.meta/label-map.json`:
|
|
|
125
125
|
}
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
+
change-grammar also ships the schema in its package. A project that lists `@williamthorsen/change-grammar` as a direct devDependency can reference the installed version as `../node_modules/@williamthorsen/change-grammar/schemas/label-map.json`, relative to `.meta/label-map.json`. release-kit depends on change-grammar, but pnpm links only direct dependencies into a project's `node_modules`, so the path does not resolve through release-kit alone; the URL works either way.
|
|
129
|
+
|
|
128
130
|
Earlier releases published the same schema from release-kit, and URLs under existing `release-kit-v*` tags keep resolving. release-kit does not generate `.meta/label-map.json`; change-grammar's `deriveLabelMap` derives one from the taxonomy, the workspace scopes, and the caller's statement of whether the repo is a monorepo, which decides the `root` scope.
|
package/docs/releasing.md
CHANGED
|
@@ -65,7 +65,7 @@ Before it writes any file, and in a dry run as well, `prepare` asks npm about ea
|
|
|
65
65
|
|
|
66
66
|
### Packages whose tarball would lack a manifest file
|
|
67
67
|
|
|
68
|
-
Before it writes any file, and in a dry run as well, `prepare` packs each publishable package that the release includes as the publish workflow would: It clones HEAD into a temporary directory, runs the package manager's frozen install there, runs the package's `prepublishOnly` script when it declares one, and packs the package. Build output in the working tree therefore does not count, and the check adds the time of one install and one build to every release. `prepare` refuses the release when a tarball lacks a file named by the package's `main`, `types`, `bin`, or `exports`, and names each package with each missing path and the manifest field that names it. The usual fix is to build the files in the package's
|
|
68
|
+
Before it writes any file, and in a dry run as well, `prepare` packs each publishable package that the release includes as the publish workflow would: It clones HEAD into a temporary directory, runs the package manager's frozen install there, runs the package's `prepublishOnly` script when it declares one, and packs the package. Build output in the working tree therefore does not count, and the check adds the time of one install and one build to every release. `prepare` refuses the release when a tarball lacks a file named by the package's `main`, `types`, `bin`, or `exports`, and names each package with each missing path and the manifest field that names it. The usual fix is to build the files in the package's `prepublishOnly` script, as `"prepublishOnly": "nmr build"` does. A failed install or build in the clean checkout also refuses the release, with the failing step's output.
|
|
69
69
|
|
|
70
70
|
A target under the `source` export condition is exempt, and so is a target under a condition listed in [`devExportConditions`](configuration.md#releasekitconfig-reference), which declares the conditions that resolve only inside the repo. [`publish`](publishing.md#tarball-check) runs the same check before it publishes any package.
|
|
71
71
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/release-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"description": "Version-bumping and changelog-generation toolkit for release workflows",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"changelog",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"templates"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@williamthorsen/change-grammar": "0.3.
|
|
55
|
-
"@williamthorsen/nmr-core": "0.
|
|
54
|
+
"@williamthorsen/change-grammar": "0.3.1",
|
|
55
|
+
"@williamthorsen/nmr-core": "0.16.0",
|
|
56
56
|
"@williamthorsen/toolbelt.errors": "0.9.0",
|
|
57
57
|
"json-stringify-pretty-compact": "4.0.0",
|
|
58
58
|
"semver": "7.8.6",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `--config` flag, shared by every subcommand that reads the config file.
|
|
3
|
-
*
|
|
4
|
-
* Spread into a subcommand's own schema rather than repeated, so that the subcommands cannot drift to different
|
|
5
|
-
* spellings of one flag.
|
|
6
|
-
*/
|
|
7
|
-
export declare const configFlagSchema: {
|
|
8
|
-
config: {
|
|
9
|
-
long: string;
|
|
10
|
-
type: "string";
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export function showInitHelp() {
|
|
2
|
-
console.info(`
|
|
3
|
-
Usage: release-kit init [options]
|
|
4
|
-
|
|
5
|
-
Initialize release-kit in the current repository.
|
|
6
|
-
By default, scaffolds only the GitHub Actions workflow files. When every
|
|
7
|
-
package is private, skips publish.yaml and create-github-release.yaml.
|
|
8
|
-
|
|
9
|
-
Options:
|
|
10
|
-
--with-config Also scaffold .config/release-kit.config.ts
|
|
11
|
-
--force Overwrite existing files instead of skipping them
|
|
12
|
-
--dry-run Preview changes without writing files
|
|
13
|
-
--help, -h Show this help message
|
|
14
|
-
`);
|
|
15
|
-
}
|
|
16
|
-
export function showUpdateTemplatesHelp() {
|
|
17
|
-
console.info(`
|
|
18
|
-
Usage: release-kit update-templates [options]
|
|
19
|
-
|
|
20
|
-
Update the GitHub Actions workflows that release-kit scaffolds to the templates
|
|
21
|
-
of the installed version, showing what changed in each file. Creates a missing
|
|
22
|
-
workflow that \`init\` would create, and refreshes sync-labels.yaml only when it
|
|
23
|
-
exists. When every package is private, refreshes publish.yaml and
|
|
24
|
-
create-github-release.yaml only when they exist. Keeps publish.yaml's provenance
|
|
25
|
-
setting. Never touches config files.
|
|
26
|
-
|
|
27
|
-
Options:
|
|
28
|
-
--dry-run Preview changes without writing files
|
|
29
|
-
--help, -h Show this help message
|
|
30
|
-
`);
|
|
31
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export function showOverridesHelp() {
|
|
2
|
-
console.info(`
|
|
3
|
-
Usage: release-kit overrides <subcommand> [options]
|
|
4
|
-
|
|
5
|
-
Manage editorial changelog overrides.
|
|
6
|
-
|
|
7
|
-
Subcommands:
|
|
8
|
-
validate Validate every \`.meta/changelog-overrides.json\` file across all scopes
|
|
9
|
-
|
|
10
|
-
Options:
|
|
11
|
-
--help, -h Show this help message
|
|
12
|
-
`);
|
|
13
|
-
}
|
|
14
|
-
export function showOverridesValidateHelp() {
|
|
15
|
-
console.info(`
|
|
16
|
-
Usage: release-kit overrides validate
|
|
17
|
-
|
|
18
|
-
Validate every \`.meta/changelog-overrides.json\` file across the project and per-workspace
|
|
19
|
-
scopes. Reports schema/parse errors, ambiguous-prefix errors, conflicting-key errors, and
|
|
20
|
-
stale-key warnings.
|
|
21
|
-
|
|
22
|
-
Exit codes:
|
|
23
|
-
0 Clean: no errors, no stale keys
|
|
24
|
-
1 Stale-key warnings only (no errors)
|
|
25
|
-
2 Schema/parse, ambiguous-prefix, or conflicting-key errors (errors take precedence)
|
|
26
|
-
|
|
27
|
-
Options:
|
|
28
|
-
--config <path> Config file, relative to the current directory
|
|
29
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
30
|
-
--help, -h Show this help message
|
|
31
|
-
`);
|
|
32
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Help text for `release-kit prepare`. The module does not have any import-time side effects, so that a test can
|
|
3
|
-
* import it without running the CLI.
|
|
4
|
-
*/
|
|
5
|
-
export declare const prepareHelpText = "\nUsage: release-kit prepare [options]\n\nRun release preparation with automatic workspace discovery.\n\nOptions:\n --config <path> Config file, relative to the current directory\n (default: .config/release-kit.config.ts at the repo root)\n --dry-run Run without modifying any files\n --bump=major|minor|patch Set the level of every release that happens; does not trigger one\n --set-version=X.Y.Z Set an explicit version; bypasses the changelog-derived bump. In monorepo\n mode, name each workspace or directory target:\n --set-version=arrays@1.0.0[,strings@2.0.0].\n Rejected when a composite (a 'project' block or a releases composite)\n is configured.\n --force Release even when the last tag is not followed by any commits,\n or by any bump-worthy ones. Defaults to patch when --bump is not given;\n use --bump=X for a different level.\n --no-git-checks, -n Skip the clean-working-tree check\n --only=name1,name2 Release only the named release targets and their dependents\n (comma-separated, monorepo only). A composite declared under 'releases'\n releases only when named; a 'project' block's release is skipped.\n --with-release-notes Also write per-workspace release-notes previews under <workspacePath>/docs/\n (docs/README.v<version>.md and docs/RELEASE_NOTES.v<version>.md).\n Recommended .gitignore entry: packages/*/docs/*.v*.md (or docs/*.v*.md).\n --help, -h Show this help message\n";
|
|
6
|
-
/** Prints the prepare command's help text. */
|
|
7
|
-
export declare function showPrepareHelp(): void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export const prepareHelpText = `
|
|
2
|
-
Usage: release-kit prepare [options]
|
|
3
|
-
|
|
4
|
-
Run release preparation with automatic workspace discovery.
|
|
5
|
-
|
|
6
|
-
Options:
|
|
7
|
-
--config <path> Config file, relative to the current directory
|
|
8
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
9
|
-
--dry-run Run without modifying any files
|
|
10
|
-
--bump=major|minor|patch Set the level of every release that happens; does not trigger one
|
|
11
|
-
--set-version=X.Y.Z Set an explicit version; bypasses the changelog-derived bump. In monorepo
|
|
12
|
-
mode, name each workspace or directory target:
|
|
13
|
-
--set-version=arrays@1.0.0[,strings@2.0.0].
|
|
14
|
-
Rejected when a composite (a 'project' block or a releases composite)
|
|
15
|
-
is configured.
|
|
16
|
-
--force Release even when the last tag is not followed by any commits,
|
|
17
|
-
or by any bump-worthy ones. Defaults to patch when --bump is not given;
|
|
18
|
-
use --bump=X for a different level.
|
|
19
|
-
--no-git-checks, -n Skip the clean-working-tree check
|
|
20
|
-
--only=name1,name2 Release only the named release targets and their dependents
|
|
21
|
-
(comma-separated, monorepo only). A composite declared under 'releases'
|
|
22
|
-
releases only when named; a 'project' block's release is skipped.
|
|
23
|
-
--with-release-notes Also write per-workspace release-notes previews under <workspacePath>/docs/
|
|
24
|
-
(docs/README.v<version>.md and docs/RELEASE_NOTES.v<version>.md).
|
|
25
|
-
Recommended .gitignore entry: packages/*/docs/*.v*.md (or docs/*.v*.md).
|
|
26
|
-
--help, -h Show this help message
|
|
27
|
-
`;
|
|
28
|
-
export function showPrepareHelp() {
|
|
29
|
-
console.info(prepareHelpText);
|
|
30
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** Prints the `commit` command's help text. */
|
|
2
|
-
export declare function showCommitHelp(): void;
|
|
3
|
-
/** Prints the `create-github-release` command's help text. */
|
|
4
|
-
export declare function showCreateGithubReleaseHelp(): void;
|
|
5
|
-
/** Prints the `publish` command's help text. */
|
|
6
|
-
export declare function showPublishHelp(): void;
|
|
7
|
-
/** Prints the `push` command's help text. */
|
|
8
|
-
export declare function showPushHelp(): void;
|
|
9
|
-
/** Prints the `show-tag-prefixes` command's help text. */
|
|
10
|
-
export declare function showShowTagPrefixesHelp(): void;
|
|
11
|
-
/** Prints the `tag` command's help text. */
|
|
12
|
-
export declare function showTagHelp(): void;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
export function showCommitHelp() {
|
|
2
|
-
console.info(`
|
|
3
|
-
Usage: release-kit commit [options]
|
|
4
|
-
|
|
5
|
-
Stage all changes and create the release commit using tags and summary
|
|
6
|
-
produced by \`prepare\`.
|
|
7
|
-
|
|
8
|
-
Options:
|
|
9
|
-
--dry-run Preview the commit message without creating it
|
|
10
|
-
--help, -h Show this help message
|
|
11
|
-
`);
|
|
12
|
-
}
|
|
13
|
-
export function showCreateGithubReleaseHelp() {
|
|
14
|
-
console.info(`
|
|
15
|
-
Usage: release-kit create-github-release [options]
|
|
16
|
-
|
|
17
|
-
Create GitHub Releases from changelog.json for tags on HEAD. Private
|
|
18
|
-
(package.json#private) workspaces are skipped with a warning, and the command
|
|
19
|
-
doesn't create a Release for them. A project tag gets a Release even when the
|
|
20
|
-
root package is private.
|
|
21
|
-
|
|
22
|
-
Options:
|
|
23
|
-
--config <path> Config file, relative to the current directory
|
|
24
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
25
|
-
--dry-run Preview without creating releases
|
|
26
|
-
--tags=tag1,tag2 Only create releases for the named tags (comma-separated, full tag names)
|
|
27
|
-
--help, -h Show this help message
|
|
28
|
-
`);
|
|
29
|
-
}
|
|
30
|
-
export function showPublishHelp() {
|
|
31
|
-
console.info(`
|
|
32
|
-
Usage: release-kit publish [options]
|
|
33
|
-
|
|
34
|
-
Publish packages that have release tags on HEAD. Operates only on workspaces whose
|
|
35
|
-
package.json#private is absent or false. Without --tags, unpublishable workspaces are
|
|
36
|
-
silently filtered out. With --tags, an unpublishable tag is skipped with a warning while
|
|
37
|
-
any publishable tags are still published. A project tag is never published.
|
|
38
|
-
|
|
39
|
-
Options:
|
|
40
|
-
--config <path> Config file, relative to the current directory
|
|
41
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
42
|
-
--dry-run Preview without publishing
|
|
43
|
-
--no-git-checks Skip the clean-working-tree check
|
|
44
|
-
--tags=tag1,tag2 Only publish the named tags (comma-separated, full tag names)
|
|
45
|
-
--provenance Generate provenance statement (requires OIDC, not supported by classic yarn)
|
|
46
|
-
--help, -h Show this help message
|
|
47
|
-
`);
|
|
48
|
-
}
|
|
49
|
-
export function showPushHelp() {
|
|
50
|
-
console.info(`
|
|
51
|
-
Usage: release-kit push [options]
|
|
52
|
-
|
|
53
|
-
Push the release commit and each tag individually, so that GitHub Actions
|
|
54
|
-
starts a separate workflow run for each tag.
|
|
55
|
-
|
|
56
|
-
Options:
|
|
57
|
-
--config <path> Config file, relative to the current directory
|
|
58
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
59
|
-
--dry-run Preview without pushing
|
|
60
|
-
--tags=tag1,tag2 Only push the named tags (comma-separated, full tag names)
|
|
61
|
-
--tags-only Skip the branch push (push tags only)
|
|
62
|
-
--help, -h Show this help message
|
|
63
|
-
`);
|
|
64
|
-
}
|
|
65
|
-
export function showShowTagPrefixesHelp() {
|
|
66
|
-
console.info(`
|
|
67
|
-
Usage: release-kit show-tag-prefixes [options]
|
|
68
|
-
|
|
69
|
-
Print a per-workspace table of derived tag prefixes, tag counts, and declared
|
|
70
|
-
legacy tag prefixes. Reports any release-shaped tags whose prefix is neither a
|
|
71
|
-
derived prefix nor declared in \`legacyIdentities\`, with a copy-pasteable
|
|
72
|
-
config snippet.
|
|
73
|
-
|
|
74
|
-
Options:
|
|
75
|
-
--config <path> Config file, relative to the current directory
|
|
76
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
77
|
-
--help, -h Show this help message
|
|
78
|
-
`);
|
|
79
|
-
}
|
|
80
|
-
export function showTagHelp() {
|
|
81
|
-
console.info(`
|
|
82
|
-
Usage: release-kit tag [options]
|
|
83
|
-
|
|
84
|
-
Create annotated git tags from the tags file produced by \`prepare\`.
|
|
85
|
-
|
|
86
|
-
Options:
|
|
87
|
-
--dry-run Preview without creating tags
|
|
88
|
-
--no-git-checks Skip dirty working tree check
|
|
89
|
-
--help, -h Show this help message
|
|
90
|
-
`);
|
|
91
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Prints the `sync-labels generate` subcommand's help text. */
|
|
2
|
-
export declare function showSyncLabelsGenerateHelp(): void;
|
|
3
|
-
/** Prints the `sync-labels` command's help text. */
|
|
4
|
-
export declare function showSyncLabelsHelp(): void;
|
|
5
|
-
/** Prints the `sync-labels init` subcommand's help text. */
|
|
6
|
-
export declare function showSyncLabelsInitHelp(): void;
|
|
7
|
-
/** Prints the `sync-labels sync` subcommand's help text. */
|
|
8
|
-
export declare function showSyncLabelsSyncHelp(): void;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
export function showSyncLabelsGenerateHelp() {
|
|
2
|
-
console.info(`
|
|
3
|
-
Usage: release-kit sync-labels generate [options]
|
|
4
|
-
|
|
5
|
-
Regenerate .github/labels.yaml from the repoLabels block of .config/release-kit.config.ts.
|
|
6
|
-
|
|
7
|
-
Options:
|
|
8
|
-
--check Report whether .github/labels.yaml is stale instead of writing it
|
|
9
|
-
--config <path> Config file, relative to the current directory
|
|
10
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
11
|
-
--help, -h Show this help message
|
|
12
|
-
`);
|
|
13
|
-
}
|
|
14
|
-
export function showSyncLabelsHelp() {
|
|
15
|
-
console.info(`
|
|
16
|
-
Usage: release-kit sync-labels <subcommand> [options]
|
|
17
|
-
|
|
18
|
-
Manage GitHub label synchronization via preset and custom label definitions.
|
|
19
|
-
|
|
20
|
-
Subcommands:
|
|
21
|
-
init Scaffold caller workflow and config, then generate labels
|
|
22
|
-
generate Regenerate .github/labels.yaml from config
|
|
23
|
-
sync Trigger the sync-labels workflow via gh CLI
|
|
24
|
-
|
|
25
|
-
Options:
|
|
26
|
-
--help, -h Show this help message
|
|
27
|
-
`);
|
|
28
|
-
}
|
|
29
|
-
export function showSyncLabelsInitHelp() {
|
|
30
|
-
console.info(`
|
|
31
|
-
Usage: release-kit sync-labels init [options]
|
|
32
|
-
|
|
33
|
-
Scaffold the sync-labels caller workflow and seed the repoLabels block of
|
|
34
|
-
.config/release-kit.config.ts with scope labels discovered from workspaces and
|
|
35
|
-
retired packages, then generate .github/labels.yaml. When the config file already
|
|
36
|
-
exists, print the block for manual paste instead of rewriting the file.
|
|
37
|
-
|
|
38
|
-
Options:
|
|
39
|
-
--config <path> Config file, relative to the current directory
|
|
40
|
-
(default: .config/release-kit.config.ts at the repo root)
|
|
41
|
-
--dry-run Preview changes without writing files
|
|
42
|
-
--force Overwrite existing files instead of skipping them
|
|
43
|
-
--help, -h Show this help message
|
|
44
|
-
`);
|
|
45
|
-
}
|
|
46
|
-
export function showSyncLabelsSyncHelp() {
|
|
47
|
-
console.info(`
|
|
48
|
-
Usage: release-kit sync-labels sync
|
|
49
|
-
|
|
50
|
-
Trigger the sync-labels GitHub Actions workflow via the gh CLI.
|
|
51
|
-
|
|
52
|
-
Options:
|
|
53
|
-
--help, -h Show this help message
|
|
54
|
-
`);
|
|
55
|
-
}
|
package/dist/esm/help/usage.d.ts
DELETED
package/dist/esm/help/usage.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { OUTPUT_STYLE_ENV_VAR } from "../resolveStylesOrExit.js";
|
|
2
|
-
export function showUsage() {
|
|
3
|
-
console.info(`
|
|
4
|
-
Usage: release-kit <command> [options]
|
|
5
|
-
|
|
6
|
-
Commands:
|
|
7
|
-
prepare Run release preparation (auto-discovers workspaces)
|
|
8
|
-
commit Stage changes and create the release commit
|
|
9
|
-
tag Create annotated git tags from the tags file
|
|
10
|
-
push Push release commit and tags (one push per tag)
|
|
11
|
-
publish Publish packages with release tags on HEAD
|
|
12
|
-
create-github-release Create GitHub Releases from changelog.json for tags on HEAD
|
|
13
|
-
show-tag-prefixes Show derived and declared legacy tag prefixes per workspace
|
|
14
|
-
init Initialize release-kit in the current repository
|
|
15
|
-
update-templates Update the scaffolded workflows to the current templates
|
|
16
|
-
overrides Manage editorial changelog overrides
|
|
17
|
-
sync-labels Manage GitHub label synchronization
|
|
18
|
-
|
|
19
|
-
Options:
|
|
20
|
-
--dry-run Preview changes without writing files
|
|
21
|
-
--help, -h Show this help message
|
|
22
|
-
--version, -V Show the version number
|
|
23
|
-
|
|
24
|
-
Environment:
|
|
25
|
-
${OUTPUT_STYLE_ENV_VAR}
|
|
26
|
-
Output style: auto (default), plain, or rich. auto prints plain,
|
|
27
|
-
without emoji, when CI is set or the stream is not a terminal.
|
|
28
|
-
`);
|
|
29
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolves a `--config` value against the directory from which `release-kit` was invoked, which differs from the
|
|
3
|
-
* working directory once the process has moved to the repo root.
|
|
4
|
-
*
|
|
5
|
-
* Returns `undefined` when the flag is absent, so that `loadConfig` falls back to the default path under the root.
|
|
6
|
-
*/
|
|
7
|
-
export declare function resolveConfigFlag(config: string | undefined, invocationDir: string): string | undefined;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { describeInvalidOutputStyle, reportError, resolveStreamStyles, } from '@williamthorsen/nmr-core';
|
|
2
|
-
export const OUTPUT_STYLE_ENV_VAR = 'RELEASE_KIT_OUTPUT_STYLE';
|
|
3
|
-
export function resolveStylesOrExit(options) {
|
|
4
|
-
const { invalid, styles } = resolveStreamStyles({ ...options, envVar: OUTPUT_STYLE_ENV_VAR });
|
|
5
|
-
if (invalid !== undefined) {
|
|
6
|
-
reportError(describeInvalidOutputStyle(invalid));
|
|
7
|
-
process.exit(1);
|
|
8
|
-
}
|
|
9
|
-
return styles;
|
|
10
|
-
}
|