@williamthorsen/release-kit 18.1.1 → 18.2.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 +60 -0
- package/.readyup/kits/default.js +595 -31
- package/.readyup/kits/npm-auto-publish.js +1 -1
- package/.readyup/manifest.json +55 -33
- package/CHANGELOG.md +18 -0
- package/README.md +19 -1
- package/dist/esm/cli/maintenanceCommands.js +1 -1
- package/dist/esm/init/managed-workflows.d.ts +10 -0
- package/dist/esm/init/managed-workflows.js +18 -0
- package/dist/esm/init/updateTemplatesCommand.js +5 -11
- package/dist/esm/previewTagPrefixes.d.ts +7 -1
- package/dist/esm/previewTagPrefixes.js +9 -4
- package/dist/esm/showTagPrefixesCommand.d.ts +6 -6
- package/dist/esm/showTagPrefixesCommand.js +94 -39
- package/dist/esm/sync-labels/generateCommand.js +0 -4
- package/dist/esm/sync-labels/initCommand.js +0 -4
- package/dist/esm/sync-labels/syncCommand.js +0 -4
- package/docs/configuration.md +3 -3
- package/docs/labels.md +0 -2
- package/package.json +7 -7
- package/dist/esm/sync-labels/retiredConfig.d.ts +0 -11
- package/dist/esm/sync-labels/retiredConfig.js +0 -12
package/docs/configuration.md
CHANGED
|
@@ -143,7 +143,7 @@ Validation rules:
|
|
|
143
143
|
- Full-tuple `(name, tagPrefix)` duplicates within `retiredPackages` are rejected.
|
|
144
144
|
- Two entries sharing the same `tagPrefix` but different `name`s are accepted: Such a pair documents a package renamed within the repo before being retired.
|
|
145
145
|
|
|
146
|
-
`show-tag-prefixes`
|
|
146
|
+
`show-tag-prefixes` lists each retired entry under "Retired packages", with its tag count and successor.
|
|
147
147
|
|
|
148
148
|
## Tag prefix collisions
|
|
149
149
|
|
|
@@ -160,13 +160,13 @@ The rule is enforced at config load; the resulting error identifies both collidi
|
|
|
160
160
|
|
|
161
161
|
## `release-kit show-tag-prefixes`
|
|
162
162
|
|
|
163
|
-
Prints
|
|
163
|
+
Prints one block per workspace and directory target, titled with its path and its package name or `releases` key, with its derived tag prefix and each declared legacy identity, their tag counts, and a status. Prefixes and counts are aligned in columns across the whole output. A "Retired packages" section follows when the config declares `retiredPackages`. An "Undeclared tag prefixes" section always follows: It reports any release-shaped tag prefix in the repo that is neither derived nor declared, along with a copy-pasteable `workspaces: [...]` config snippet, or `(none)`. The snippet uses a `TODO-fill-in-legacy-npm-name` placeholder for each identity's `name`; replace it with the package's prior npm name before pasting. When a derived prefix does not have any tags yet, a closing note explains that `release-kit tag` creates the first tag from the tags file that `release-kit prepare` writes.
|
|
164
164
|
|
|
165
165
|
Exits `0` when every workspace derives a prefix and the workspaces' prefixes don't collide; exits `1` on any derivation failure or collision. Undeclared candidates do not affect the exit code; the `legacy tag prefixes are declared` readyup check reports them as a warning.
|
|
166
166
|
|
|
167
167
|
When a config file exists and either fails to load or fails schema validation, the command reports the failure on stderr and exits `1` without printing a preview, because a config that cannot be read leaves the declared-versus-undeclared verdict wrong in the one dimension on which the command exists to report. That holds on the default path and under `--config`, and in single-package mode as well as monorepo mode. An absent default config is a supported state and still previews against derived defaults.
|
|
168
168
|
|
|
169
|
-
In single-package mode, prints a single
|
|
169
|
+
In single-package mode, prints a single block for `.` with the derived prefix `v`; legacy entries and undeclared-candidate scanning are not applicable.
|
|
170
170
|
|
|
171
171
|
## `VersionPatterns`
|
|
172
172
|
|
package/docs/labels.md
CHANGED
|
@@ -10,8 +10,6 @@ Manages GitHub label definitions via the `repoLabels` block of `.config/release-
|
|
|
10
10
|
|
|
11
11
|
`init` and `generate` accept `--config <path>` to read a config elsewhere; `sync` reads none and rejects the flag. Under `--config`, `init` reads the named file and prints the block for manual paste, and fails when that file does not exist rather than scaffolding one, so its write target stays `.config/release-kit.config.ts`. See [Config file location](configuration.md#config-file-location).
|
|
12
12
|
|
|
13
|
-
Every `sync-labels` subcommand refuses to run while the retired `.config/sync-labels.config.ts` is present, so that custom labels cannot be silently dropped mid-migration, and the refusal names what to move and where.
|
|
14
|
-
|
|
15
13
|
### Label configuration
|
|
16
14
|
|
|
17
15
|
```typescript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/release-kit",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"description": "Version-bumping and changelog-generation toolkit for release workflows",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"changelog",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@williamthorsen/change-grammar": "0.4.1",
|
|
55
55
|
"@williamthorsen/nmr-core": "0.16.2",
|
|
56
|
-
"@williamthorsen/toolbelt.errors": "0.
|
|
56
|
+
"@williamthorsen/toolbelt.errors": "0.10.1",
|
|
57
57
|
"json-stringify-pretty-compact": "4.0.0",
|
|
58
58
|
"semver": "7.8.6",
|
|
59
59
|
"yaml": "2.9.1",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/semver": "7.8.0",
|
|
64
|
-
"@williamthorsen/nmr": "2.
|
|
65
|
-
"@williamthorsen/toolbelt.filesystem": "0.10.
|
|
66
|
-
"@williamthorsen/toolbelt.testing": "0.8.
|
|
67
|
-
"@williamthorsen/toolbelt.vitest": "0.13.
|
|
64
|
+
"@williamthorsen/nmr": "2.2.1",
|
|
65
|
+
"@williamthorsen/toolbelt.filesystem": "0.10.3",
|
|
66
|
+
"@williamthorsen/toolbelt.testing": "0.8.3",
|
|
67
|
+
"@williamthorsen/toolbelt.vitest": "0.13.5",
|
|
68
68
|
"actionlint": "2.0.6",
|
|
69
69
|
"esbuild": "0.28.2",
|
|
70
|
-
"readyup": "0.
|
|
70
|
+
"readyup": "0.46.2",
|
|
71
71
|
"smol-toml": "1.9.1",
|
|
72
72
|
"vitest": "5.1.0"
|
|
73
73
|
},
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** Path of the retired standalone sync-labels config file. */
|
|
2
|
-
export declare const RETIRED_SYNC_LABELS_CONFIG_PATH = ".config/sync-labels.config.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Reports an actionable migration error when the retired standalone config file is present.
|
|
5
|
-
*
|
|
6
|
-
* Returns `true` when the file exists, in which case the caller must abort. The check is
|
|
7
|
-
* unconditional on config content: File presence alone triggers it, so a half-migrated
|
|
8
|
-
* repo cannot silently lose its custom labels. `configPath` names the config into which the
|
|
9
|
-
* message directs the labels.
|
|
10
|
-
*/
|
|
11
|
-
export declare function checkRetiredSyncLabelsConfig(configPath?: string): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
2
|
-
import { reportError } from '@williamthorsen/nmr-core';
|
|
3
|
-
import { BIN } from "../bin.js";
|
|
4
|
-
import { CONFIG_FILE_PATH } from "../loadConfig.js";
|
|
5
|
-
export const RETIRED_SYNC_LABELS_CONFIG_PATH = '.config/sync-labels.config.ts';
|
|
6
|
-
export function checkRetiredSyncLabelsConfig(configPath = CONFIG_FILE_PATH) {
|
|
7
|
-
if (!existsSync(RETIRED_SYNC_LABELS_CONFIG_PATH)) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
reportError(BIN, `${RETIRED_SYNC_LABELS_CONFIG_PATH} is no longer read. Move its labels into the \`repoLabels\` block of ${configPath} (presets move to \`repoLabels.extends\`; each label becomes a \`'name': { color, description }\` entry under \`repoLabels.labels\`), then delete the file.`);
|
|
11
|
-
return true;
|
|
12
|
-
}
|