@williamthorsen/release-kit 10.6.0 → 10.8.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 +96 -0
- package/.readyup/kits/default.js +17 -3
- package/.readyup/kits/npm-auto-publish.js +87 -23
- package/.readyup/manifest.json +9 -9
- package/CHANGELOG.md +61 -0
- package/README.md +53 -1010
- package/dist/esm/bin/release-kit.js +7 -6
- package/dist/esm/buildChangelogEntries.d.ts +1 -1
- package/dist/esm/buildChangelogEntries.js +14 -5
- package/dist/esm/buildDependencyGraph.d.ts +6 -5
- package/dist/esm/buildDependencyGraph.js +5 -1
- package/dist/esm/checkWorkTypesDrift.d.ts +2 -3
- package/dist/esm/checkWorkTypesDrift.js +1 -1
- package/dist/esm/init/scaffold.js +14 -6
- package/dist/esm/parseCommitMessage.d.ts +4 -5
- package/dist/esm/planVersionBump.d.ts +2 -1
- package/dist/esm/planVersionBump.js +4 -0
- package/dist/esm/propagateBumps.d.ts +1 -3
- package/dist/esm/propagateBumps.js +2 -2
- package/dist/esm/releasePrepare.js +0 -13
- package/dist/esm/releasePrepareMono.js +3 -20
- package/dist/esm/sync-labels/resolveLabels.d.ts +5 -3
- package/dist/esm/sync-labels/resolveLabels.js +21 -6
- package/dist/esm/types.d.ts +12 -9
- package/dist/esm/validateConfig.js +1 -1
- package/dist/esm/work-types.json +68 -52
- package/dist/esm/work-types.schema.json +12 -2
- package/dist/esm/workTypesData.d.ts +10 -9
- package/dist/esm/workTypesData.js +97 -11
- package/docs/api.md +73 -0
- package/docs/changelogs.md +70 -0
- package/docs/configuration.md +105 -0
- package/docs/editorial-overrides.md +144 -0
- package/docs/labels.md +83 -0
- package/docs/project-releases.md +74 -0
- package/docs/publishing.md +30 -0
- package/docs/readiness-checks.md +18 -0
- package/docs/releasing.md +108 -0
- package/docs/work-types.md +116 -0
- package/package.json +7 -4
- package/dist/esm/readCurrentVersion.d.ts +0 -2
- package/dist/esm/readCurrentVersion.js +0 -18
package/.meta/changelog.json
CHANGED
|
@@ -1,4 +1,100 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "10.8.0",
|
|
4
|
+
"date": "2026-09-15",
|
|
5
|
+
"sections": [
|
|
6
|
+
{
|
|
7
|
+
"title": "🎉 Features",
|
|
8
|
+
"audience": "all",
|
|
9
|
+
"items": [
|
|
10
|
+
{
|
|
11
|
+
"description": "Allow the breaking marker on fix and perf commits (#818)",
|
|
12
|
+
"body": "- Makes `release-kit prepare` bump the major version for a `fix!` or `perf!` commit under the default breaking policies, instead of reporting a policy violation and bumping only the patch version while the changelog marked the entry breaking.\n- Corrects `docs/work-types.md` to state that a `breakingPolicies` map replaces the default policies rather than overriding individual types, and that release-kit treats every type omitted by the map as `optional`.",
|
|
13
|
+
"hash": "9d7bbe89deef6cdcedd999336e1cb8118bbf739f"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "🐛 Bug fixes",
|
|
19
|
+
"audience": "all",
|
|
20
|
+
"items": [
|
|
21
|
+
{
|
|
22
|
+
"description": "Omit the breaking marker from changelog entries whose type forbids it (#819)",
|
|
23
|
+
"body": "- Makes the configured `breakingPolicies` map decide whether the changelog marks a commit breaking, as it already decides the version bump.",
|
|
24
|
+
"hash": "6ff7414f6f826fc85ae3337c4ac6bd9e38fe6ef7"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"version": "10.7.0",
|
|
32
|
+
"date": "2026-09-15",
|
|
33
|
+
"sections": [
|
|
34
|
+
{
|
|
35
|
+
"title": "🎉 Features",
|
|
36
|
+
"audience": "all",
|
|
37
|
+
"items": [
|
|
38
|
+
{
|
|
39
|
+
"description": "Fix scaffold error handling and cover every scaffolded workflow (#806)",
|
|
40
|
+
"body": "- Adds a `create-github-release.yaml matches template` check to release-kit's ReadyUp kit, which warns when `.github/workflows/create-github-release.yaml` differs from the template for the detected repo type and skips in a repo that has not installed that workflow.\n- Stops `v11y init --force` from replacing an existing `.config/v11y-check.config.json` with the defaults, which discarded the repo's thresholds and the allowlist maintained by `v11y sync`.\n\nMigration: To reset `.config/v11y-check.config.json` to its defaults, delete the file and run `v11y init`, because `v11y init --force` now overwrites only `.github/workflows/audit.yaml`.",
|
|
41
|
+
"migration": "To reset `.config/v11y-check.config.json` to its defaults, delete the file and run `v11y init`, because `v11y init --force` now overwrites only `.github/workflows/audit.yaml`.",
|
|
42
|
+
"hash": "1e197577c6c60678b5d6522f58b3211f3b10c752"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"title": "🐛 Bug fixes",
|
|
48
|
+
"audience": "all",
|
|
49
|
+
"items": [
|
|
50
|
+
{
|
|
51
|
+
"description": "Gate the trusted-publisher checks on trust-query capability (#786)",
|
|
52
|
+
"body": "- Fixes the issue that the `npm-auto-publish` kit advised `npm trust github …` for every package when the npm session lacked the two-factor authentication that trust queries need.",
|
|
53
|
+
"hash": "255ac707f8eabbde2b14ce8ce5fb9819262f1b6e"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"description": "Treat label names that differ only in case as one label (#808)",
|
|
57
|
+
"body": "- Fixes the issue that `sync-labels generate` wrote a preset's `bug` and a local `Bug` to `.github/labels.yaml` as two labels, which made the first sync fail to create the second and every later sync rename the existing label back and forth.\n- Lets a `labels` entry change a preset label's casing: `Bug` replaces a preset's `bug` and appears in the output as `Bug`, and `Bug: null` removes it.\n- Makes `labels` keys that differ only in case a config error that names each group, such as `'bug' and 'Bug'`, since folding them would discard all but one without any sign in the output.\n\nMigration: Keep one of any keys in the `labels` record that differ only in case, and delete the others.",
|
|
58
|
+
"migration": "Keep one of any keys in the `labels` record that differ only in case, and delete the others.",
|
|
59
|
+
"hash": "e045010109b26aae95a63ad51d60c3eb688f5b6c"
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"title": "♻️ Refactoring",
|
|
65
|
+
"audience": "dev",
|
|
66
|
+
"items": [
|
|
67
|
+
{
|
|
68
|
+
"description": "Remove the redundant, soft-failing version read from release prepare (#811)",
|
|
69
|
+
"body": "- Deletes `readCurrentVersion` from `release-kit`, moving into `planVersionSet` the check that a `--set-version` target exceeds the current version and recording each workspace's version in the `DependencyGraph` passed to `propagateBumps`.\n- Stops prepare from printing a warning before it fails on an unreadable `package.json`, and replaces `failed to read current version` for a missing `version` under `--set-version` with an error from `planVersionSet` that reports the missing `version` field.",
|
|
70
|
+
"hash": "668123e01e71b013fa33dc391f9b0f685508a25b"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"title": "⚙️ Tooling",
|
|
76
|
+
"audience": "dev",
|
|
77
|
+
"items": [
|
|
78
|
+
{
|
|
79
|
+
"description": "Upgrade eslint-config-typescript to v17 and adopt its ignore lists (#797)",
|
|
80
|
+
"body": "- Declares `vitest` as `catalog:` in every workspace that imports it, with the pnpm catalog pinning 4.1.11, because v17 no longer exempts `vitest` from `n/no-extraneous-import`.\n- Builds the global ignores in `eslint.config.ts` from the published `commonIgnores` and `toolIgnores`, which also exclude `pnpm-lock.yaml` and each `.readyup/manifest.json`, so the `eslint --fix` in `nmr lint` can no longer rewrite a kit manifest and make the next build's `rdy verify` fail.",
|
|
81
|
+
"hash": "b201669444763ad5bef85730b114098ef352e09b"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"title": "📚 Documentation",
|
|
87
|
+
"audience": "dev",
|
|
88
|
+
"items": [
|
|
89
|
+
{
|
|
90
|
+
"description": "Trim the release-kit README and move reference detail into shipped docs (#802)",
|
|
91
|
+
"body": "- Adds `docs` to the published `files` of `@williamthorsen/release-kit` and a `!docs/*.v*.md` exclusion to both it and `@williamthorsen/nmr`, because `pnpm pack` would otherwise include the release-notes previews that a local checkout holds.\n- Adds `--version` to the options that `release-kit --help` lists, and points the hints for the removed `releaseNotes.shouldCreateGithubRelease` field at `release-kit init` instead of the README.",
|
|
92
|
+
"hash": "bce2e74071cffd44e64e8bf9e6d2e6a2adaaf363"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
2
98
|
{
|
|
3
99
|
"version": "10.6.0",
|
|
4
100
|
"date": "2026-09-08",
|
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.36.0";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// .readyup/kits/default.ts
|
|
@@ -98,7 +98,7 @@ function translateGlob(pattern) {
|
|
|
98
98
|
|
|
99
99
|
// .readyup/kits/default.ts
|
|
100
100
|
function getMinVersion() {
|
|
101
|
-
const picked = { "version": "10.
|
|
101
|
+
const picked = { "version": "10.8.0" };
|
|
102
102
|
if (typeof picked["version"] !== "string") {
|
|
103
103
|
throw new TypeError("release-kit/package.json: 'version' must be a string");
|
|
104
104
|
}
|
|
@@ -121,6 +121,8 @@ var RELEASE_WORKFLOW_HASH_MONOREPO = "0a9724b7b3c5e24087fd3a8f36fed8e990d699267f
|
|
|
121
121
|
var RELEASE_WORKFLOW_HASH_SINGLE = "a3d19bbc1ba8bb30622e53c590137b97e3179e80988c0967737b021cdaeab73f";
|
|
122
122
|
var PUBLISH_WORKFLOW_HASH_MONOREPO = "0afa9ffe914f3dc8f043e68252ebc604c8cc1a953422fcea37a909a4def370ee";
|
|
123
123
|
var PUBLISH_WORKFLOW_HASH_SINGLE = "6f31183e0a1e66be791a19266c3b028dadbd9fe010f7fc4452f3f8970c937b43";
|
|
124
|
+
var CREATE_GITHUB_RELEASE_WORKFLOW_HASH_MONOREPO = "c455d88c93d855737c96079945ff729a9d094f846519c24afbefe83a425c1d7f";
|
|
125
|
+
var CREATE_GITHUB_RELEASE_WORKFLOW_HASH_SINGLE = "f595831ff28f8b3a01d97e6cb0cfe100262f7a8821091c6c458b0c0224cebba8";
|
|
124
126
|
var default_default = defineRdyKit({
|
|
125
127
|
checklists: [
|
|
126
128
|
{
|
|
@@ -195,6 +197,16 @@ var default_default = defineRdyKit({
|
|
|
195
197
|
}
|
|
196
198
|
]
|
|
197
199
|
},
|
|
200
|
+
{
|
|
201
|
+
name: "create-github-release.yaml matches template",
|
|
202
|
+
severity: "warn",
|
|
203
|
+
skip: () => !fileExists(".github/workflows/create-github-release.yaml") ? "no create-github-release workflow (GitHub Releases not adopted)" : false,
|
|
204
|
+
check: () => {
|
|
205
|
+
const hash = detectRepoType() === "monorepo" ? CREATE_GITHUB_RELEASE_WORKFLOW_HASH_MONOREPO : CREATE_GITHUB_RELEASE_WORKFLOW_HASH_SINGLE;
|
|
206
|
+
return fileMatchesHash(".github/workflows/create-github-release.yaml", hash);
|
|
207
|
+
},
|
|
208
|
+
fix: "Run `release-kit init --force` to regenerate create-github-release.yaml from the current template"
|
|
209
|
+
},
|
|
198
210
|
{
|
|
199
211
|
name: ".config/release-kit.config.ts exports a config",
|
|
200
212
|
severity: "error",
|
|
@@ -282,7 +294,7 @@ var default_default = defineRdyKit({
|
|
|
282
294
|
severity: "error",
|
|
283
295
|
quiet: true,
|
|
284
296
|
check: () => fileDoesNotContain(".config/release-kit.config.ts", /shouldCreateGithubRelease/),
|
|
285
|
-
fix: "Remove 'shouldCreateGithubRelease' from .config/release-kit.config.ts. Adoption of GitHub Releases is now signaled by installing the create-github-release workflow
|
|
297
|
+
fix: "Remove 'shouldCreateGithubRelease' from .config/release-kit.config.ts. Adoption of GitHub Releases is now signaled by installing the create-github-release workflow, which `release-kit init` scaffolds."
|
|
286
298
|
},
|
|
287
299
|
{
|
|
288
300
|
name: "git-cliff not in devDependencies",
|
|
@@ -415,6 +427,8 @@ function resolveChangelogJsonOutputPath() {
|
|
|
415
427
|
export {
|
|
416
428
|
CLIFF_TEMPLATE_HASH,
|
|
417
429
|
COMMON_PRESET_HASH,
|
|
430
|
+
CREATE_GITHUB_RELEASE_WORKFLOW_HASH_MONOREPO,
|
|
431
|
+
CREATE_GITHUB_RELEASE_WORKFLOW_HASH_SINGLE,
|
|
418
432
|
DEFAULT_CHANGELOG_JSON_PATH,
|
|
419
433
|
PUBLISH_WORKFLOW_HASH_MONOREPO,
|
|
420
434
|
PUBLISH_WORKFLOW_HASH_SINGLE,
|
|
@@ -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.36.0";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// .readyup/kits/npm-auto-publish.ts
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
readJsonFile
|
|
19
19
|
} from "readyup/check-utils";
|
|
20
20
|
var AUTH_ERROR_CODES = /* @__PURE__ */ new Set(["E401", "ENEEDAUTH"]);
|
|
21
|
+
var OTP_ERROR_CODE = "EOTP";
|
|
21
22
|
var PUBLISH_WORKFLOW_FILE = "publish.yaml";
|
|
22
23
|
var UNREACHABLE_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
23
24
|
"EAI_AGAIN",
|
|
@@ -77,24 +78,19 @@ var packagesChecklist = defineRdyChecklist({
|
|
|
77
78
|
fix: "Ensure pnpm-workspace.yaml lists package globs, or that a root package.json exists"
|
|
78
79
|
}
|
|
79
80
|
],
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
// readyup reads `fix` before it consults `skip`, and again when it validates the kit, so a getter here would
|
|
89
|
-
// reach the registry on every run regardless of the skip. Per-outcome wording goes in the check's detail.
|
|
90
|
-
fix: 'Restore a usable npm session: log in with "npm login", or restore access to the registry, which the trusted-publisher check queries directly',
|
|
91
|
-
get checks() {
|
|
92
|
-
return discoverWorkspaces({ filter: belongsInPackagesChecklist }).map(
|
|
93
|
-
(workspace) => buildWorkspaceCheck(workspace)
|
|
94
|
-
);
|
|
95
|
-
}
|
|
81
|
+
// The gate stands beside the workspace rows rather than above them, so a session that cannot answer trust queries
|
|
82
|
+
// suppresses the trusted-publisher rows alone and leaves the package.json checks reporting. The rows no longer
|
|
83
|
+
// hang beneath the gate's skip, so a repo that publishes nothing has to be held to its one line here.
|
|
84
|
+
get checks() {
|
|
85
|
+
const sessionCheck = buildSessionCheck();
|
|
86
|
+
if (skipIfNothingPublishable() !== false) {
|
|
87
|
+
return [sessionCheck];
|
|
96
88
|
}
|
|
97
|
-
|
|
89
|
+
return [
|
|
90
|
+
sessionCheck,
|
|
91
|
+
...discoverWorkspaces({ filter: belongsInPackagesChecklist }).map((workspace) => buildWorkspaceCheck(workspace))
|
|
92
|
+
];
|
|
93
|
+
}
|
|
98
94
|
});
|
|
99
95
|
var npm_auto_publish_default = defineRdyKit({
|
|
100
96
|
fixLocation: "inline",
|
|
@@ -103,6 +99,19 @@ var npm_auto_publish_default = defineRdyKit({
|
|
|
103
99
|
function belongsInPackagesChecklist(workspace) {
|
|
104
100
|
return !workspace.isRoot || workspace.isPackage;
|
|
105
101
|
}
|
|
102
|
+
function buildSessionCheck() {
|
|
103
|
+
return {
|
|
104
|
+
name: "npm session can answer trust queries",
|
|
105
|
+
skip: () => skipIfNothingPublishable(),
|
|
106
|
+
check: () => {
|
|
107
|
+
const capability = getCachedTrustCapability();
|
|
108
|
+
return capability.ok ? { ok: true } : { ok: false, detail: capability.detail };
|
|
109
|
+
},
|
|
110
|
+
// A plain string rather than a getter, because readyup takes outcome-specific wording in `detail`, which the
|
|
111
|
+
// check above already carries.
|
|
112
|
+
fix: 'Restore a usable npm session: log in with "npm login", supplying the one-time password when prompted, or restore access to the registry, which the trusted-publisher check queries directly'
|
|
113
|
+
};
|
|
114
|
+
}
|
|
106
115
|
function buildWorkspaceCheck(workspace) {
|
|
107
116
|
const displayName = workspace.name ?? "(unnamed)";
|
|
108
117
|
const pkgJsonPath = path.join(workspace.dir, "package.json");
|
|
@@ -126,11 +135,22 @@ function buildWorkspaceCheck(workspace) {
|
|
|
126
135
|
children.push(
|
|
127
136
|
{
|
|
128
137
|
name: "published to npm",
|
|
138
|
+
// `npm view` reads the registry without a session, so a missing login or a missing one-time password leaves
|
|
139
|
+
// this answerable. An unreachable registry does not: the lookup fails for every package, and reporting that
|
|
140
|
+
// as unpublished would advise publishing a package that is already there.
|
|
141
|
+
skip: () => {
|
|
142
|
+
const auth = getCachedNpmAuthStatus();
|
|
143
|
+
return auth.status === "unreachable" ? auth.detail : false;
|
|
144
|
+
},
|
|
129
145
|
check: () => isPublishedToNpm(displayName),
|
|
130
146
|
fix: `Run "npm publish --access public" from ${workspace.dir} to bootstrap the package on npm`,
|
|
131
147
|
checks: [
|
|
132
148
|
{
|
|
133
149
|
name: "trusted publisher configured",
|
|
150
|
+
skip: () => {
|
|
151
|
+
const capability = getCachedTrustCapability();
|
|
152
|
+
return capability.ok ? false : capability.detail;
|
|
153
|
+
},
|
|
134
154
|
check: () => checkTrustedPublisher(displayName),
|
|
135
155
|
get fix() {
|
|
136
156
|
return `Run: npm trust github ${displayName} --repo ${getCachedOwnerRepo()} --file ${PUBLISH_WORKFLOW_FILE}`;
|
|
@@ -180,11 +200,7 @@ function checkProvenanceMatchesVisibility() {
|
|
|
180
200
|
return { ok: true };
|
|
181
201
|
}
|
|
182
202
|
function checkTrustedPublisher(packageName) {
|
|
183
|
-
const result =
|
|
184
|
-
runNpmJson(`npm trust list ${packageName} --json`),
|
|
185
|
-
getCachedOwnerRepo(),
|
|
186
|
-
PUBLISH_WORKFLOW_FILE
|
|
187
|
-
);
|
|
203
|
+
const result = getTrustQueryResult(packageName);
|
|
188
204
|
switch (result.status) {
|
|
189
205
|
case "configured":
|
|
190
206
|
return { ok: true };
|
|
@@ -210,6 +226,12 @@ function classifyNpmAuth(result) {
|
|
|
210
226
|
}
|
|
211
227
|
return { status: "unreachable", detail: `The npm registry query failed (${error.code}): ${error.summary}` };
|
|
212
228
|
}
|
|
229
|
+
function classifyTrustCapability(auth, probe) {
|
|
230
|
+
if (auth.status !== "authenticated") {
|
|
231
|
+
return { ok: false, detail: auth.detail };
|
|
232
|
+
}
|
|
233
|
+
return probe?.status === "unanswerable" ? { ok: false, detail: probe.detail } : { ok: true };
|
|
234
|
+
}
|
|
213
235
|
function classifyTrustQuery(result, expectedRepo, expectedFile) {
|
|
214
236
|
if (!result.exitOk) {
|
|
215
237
|
const error = readNpmError(result.stdout);
|
|
@@ -219,6 +241,15 @@ function classifyTrustQuery(result, expectedRepo, expectedFile) {
|
|
|
219
241
|
if (error.code === "E404") {
|
|
220
242
|
return { status: "not-configured" };
|
|
221
243
|
}
|
|
244
|
+
if (AUTH_ERROR_CODES.has(error.code) || error.code === OTP_ERROR_CODE) {
|
|
245
|
+
return {
|
|
246
|
+
status: "unanswerable",
|
|
247
|
+
detail: `The npm session cannot answer trust queries (${error.code}): ${error.summary}`
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
if (UNREACHABLE_ERROR_CODES.has(error.code)) {
|
|
251
|
+
return { status: "unanswerable", detail: `Cannot reach the npm registry (${error.code})` };
|
|
252
|
+
}
|
|
222
253
|
return { status: "error", detail: `The npm trust query failed (${error.code}): ${error.summary}` };
|
|
223
254
|
}
|
|
224
255
|
const relationships = readTrustRelationships(result.stdout);
|
|
@@ -252,6 +283,10 @@ var getCachedOwnerRepo = /* @__PURE__ */ (() => {
|
|
|
252
283
|
let cached;
|
|
253
284
|
return () => cached ??= getOwnerRepo();
|
|
254
285
|
})();
|
|
286
|
+
var getCachedTrustCapability = /* @__PURE__ */ (() => {
|
|
287
|
+
let cached;
|
|
288
|
+
return () => cached ??= resolveTrustCapability();
|
|
289
|
+
})();
|
|
255
290
|
function getOwnerRepo() {
|
|
256
291
|
const url = execSync("git remote get-url origin", {
|
|
257
292
|
encoding: "utf8"
|
|
@@ -266,6 +301,20 @@ function getOwnerRepo() {
|
|
|
266
301
|
}
|
|
267
302
|
throw new Error(`Cannot parse GitHub owner/repo from remote URL: ${url}`);
|
|
268
303
|
}
|
|
304
|
+
var trustQueryResults = /* @__PURE__ */ new Map();
|
|
305
|
+
function getTrustQueryResult(packageName) {
|
|
306
|
+
const cached = trustQueryResults.get(packageName);
|
|
307
|
+
if (cached !== void 0) {
|
|
308
|
+
return cached;
|
|
309
|
+
}
|
|
310
|
+
const result = classifyTrustQuery(
|
|
311
|
+
runNpmJson(`npm trust list ${packageName} --json`),
|
|
312
|
+
getCachedOwnerRepo(),
|
|
313
|
+
PUBLISH_WORKFLOW_FILE
|
|
314
|
+
);
|
|
315
|
+
trustQueryResults.set(packageName, result);
|
|
316
|
+
return result;
|
|
317
|
+
}
|
|
269
318
|
function hasTokenReferences() {
|
|
270
319
|
const workflowDir = path.resolve(process.cwd(), ".github/workflows");
|
|
271
320
|
if (!existsSync(workflowDir)) {
|
|
@@ -301,6 +350,10 @@ function isRepoPrivate() {
|
|
|
301
350
|
function parseProvenanceSetting(workflowContent) {
|
|
302
351
|
return /^[^#]*provenance:\s*['"]?true['"]?/im.test(workflowContent);
|
|
303
352
|
}
|
|
353
|
+
function probeTrustQuery() {
|
|
354
|
+
const probeName = selectProbeName();
|
|
355
|
+
return probeName === void 0 ? void 0 : getTrustQueryResult(probeName);
|
|
356
|
+
}
|
|
304
357
|
function readNpmError(stdout) {
|
|
305
358
|
let parsed;
|
|
306
359
|
try {
|
|
@@ -329,6 +382,10 @@ function readTrustRelationships(stdout) {
|
|
|
329
382
|
}
|
|
330
383
|
return "type" in parsed ? [parsed] : [];
|
|
331
384
|
}
|
|
385
|
+
function resolveTrustCapability() {
|
|
386
|
+
const auth = getCachedNpmAuthStatus();
|
|
387
|
+
return classifyTrustCapability(auth, auth.status === "authenticated" ? probeTrustQuery() : void 0);
|
|
388
|
+
}
|
|
332
389
|
function runNpmJson(command) {
|
|
333
390
|
try {
|
|
334
391
|
return { exitOk: true, stdout: execSync(command, { encoding: "utf8", stdio: "pipe" }) };
|
|
@@ -337,6 +394,11 @@ function runNpmJson(command) {
|
|
|
337
394
|
return { exitOk: false, stdout };
|
|
338
395
|
}
|
|
339
396
|
}
|
|
397
|
+
function selectProbeName() {
|
|
398
|
+
return discoverWorkspaces({ filter: (workspace) => workspace.isPackage }).find(
|
|
399
|
+
(workspace) => workspace.name !== void 0
|
|
400
|
+
)?.name;
|
|
401
|
+
}
|
|
340
402
|
function skipIfNothingPublishable() {
|
|
341
403
|
const publishable = discoverWorkspaces({ filter: (workspace) => workspace.isPackage });
|
|
342
404
|
return publishable.length > 0 ? false : "no publishable packages";
|
|
@@ -347,9 +409,11 @@ function skipIfNotPublishable(workspace) {
|
|
|
347
409
|
export {
|
|
348
410
|
buildWorkspaceCheck,
|
|
349
411
|
classifyNpmAuth,
|
|
412
|
+
classifyTrustCapability,
|
|
350
413
|
classifyTrustQuery,
|
|
351
414
|
npm_auto_publish_default as default,
|
|
352
415
|
packagesChecklist,
|
|
416
|
+
selectProbeName,
|
|
353
417
|
skipIfNotPublishable,
|
|
354
418
|
skipIfNothingPublishable
|
|
355
419
|
};
|
package/.readyup/manifest.json
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
"esbuildVersion": "0.28.2",
|
|
9
9
|
"inputs": [
|
|
10
10
|
{
|
|
11
|
-
"hash": "
|
|
11
|
+
"hash": "55ff5731",
|
|
12
12
|
"kind": "module",
|
|
13
13
|
"path": "kits/default.ts"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
|
-
"hash": "
|
|
16
|
+
"hash": "a8611365",
|
|
17
17
|
"kind": "inline",
|
|
18
18
|
"path": "../package.json",
|
|
19
19
|
"paths": [
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
],
|
|
44
44
|
"name": "default",
|
|
45
45
|
"path": "kits/default.js",
|
|
46
|
-
"readyupVersion": "0.
|
|
46
|
+
"readyupVersion": "0.36.0",
|
|
47
47
|
"source": "kits/default.ts",
|
|
48
|
-
"sourceHash": "
|
|
49
|
-
"targetHash": "
|
|
48
|
+
"sourceHash": "55ff5731",
|
|
49
|
+
"targetHash": "be5f29ad"
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
"checklists": [
|
|
@@ -56,17 +56,17 @@
|
|
|
56
56
|
"esbuildVersion": "0.28.2",
|
|
57
57
|
"inputs": [
|
|
58
58
|
{
|
|
59
|
-
"hash": "
|
|
59
|
+
"hash": "2f1fb68c",
|
|
60
60
|
"kind": "module",
|
|
61
61
|
"path": "kits/npm-auto-publish.ts"
|
|
62
62
|
}
|
|
63
63
|
],
|
|
64
64
|
"name": "npm-auto-publish",
|
|
65
65
|
"path": "kits/npm-auto-publish.js",
|
|
66
|
-
"readyupVersion": "0.
|
|
66
|
+
"readyupVersion": "0.36.0",
|
|
67
67
|
"source": "kits/npm-auto-publish.ts",
|
|
68
|
-
"sourceHash": "
|
|
69
|
-
"targetHash": "
|
|
68
|
+
"sourceHash": "2f1fb68c",
|
|
69
|
+
"targetHash": "cbabceb3"
|
|
70
70
|
}
|
|
71
71
|
]
|
|
72
72
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,67 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 10.8.0 — 2026-09-15
|
|
6
|
+
|
|
7
|
+
### 🎉 Features
|
|
8
|
+
|
|
9
|
+
- Allow the breaking marker on fix and perf commits (#818)
|
|
10
|
+
|
|
11
|
+
- Makes `release-kit prepare` bump the major version for a `fix!` or `perf!` commit under the default breaking policies, instead of reporting a policy violation and bumping only the patch version while the changelog marked the entry breaking.
|
|
12
|
+
- Corrects `docs/work-types.md` to state that a `breakingPolicies` map replaces the default policies rather than overriding individual types, and that release-kit treats every type omitted by the map as `optional`.
|
|
13
|
+
|
|
14
|
+
### 🐛 Bug fixes
|
|
15
|
+
|
|
16
|
+
- Omit the breaking marker from changelog entries whose type forbids it (#819)
|
|
17
|
+
|
|
18
|
+
- Makes the configured `breakingPolicies` map decide whether the changelog marks a commit breaking, as it already decides the version bump.
|
|
19
|
+
|
|
20
|
+
## 10.7.0 — 2026-09-15
|
|
21
|
+
|
|
22
|
+
### 🎉 Features
|
|
23
|
+
|
|
24
|
+
- Fix scaffold error handling and cover every scaffolded workflow (#806)
|
|
25
|
+
|
|
26
|
+
- Adds a `create-github-release.yaml matches template` check to release-kit's ReadyUp kit, which warns when `.github/workflows/create-github-release.yaml` differs from the template for the detected repo type and skips in a repo that has not installed that workflow.
|
|
27
|
+
- Stops `v11y init --force` from replacing an existing `.config/v11y-check.config.json` with the defaults, which discarded the repo's thresholds and the allowlist maintained by `v11y sync`.
|
|
28
|
+
|
|
29
|
+
Migration: To reset `.config/v11y-check.config.json` to its defaults, delete the file and run `v11y init`, because `v11y init --force` now overwrites only `.github/workflows/audit.yaml`.
|
|
30
|
+
|
|
31
|
+
### 🐛 Bug fixes
|
|
32
|
+
|
|
33
|
+
- Gate the trusted-publisher checks on trust-query capability (#786)
|
|
34
|
+
|
|
35
|
+
- Fixes the issue that the `npm-auto-publish` kit advised `npm trust github …` for every package when the npm session lacked the two-factor authentication that trust queries need.
|
|
36
|
+
|
|
37
|
+
- Treat label names that differ only in case as one label (#808)
|
|
38
|
+
|
|
39
|
+
- Fixes the issue that `sync-labels generate` wrote a preset's `bug` and a local `Bug` to `.github/labels.yaml` as two labels, which made the first sync fail to create the second and every later sync rename the existing label back and forth.
|
|
40
|
+
- Lets a `labels` entry change a preset label's casing: `Bug` replaces a preset's `bug` and appears in the output as `Bug`, and `Bug: null` removes it.
|
|
41
|
+
- Makes `labels` keys that differ only in case a config error that names each group, such as `'bug' and 'Bug'`, since folding them would discard all but one without any sign in the output.
|
|
42
|
+
|
|
43
|
+
Migration: Keep one of any keys in the `labels` record that differ only in case, and delete the others.
|
|
44
|
+
|
|
45
|
+
### ♻️ Refactoring
|
|
46
|
+
|
|
47
|
+
- Remove the redundant, soft-failing version read from release prepare (#811)
|
|
48
|
+
|
|
49
|
+
- Deletes `readCurrentVersion` from `release-kit`, moving into `planVersionSet` the check that a `--set-version` target exceeds the current version and recording each workspace's version in the `DependencyGraph` passed to `propagateBumps`.
|
|
50
|
+
- Stops prepare from printing a warning before it fails on an unreadable `package.json`, and replaces `failed to read current version` for a missing `version` under `--set-version` with an error from `planVersionSet` that reports the missing `version` field.
|
|
51
|
+
|
|
52
|
+
### ⚙️ Tooling
|
|
53
|
+
|
|
54
|
+
- Upgrade eslint-config-typescript to v17 and adopt its ignore lists (#797)
|
|
55
|
+
|
|
56
|
+
- Declares `vitest` as `catalog:` in every workspace that imports it, with the pnpm catalog pinning 4.1.11, because v17 no longer exempts `vitest` from `n/no-extraneous-import`.
|
|
57
|
+
- Builds the global ignores in `eslint.config.ts` from the published `commonIgnores` and `toolIgnores`, which also exclude `pnpm-lock.yaml` and each `.readyup/manifest.json`, so the `eslint --fix` in `nmr lint` can no longer rewrite a kit manifest and make the next build's `rdy verify` fail.
|
|
58
|
+
|
|
59
|
+
### 📚 Documentation
|
|
60
|
+
|
|
61
|
+
- Trim the release-kit README and move reference detail into shipped docs (#802)
|
|
62
|
+
|
|
63
|
+
- Adds `docs` to the published `files` of `@williamthorsen/release-kit` and a `!docs/*.v*.md` exclusion to both it and `@williamthorsen/nmr`, because `pnpm pack` would otherwise include the release-notes previews that a local checkout holds.
|
|
64
|
+
- Adds `--version` to the options that `release-kit --help` lists, and points the hints for the removed `releaseNotes.shouldCreateGithubRelease` field at `release-kit init` instead of the README.
|
|
65
|
+
|
|
5
66
|
## 10.6.0 — 2026-09-08
|
|
6
67
|
|
|
7
68
|
### 🎉 Features
|