@williamthorsen/release-kit 14.2.0 → 14.2.2
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 +38 -0
- package/.readyup/kits/default.js +11 -11
- package/.readyup/kits/npm-auto-publish.js +5 -5
- package/.readyup/manifest.json +69 -9
- package/CHANGELOG.md +14 -0
- package/README.md +1 -25
- package/dist/esm/createGithubReleaseCommand.js +4 -3
- package/dist/esm/defaults.js +1 -4
- package/dist/esm/determineBumpType.js +4 -3
- package/dist/esm/enumerateReleaseWindows.js +4 -4
- package/dist/esm/init/initCommand.js +3 -7
- package/dist/esm/loadConfig.js +1 -3
- package/dist/esm/prepareCommand.js +5 -4
- package/dist/esm/releasePrepareTargets.js +1 -3
- package/dist/esm/renderReleaseNotes.js +6 -5
- package/dist/esm/reportPrepare.js +13 -11
- package/dist/esm/stripScope.js +4 -3
- package/package.json +5 -5
package/.meta/changelog.json
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "14.2.2",
|
|
4
|
+
"date": "2026-10-17",
|
|
5
|
+
"sections": [
|
|
6
|
+
{
|
|
7
|
+
"title": "📦 Dependencies",
|
|
8
|
+
"audience": "dev",
|
|
9
|
+
"items": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Upgrades `@williamthorsen/eslint-config-typescript` from 18.0.0 to 19.0.0 and rewrites the code in `build-info`, `nmr-core`, `nmr`, and `release-kit` that its new and widened rules report, without changing behavior. (#1047)",
|
|
12
|
+
"hash": "610ee159fdc429681b1078b500a064c5df296724",
|
|
13
|
+
"entry": 1
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"description": "Upgrades `readyup` from 0.40.0 to 0.41.0 and recompiles the kits in `nmr`, `release-kit`, and `v11y-check`, whose manifests now record each checklist's check names under `checklistChecks`. (#1047)",
|
|
17
|
+
"hash": "610ee159fdc429681b1078b500a064c5df296724",
|
|
18
|
+
"entry": 2
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"description": "Upgrades `pnpm` to 12.11.2, `@types/node` to 24.19.2, `lefthook` to 2.2.1, `@williamthorsen/strict-lint` to 14.2.0, `@williamthorsen/tsconfig` to 0.11.0, `smol-toml` to 1.9.1, and `vite` to 8.3.4. (#1047)",
|
|
22
|
+
"hash": "610ee159fdc429681b1078b500a064c5df296724",
|
|
23
|
+
"entry": 3
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"version": "14.2.1",
|
|
31
|
+
"date": "2026-10-13",
|
|
32
|
+
"sections": [
|
|
33
|
+
{
|
|
34
|
+
"title": "📦 Dependencies",
|
|
35
|
+
"audience": "dev",
|
|
36
|
+
"items": [{ "description": "Bumped `@williamthorsen/change-grammar` to 0.2.1" }]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
2
40
|
{
|
|
3
41
|
"version": "14.2.0",
|
|
4
42
|
"date": "2026-10-12",
|
package/.readyup/kits/default.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @noformat -- @generated. Do not edit. Compiled by rdy. */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export const __readyupVersion = "0.
|
|
3
|
+
export const __readyupVersion = "0.41.0";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// .readyup/kits/default.ts
|
|
@@ -101,7 +101,7 @@ function translateGlob(pattern) {
|
|
|
101
101
|
|
|
102
102
|
// .readyup/kits/default.ts
|
|
103
103
|
function getMinVersion() {
|
|
104
|
-
const picked = { "version": "14.2.
|
|
104
|
+
const picked = { "version": "14.2.2" };
|
|
105
105
|
if (typeof picked["version"] !== "string") {
|
|
106
106
|
throw new TypeError("release-kit/package.json: 'version' must be a string");
|
|
107
107
|
}
|
|
@@ -177,7 +177,7 @@ var default_default = defineRdyKit({
|
|
|
177
177
|
{
|
|
178
178
|
name: "publish.yaml workflow exists",
|
|
179
179
|
severity: "warn",
|
|
180
|
-
skip: () => !hasPublishablePackages()
|
|
180
|
+
skip: () => !hasPublishablePackages() && "no publishable packages",
|
|
181
181
|
check: () => fileExists(".github/workflows/publish.yaml"),
|
|
182
182
|
fix: "Add .github/workflows/publish.yaml using the publish workflow template",
|
|
183
183
|
checks: [
|
|
@@ -202,7 +202,7 @@ var default_default = defineRdyKit({
|
|
|
202
202
|
{
|
|
203
203
|
name: "create-github-release.yaml matches template",
|
|
204
204
|
severity: "warn",
|
|
205
|
-
skip: () => !fileExists(".github/workflows/create-github-release.yaml")
|
|
205
|
+
skip: () => !fileExists(".github/workflows/create-github-release.yaml") && "no create-github-release workflow (GitHub Releases not adopted)",
|
|
206
206
|
check: () => {
|
|
207
207
|
const hash = detectRepoType() === "monorepo" ? CREATE_GITHUB_RELEASE_WORKFLOW_HASH_MONOREPO : CREATE_GITHUB_RELEASE_WORKFLOW_HASH_SINGLE;
|
|
208
208
|
return fileMatchesHash(".github/workflows/create-github-release.yaml", hash);
|
|
@@ -212,7 +212,7 @@ var default_default = defineRdyKit({
|
|
|
212
212
|
{
|
|
213
213
|
name: ".config/release-kit.config.ts exports a config",
|
|
214
214
|
severity: "error",
|
|
215
|
-
skip: () => !fileExists(".config/release-kit.config.ts")
|
|
215
|
+
skip: () => !fileExists(".config/release-kit.config.ts") && "no release-kit config file",
|
|
216
216
|
check: () => configFileExportsConfig(),
|
|
217
217
|
fix: "Export the config from .config/release-kit.config.ts as a default export or as a named `config` export; release-kit does not resolve any other export",
|
|
218
218
|
checks: [
|
|
@@ -251,7 +251,7 @@ var default_default = defineRdyKit({
|
|
|
251
251
|
{
|
|
252
252
|
name: ".github/labels.yaml exists",
|
|
253
253
|
severity: "warn",
|
|
254
|
-
skip: () => !fileContains(".config/release-kit.config.ts", /repoLabels/)
|
|
254
|
+
skip: () => !fileContains(".config/release-kit.config.ts", /repoLabels/) && "no repoLabels config",
|
|
255
255
|
check: () => fileExists(".github/labels.yaml"),
|
|
256
256
|
fix: "Run `release-kit sync-labels generate` to produce the labels file",
|
|
257
257
|
checks: [
|
|
@@ -278,7 +278,7 @@ var default_default = defineRdyKit({
|
|
|
278
278
|
{
|
|
279
279
|
name: "published packages ship CHANGELOG.md",
|
|
280
280
|
severity: "warn",
|
|
281
|
-
skip: () => !hasPublishablePackages()
|
|
281
|
+
skip: () => !hasPublishablePackages() && "no publishable packages",
|
|
282
282
|
check: () => packagesShipChangelog(),
|
|
283
283
|
fix: 'Add "CHANGELOG.md" to the files field of each affected package.json'
|
|
284
284
|
},
|
|
@@ -287,7 +287,7 @@ var default_default = defineRdyKit({
|
|
|
287
287
|
severity: "warn",
|
|
288
288
|
skip: () => {
|
|
289
289
|
if (!hasPublishablePackages()) return "no publishable packages";
|
|
290
|
-
return changelogArchivesAreEnabled()
|
|
290
|
+
return !changelogArchivesAreEnabled() && "changelogMarkdown.keepVersions is not set";
|
|
291
291
|
},
|
|
292
292
|
check: () => packagesShipChangelogArchives(),
|
|
293
293
|
fix: 'Add "changelogs/" to the files field of each affected package.json, so that the links from CHANGELOG.md to its archive files resolve in the published package'
|
|
@@ -295,7 +295,7 @@ var default_default = defineRdyKit({
|
|
|
295
295
|
{
|
|
296
296
|
name: "changelog.json generation is enabled",
|
|
297
297
|
severity: "recommend",
|
|
298
|
-
skip: () => !hasPublishablePackages()
|
|
298
|
+
skip: () => !hasPublishablePackages() && "no publishable packages",
|
|
299
299
|
check: () => changelogJsonIsEnabled(),
|
|
300
300
|
fix: "Remove changelogJson.enabled: false from .config/release-kit.config.ts so that release-kit writes the machine-readable changelog that upgrade tooling reads before CHANGELOG.md",
|
|
301
301
|
checks: [
|
|
@@ -450,8 +450,8 @@ function scopeLabelsHaveNoDescriptions() {
|
|
|
450
450
|
continue;
|
|
451
451
|
}
|
|
452
452
|
const descriptionMatch = /^\s+description:\s*(.*?)\s*$/.exec(line);
|
|
453
|
-
if (descriptionMatch && currentName?.startsWith("scope:")) {
|
|
454
|
-
|
|
453
|
+
if (descriptionMatch && currentName?.startsWith("scope:") && stripYamlQuotes(descriptionMatch[1] ?? "") !== "") {
|
|
454
|
+
described.push(currentName);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
if (described.length === 0) return true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @noformat -- @generated. Do not edit. Compiled by rdy. */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export const __readyupVersion = "0.
|
|
3
|
+
export const __readyupVersion = "0.41.0";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// .readyup/kits/npm-auto-publish.ts
|
|
@@ -202,7 +202,7 @@ function buildWorkspaceCheck(workspace) {
|
|
|
202
202
|
// as unpublished would advise publishing a package that is already there.
|
|
203
203
|
skip: () => {
|
|
204
204
|
const auth = getCachedNpmAuthStatus();
|
|
205
|
-
return auth.status === "unreachable"
|
|
205
|
+
return auth.status === "unreachable" && auth.detail;
|
|
206
206
|
},
|
|
207
207
|
check: () => describeNpmPackageLookup(lookUpNpmPackage(displayName, readPublishRegistry(workspace))),
|
|
208
208
|
fix: `Run "npm publish --access public" from ${workspace.dir} to bootstrap the package on npm`,
|
|
@@ -211,7 +211,7 @@ function buildWorkspaceCheck(workspace) {
|
|
|
211
211
|
name: "trusted publisher configured",
|
|
212
212
|
skip: () => {
|
|
213
213
|
const capability = getCachedTrustCapability();
|
|
214
|
-
return capability.ok
|
|
214
|
+
return !capability.ok && capability.detail;
|
|
215
215
|
},
|
|
216
216
|
check: () => describeTrustedPublisher(getTrustQueryResult(displayName), displayName, getCachedOwnerRepo()),
|
|
217
217
|
fix: formatTrustCommand(displayName, "<owner>/<repo>")
|
|
@@ -470,10 +470,10 @@ function selectProbeName() {
|
|
|
470
470
|
}
|
|
471
471
|
function skipIfNothingPublishable() {
|
|
472
472
|
const publishable = discoverWorkspaces({ filter: (workspace) => workspace.isPackage });
|
|
473
|
-
return publishable.length
|
|
473
|
+
return publishable.length === 0 && "no publishable packages";
|
|
474
474
|
}
|
|
475
475
|
function skipIfNotPublishable(workspace) {
|
|
476
|
-
return workspace.isPackage
|
|
476
|
+
return !workspace.isPackage && "package.json#private is true";
|
|
477
477
|
}
|
|
478
478
|
export {
|
|
479
479
|
buildWorkspaceCheck,
|
package/.readyup/manifest.json
CHANGED
|
@@ -2,18 +2,53 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"kits": [
|
|
4
4
|
{
|
|
5
|
+
"checklistChecks": [
|
|
6
|
+
{
|
|
7
|
+
"checklist": "release-kit",
|
|
8
|
+
"checks": [
|
|
9
|
+
"@williamthorsen/release-kit in devDependencies",
|
|
10
|
+
"@williamthorsen/release-kit >= 14.2.2",
|
|
11
|
+
"release.yaml workflow exists",
|
|
12
|
+
"release.yaml matches template",
|
|
13
|
+
"release.yaml does not reference deprecated tag ref",
|
|
14
|
+
"publish.yaml workflow exists",
|
|
15
|
+
"publish.yaml matches template",
|
|
16
|
+
"publish.yaml does not reference deprecated tag ref",
|
|
17
|
+
"create-github-release.yaml matches template",
|
|
18
|
+
".config/release-kit.config.ts exports a config",
|
|
19
|
+
"releaseNotes config is consistent with changelogJson",
|
|
20
|
+
".config/release-kit.config.ts uses defineConfig",
|
|
21
|
+
"releaseNotes.shouldInjectIntoReadme is true",
|
|
22
|
+
"README contains release-notes section markers",
|
|
23
|
+
"repoLabels block declared in .config/release-kit.config.ts",
|
|
24
|
+
".github/labels.yaml exists",
|
|
25
|
+
"labels.yaml has current common preset",
|
|
26
|
+
"scope labels in .github/labels.yaml have no description",
|
|
27
|
+
"published packages ship CHANGELOG.md",
|
|
28
|
+
"published packages ship the changelog archives",
|
|
29
|
+
"changelog.json generation is enabled",
|
|
30
|
+
"published packages ship the changelog JSON",
|
|
31
|
+
"config does not use removed releaseNotes.shouldCreateGithubRelease",
|
|
32
|
+
"@changesets/cli not in devDependencies",
|
|
33
|
+
"sync-labels.yaml workflow exists",
|
|
34
|
+
"sync-labels.yaml matches template",
|
|
35
|
+
"sync-labels.yaml does not reference deprecated tag ref",
|
|
36
|
+
"retired .config/sync-labels.config.ts is absent"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
],
|
|
5
40
|
"checklists": [
|
|
6
41
|
"release-kit"
|
|
7
42
|
],
|
|
8
43
|
"esbuildVersion": "0.28.2",
|
|
9
44
|
"inputs": [
|
|
10
45
|
{
|
|
11
|
-
"hash": "
|
|
46
|
+
"hash": "176a18ce",
|
|
12
47
|
"kind": "module",
|
|
13
48
|
"path": "kits/default.ts"
|
|
14
49
|
},
|
|
15
50
|
{
|
|
16
|
-
"hash": "
|
|
51
|
+
"hash": "92bf79b3",
|
|
17
52
|
"kind": "inline",
|
|
18
53
|
"path": "../package.json",
|
|
19
54
|
"paths": [
|
|
@@ -48,12 +83,37 @@
|
|
|
48
83
|
],
|
|
49
84
|
"name": "default",
|
|
50
85
|
"path": "kits/default.js",
|
|
51
|
-
"readyupVersion": "0.
|
|
86
|
+
"readyupVersion": "0.41.0",
|
|
52
87
|
"source": "kits/default.ts",
|
|
53
|
-
"sourceHash": "
|
|
54
|
-
"targetHash": "
|
|
88
|
+
"sourceHash": "176a18ce",
|
|
89
|
+
"targetHash": "f10b7179"
|
|
55
90
|
},
|
|
56
91
|
{
|
|
92
|
+
"checklistChecks": [
|
|
93
|
+
{
|
|
94
|
+
"checklist": "repo",
|
|
95
|
+
"checks": [
|
|
96
|
+
"publish.yaml exists",
|
|
97
|
+
"id-token: write permission declared",
|
|
98
|
+
"No legacy token references in workflow files",
|
|
99
|
+
"Provenance setting matches repo visibility"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"checklist": "packages",
|
|
104
|
+
"checks": [
|
|
105
|
+
"packageManager field starts with \"pnpm\"",
|
|
106
|
+
"At least one workspace discovered",
|
|
107
|
+
"npm session can answer trust queries",
|
|
108
|
+
"@williamthorsen/release-kit",
|
|
109
|
+
"repository field exists",
|
|
110
|
+
"publishConfig.access is \"public\"",
|
|
111
|
+
"published to npm",
|
|
112
|
+
"trusted publisher configured",
|
|
113
|
+
"files field exists"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
],
|
|
57
117
|
"checklists": [
|
|
58
118
|
"repo",
|
|
59
119
|
"packages"
|
|
@@ -61,7 +121,7 @@
|
|
|
61
121
|
"esbuildVersion": "0.28.2",
|
|
62
122
|
"inputs": [
|
|
63
123
|
{
|
|
64
|
-
"hash": "
|
|
124
|
+
"hash": "66081555",
|
|
65
125
|
"kind": "module",
|
|
66
126
|
"path": "kits/npm-auto-publish.ts"
|
|
67
127
|
},
|
|
@@ -83,10 +143,10 @@
|
|
|
83
143
|
],
|
|
84
144
|
"name": "npm-auto-publish",
|
|
85
145
|
"path": "kits/npm-auto-publish.js",
|
|
86
|
-
"readyupVersion": "0.
|
|
146
|
+
"readyupVersion": "0.41.0",
|
|
87
147
|
"source": "kits/npm-auto-publish.ts",
|
|
88
|
-
"sourceHash": "
|
|
89
|
-
"targetHash": "
|
|
148
|
+
"sourceHash": "66081555",
|
|
149
|
+
"targetHash": "081994f8"
|
|
90
150
|
}
|
|
91
151
|
]
|
|
92
152
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 14.2.2 — 2026-10-17
|
|
6
|
+
|
|
7
|
+
### 📦 Dependencies
|
|
8
|
+
|
|
9
|
+
- Upgrades `@williamthorsen/eslint-config-typescript` from 18.0.0 to 19.0.0 and rewrites the code in `build-info`, `nmr-core`, `nmr`, and `release-kit` that its new and widened rules report, without changing behavior. (#1047)
|
|
10
|
+
- Upgrades `readyup` from 0.40.0 to 0.41.0 and recompiles the kits in `nmr`, `release-kit`, and `v11y-check`, whose manifests now record each checklist's check names under `checklistChecks`. (#1047)
|
|
11
|
+
- Upgrades `pnpm` to 12.11.2, `@types/node` to 24.19.2, `lefthook` to 2.2.1, `@williamthorsen/strict-lint` to 14.2.0, `@williamthorsen/tsconfig` to 0.11.0, `smol-toml` to 1.9.1, and `vite` to 8.3.4. (#1047)
|
|
12
|
+
|
|
13
|
+
## 14.2.1 — 2026-10-13
|
|
14
|
+
|
|
15
|
+
### 📦 Dependencies
|
|
16
|
+
|
|
17
|
+
- Bumped `@williamthorsen/change-grammar` to 0.2.1
|
|
18
|
+
|
|
5
19
|
## 14.2.0 — 2026-10-12
|
|
6
20
|
|
|
7
21
|
### 🎉 Features
|
package/README.md
CHANGED
|
@@ -6,31 +6,7 @@ Version-bumping and changelog-generation toolkit for release workflows.
|
|
|
6
6
|
|
|
7
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
|
-
<!-- section:release-notes -->
|
|
10
|
-
## Release notes — v14.2.0 (2026-10-12)
|
|
11
|
-
|
|
12
|
-
### 🎉 Features
|
|
13
|
-
|
|
14
|
-
- Adds an optional `aliases` array to a `repoLabels.labels` entry, which `sync-labels` writes to `.github/labels.yaml` so that the sync renames each existing label named by an alias to the entry's name and keeps it on the issues and pull requests that have it. (#1015)
|
|
15
|
-
- Makes `release-kit sync-labels` reject a config whose alias names a label that the config resolves or appears twice, because the sync would otherwise merge one declared label into another and delete it. (#1015)
|
|
16
|
-
- Adds the `confidence:high` ("Clearly worth doing"), `confidence:medium` ("Worth doing, but arguable"), and `confidence:low` ("Not worth a ticket now") labels to the `common` preset of `release-kit sync-labels`, and documents in `docs/labels.md` that the family grades how advisable a recommendation is. (#1019)
|
|
17
|
-
- Adds a warning to the `release-kit` readyup kit that names each `scope:` label in `.github/labels.yaml` with a non-empty description, archived labels included, because GitHub's label list groups scope labels compactly only when they have no description. (#1022)
|
|
18
|
-
- Adds the `releases` block to `.config/release-kit.config.ts`, in which an entry renames a discovered workspace's release target, excludes the workspace with `false`, or declares a composite of named members that the root `package.json` versions, as an alternative to the `workspaces` and `project` blocks, which keep working unchanged. (#1028)
|
|
19
|
-
- Lets `release-kit prepare --only` select a `releases` composite by its target name, and makes a narrowed run that leaves the composite out skip it with a warning that names it. (#1028)
|
|
20
|
-
- Adds directory release targets to `release-kit`: A `releases` entry whose `path` is not a workspace now declares a target that `prepare` versions from the directory's `package.json` or `version.json`, whose `CHANGELOG.md` `prepare` writes, and whose tags `push` and `create-github-release` handle, while `publish` skips them because a directory does not have any package to publish to npm. (#1029)
|
|
21
|
-
- Adds the repo-root target `{ path: '.' }`, which versions the root `package.json`, tags `v{version}`, and writes every commit in the repo to `./CHANGELOG.md`, replacing a `project` block whose window covered the whole repo only while every workspace was excluded. (#1029)
|
|
22
|
-
- Adds the `changelogMarkdown.keepVersions` config option, which makes `prepare` write only the newest `keepVersions` sections to `CHANGELOG.md`, with links to `changelogs/CHANGELOG-v{major}.md` archive files that contain the older sections, and delete any archive file that is no longer needed after the option is raised or removed. (#1031)
|
|
23
|
-
- Extends `prepare` to read hand-written sections from the `changelogs/` archive files as well as from `CHANGELOG.md`, so that an archived section written by hand is kept when the changelog is regenerated. (#1031)
|
|
24
|
-
- Adds the warning "published packages ship the changelog archives" to the release-kit readyup kit, which reports each publishable package whose `files` field omits `changelogs/` while `keepVersions` is set, because the links in `CHANGELOG.md` to the archive files would otherwise be broken in the published package. (#1031)
|
|
25
|
-
|
|
26
|
-
### 🐛 Bug fixes
|
|
27
|
-
|
|
28
|
-
- Fixes the issue that the `npm-auto-publish` kit crashed without reporting any results in a repo whose `origin` remote is missing or does not point to GitHub, and makes its trusted-publisher and provenance checks name that cause and advise adding the remote. (#1018)
|
|
29
|
-
- Fixes the issue that `release-kit prepare` accepted two workspaces whose directories share a name, which `--only` and the dependency graph use to identify a workspace, and makes `prepare` and `release-kit overrides validate` stop with an error that lists the path of each. (#1026)
|
|
30
|
-
- Fixes the issue that `release-kit push` never pushed the project tag on HEAD, and failed with `HEAD does not have any release tags.` when the project tag was the only release tag. (#1027)
|
|
31
|
-
- Fixes the issue that `release-kit create-github-release` did not create a GitHub Release for the project tag; a private workspace's tag is still skipped. (#1027)
|
|
32
|
-
- Makes `release-kit publish` skip a project tag named by `--tags` with the warning `Skipping v0.13.0: a project tag is not an npm package.`, since the project does not have an npm package to publish. (#1027)
|
|
33
|
-
<!-- /section:release-notes -->
|
|
9
|
+
<!-- section:release-notes --><!-- /section:release-notes -->
|
|
34
10
|
|
|
35
11
|
## Installation
|
|
36
12
|
|
|
@@ -38,10 +38,11 @@ export async function createGithubReleaseCommand(argv, styles, invocationDir) {
|
|
|
38
38
|
reportError(`Failed to create GitHub Releases: ${describeError(error)}`);
|
|
39
39
|
process.exit(1);
|
|
40
40
|
}
|
|
41
|
-
if (outcome.skipped.length
|
|
42
|
-
|
|
43
|
-
console.info(`Skipped ${outcome.skipped.length} tag(s) without releasable content: ${formatted}.`);
|
|
41
|
+
if (outcome.skipped.length === 0) {
|
|
42
|
+
return;
|
|
44
43
|
}
|
|
44
|
+
const formatted = outcome.skipped.map((s) => `${s.tag} (${s.reason})`).join(', ');
|
|
45
|
+
console.info(`Skipped ${outcome.skipped.length} tag(s) without releasable content: ${formatted}.`);
|
|
45
46
|
}
|
|
46
47
|
function isReleasable(resolvedTag) {
|
|
47
48
|
return resolvedTag.kind !== 'package' || resolvedTag.isPublishable;
|
package/dist/esm/defaults.js
CHANGED
|
@@ -22,10 +22,7 @@ function deriveDefaultWorkTypes() {
|
|
|
22
22
|
function deriveDevOnlySections() {
|
|
23
23
|
const sections = [];
|
|
24
24
|
for (const entry of CANONICAL_TAXONOMY.types) {
|
|
25
|
-
if (!DEV_ONLY_TIERS.has(entry.tier)) {
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
if (entry.excludedFromChangelog === true) {
|
|
25
|
+
if (!DEV_ONLY_TIERS.has(entry.tier) || entry.excludedFromChangelog === true) {
|
|
29
26
|
continue;
|
|
30
27
|
}
|
|
31
28
|
sections.push(composeHeader(entry));
|
|
@@ -25,10 +25,11 @@ export function determineBumpType(changes, workTypes, versionPatterns) {
|
|
|
25
25
|
bump = 'patch';
|
|
26
26
|
}
|
|
27
27
|
const priority = RELEASE_PRIORITY[bump];
|
|
28
|
-
if (priority
|
|
29
|
-
|
|
30
|
-
result = bump;
|
|
28
|
+
if (priority <= highestPriority) {
|
|
29
|
+
continue;
|
|
31
30
|
}
|
|
31
|
+
highestPriority = priority;
|
|
32
|
+
result = bump;
|
|
32
33
|
}
|
|
33
34
|
return result;
|
|
34
35
|
}
|
|
@@ -94,10 +94,10 @@ function readTagBoundaries(tagPrefixes, positionByHash) {
|
|
|
94
94
|
const boundaries = [];
|
|
95
95
|
for (const line of output.split('\n')) {
|
|
96
96
|
const [tag, creatorDate, objectName, dereferencedName] = line.split(FIELD_SEPARATOR);
|
|
97
|
-
if (tag === undefined ||
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
97
|
+
if (tag === undefined ||
|
|
98
|
+
creatorDate === undefined ||
|
|
99
|
+
objectName === undefined ||
|
|
100
|
+
!matchesTagPrefix(tag, tagPrefixes)) {
|
|
101
101
|
continue;
|
|
102
102
|
}
|
|
103
103
|
const hash = dereferencedName || objectName;
|
|
@@ -6,13 +6,9 @@ import { formatPrivateWorkflowSkip, hasPublishablePackage } from "./hasPublishab
|
|
|
6
6
|
import { PUBLISHING_WORKFLOW_PATHS, scaffoldFiles } from "./scaffold.js";
|
|
7
7
|
export function checkEligibility(styles) {
|
|
8
8
|
printStep('Checking eligibility');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return false;
|
|
13
|
-
if (!runRequiredCheck('pnpm detected', usesPnpm(), styles))
|
|
14
|
-
return false;
|
|
15
|
-
return true;
|
|
9
|
+
return (runRequiredCheck('Git repository detected', isGitRepo(), styles) &&
|
|
10
|
+
runRequiredCheck('package.json found', hasPackageJson(), styles) &&
|
|
11
|
+
runRequiredCheck('pnpm detected', usesPnpm(), styles));
|
|
16
12
|
}
|
|
17
13
|
export function initCommand({ dryRun, force, styles, withConfig }) {
|
|
18
14
|
if (dryRun) {
|
package/dist/esm/loadConfig.js
CHANGED
|
@@ -254,9 +254,7 @@ function assertNoTagPrefixCollisions(workspaces, directories, retiredPackages, p
|
|
|
254
254
|
for (let j = i + 1; j < sources.length; j++) {
|
|
255
255
|
const a = sources[i];
|
|
256
256
|
const b = sources[j];
|
|
257
|
-
if (a === undefined || b === undefined)
|
|
258
|
-
continue;
|
|
259
|
-
if (a.owner === b.owner)
|
|
257
|
+
if (a === undefined || b === undefined || a.owner === b.owner)
|
|
260
258
|
continue;
|
|
261
259
|
if (isPrefixCollision(a.prefix, b.prefix)) {
|
|
262
260
|
throw new Error(`Tag prefix collision: '${a.prefix}' (${a.label}) and '${b.prefix}' (${b.label}). ` +
|
|
@@ -212,11 +212,12 @@ function runAndReport(computePlan, dryRun, style) {
|
|
|
212
212
|
const formatError = runFormatCommand(plan.formatCommand);
|
|
213
213
|
process.stdout.write(reportPrepare(plan, { applied: true, style, ...(formatError !== undefined && { formatError }) }) + '\n');
|
|
214
214
|
reportPlanFiles(plan, false);
|
|
215
|
-
if (formatError
|
|
216
|
-
|
|
217
|
-
`Format the release files and run 'release-kit commit'.`);
|
|
218
|
-
process.exit(1);
|
|
215
|
+
if (formatError === undefined) {
|
|
216
|
+
return;
|
|
219
217
|
}
|
|
218
|
+
reportError(`The format command failed, but the release is prepared and ${RELEASE_TAGS_FILE} is written. ` +
|
|
219
|
+
`Format the release files and run 'release-kit commit'.`);
|
|
220
|
+
process.exit(1);
|
|
220
221
|
}
|
|
221
222
|
function runFormatCommand(formatCommand) {
|
|
222
223
|
if (formatCommand === undefined) {
|
|
@@ -179,9 +179,7 @@ function describeStage(target) {
|
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
function maybeEmitBaselineHint(target, knownPrefixes, state) {
|
|
182
|
-
if (state.emitted)
|
|
183
|
-
return;
|
|
184
|
-
if ((target.legacyIdentities?.length ?? 0) > 0)
|
|
182
|
+
if (state.emitted || (target.legacyIdentities?.length ?? 0) > 0)
|
|
185
183
|
return;
|
|
186
184
|
const candidates = detectUndeclaredTagPrefixes(knownPrefixes);
|
|
187
185
|
if (candidates.length === 0)
|
|
@@ -33,11 +33,12 @@ export function renderReleaseNotesSingle(entry, options) {
|
|
|
33
33
|
for (const [index, item] of section.items.entries()) {
|
|
34
34
|
const prefix = item.breaking === true ? getBreakingPrefix() : '';
|
|
35
35
|
lines.push(`- ${prefix}${item.description}`);
|
|
36
|
-
if (item.body
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (item.body === undefined || item.body.length === 0) {
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
lines.push('', ...indentBodyLines(item.body));
|
|
40
|
+
if (index < section.items.length - 1) {
|
|
41
|
+
lines.push('');
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -204,10 +204,11 @@ function formatChangelogFiles(lines, release, dryRun, style, indent = '') {
|
|
|
204
204
|
lines.push(dim(`${indent} Kept from the existing changelog: ${preservation.preservedVersions.join(', ')}`));
|
|
205
205
|
}
|
|
206
206
|
const dropped = preservation.droppedUnversionedHeadings;
|
|
207
|
-
if (dropped.length
|
|
208
|
-
|
|
209
|
-
lines.push(`${indent} ${formatStatusLine(style, 'warning', message)}`);
|
|
207
|
+
if (dropped.length === 0) {
|
|
208
|
+
continue;
|
|
210
209
|
}
|
|
210
|
+
const message = `Dropped ${dropped.length} section${dropped.length === 1 ? '' : 's'} without a version: ${dropped.join(', ')}`;
|
|
211
|
+
lines.push(`${indent} ${formatStatusLine(style, 'warning', message)}`);
|
|
211
212
|
}
|
|
212
213
|
const removedFiles = release.removedChangelogFiles ?? [];
|
|
213
214
|
for (const file of removedFiles) {
|
|
@@ -276,14 +277,15 @@ function formatChangeRecordWarnings(lines, release, style, indent = '') {
|
|
|
276
277
|
lines.push(`${indent} · ${shortHash} '${truncateSubject(entry.commitSubject)}': type '${entry.type}' at entry ${entry.entryPosition}`);
|
|
277
278
|
}
|
|
278
279
|
}
|
|
279
|
-
if (unroutedEntryScopes.length
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
280
|
+
if (unroutedEntryScopes.length === 0) {
|
|
281
|
+
return;
|
|
282
|
+
}
|
|
283
|
+
const count = unroutedEntryScopes.length;
|
|
284
|
+
const header = `${count} change-record entry scope${count === 1 ? ' does not match' : 's do not match'} any workspace in the commit's window (no item there)`;
|
|
285
|
+
lines.push(`${indent} ${formatStatusLine(style, 'warning', `${header}:`)}`);
|
|
286
|
+
for (const finding of unroutedEntryScopes) {
|
|
287
|
+
const shortHash = finding.commitHash.slice(0, 7);
|
|
288
|
+
lines.push(`${indent} · ${shortHash} '${truncateSubject(finding.commitSubject)}': scope '${finding.scope}' at entry ${finding.entryPosition}`);
|
|
287
289
|
}
|
|
288
290
|
}
|
|
289
291
|
function formatPropagationSuffix(propagatedFrom) {
|
package/dist/esm/stripScope.js
CHANGED
|
@@ -5,10 +5,11 @@ export function stripScope(message) {
|
|
|
5
5
|
let remainder = message;
|
|
6
6
|
for (const pattern of TICKET_PREFIX_PATTERNS) {
|
|
7
7
|
const match = remainder.match(pattern);
|
|
8
|
-
if (match) {
|
|
9
|
-
|
|
10
|
-
remainder = remainder.slice(match[0].length);
|
|
8
|
+
if (!match) {
|
|
9
|
+
continue;
|
|
11
10
|
}
|
|
11
|
+
ticketPrefix += match[0];
|
|
12
|
+
remainder = remainder.slice(match[0].length);
|
|
12
13
|
}
|
|
13
14
|
const pipeMatch = remainder.match(PIPE_SCOPE_PATTERN);
|
|
14
15
|
if (pipeMatch) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/release-kit",
|
|
3
|
-
"version": "14.2.
|
|
3
|
+
"version": "14.2.2",
|
|
4
4
|
"description": "Version-bumping and changelog-generation toolkit for release workflows",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"changelog",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"schemas/**"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@williamthorsen/change-grammar": "0.2.
|
|
54
|
-
"@williamthorsen/nmr-core": "0.13.
|
|
53
|
+
"@williamthorsen/change-grammar": "0.2.1",
|
|
54
|
+
"@williamthorsen/nmr-core": "0.13.4",
|
|
55
55
|
"@williamthorsen/toolbelt.errors": "0.8.3",
|
|
56
56
|
"json-stringify-pretty-compact": "4.0.0",
|
|
57
57
|
"semver": "7.8.5",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@williamthorsen/toolbelt.vitest": "0.10.3",
|
|
66
66
|
"actionlint": "2.0.6",
|
|
67
67
|
"esbuild": "0.28.2",
|
|
68
|
-
"readyup": "0.
|
|
69
|
-
"smol-toml": "1.9.
|
|
68
|
+
"readyup": "0.41.0",
|
|
69
|
+
"smol-toml": "1.9.1",
|
|
70
70
|
"vitest": "4.1.11"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|