@williamthorsen/release-kit 11.0.0 → 13.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 +274 -2
- package/.readyup/kits/default.js +18 -33
- package/.readyup/kits/npm-auto-publish.js +24 -23
- package/.readyup/manifest.json +16 -11
- package/CHANGELOG.md +98 -0
- package/README.md +57 -69
- package/bin/release-kit.js +1 -1
- package/dist/esm/assertCleanWorkingTree.d.ts +1 -5
- package/dist/esm/assertTaggedBaseline.d.ts +29 -0
- package/dist/esm/assertTaggedBaseline.js +41 -0
- package/dist/esm/attachChangelogDiagnostics.d.ts +4 -0
- package/dist/esm/attachChangelogDiagnostics.js +14 -0
- package/dist/esm/bin/release-kit.js +88 -24
- package/dist/esm/buildChangelogEntries.d.ts +69 -17
- package/dist/esm/buildChangelogEntries.js +222 -120
- package/dist/esm/buildDependencyGraph.d.ts +6 -6
- package/dist/esm/buildEmptyReleaseEntry.d.ts +1 -8
- package/dist/esm/buildReleaseSummary.d.ts +2 -8
- package/dist/esm/buildReleaseSummary.js +2 -2
- package/dist/esm/buildSyntheticChangelogEntry.d.ts +3 -5
- package/dist/esm/buildSyntheticChangelogEntry.js +2 -2
- package/dist/esm/bumpVersion.d.ts +1 -8
- package/dist/esm/changelogJsonFile.d.ts +5 -7
- package/dist/esm/changelogJsonFile.js +2 -17
- package/dist/esm/changelogJsonUtils.d.ts +7 -10
- package/dist/esm/changelogOverrides.d.ts +79 -100
- package/dist/esm/changelogOverrides.js +138 -58
- package/dist/esm/classifyChangelogCommit.d.ts +36 -0
- package/dist/esm/classifyChangelogCommit.js +34 -0
- package/dist/esm/commitCommand.d.ts +2 -4
- package/dist/esm/compareVersions.d.ts +10 -4
- package/dist/esm/compareVersions.js +16 -0
- package/dist/esm/configFlagSchema.d.ts +1 -1
- package/dist/esm/createGithubRelease.d.ts +7 -19
- package/dist/esm/createGithubReleaseCommand.d.ts +5 -5
- package/dist/esm/createGithubReleaseCommand.js +9 -9
- package/dist/esm/createTags.d.ts +2 -3
- package/dist/esm/decideRelease.d.ts +11 -41
- package/dist/esm/decideRelease.js +5 -27
- package/dist/esm/defaults.d.ts +5 -24
- package/dist/esm/defaults.js +7 -5
- package/dist/esm/defineConfig.d.ts +1 -1
- package/dist/esm/deleteFileIfExists.d.ts +1 -1
- package/dist/esm/deriveReleaseNotesConfig.d.ts +20 -0
- package/dist/esm/deriveReleaseNotesConfig.js +21 -0
- package/dist/esm/deriveWorkspaceConfig.d.ts +3 -5
- package/dist/esm/detectPackageManager.d.ts +2 -4
- package/dist/esm/detectUndeclaredTagPrefixes.d.ts +4 -6
- package/dist/esm/detectUndeclaredTagPrefixes.js +1 -1
- package/dist/esm/determineBumpType.d.ts +11 -11
- package/dist/esm/determineBumpType.js +6 -7
- package/dist/esm/discoverWorkspaces.d.ts +14 -15
- package/dist/esm/discoverWorkspaces.js +12 -12
- package/dist/esm/enterRepoRoot.d.ts +12 -0
- package/dist/esm/enterRepoRoot.js +16 -0
- package/dist/esm/enumerateReleaseWindows.d.ts +50 -0
- package/dist/esm/enumerateReleaseWindows.js +124 -0
- package/dist/esm/extractMigration.d.ts +6 -8
- package/dist/esm/findUnroutedEntryScopes.d.ts +16 -0
- package/dist/esm/findUnroutedEntryScopes.js +57 -0
- package/dist/esm/formatExcludedSkip.d.ts +3 -0
- package/dist/esm/formatExcludedSkip.js +3 -0
- package/dist/esm/formatPrivateSkip.d.ts +1 -6
- package/dist/esm/generateChangelogs.d.ts +13 -26
- package/dist/esm/generateChangelogs.js +0 -14
- package/dist/esm/glyphs.d.ts +2 -2
- package/dist/esm/help/prepareHelp.d.ts +3 -4
- package/dist/esm/help/prepareHelp.js +7 -8
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/init/checks.d.ts +3 -3
- package/dist/esm/init/checks.js +4 -1
- package/dist/esm/init/detectRepoType.d.ts +2 -3
- package/dist/esm/init/hasProvenance.d.ts +2 -0
- package/dist/esm/init/hasProvenance.js +3 -0
- package/dist/esm/init/initCommand.d.ts +3 -6
- package/dist/esm/init/initCommand.js +11 -11
- package/dist/esm/init/parseJsonRecord.d.ts +1 -4
- package/dist/esm/init/scaffold.d.ts +1 -3
- package/dist/esm/init/scaffold.js +2 -30
- package/dist/esm/init/templates.d.ts +9 -11
- package/dist/esm/init/templates.js +12 -11
- package/dist/esm/init/updateTemplatesCommand.d.ts +13 -0
- package/dist/esm/init/updateTemplatesCommand.js +64 -0
- package/dist/esm/injectReleaseNotesIntoReadme.d.ts +12 -17
- package/dist/esm/injectSection.d.ts +3 -3
- package/dist/esm/loadConfig.d.ts +16 -14
- package/dist/esm/loadConfig.js +2 -5
- package/dist/esm/loadValidatedConfig.d.ts +16 -19
- package/dist/esm/loadValidatedConfig.js +6 -1
- package/dist/esm/packsPath.d.ts +9 -9
- package/dist/esm/parseChangeRecordBlock.d.ts +37 -0
- package/dist/esm/parseChangeRecordBlock.js +134 -0
- package/dist/esm/parseCommitMessage.d.ts +42 -32
- package/dist/esm/parseCommitMessage.js +33 -41
- package/dist/esm/parseRequestedTags.d.ts +3 -3
- package/dist/esm/planReleaseNotesPreviews.d.ts +6 -6
- package/dist/esm/planVersionBump.d.ts +5 -3
- package/dist/esm/planVersionBump.js +3 -0
- package/dist/esm/prepareCommand.d.ts +4 -7
- package/dist/esm/prepareCommand.js +17 -18
- package/dist/esm/previewTagPrefixes.d.ts +8 -10
- package/dist/esm/propagateBumps.d.ts +6 -7
- package/dist/esm/publish.d.ts +1 -1
- package/dist/esm/publishCommand.d.ts +4 -3
- package/dist/esm/publishCommand.js +8 -8
- package/dist/esm/pushCommand.d.ts +4 -3
- package/dist/esm/pushCommand.js +8 -2
- package/dist/esm/pushRelease.d.ts +2 -2
- package/dist/esm/readChangelogSections.d.ts +33 -0
- package/dist/esm/readChangelogSections.js +80 -0
- package/dist/esm/releaseFiles.d.ts +5 -7
- package/dist/esm/releasePlan.d.ts +11 -13
- package/dist/esm/releasePrepare.d.ts +25 -25
- package/dist/esm/releasePrepare.js +80 -80
- package/dist/esm/releasePrepareMono.d.ts +9 -7
- package/dist/esm/releasePrepareMono.js +114 -99
- package/dist/esm/releasePrepareProject.d.ts +19 -29
- package/dist/esm/releasePrepareProject.js +46 -45
- package/dist/esm/renderChangelogMarkdown.d.ts +10 -4
- package/dist/esm/renderChangelogMarkdown.js +27 -2
- package/dist/esm/renderReleaseNotes.d.ts +3 -11
- package/dist/esm/renderReleaseNotes.js +2 -6
- package/dist/esm/reportPrepare.d.ts +4 -5
- package/dist/esm/reportPrepare.js +67 -42
- package/dist/esm/resolveCommandTags.d.ts +15 -11
- package/dist/esm/resolveCommandTags.js +35 -5
- package/dist/esm/resolveConfigFlag.d.ts +7 -0
- package/dist/esm/resolveConfigFlag.js +4 -0
- package/dist/esm/resolveReleaseTags.d.ts +6 -8
- package/dist/esm/resolveReleaseTags.js +1 -1
- package/dist/esm/resolveStylesOrExit.d.ts +2 -2
- package/dist/esm/showTagPrefixesCommand.d.ts +7 -10
- package/dist/esm/showTagPrefixesCommand.js +4 -4
- package/dist/esm/stripEmojiPrefix.d.ts +1 -0
- package/dist/esm/stripScope.d.ts +2 -2
- package/dist/esm/stripScope.js +3 -3
- package/dist/esm/sync-labels/generateCommand.d.ts +11 -10
- package/dist/esm/sync-labels/generateCommand.js +11 -8
- package/dist/esm/sync-labels/initCommand.d.ts +6 -7
- package/dist/esm/sync-labels/initCommand.js +2 -2
- package/dist/esm/sync-labels/presets.d.ts +5 -4
- package/dist/esm/sync-labels/presets.js +9 -9
- package/dist/esm/sync-labels/resolveLabels.d.ts +7 -7
- package/dist/esm/sync-labels/resolveLabels.js +1 -1
- package/dist/esm/sync-labels/retiredConfig.d.ts +4 -5
- package/dist/esm/sync-labels/syncCommand.d.ts +1 -4
- package/dist/esm/sync-labels/templates.d.ts +3 -3
- package/dist/esm/sync-labels/templates.js +3 -3
- package/dist/esm/sync-labels/typeLabels.d.ts +14 -0
- package/dist/esm/sync-labels/typeLabels.js +38 -0
- package/dist/esm/sync-labels/types.d.ts +1 -1
- package/dist/esm/tagCommand.d.ts +1 -1
- package/dist/esm/typeGuards.d.ts +2 -2
- package/dist/esm/types.d.ts +185 -116
- package/dist/esm/types.js +2 -2
- package/dist/esm/validateConfig.d.ts +2 -11
- package/dist/esm/validateConfig.js +5 -1
- package/dist/esm/validateOnlyExcludesStrandedDependents.d.ts +14 -12
- package/dist/esm/validateOverridesCommand.d.ts +19 -21
- package/dist/esm/validateOverridesCommand.js +16 -23
- package/docs/api.md +6 -6
- package/docs/changelogs.md +90 -28
- package/docs/configuration.md +30 -29
- package/docs/editorial-overrides.md +90 -31
- package/docs/labels.md +21 -19
- package/docs/project-releases.md +14 -14
- package/docs/publishing.md +5 -5
- package/docs/readiness-checks.md +3 -3
- package/docs/releasing.md +54 -24
- package/docs/work-types.md +46 -58
- package/package.json +7 -7
- package/presets/labels/common.yaml +1 -41
- package/schemas/changelog-overrides.json +39 -0
- package/cliff.toml.template +0 -65
- package/dist/esm/collectPolicyViolations.d.ts +0 -15
- package/dist/esm/collectPolicyViolations.js +0 -12
- package/dist/esm/determineBumpFromCommits.d.ts +0 -17
- package/dist/esm/determineBumpFromCommits.js +0 -28
- package/dist/esm/getCommitsSinceTarget.d.ts +0 -21
- package/dist/esm/getCommitsSinceTarget.js +0 -66
- package/dist/esm/resolveCliffConfigPath.d.ts +0 -11
- package/dist/esm/resolveCliffConfigPath.js +0 -20
- package/dist/esm/resolveReleaseNotesConfig.d.ts +0 -26
- package/dist/esm/resolveReleaseNotesConfig.js +0 -29
- package/dist/esm/runGitCliff.d.ts +0 -38
- package/dist/esm/runGitCliff.js +0 -25
- package/dist/esm/workTypesData.d.ts +0 -50
- package/dist/esm/workTypesData.js +0 -145
- package/schemas/label-map.json +0 -24
package/.readyup/manifest.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"esbuildVersion": "0.28.2",
|
|
9
9
|
"inputs": [
|
|
10
10
|
{
|
|
11
|
-
"hash": "
|
|
11
|
+
"hash": "91bc3638",
|
|
12
12
|
"kind": "module",
|
|
13
13
|
"path": "kits/default.ts"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"hash": "
|
|
16
|
+
"hash": "7f9ab854",
|
|
17
17
|
"kind": "inline",
|
|
18
18
|
"path": "../package.json",
|
|
19
19
|
"paths": [
|
|
@@ -21,22 +21,22 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
"hash": "
|
|
24
|
+
"hash": "43bb0452",
|
|
25
25
|
"kind": "module",
|
|
26
26
|
"path": "../src/init/detectRepoType.ts"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
"hash": "
|
|
29
|
+
"hash": "68354f97",
|
|
30
30
|
"kind": "module",
|
|
31
31
|
"path": "../src/init/parseJsonRecord.ts"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
|
-
"hash": "
|
|
34
|
+
"hash": "1c9cbce9",
|
|
35
35
|
"kind": "module",
|
|
36
36
|
"path": "../src/packsPath.ts"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"hash": "
|
|
39
|
+
"hash": "1424b343",
|
|
40
40
|
"kind": "module",
|
|
41
41
|
"path": "../src/typeGuards.ts"
|
|
42
42
|
}
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"path": "kits/default.js",
|
|
46
46
|
"readyupVersion": "0.38.0",
|
|
47
47
|
"source": "kits/default.ts",
|
|
48
|
-
"sourceHash": "
|
|
49
|
-
"targetHash": "
|
|
48
|
+
"sourceHash": "91bc3638",
|
|
49
|
+
"targetHash": "2fdeff1f"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"checklists": [
|
|
@@ -56,17 +56,22 @@
|
|
|
56
56
|
"esbuildVersion": "0.28.2",
|
|
57
57
|
"inputs": [
|
|
58
58
|
{
|
|
59
|
-
"hash": "
|
|
59
|
+
"hash": "d9910d60",
|
|
60
60
|
"kind": "module",
|
|
61
61
|
"path": "kits/npm-auto-publish.ts"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"hash": "d360febf",
|
|
65
|
+
"kind": "module",
|
|
66
|
+
"path": "../src/init/hasProvenance.ts"
|
|
62
67
|
}
|
|
63
68
|
],
|
|
64
69
|
"name": "npm-auto-publish",
|
|
65
70
|
"path": "kits/npm-auto-publish.js",
|
|
66
71
|
"readyupVersion": "0.38.0",
|
|
67
72
|
"source": "kits/npm-auto-publish.ts",
|
|
68
|
-
"sourceHash": "
|
|
69
|
-
"targetHash": "
|
|
73
|
+
"sourceHash": "d9910d60",
|
|
74
|
+
"targetHash": "8bdbefef"
|
|
70
75
|
}
|
|
71
76
|
]
|
|
72
77
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,104 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 13.0.0 — 2026-10-01
|
|
6
|
+
|
|
7
|
+
### 🎉 Features
|
|
8
|
+
|
|
9
|
+
- Adds the `--config <path>` flag to `release-kit push`, which now reads the config as `publish` and `create-github-release` do and fails when the file exists but is invalid. (#895)
|
|
10
|
+
- Makes `release-kit` add an item derived from a change-record entry to a workspace's changelog and version bump only when the entry's `scopes`, after `scopeAliases` resolution, name the workspace's `dir`, are empty, or contain `*`, and extends that rule to the sections of earlier releases that `release-kit prepare` rebuilds. (#896)
|
|
11
|
+
- Adds a warning to the `release-kit prepare` report that lists each change-record entry scope matching no workspace in its commit's window, such as a misspelled scope or the old name of a renamed directory that has no `scopeAliases` entry. (#896)
|
|
12
|
+
- Makes `release-kit overrides validate` check a workspace's overrides against only the entries routed to that workspace, so that an override keyed to an entry routed elsewhere is reported as stale. (#896)
|
|
13
|
+
- Adds `release-kit update-templates`, which writes each scaffolded workflow that is missing or differs from the installed template, prints a diff of each updated file, refreshes `sync-labels.yaml` only when it exists, keeps `publish.yaml`'s provenance setting, and never reads or writes the config files. (#952)
|
|
14
|
+
- Changes the readyup kits' fix messages for a workflow that differs from its template, or that references a deprecated tag, to recommend `update-templates` rather than `init --force`. (#952)
|
|
15
|
+
|
|
16
|
+
### 🪦 Removed
|
|
17
|
+
|
|
18
|
+
- 🚨 **Breaking:** Removes `required` as a `breakingPolicies` value, making `drop` default to `optional` so that an unmarked `drop:` commit no longer reports a policy violation. (#905)
|
|
19
|
+
- Stops `release-kit` from parsing a commit subject that combines a pipe scope with a parenthesized scope, such as `web|feat(other): ...`, or that lacks a space and a title after the colon, because subjects are now read through `@williamthorsen/change-grammar`. (#905)
|
|
20
|
+
- Stops publishing `schemas/label-map.json` from `release-kit`, whose identical schema `@williamthorsen/change-grammar` now publishes; URLs under existing `release-kit-v*` tags keep resolving. (#905)
|
|
21
|
+
|
|
22
|
+
### 🐛 Bug fixes
|
|
23
|
+
|
|
24
|
+
- Record a changelog entry for a forced release whose commits yield no item (#887)
|
|
25
|
+
|
|
26
|
+
Makes `release-kit prepare` record the "Forced version bump." changelog entry for any release forced by `--force` or `--set-version` whose commits yield no changelog item, instead of only for a release with no commits at all. It also stops a monorepo's project release from dropping the forced-release entries that earlier releases recorded.
|
|
27
|
+
|
|
28
|
+
- Stops `release-kit prepare` from reporting `commitCount` 0 and dropping the unparseable commits and change-record and policy diagnostics of a workspace released only because a dependency was bumped, and makes `prepare` list that workspace's commits in the release commit summary under its tag. (#888)
|
|
29
|
+
- Stops `release-kit prepare` from labeling a direct release that has no commits as bumped via a dependency, by marking a propagation-only release with the new `propagatedOnly` result field, whose report line now reads `Bumped via dependency: …` in place of `0 commits (bumped via dependency: …)`. (#888)
|
|
30
|
+
- Stops a `release-kit` command run from inside a package from releasing that package as a single-package repo with its own tag and changelog, by running every command from the repo root: the nearest directory that contains `pnpm-workspace.yaml`, or else the working directory when it contains a `package.json`. (#893)
|
|
31
|
+
- Stops `sync-labels generate` from writing the `--config` path into the `.github/labels.yaml` header as typed, which made the header and the result of `generate --check` depend on the directory from which the command ran; the header now names the config by its path relative to the repo root. (#893)
|
|
32
|
+
- Stops `push`, `publish`, and `create-github-release` from pushing, publishing, or creating a GitHub Release for a tag on HEAD whose workspace the config excludes with `shouldExclude: true`, which each command now skips with a warning, including when `--tags` names the tag or when every tag on HEAD is excluded. (#895)
|
|
33
|
+
- Stops `release-kit prepare` from silently deleting a `CHANGELOG.md` section whose version is absent from both the release windows and `changelog.json`, such as history written by hand before release-kit was adopted; `prepare` now keeps that section verbatim in version order, lists the kept versions in its report, and warns about each `##` section that names no version and is dropped. (#897)
|
|
34
|
+
- Stops `release-kit prepare` from folding every earlier commit into the new version, and deriving the bump from all of them, when the current version was released and recorded in the changelog but never tagged; `prepare` now fails before any write, under `--force` and `--set-version` too, and names each target and the tag to create. (#897)
|
|
35
|
+
- Adds the missing `removal` and `formatting` labels to the `common` preset by defining a label for every work type in change-grammar's taxonomy, and keeps the names, colors, and descriptions of the existing type labels. (#906)
|
|
36
|
+
- Fixes the `release.yaml` generated by `release-kit init`, which `actionlint` rejected because its `bump` choice input listed an empty string as the auto-detect option, by offering `auto` as the default option and passing it to the reusable release workflow as an empty `bump`. (#936)
|
|
37
|
+
- Rewords the error messages, `prepare` report lines, command help, and readyup kit fix strings of `release-kit` that addressed the reader as "your", separated a detail from its subject with an em-dash, or stated an absence with "no", such as "No workspaces had release-worthy changes." (#937)
|
|
38
|
+
- Fixes the issue that the `release.yaml` and `sync-labels.yaml` workflows generated by `release-kit init` and `release-kit sync-labels init` contained unclear wording in two comments and in the `force` input description, which the change rewrites without altering any job, trigger, or input; the release-kit kit check reports a copy generated before this change as stale until `release-kit init --force` or `release-kit sync-labels init --force` regenerates it. (#946)
|
|
39
|
+
- Fixes the issue that `release-kit` titled a propagation-only bump's changelog section `Dependency updates` rather than with the resolved `deps` work type's header, `📦 Dependencies` by default or a consumer's `workTypes.deps.header` override, which broke the heading convention and left the section outside the section order. (#950)
|
|
40
|
+
- Fixes the issue that `release-kit init`'s next steps told a public repo to set `provenance: true` in `publish.yaml`, which the template already sets, and now tells a private repo to remove it instead. (#952)
|
|
41
|
+
|
|
42
|
+
### ♻️ Refactoring
|
|
43
|
+
|
|
44
|
+
- Narrows the config accepted by `releasePrepare`, `releasePrepareMono`, `releasePrepareProject`, and the helpers that they pass it to, to the new `PrepareConfig` and `MonorepoPrepareConfig` aliases, which omit `releaseNotes` so that typecheck rejects any read of release-notes configuration on the prepare path. (#890)
|
|
45
|
+
- Derives `DEFAULT_WORK_TYPES`, `DEFAULT_BREAKING_POLICIES`, the default `devOnlySections`, and the release-notes breaking marker from change-grammar's `CANONICAL_TAXONOMY`, removing release-kit's taxonomy copy and its `work-types:check` and `work-types:sync` scripts. (#905)
|
|
46
|
+
- Replaces every `.sort()` call that suppressed `unicorn/no-array-sort` with `toSorted()` and drops the spread copy wherever the source was already an array. (#925)
|
|
47
|
+
|
|
48
|
+
### 🧪 Tests
|
|
49
|
+
|
|
50
|
+
- Extends the `changelogJson.enabled` tests of `releasePrepareMono` to configure a format command and assert that `formatCommand.files` includes the workspace's `changelog.json` when the feature is enabled and excludes it when the feature is disabled, where the disabled case also requires a format command to exist so that the exclusion cannot pass vacuously. (#889)
|
|
51
|
+
- Replaces the inline copies of the fixture in which `app` depends on `core` in `releasePrepareMono.unit.test.ts` with `stubPropagationWorkspaces`, a helper that stubs both manifests at their exact paths and returns the two-workspace config. (#951)
|
|
52
|
+
|
|
53
|
+
### 📦 Dependencies
|
|
54
|
+
|
|
55
|
+
- Upgrades all dependencies to the latest versions allowed by the ceilings in `taze.config.ts` and the release quarantine, including pnpm to 12.6.0. (#944)
|
|
56
|
+
- Adds `esbuild` 0.28.2 to the pnpm catalog and declares it as a devDependency of `nmr`, `release-kit`, and `v11y-check`, because `readyup` declares it only as an optional peer and `rdy compile` failed in those packages once a regenerated lockfile stopped installing it. (#944)
|
|
57
|
+
|
|
58
|
+
### 📚 Documentation
|
|
59
|
+
|
|
60
|
+
- Revises the comments in `packages/release-kit/src` and the `default` and `npm-auto-publish` readyup kits against the comment-discipline rules, correcting comments that misstated the code, such as the `releasePrepareProject` description that said it returns `undefined` where it throws and the `renderChangelogMarkdown` note that said no logic reads the footer. (#922)
|
|
61
|
+
- Rewrites the prose of the `release-kit` README, the pages under `docs/`, and the package's source comments and test names in plain, literal wording. (#937)
|
|
62
|
+
|
|
63
|
+
## 12.0.0 — 2026-09-23
|
|
64
|
+
|
|
65
|
+
### 🎉 Features
|
|
66
|
+
|
|
67
|
+
- Assign changelog sections from the work-type taxonomy (#877)
|
|
68
|
+
|
|
69
|
+
- Adds `excludedFromChangelog` to a `workTypes` entry, which keeps commits of that type out of every changelog while they still count toward the version bump.
|
|
70
|
+
- Fixes the silent omission of a ticketed commit written as `type(scope):` or with a capitalized type such as `FEAT:`, which counted toward the version bump but reached no changelog.
|
|
71
|
+
- Documents that a scaffolded `.config/git-cliff.toml` may vary its enumeration keys alone: a `commit_parsers` entry that skips or narrows drops the commit before classification, with no error.
|
|
72
|
+
|
|
73
|
+
- Build changelog items from a merge commit's change-record block (#882)
|
|
74
|
+
|
|
75
|
+
Builds `release-kit` changelog items from a commit's `change-record` block, the fenced YAML block at the end of a squash-merge commit that lists the change's outcomes, so that a merge with several outcomes of different types yields one item per outcome, each under its own type's section. Makes `release-kit prepare` warn about a block that cannot be read, an entry whose type is undeclared, and an entry that violates its type's breaking policy. Keeps reading a commit with no usable block from its title, as before.
|
|
76
|
+
|
|
77
|
+
- 🚨 **Breaking:** Derive the version bump from the changelog items (#885)
|
|
78
|
+
|
|
79
|
+
Derives the version bump in every `release-kit prepare` path (single-package, project, and monorepo) from the changelog items of the unreleased commits, so that the bump and the changelog describe the same release. A commit that yields no changelog item no longer bumps, and a `BREAKING CHANGE:` footer no longer raises a major bump. Single-package mode now follows the monorepo rules for `--bump` and `--force`, and the `prepare` report shows the diagnostics of a skipped target.
|
|
80
|
+
|
|
81
|
+
Migration: Mark a breaking change with a `!` on the commit subject or with `breaking: true` on its change-record entry, because a `BREAKING CHANGE:` footer alone now gets the bump of the commit's type. Give each commit that should bump a ticket-ID prefix and a type that the changelog does not exclude. In single-package mode, add `--force` to a release that used `--bump=X` alone, or that relied on the patch floor, when no commit yields a changelog item; without it, `prepare` skips the release.
|
|
82
|
+
|
|
83
|
+
- 🚨 **Breaking:** Key an editorial override to one of several items on a commit (#886)
|
|
84
|
+
|
|
85
|
+
Adds the `<hash>:<n>` key to `.meta/changelog-overrides.json`. It targets one of the several changelog items that a commit's change-record block yields, while a bare `<hash>` key still targets all of them. Also makes `release-kit prepare` and `release-kit overrides validate` fail when override keys conflict on an item, and publishes a JSON Schema for the override file.
|
|
86
|
+
|
|
87
|
+
Migration: Replace a bare key that sets `description` or `body` on a commit with several items with one `<hash>:<n>` key per item, as listed by the error message. Where two keys match the same item, such as `abc1234` beside `abc1234:2`, remove one of them. This includes a root-file key that overlaps a workspace-file key, which now fails even though the two files are separate. In each scope passed to `validateAllChangelogOverrides`, rename `hashes` to `items` and pass `OverrideTargetItem` objects (`{ hash, entry? }`) instead of hash strings.
|
|
88
|
+
|
|
89
|
+
### 🪦 Removed
|
|
90
|
+
|
|
91
|
+
- 🚨 **Breaking:** Build changelogs from release-kit's own enumeration and remove git-cliff (#880)
|
|
92
|
+
|
|
93
|
+
Removes git-cliff from `@williamthorsen/release-kit`: `prepare` now builds every changelog from the same commit history that decides each version bump, and no longer fetches a git-cliff binary through `npx`. A config that still sets `cliffConfigPath` now fails validation. Two ways in which the changelog and the bump read different commits are gone, affecting single-package repositories with a tag prefix other than `v` and `paths` entries that name a bare directory.
|
|
94
|
+
|
|
95
|
+
Migration: Remove `cliffConfigPath` from `.config/release-kit.config.ts`, and delete `.config/git-cliff.toml` or `cliff.toml` if the repository has one. Any customization in that file, such as `tag_pattern` or its tag-skipping keys, no longer has an effect: `release-kit` now splits the changelog on the configured tag prefixes alone.
|
|
96
|
+
|
|
97
|
+
### 🏗️ Internal features
|
|
98
|
+
|
|
99
|
+
- Enumerate release windows and read them on the bump path (#879)
|
|
100
|
+
|
|
101
|
+
Adds `enumerateReleaseWindows`, which splits the history reachable from HEAD into release windows from tag prefixes and a path list, and rebuilds `getCommitsSinceTarget` on the newest of those windows in place of its `git describe` baseline lookup. Leaves the changelog on git-cliff's enumeration.
|
|
102
|
+
|
|
5
103
|
## 11.0.0 — 2026-09-22
|
|
6
104
|
|
|
7
105
|
### 🎉 Features
|
package/README.md
CHANGED
|
@@ -4,56 +4,45 @@
|
|
|
4
4
|
|
|
5
5
|
Version-bumping and changelog-generation toolkit for release workflows.
|
|
6
6
|
|
|
7
|
-
Provides a self-contained CLI that auto-discovers workspaces from `pnpm-workspace.yaml`, parses conventional commits, determines version bumps, updates `package.json` files, and generates changelogs from
|
|
7
|
+
Provides a self-contained CLI that auto-discovers workspaces from `pnpm-workspace.yaml`, parses conventional commits, determines version bumps, updates `package.json` files, and generates changelogs from the same commit history that decides each bump (with optional [editorial overrides](docs/editorial-overrides.md)).
|
|
8
8
|
|
|
9
9
|
<!-- section:release-notes -->
|
|
10
|
-
## Release notes —
|
|
10
|
+
## Release notes — v13.0.0 (2026-10-01)
|
|
11
11
|
|
|
12
12
|
### 🎉 Features
|
|
13
13
|
|
|
14
|
-
-
|
|
14
|
+
- Adds the `--config <path>` flag to `release-kit push`, which now reads the config as `publish` and `create-github-release` do and fails when the file exists but is invalid. (#895)
|
|
15
|
+
- Makes `release-kit` add an item derived from a change-record entry to a workspace's changelog and version bump only when the entry's `scopes`, after `scopeAliases` resolution, name the workspace's `dir`, are empty, or contain `*`, and extends that rule to the sections of earlier releases that `release-kit prepare` rebuilds. (#896)
|
|
16
|
+
- Adds a warning to the `release-kit prepare` report that lists each change-record entry scope matching no workspace in its commit's window, such as a misspelled scope or the old name of a renamed directory that has no `scopeAliases` entry. (#896)
|
|
17
|
+
- Makes `release-kit overrides validate` check a workspace's overrides against only the entries routed to that workspace, so that an override keyed to an entry routed elsewhere is reported as stale. (#896)
|
|
18
|
+
- Adds `release-kit update-templates`, which writes each scaffolded workflow that is missing or differs from the installed template, prints a diff of each updated file, refreshes `sync-labels.yaml` only when it exists, keeps `publish.yaml`'s provenance setting, and never reads or writes the config files. (#952)
|
|
19
|
+
- Changes the readyup kits' fix messages for a workflow that differs from its template, or that references a deprecated tag, to recommend `update-templates` rather than `init --force`. (#952)
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
- Declares `minReadyupVersion: '0.37.0'` on the kit, the readyup release that introduced `CheckOutcome.fix`, which retires the kit's `version-skew` advisory and makes an older runner fail to load the kit.
|
|
21
|
+
### 🪦 Removed
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
- Adds `--config <path>` to `prepare`, `publish`, `create-github-release`, `show-tag-prefixes`, `overrides validate`, `sync-labels init`, and `sync-labels generate`, each of which then reads the named file in place of `.config/release-kit.config.ts`.
|
|
24
|
-
- Requires a named `--config` file to exist, failing if it does not; an absent default path continues to mean that the repo declares no config.
|
|
25
|
-
- Confines scaffolding to the default path: `release-kit init` and `sync-labels init` still write `.config/release-kit.config.ts`, and `sync-labels init --config` reads the named file and fails when it is absent.
|
|
26
|
-
|
|
27
|
-
- 🚨 **Breaking:** Adopt the shared workspace resolver in release-kit, honoring exclusions (#865)
|
|
28
|
-
|
|
29
|
-
- 🚨 **Breaking:** Narrows `no-pattern` in `@williamthorsen/nmr-core`'s `EmptyWorkspaceCause`, moving an absent or empty `packages` list onto `no-packages-list` and a value that is not a list of strings onto `unreadable-packages`.
|
|
30
|
-
- Stops `release-kit` from tagging, publishing, and label-syncing a package that a `!` entry in `pnpm-workspace.yaml` excludes, which its previous `glob`-based resolution could not remove from the match.
|
|
31
|
-
- Replaces the release of the root package alone with a failure naming the condition that emptied the workspace, when `pnpm-workspace.yaml` does not hold valid YAML or declares a workspace that does not resolve to a package.
|
|
32
|
-
- Replaces the `no-pattern` remedy that `nmr` printed for a `pnpm-workspace.yaml` declaring no `packages` list, and for one declaring a `packages` value that is not a list of strings.
|
|
33
|
-
- Raises `engines.node` to `>=24.16.0` in `@williamthorsen/nmr-core` and `@williamthorsen/release-kit`, because Node 24.0 through 24.15 ignores the `followSymlinks` option that the workspace matcher passes to `globSync` and drops a symlinked package directory from the resolution without reporting it.
|
|
34
|
-
|
|
35
|
-
Migration: Add a `no-packages-list` arm and an `unreadable-packages` arm to any `switch` that covers `EmptyWorkspaceCause` exhaustively. `no-pattern` now names only a list that the resolver read in full and whose entries all failed to become a positive pattern, so move the handling of an absent `packages` key, an empty list, and a value that is not a list of strings out of the `no-pattern` arm into the two new ones. Route `no-packages-list` to single-package behavior rather than to a failure path: pnpm resolves such a manifest to the root package alone.
|
|
23
|
+
- 🚨 **Breaking:** Removes `required` as a `breakingPolicies` value, making `drop` default to `optional` so that an unmarked `drop:` commit no longer reports a policy violation. (#905)
|
|
24
|
+
- Stops `release-kit` from parsing a commit subject that combines a pipe scope with a parenthesized scope, such as `web|feat(other): ...`, or that lacks a space and a title after the colon, because subjects are now read through `@williamthorsen/change-grammar`. (#905)
|
|
25
|
+
- Stops publishing `schemas/label-map.json` from `release-kit`, whose identical schema `@williamthorsen/change-grammar` now publishes; URLs under existing `release-kit-v*` tags keep resolving. (#905)
|
|
36
26
|
|
|
37
27
|
### 🐛 Bug fixes
|
|
38
28
|
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
- Fixes a changelog item body that kept a commit's trailing `Change:` trailers, which then appeared verbatim in the rendered release notes, including the notes injected into a README.
|
|
29
|
+
- Record a changelog entry for a forced release whose commits yield no item (#887)
|
|
30
|
+
|
|
31
|
+
Makes `release-kit prepare` record the "Forced version bump." changelog entry for any release forced by `--force` or `--set-version` whose commits yield no changelog item, instead of only for a release with no commits at all. It also stops a monorepo's project release from dropping the forced-release entries that earlier releases recorded.
|
|
32
|
+
|
|
33
|
+
- Stops `release-kit prepare` from reporting `commitCount` 0 and dropping the unparseable commits and change-record and policy diagnostics of a workspace released only because a dependency was bumped, and makes `prepare` list that workspace's commits in the release commit summary under its tag. (#888)
|
|
34
|
+
- Stops `release-kit prepare` from labeling a direct release that has no commits as bumped via a dependency, by marking a propagation-only release with the new `propagatedOnly` result field, whose report line now reads `Bumped via dependency: …` in place of `0 commits (bumped via dependency: …)`. (#888)
|
|
35
|
+
- Stops a `release-kit` command run from inside a package from releasing that package as a single-package repo with its own tag and changelog, by running every command from the repo root: the nearest directory that contains `pnpm-workspace.yaml`, or else the working directory when it contains a `package.json`. (#893)
|
|
36
|
+
- Stops `sync-labels generate` from writing the `--config` path into the `.github/labels.yaml` header as typed, which made the header and the result of `generate --check` depend on the directory from which the command ran; the header now names the config by its path relative to the repo root. (#893)
|
|
37
|
+
- Stops `push`, `publish`, and `create-github-release` from pushing, publishing, or creating a GitHub Release for a tag on HEAD whose workspace the config excludes with `shouldExclude: true`, which each command now skips with a warning, including when `--tags` names the tag or when every tag on HEAD is excluded. (#895)
|
|
38
|
+
- Stops `release-kit prepare` from silently deleting a `CHANGELOG.md` section whose version is absent from both the release windows and `changelog.json`, such as history written by hand before release-kit was adopted; `prepare` now keeps that section verbatim in version order, lists the kept versions in its report, and warns about each `##` section that names no version and is dropped. (#897)
|
|
39
|
+
- Stops `release-kit prepare` from folding every earlier commit into the new version, and deriving the bump from all of them, when the current version was released and recorded in the changelog but never tagged; `prepare` now fails before any write, under `--force` and `--set-version` too, and names each target and the tag to create. (#897)
|
|
40
|
+
- Adds the missing `removal` and `formatting` labels to the `common` preset by defining a label for every work type in change-grammar's taxonomy, and keeps the names, colors, and descriptions of the existing type labels. (#906)
|
|
41
|
+
- Fixes the `release.yaml` generated by `release-kit init`, which `actionlint` rejected because its `bump` choice input listed an empty string as the auto-detect option, by offering `auto` as the default option and passing it to the reusable release workflow as an empty `bump`. (#936)
|
|
42
|
+
- Rewords the error messages, `prepare` report lines, command help, and readyup kit fix strings of `release-kit` that addressed the reader as "your", separated a detail from its subject with an em-dash, or stated an absence with "no", such as "No workspaces had release-worthy changes." (#937)
|
|
43
|
+
- Fixes the issue that the `release.yaml` and `sync-labels.yaml` workflows generated by `release-kit init` and `release-kit sync-labels init` contained unclear wording in two comments and in the `force` input description, which the change rewrites without altering any job, trigger, or input; the release-kit kit check reports a copy generated before this change as stale until `release-kit init --force` or `release-kit sync-labels init --force` regenerates it. (#946)
|
|
44
|
+
- Fixes the issue that `release-kit` titled a propagation-only bump's changelog section `Dependency updates` rather than with the resolved `deps` work type's header, `📦 Dependencies` by default or a consumer's `workTypes.deps.header` override, which broke the heading convention and left the section outside the section order. (#950)
|
|
45
|
+
- Fixes the issue that `release-kit init`'s next steps told a public repo to set `provenance: true` in `publish.yaml`, which the template already sets, and now tells a private repo to remove it instead. (#952)
|
|
57
46
|
<!-- /section:release-notes -->
|
|
58
47
|
|
|
59
48
|
## Installation
|
|
@@ -77,7 +66,7 @@ npx @williamthorsen/release-kit prepare --dry-run
|
|
|
77
66
|
Example output from `prepare --dry-run` in a monorepo whose `arrays` workspace has two commits since its last release:
|
|
78
67
|
|
|
79
68
|
```
|
|
80
|
-
🔍 DRY RUN
|
|
69
|
+
🔍 DRY RUN: release-kit will not modify any files
|
|
81
70
|
|
|
82
71
|
━━━ arrays ━━━
|
|
83
72
|
Found 2 commits since arrays-v1.2.0
|
|
@@ -86,7 +75,7 @@ Example output from `prepare --dry-run` in a monorepo whose `arrays` workspace h
|
|
|
86
75
|
📦 1.2.0 → 1.3.0 (minor)
|
|
87
76
|
[dry-run] Would bump packages/arrays/package.json
|
|
88
77
|
Generating changelogs...
|
|
89
|
-
[dry-run] Would
|
|
78
|
+
[dry-run] Would generate changelog: packages/arrays/CHANGELOG.md
|
|
90
79
|
🔖 arrays-v1.3.0
|
|
91
80
|
|
|
92
81
|
✅ Release preparation complete.
|
|
@@ -102,17 +91,21 @@ gh workflow run release.yaml # every workspace with release-wor
|
|
|
102
91
|
gh workflow run release.yaml -f only=arrays # the named workspaces alone
|
|
103
92
|
```
|
|
104
93
|
|
|
105
|
-
|
|
94
|
+
After upgrading release-kit, run `release-kit update-templates` to update the scaffolded workflows to its templates; it leaves the config files alone.
|
|
95
|
+
|
|
96
|
+
The CLI applies defaults to every discovered workspace. [Releasing](docs/releasing.md) covers `prepare`'s flags, release-notes previews, and the workflow's inputs.
|
|
106
97
|
|
|
107
98
|
## How it works
|
|
108
99
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
Every command other than `--version` and `--help` first locates the repo root and runs from it, so it can be invoked from any directory in the repo. The root is the nearest directory at or above the invocation directory that contains `pnpm-workspace.yaml`, or else the invocation directory itself when it contains a `package.json`; when neither exists, the command fails. Because a `pnpm-workspace.yaml` takes precedence wherever it is, as it does for pnpm, a single-package repo checked out below a pnpm workspace resolves to that outer workspace.
|
|
101
|
+
|
|
102
|
+
1. **Workspace discovery**: Reads `pnpm-workspace.yaml` and resolves its `packages` patterns to find workspace directories, applying pnpm's semantics: A `!`-prefixed entry excludes what it matches, wherever it appears in the list. Each directory containing a `package.json` becomes a workspace. The repo is treated as a single-package project when it doesn't contain a workspace file, and when the workspace file doesn't declare a `packages` list: a file kept for `catalog:` or `overrides:` alone, which pnpm likewise resolves to the root package. A workspace file that declares patterns that don't resolve to any package is an error naming the condition that emptied it.
|
|
103
|
+
2. **Config loading**: Loads `.config/release-kit.config.ts` (if present) from the repo root, or the file named by `--config` relative to the invocation directory, and merges it with discovered defaults.
|
|
104
|
+
3. **Commit analysis**: For each workspace, reads the history once, builds the changelog items of the commits since the last version tag, and takes the bump as the highest level that those items call for.
|
|
105
|
+
4. **Version bump + changelog**: Bumps `package.json` versions, builds structured `ChangelogEntry[]` from the commits between each pair of release tags, applies any [editorial overrides](docs/editorial-overrides.md) from per-scope `.meta/changelog-overrides.json` files, and renders both `CHANGELOG.md` and `.meta/changelog.json` from that single source, so the two always agree.
|
|
106
|
+
5. **Release tags file**: Writes computed tags to `tmp/.release-tags` for the release workflow to read when tagging and pushing.
|
|
114
107
|
|
|
115
|
-
[Changelogs](docs/changelogs.md) covers what
|
|
108
|
+
[Changelogs](docs/changelogs.md) covers what a published tarball includes, the `changelog.json` item schema, and which commits appear in a changelog.
|
|
116
109
|
|
|
117
110
|
## Commit format
|
|
118
111
|
|
|
@@ -127,15 +120,15 @@ scope|type!: description # scoped breaking change
|
|
|
127
120
|
type(scope)!: description # conventional scoped breaking change
|
|
128
121
|
```
|
|
129
122
|
|
|
130
|
-
The `scope|type:` format scopes a commit to a specific workspace in a monorepo. Use `scopeAliases` in
|
|
123
|
+
The `scope|type:` format scopes a commit to a specific workspace in a monorepo. Use `scopeAliases` in the config to map shorthand names to canonical scope names.
|
|
131
124
|
|
|
132
125
|
[Work types and tiers](docs/work-types.md) lists the recognized types and how each one affects the bump and the changelog.
|
|
133
126
|
|
|
134
127
|
## Configuration
|
|
135
128
|
|
|
136
|
-
Configuration is optional. The CLI works out of the box by auto-discovering workspaces and applying defaults. Create `.config/release-kit.config.ts` only
|
|
129
|
+
Configuration is optional. The CLI works out of the box by auto-discovering workspaces and applying defaults. Create `.config/release-kit.config.ts` only to customize behavior.
|
|
137
130
|
|
|
138
|
-
Every subcommand that reads a config accepts `--config <path>` to read a file elsewhere. An absent default path means
|
|
131
|
+
Every subcommand that reads a config accepts `--config <path>` to read a file elsewhere. An absent default path means that the repo doesn't declare a config; an absent `--config` path fails the command. See [Config file location](docs/configuration.md#config-file-location).
|
|
139
132
|
|
|
140
133
|
```typescript
|
|
141
134
|
import { defineConfig } from '@williamthorsen/release-kit/config';
|
|
@@ -155,18 +148,15 @@ export default defineConfig({
|
|
|
155
148
|
});
|
|
156
149
|
```
|
|
157
150
|
|
|
158
|
-
`defineConfig` is a type-safe identity function:
|
|
151
|
+
`defineConfig` is a type-safe identity function: It gives the config object validation and completion in `.ts` files and full inference in `.js` ones. The loader also accepts a plain `export default config` or `export const config = { ... }`.
|
|
159
152
|
|
|
160
|
-
Node loads the file directly, so a relative import inside it needs an explicit file extension
|
|
153
|
+
Node loads the file directly, so a relative import inside it needs an explicit file extension: `./work-types.ts`, not `./work-types`.
|
|
161
154
|
|
|
162
155
|
[Configuration](docs/configuration.md) lists every field and covers legacy identities, retired packages, and tag prefixes. [Project releases](docs/project-releases.md) covers releasing a monorepo as one combined deliverable.
|
|
163
156
|
|
|
164
157
|
## External dependencies
|
|
165
158
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
- **`git`** — must be available on `PATH`. Used to find tags and retrieve commit history.
|
|
169
|
-
- **`git-cliff`** — pinned to an exact version and fetched via `npx` on first invocation, then served from npx's cache. No need to install it as a dev dependency. The pin moves only when a new release-kit version names a newer git-cliff, so two releases cut months apart run the same changelog generator.
|
|
159
|
+
release-kit shells out to `git`, which must be available on `PATH`, to find tags and read commit history.
|
|
170
160
|
|
|
171
161
|
## Readiness checks
|
|
172
162
|
|
|
@@ -185,7 +175,7 @@ export default defineRdyConfig({
|
|
|
185
175
|
rdy run --packages
|
|
186
176
|
```
|
|
187
177
|
|
|
188
|
-
`rdy run` needs `readyup` 0.23 or later, and `@williamthorsen/release-kit` as a _direct_ devDependency:
|
|
178
|
+
`rdy run` needs `readyup` 0.23 or later, and `@williamthorsen/release-kit` as a _direct_ devDependency: A strict pnpm layout links nothing else into the project; therefore, a transitive copy is unreachable.
|
|
189
179
|
|
|
190
180
|
[Readiness checks](docs/readiness-checks.md) covers running each kit alone and what `npm-auto-publish` needs from the npm session.
|
|
191
181
|
|
|
@@ -195,20 +185,18 @@ rdy run --packages
|
|
|
195
185
|
2. Remove `@changesets/cli` from dev dependencies. The [default readyup kit](#readiness-checks) reports a repo that still declares it.
|
|
196
186
|
3. Delete the `.changeset/` directory.
|
|
197
187
|
4. Run `npx @williamthorsen/release-kit init` to scaffold the release workflows.
|
|
198
|
-
5. Remove `changeset:*` scripts from `package.json` (
|
|
188
|
+
5. Remove `changeset:*` scripts from `package.json` (they don't need a replacement, because the CLI handles everything).
|
|
199
189
|
6. Create an initial version tag for each package (e.g., `git tag v1.0.0` or `git tag arrays-v1.0.0`).
|
|
200
190
|
|
|
201
|
-
No cliff config copy is needed — the bundled template is used automatically. To customize, run `release-kit init --with-config`.
|
|
202
|
-
|
|
203
191
|
## Documentation
|
|
204
192
|
|
|
205
193
|
- [Configuration](docs/configuration.md): `ReleaseKitConfig` fields, workspace overrides and legacy identities, retired packages, tag prefixes, and version patterns
|
|
206
|
-
- [Project releases](docs/project-releases.md):
|
|
207
|
-
- [Releasing](docs/releasing.md): `init`, `prepare`'s flags and release-notes previews, and the release workflow
|
|
194
|
+
- [Project releases](docs/project-releases.md): The `project` block, and how a project release interacts with `prepare`'s flags
|
|
195
|
+
- [Releasing](docs/releasing.md): `init`, `update-templates`, `prepare`'s flags and release-notes previews, and the release workflow
|
|
208
196
|
- [Publishing](docs/publishing.md): `publish`, the publishability filter, and `create-github-release`
|
|
209
|
-
- [Changelogs](docs/changelogs.md):
|
|
210
|
-
- [Editorial overrides](docs/editorial-overrides.md):
|
|
211
|
-
- [Work types and tiers](docs/work-types.md):
|
|
212
|
-
- [Labels](docs/labels.md): `sync-labels`, label configuration, the workflow's triggers, and the `label-map.json` schema
|
|
213
|
-
- [Readiness checks](docs/readiness-checks.md):
|
|
197
|
+
- [Changelogs](docs/changelogs.md): The `changelog.json` item schema, which commits appear in a changelog, and release-notes injection
|
|
198
|
+
- [Editorial overrides](docs/editorial-overrides.md): Correcting generated changelog entries, and `overrides validate`
|
|
199
|
+
- [Work types and tiers](docs/work-types.md): Tiers, the `!` policy, markers, and custom work types
|
|
200
|
+
- [Labels](docs/labels.md): `sync-labels`, label configuration, the workflow's triggers, and where the `label-map.json` schema is published
|
|
201
|
+
- [Readiness checks](docs/readiness-checks.md): Both readyup kits, and how to run each
|
|
214
202
|
- [Programmatic API](docs/api.md): `deriveWorkspaceConfig()`, the script-based approach, and `resolveReleaseTags`
|
package/bin/release-kit.js
CHANGED
|
@@ -3,7 +3,7 @@ try {
|
|
|
3
3
|
await import('../dist/esm/bin/release-kit.js');
|
|
4
4
|
} catch (error) {
|
|
5
5
|
if (error.code === 'ERR_MODULE_NOT_FOUND') {
|
|
6
|
-
process.stderr.write('release-kit: build output not found
|
|
6
|
+
process.stderr.write('release-kit: build output not found; run `nmr build` first\n');
|
|
7
7
|
} else {
|
|
8
8
|
process.stderr.write(`release-kit: failed to load: ${error.message}\n`);
|
|
9
9
|
}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Verify that the git working tree has no uncommitted changes.
|
|
3
|
-
*
|
|
4
|
-
* @throws If `git status --porcelain` reports any changes.
|
|
5
|
-
*/
|
|
1
|
+
/** Throws if `git status --porcelain` reports any uncommitted change in the working tree. */
|
|
6
2
|
export declare function assertCleanWorkingTree(): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReleaseConfig } from './types.js';
|
|
2
|
+
/** A release target whose history `prepare` has read, as the baseline check sees it. */
|
|
3
|
+
export interface BaselineTarget {
|
|
4
|
+
/** How the error names the target, such as `workspace 'core'`. */
|
|
5
|
+
label: string;
|
|
6
|
+
packageFiles: readonly string[];
|
|
7
|
+
changelogPaths: readonly string[];
|
|
8
|
+
/** The prefixes under which the history was read; a missing tag is named under the first. */
|
|
9
|
+
tagPrefixes: readonly string[];
|
|
10
|
+
previousTag: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/** A target whose current version is recorded in its changelog but is not its previous reachable tag. */
|
|
13
|
+
export interface UntaggedBaseline {
|
|
14
|
+
label: string;
|
|
15
|
+
version: string;
|
|
16
|
+
/** The tag to create at the commit that released `version`. */
|
|
17
|
+
tag: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Throws when any finding is an untagged baseline, naming each one's missing tag. Without that tag, the unreleased
|
|
21
|
+
* window extends back to the start of history, so the new version would include every earlier commit.
|
|
22
|
+
*/
|
|
23
|
+
export declare function assertTaggedBaseline(findings: ReadonlyArray<UntaggedBaseline | undefined>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Returns the target's untagged baseline: its current version appears in one of its `CHANGELOG.md` or
|
|
26
|
+
* `changelog.json` files, and its previous tag is not that version under any of its prefixes. A first release has
|
|
27
|
+
* none, because its changelogs do not record its version yet.
|
|
28
|
+
*/
|
|
29
|
+
export declare function findUntaggedBaseline(target: BaselineTarget, config: Pick<ReleaseConfig, 'changelogJson'>): UntaggedBaseline | undefined;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { resolveChangelogJsonPath } from "./changelogJsonFile.js";
|
|
3
|
+
import { readChangelogEntries } from "./changelogJsonUtils.js";
|
|
4
|
+
import { readCurrentVersion } from "./planVersionBump.js";
|
|
5
|
+
import { readChangelogSections } from "./readChangelogSections.js";
|
|
6
|
+
export function assertTaggedBaseline(findings) {
|
|
7
|
+
const untagged = findings.filter((finding) => finding !== undefined);
|
|
8
|
+
if (untagged.length === 0)
|
|
9
|
+
return;
|
|
10
|
+
const lines = untagged.map(({ label, version, tag }) => ` - ${label}: ${version} (create tag ${tag})`);
|
|
11
|
+
throw new Error([
|
|
12
|
+
'The current version is recorded in the changelog, but its tag is not the previous tag reachable from HEAD:',
|
|
13
|
+
...lines,
|
|
14
|
+
'Tag the commit that released each version, then run prepare again.',
|
|
15
|
+
].join('\n'));
|
|
16
|
+
}
|
|
17
|
+
export function findUntaggedBaseline(target, config) {
|
|
18
|
+
const recordedVersions = readRecordedVersions(target.changelogPaths, config);
|
|
19
|
+
if (recordedVersions.size === 0) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
const version = readCurrentVersion(target.packageFiles);
|
|
23
|
+
if (!recordedVersions.has(version)) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (target.tagPrefixes.some((prefix) => target.previousTag === `${prefix}${version}`)) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return { label: target.label, version, tag: `${target.tagPrefixes[0] ?? ''}${version}` };
|
|
30
|
+
}
|
|
31
|
+
function readRecordedVersions(changelogPaths, config) {
|
|
32
|
+
const versions = new Set();
|
|
33
|
+
for (const changelogPath of changelogPaths) {
|
|
34
|
+
const { versioned } = readChangelogSections(join(changelogPath, 'CHANGELOG.md'));
|
|
35
|
+
const entries = readChangelogEntries(resolveChangelogJsonPath(config, changelogPath)) ?? [];
|
|
36
|
+
for (const { version } of [...versioned, ...entries]) {
|
|
37
|
+
versions.add(version);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return versions;
|
|
41
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ChangelogDiagnostics } from './buildChangelogEntries.js';
|
|
2
|
+
import type { ReleasedWorkspaceResult } from './types.js';
|
|
3
|
+
/** Attaches a history's diagnostics to a released or skipped result, omitting each empty list. */
|
|
4
|
+
export declare function attachChangelogDiagnostics(result: Pick<ReleasedWorkspaceResult, 'malformedBlocks' | 'policyViolations' | 'undeclaredEntryTypes' | 'unroutedEntryScopes'>, diagnostics: ChangelogDiagnostics): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function attachChangelogDiagnostics(result, diagnostics) {
|
|
2
|
+
if (diagnostics.malformedBlocks.length > 0) {
|
|
3
|
+
result.malformedBlocks = diagnostics.malformedBlocks;
|
|
4
|
+
}
|
|
5
|
+
if (diagnostics.undeclaredEntryTypes.length > 0) {
|
|
6
|
+
result.undeclaredEntryTypes = diagnostics.undeclaredEntryTypes;
|
|
7
|
+
}
|
|
8
|
+
if (diagnostics.policyViolations.length > 0) {
|
|
9
|
+
result.policyViolations = diagnostics.policyViolations;
|
|
10
|
+
}
|
|
11
|
+
if (diagnostics.unroutedEntryScopes.length > 0) {
|
|
12
|
+
result.unroutedEntryScopes = diagnostics.unroutedEntryScopes;
|
|
13
|
+
}
|
|
14
|
+
}
|