@williamthorsen/release-kit 14.2.2 → 14.2.4

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.
Files changed (85) hide show
  1. package/.meta/changelog.json +88 -0
  2. package/.readyup/kits/default.js +135 -145
  3. package/.readyup/kits/npm-auto-publish.js +179 -180
  4. package/.readyup/manifest.json +31 -17
  5. package/CHANGELOG.md +35 -0
  6. package/README.md +7 -1
  7. package/dist/esm/applyChangelogOverrides.d.ts +50 -0
  8. package/dist/esm/applyChangelogOverrides.js +162 -0
  9. package/dist/esm/attachChangelogDiagnostics.d.ts +1 -1
  10. package/dist/esm/bin/release-kit.js +6 -238
  11. package/dist/esm/buildChangelogEntries.d.ts +24 -35
  12. package/dist/esm/buildChangelogEntries.js +71 -188
  13. package/dist/esm/buildChangelogItem.d.ts +58 -0
  14. package/dist/esm/buildChangelogItem.js +122 -0
  15. package/dist/esm/buildReleasedResult.d.ts +20 -0
  16. package/dist/esm/buildReleasedResult.js +78 -0
  17. package/dist/esm/changelogJsonUtils.d.ts +1 -1
  18. package/dist/esm/changelogOverrides.d.ts +29 -143
  19. package/dist/esm/changelogOverrides.js +35 -467
  20. package/dist/esm/configSchema.d.ts +225 -0
  21. package/dist/esm/configSchema.js +103 -0
  22. package/dist/esm/decideDirectReleases.d.ts +30 -0
  23. package/dist/esm/decideDirectReleases.js +66 -0
  24. package/dist/esm/defineConfig.d.ts +2 -2
  25. package/dist/esm/deriveReleaseNotesConfig.d.ts +2 -1
  26. package/dist/esm/deriveReleaseNotesConfig.js +1 -1
  27. package/dist/esm/formatPrepareFiles.d.ts +11 -0
  28. package/dist/esm/formatPrepareFiles.js +55 -0
  29. package/dist/esm/formatPrepareWarnings.d.ts +26 -0
  30. package/dist/esm/formatPrepareWarnings.js +72 -0
  31. package/dist/esm/help/initHelp.d.ts +4 -0
  32. package/dist/esm/help/initHelp.js +31 -0
  33. package/dist/esm/help/overridesHelp.d.ts +4 -0
  34. package/dist/esm/help/overridesHelp.js +32 -0
  35. package/dist/esm/help/releaseStepsHelp.d.ts +12 -0
  36. package/dist/esm/help/releaseStepsHelp.js +91 -0
  37. package/dist/esm/help/syncLabelsHelp.d.ts +8 -0
  38. package/dist/esm/help/syncLabelsHelp.js +55 -0
  39. package/dist/esm/help/usage.d.ts +2 -0
  40. package/dist/esm/help/usage.js +29 -0
  41. package/dist/esm/index.d.ts +1 -1
  42. package/dist/esm/index.js +1 -1
  43. package/dist/esm/loadChangelogOverrides.d.ts +31 -0
  44. package/dist/esm/loadChangelogOverrides.js +138 -0
  45. package/dist/esm/loadConfig.d.ts +0 -40
  46. package/dist/esm/loadConfig.js +0 -240
  47. package/dist/esm/loadValidatedConfig.d.ts +1 -1
  48. package/dist/esm/mergeConfig.d.ts +41 -0
  49. package/dist/esm/mergeConfig.js +118 -0
  50. package/dist/esm/monorepoConfigAssertions.d.ts +49 -0
  51. package/dist/esm/monorepoConfigAssertions.js +126 -0
  52. package/dist/esm/planChangelogFiles.d.ts +16 -0
  53. package/dist/esm/planChangelogFiles.js +41 -0
  54. package/dist/esm/prepareArgs.d.ts +55 -0
  55. package/dist/esm/prepareArgs.js +69 -0
  56. package/dist/esm/prepareCommand.d.ts +0 -48
  57. package/dist/esm/prepareCommand.js +6 -73
  58. package/dist/esm/prepareComposite.d.ts +16 -0
  59. package/dist/esm/prepareComposite.js +39 -0
  60. package/dist/esm/prepareRunContext.d.ts +38 -0
  61. package/dist/esm/prepareRunContext.js +39 -0
  62. package/dist/esm/prepareTarget.d.ts +2 -7
  63. package/dist/esm/prepareTarget.js +2 -118
  64. package/dist/esm/previewTagPrefixes.d.ts +1 -1
  65. package/dist/esm/releasePrepareTargets.js +13 -205
  66. package/dist/esm/reportPrepare.js +3 -125
  67. package/dist/esm/resolveCommandTags.d.ts +1 -1
  68. package/dist/esm/resolveCommandTags.js +2 -1
  69. package/dist/esm/resolveReleaseDeclaration.d.ts +2 -1
  70. package/dist/esm/resolveReleaseTargets.d.ts +2 -1
  71. package/dist/esm/resolveReleaseTargets.js +2 -1
  72. package/dist/esm/sync-labels/generateCommand.d.ts +1 -1
  73. package/dist/esm/sync-labels/resolveLabels.d.ts +1 -1
  74. package/dist/esm/topologicalSort.d.ts +12 -0
  75. package/dist/esm/topologicalSort.js +60 -0
  76. package/dist/esm/types.d.ts +1 -225
  77. package/dist/esm/types.js +1 -103
  78. package/dist/esm/validateAllChangelogOverrides.d.ts +56 -0
  79. package/dist/esm/validateAllChangelogOverrides.js +138 -0
  80. package/dist/esm/validateConfig.d.ts +1 -1
  81. package/dist/esm/validateConfig.js +7 -9
  82. package/dist/esm/validateOverridesCommand.d.ts +1 -1
  83. package/dist/esm/validateOverridesCommand.js +2 -1
  84. package/docs/changelogs.md +6 -4
  85. package/package.json +4 -4
@@ -1,4 +1,71 @@
1
1
  [
2
+ {
3
+ "version": "14.2.4",
4
+ "date": "2026-10-21",
5
+ "sections": [
6
+ {
7
+ "title": "🐛 Bug fixes",
8
+ "audience": "all",
9
+ "items": [
10
+ {
11
+ "description": "Fixes the issue that `release-kit` did not release a workspace whose files a commit changed when that commit scoped every change-record entry to other workspaces; for that workspace, the commit's title now sets the bump and the changelog item. (#1086)",
12
+ "hash": "b518414c98f4703f2adca3840577e9f2b66e0924",
13
+ "entry": 1
14
+ }
15
+ ]
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "version": "14.2.3",
21
+ "date": "2026-10-18",
22
+ "sections": [
23
+ {
24
+ "title": "🐛 Bug fixes",
25
+ "audience": "all",
26
+ "items": [
27
+ {
28
+ "description": "Fixes the issue that the manifest of the `npm-auto-publish` kit recorded a different list of checks depending on the directory from which `rdy compile` ran, by declaring one fixed check, \"Repo publishes at least one package\", under which `rdy run` builds the npm session check and the per-package rows. (#1081)",
29
+ "migration": "Upgrade `readyup` to 0.42.0 or later before running the `npm-auto-publish` kit, because the kit now declares `minReadyupVersion` 0.42.0 and an older runner refuses to load it.",
30
+ "hash": "bea0d66f5b804bf51259fa094a890af80917abca",
31
+ "entry": 1
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "title": "♻️ Refactoring",
37
+ "audience": "dev",
38
+ "items": [
39
+ {
40
+ "description": "Splits `types.ts`, `loadConfig.ts`, `changelogOverrides.ts`, and `buildChangelogEntries.ts` to bring each under the 300-line `max-lines` limit, moving the config zod schemas into `configSchema.ts`, config merging into `mergeConfig.ts`, the cross-target checks into `monorepoConfigAssertions.ts`, override parsing, application, and repo-wide validation into `loadChangelogOverrides.ts`, `applyChangelogOverrides.ts`, and `validateAllChangelogOverrides.ts`, and changelog-item construction into `buildChangelogItem.ts`. (#1067)",
41
+ "hash": "a4322d91bd32df24cdeaff4c9c36f48a76f1f5b1",
42
+ "entry": 1
43
+ },
44
+ {
45
+ "description": "Splits the `release-kit` bin, the `prepare` pipeline (`prepareCommand`, `prepareTarget`, `releasePrepareTargets`, and `reportPrepare`), and the `default` and `npm-auto-publish` readyup kits into smaller modules under `src`, `src/help`, and `.readyup/lib`, and recompiles the kit bundles without changing their check lists. (#1069)",
46
+ "hash": "723105c97c13ee85e7477f6b3073230e07ec5396",
47
+ "entry": 1
48
+ },
49
+ {
50
+ "description": "Rewrites the code that the new and widened rules in `eslint-plugin-unicorn` 78 report, mostly by changing `flatMap` callbacks to return a single value rather than a one-element array. (#1072)",
51
+ "hash": "0eef39d82b4eb46f8d55f1cefe673bc8f54ee2dd",
52
+ "entry": 2
53
+ }
54
+ ]
55
+ },
56
+ {
57
+ "title": "🧪 Tests",
58
+ "audience": "dev",
59
+ "items": [
60
+ {
61
+ "description": "Splits the `release-kit` unit tests for `releasePrepareTargets`, `reportPrepare`, `prepareCommand`, `publishCommand`, `parseCommitMessage`, and `validateConfig` into `<subject>.<aspect>.unit.test.ts` files that each stay under the `max-lines` limit, and moves the mocks and fixtures that the split files share into modules under `src/test-utils/`. (#1066)",
62
+ "hash": "0e7aa3b387d2c06c27cf09b41a164cee93b3f418",
63
+ "entry": 1
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ },
2
69
  {
3
70
  "version": "14.2.2",
4
71
  "date": "2026-10-17",
@@ -133,6 +200,17 @@
133
200
  }
134
201
  ]
135
202
  },
203
+ {
204
+ "title": "🏗️ Internal features",
205
+ "audience": "dev",
206
+ "items": [
207
+ {
208
+ "description": "Resolve package roots past dual-format marker manifests (#1016)",
209
+ "body": "Replaces nmr-core's hand-written package-root and version lookups with `findPackageRoot` and `resolveSelfVersion` re-exported from `@williamthorsen/toolbelt.packaging`, which pass over the `{\"type\": \"commonjs\"}` marker manifest of a dual-format layout to reach the package that declares a `name`. `nmr`, `release-kit`, and `v11y-check` switch from `readPackageVersion` to `resolveSelfVersion`, and the boundary guard now holds `toolbelt.packaging`, like `toolbelt.terminal`, to a single importer and a single declarer in nmr-core.",
210
+ "hash": "ff6627180d9e86d083656afb2c09a3fb190fc79d"
211
+ }
212
+ ]
213
+ },
136
214
  {
137
215
  "title": "♻️ Refactoring",
138
216
  "audience": "dev",
@@ -184,6 +262,16 @@
184
262
  "description": "Makes `release-kit prepare` refuse, before it writes any file and in a dry run too, to release a publishable package that npm does not list or that it cannot look up, and prints `npm publish --access public` as the fix for each unlisted package. (#996)",
185
263
  "hash": "7b8b6d67b264af56dff761d0bf987eca8bc2f934",
186
264
  "entry": 1
265
+ },
266
+ {
267
+ "description": "Let a calling repo choose the runner of the reusable workflows (#997)",
268
+ "body": "Makes the reusable `audit`, `create-github-release`, `release`, and `sync-labels` workflows run their jobs on the runner named by the calling repository's `CI_RUNS_ON` configuration variable, such as a self-hosted runner, and keeps `ubuntu-latest` as the default when the variable is unset. Leaves the reusable `publish` workflow on `ubuntu-latest`, because npm generates provenance only on GitHub-hosted runners.",
269
+ "hash": "91573eec402f4028b766684be84c33e8739513ce"
270
+ },
271
+ {
272
+ "description": "Keep undeclared repo labels and warn about each (#1002)",
273
+ "body": "Changes the reusable sync-labels workflow to keep each repository label that `.github/labels.yaml` does not declare, rather than delete it, and to report each such label as a warning annotation on the run and on the pull request's check. A label created by hand now stays in place across syncs until the file declares it or it is deleted with `gh label delete <name>`.",
274
+ "hash": "f696a4f92064a5f2993e8bcbb6764762f161ec9d"
187
275
  }
188
276
  ]
189
277
  },
@@ -1,24 +1,20 @@
1
1
  /** @noformat -- @generated. Do not edit. Compiled by rdy. */
2
2
  /* eslint-disable */
3
- export const __readyupVersion = "0.41.0";
3
+ export const __readyupVersion = "0.42.0";
4
4
 
5
5
 
6
6
  // .readyup/kits/default.ts
7
7
  import { defineRdyKit } from "readyup";
8
8
  import {
9
- discoverWorkspaces,
9
+ discoverWorkspaces as discoverWorkspaces3,
10
10
  fileContains,
11
11
  fileDoesNotContain,
12
12
  fileExists,
13
13
  fileMatchesHash,
14
14
  hasDevDependency,
15
- hasMinDevDependencyVersion,
16
- readFile
15
+ hasMinDevDependencyVersion
17
16
  } from "readyup/check-utils";
18
17
 
19
- // src/changelogArchive.ts
20
- var CHANGELOG_ARCHIVE_DIRECTORY = "changelogs";
21
-
22
18
  // src/init/detectRepoType.ts
23
19
  import { existsSync, readFileSync } from "node:fs";
24
20
 
@@ -53,6 +49,12 @@ function detectRepoType() {
53
49
  return "single-package";
54
50
  }
55
51
 
52
+ // .readyup/lib/changelog-checks.ts
53
+ import { discoverWorkspaces, readFile } from "readyup/check-utils";
54
+
55
+ // src/changelogArchive.ts
56
+ var CHANGELOG_ARCHIVE_DIRECTORY = "changelogs";
57
+
56
58
  // src/packsPath.ts
57
59
  function packsPath(filesField, path) {
58
60
  if (!isStringArray(filesField)) return true;
@@ -99,24 +101,128 @@ function translateGlob(pattern) {
99
101
  return source;
100
102
  }
101
103
 
102
- // .readyup/kits/default.ts
103
- function getMinVersion() {
104
- const picked = { "version": "14.2.2" };
105
- if (typeof picked["version"] !== "string") {
106
- throw new TypeError("release-kit/package.json: 'version' must be a string");
107
- }
108
- return picked["version"];
104
+ // .readyup/lib/changelog-checks.ts
105
+ function changelogArchivesAreEnabled() {
106
+ const content = readFile(".config/release-kit.config.ts");
107
+ if (content === void 0) return false;
108
+ return /changelogMarkdown\s*:\s*\{[^}]*keepVersions\s*:/.test(content);
109
109
  }
110
- function hasPublishablePackages() {
111
- return discoverWorkspaces({ filter: (w) => w.isPackage }).length > 0;
110
+ function changelogJsonIsEnabled() {
111
+ const content = readFile(".config/release-kit.config.ts");
112
+ if (content === void 0) return true;
113
+ return !/changelogJson\s*:\s*\{[^}]*enabled\s*:\s*false/.test(content);
112
114
  }
113
115
  var DEFAULT_CHANGELOG_JSON_PATH = ".meta/changelog.json";
116
+ function packagesShipChangelog() {
117
+ return reportWorkspacesOmitting("CHANGELOG.md");
118
+ }
119
+ function packagesShipChangelogArchives() {
120
+ return reportWorkspacesOmitting(`${CHANGELOG_ARCHIVE_DIRECTORY}/CHANGELOG-v1.md`, `${CHANGELOG_ARCHIVE_DIRECTORY}/`);
121
+ }
122
+ function packagesShipChangelogJson() {
123
+ return reportWorkspacesOmitting(resolveChangelogJsonOutputPath());
124
+ }
125
+ function resolveChangelogJsonOutputPath() {
126
+ const content = readFile(".config/release-kit.config.ts");
127
+ if (content === void 0) return DEFAULT_CHANGELOG_JSON_PATH;
128
+ const match = /changelogJson\s*:\s*\{[^}]*outputPath\s*:\s*['"]([^'"]+)['"]/.exec(content);
129
+ return match?.[1] ?? DEFAULT_CHANGELOG_JSON_PATH;
130
+ }
131
+ function reportWorkspacesOmitting(path, label = path) {
132
+ const failing = [];
133
+ const packageWorkspaces = discoverWorkspaces({ filter: (w) => w.isPackage });
134
+ for (const { dir, packageJson } of packageWorkspaces) {
135
+ if (!packsPath(packageJson["files"], path)) {
136
+ failing.push(dir === "." ? "package.json" : `${dir}/package.json`);
137
+ }
138
+ }
139
+ if (failing.length === 0) return true;
140
+ return {
141
+ ok: false,
142
+ detail: `files field omits ${label}: ${failing.join(", ")}`
143
+ };
144
+ }
145
+
146
+ // .readyup/lib/config-checks.ts
147
+ import { discoverWorkspaces as discoverWorkspaces2, readFile as readFile2 } from "readyup/check-utils";
114
148
  var CONFIG_EXPORT_PATTERNS = [
115
149
  /export\s+default\b/,
116
150
  /export\s+(?:const|let|var)\s+config\b/,
117
151
  /export\s*\{[^}]*\b(?:config|default)\b[^}]*\}/,
118
152
  /export\s*\*/
119
153
  ];
154
+ function configFileExportsConfig() {
155
+ const content = readFile2(".config/release-kit.config.ts");
156
+ if (content === void 0) return false;
157
+ return CONFIG_EXPORT_PATTERNS.some((pattern) => pattern.test(content));
158
+ }
159
+ function labelsHaveCurrentPresetHash(presetName, expectedHash) {
160
+ const content = readFile2(".github/labels.yaml");
161
+ if (content === void 0) return false;
162
+ const pattern = new RegExp(`^# ${presetName} preset hash: (.+)$`, "m");
163
+ const match = pattern.exec(content);
164
+ return match !== null && match[1] === expectedHash;
165
+ }
166
+ function readmeHasReleaseNotesMarkers(content) {
167
+ return content.includes("<!-- section:release-notes -->") && content.includes("<!-- /section:release-notes -->");
168
+ }
169
+ function readmesHaveReleaseNotesMarkers() {
170
+ const failing = [];
171
+ const packageWorkspaces = discoverWorkspaces2({ filter: (w) => w.isPackage });
172
+ for (const { dir } of packageWorkspaces) {
173
+ const readmePath = dir === "." ? "README.md" : `${dir}/README.md`;
174
+ const content = readFile2(readmePath);
175
+ if (content === void 0 || !readmeHasReleaseNotesMarkers(content)) {
176
+ failing.push(readmePath);
177
+ }
178
+ }
179
+ if (failing.length === 0) return true;
180
+ return {
181
+ ok: false,
182
+ detail: `missing markers or README: ${failing.join(", ")}`
183
+ };
184
+ }
185
+ function releaseNotesConfigIsConsistent() {
186
+ const content = readFile2(".config/release-kit.config.ts");
187
+ if (content === void 0) return true;
188
+ const changelogJsonDisabled = /changelogJson\s*:\s*\{[^}]*enabled\s*:\s*false/.test(content);
189
+ if (!changelogJsonDisabled) return true;
190
+ const hasReadmeInjection = /shouldInjectIntoReadme\s*:\s*true/.test(content);
191
+ return !hasReadmeInjection;
192
+ }
193
+ function releaseNotesInjectsIntoReadme() {
194
+ const content = readFile2(".config/release-kit.config.ts");
195
+ if (content === void 0) return false;
196
+ return /shouldInjectIntoReadme\s*:\s*true/.test(content);
197
+ }
198
+ function scopeLabelsHaveNoDescriptions() {
199
+ const content = readFile2(".github/labels.yaml");
200
+ if (content === void 0) return true;
201
+ const described = [];
202
+ let currentName;
203
+ for (const line of content.split("\n")) {
204
+ const nameMatch = /^- name:\s*(.*?)\s*$/.exec(line);
205
+ if (nameMatch) {
206
+ currentName = stripYamlQuotes(nameMatch[1] ?? "");
207
+ continue;
208
+ }
209
+ const descriptionMatch = /^\s+description:\s*(.*?)\s*$/.exec(line);
210
+ if (descriptionMatch && currentName?.startsWith("scope:") && stripYamlQuotes(descriptionMatch[1] ?? "") !== "") {
211
+ described.push(currentName);
212
+ }
213
+ }
214
+ if (described.length === 0) return true;
215
+ return {
216
+ ok: false,
217
+ detail: `scope labels with a description: ${described.join(", ")}`
218
+ };
219
+ }
220
+ function stripYamlQuotes(value) {
221
+ const match = /^(['"])(.*)\1$/.exec(value);
222
+ return match?.[2] ?? value;
223
+ }
224
+
225
+ // .readyup/lib/workflow-hashes.ts
120
226
  var COMMON_PRESET_HASH = "1d3e2df1ccd7deea4707fa07a4ae171d761344b65c1a311467fc0f66b70ee646";
121
227
  var SYNC_LABELS_WORKFLOW_HASH = "0a88829d154c0de7cdd4246fede99e9311a89ab4199034dbe601663d641ab1e4";
122
228
  var RELEASE_WORKFLOW_HASH_MONOREPO = "f63f4cabb57f94ee6550f17a9874c7a346d46554595ddbcd46fdd3208d613437";
@@ -125,6 +231,18 @@ var PUBLISH_WORKFLOW_HASH_MONOREPO = "0afa9ffe914f3dc8f043e68252ebc604c8cc1a9534
125
231
  var PUBLISH_WORKFLOW_HASH_SINGLE = "6f31183e0a1e66be791a19266c3b028dadbd9fe010f7fc4452f3f8970c937b43";
126
232
  var CREATE_GITHUB_RELEASE_WORKFLOW_HASH_MONOREPO = "c455d88c93d855737c96079945ff729a9d094f846519c24afbefe83a425c1d7f";
127
233
  var CREATE_GITHUB_RELEASE_WORKFLOW_HASH_SINGLE = "f595831ff28f8b3a01d97e6cb0cfe100262f7a8821091c6c458b0c0224cebba8";
234
+
235
+ // .readyup/kits/default.ts
236
+ function getMinVersion() {
237
+ const picked = { "version": "14.2.4" };
238
+ if (typeof picked["version"] !== "string") {
239
+ throw new TypeError("release-kit/package.json: 'version' must be a string");
240
+ }
241
+ return picked["version"];
242
+ }
243
+ function hasPublishablePackages() {
244
+ return discoverWorkspaces3({ filter: (w) => w.isPackage }).length > 0;
245
+ }
128
246
  var default_default = defineRdyKit({
129
247
  checklists: [
130
248
  {
@@ -355,134 +473,6 @@ var default_default = defineRdyKit({
355
473
  }
356
474
  ]
357
475
  });
358
- function changelogArchivesAreEnabled() {
359
- const content = readFile(".config/release-kit.config.ts");
360
- if (content === void 0) return false;
361
- return /changelogMarkdown\s*:\s*\{[^}]*keepVersions\s*:/.test(content);
362
- }
363
- function changelogJsonIsEnabled() {
364
- const content = readFile(".config/release-kit.config.ts");
365
- if (content === void 0) return true;
366
- return !/changelogJson\s*:\s*\{[^}]*enabled\s*:\s*false/.test(content);
367
- }
368
- function configFileExportsConfig() {
369
- const content = readFile(".config/release-kit.config.ts");
370
- if (content === void 0) return false;
371
- return CONFIG_EXPORT_PATTERNS.some((pattern) => pattern.test(content));
372
- }
373
- function labelsHaveCurrentPresetHash(presetName, expectedHash) {
374
- const content = readFile(".github/labels.yaml");
375
- if (content === void 0) return false;
376
- const pattern = new RegExp(`^# ${presetName} preset hash: (.+)$`, "m");
377
- const match = pattern.exec(content);
378
- return match !== null && match[1] === expectedHash;
379
- }
380
- function packagesShipChangelog() {
381
- return reportWorkspacesOmitting("CHANGELOG.md");
382
- }
383
- function packagesShipChangelogArchives() {
384
- return reportWorkspacesOmitting(`${CHANGELOG_ARCHIVE_DIRECTORY}/CHANGELOG-v1.md`, `${CHANGELOG_ARCHIVE_DIRECTORY}/`);
385
- }
386
- function packagesShipChangelogJson() {
387
- return reportWorkspacesOmitting(resolveChangelogJsonOutputPath());
388
- }
389
- function readmeHasReleaseNotesMarkers(content) {
390
- return content.includes("<!-- section:release-notes -->") && content.includes("<!-- /section:release-notes -->");
391
- }
392
- function readmesHaveReleaseNotesMarkers() {
393
- const failing = [];
394
- const packageWorkspaces = discoverWorkspaces({ filter: (w) => w.isPackage });
395
- for (const { dir } of packageWorkspaces) {
396
- const readmePath = dir === "." ? "README.md" : `${dir}/README.md`;
397
- const content = readFile(readmePath);
398
- if (content === void 0 || !readmeHasReleaseNotesMarkers(content)) {
399
- failing.push(readmePath);
400
- }
401
- }
402
- if (failing.length === 0) return true;
403
- return {
404
- ok: false,
405
- detail: `missing markers or README: ${failing.join(", ")}`
406
- };
407
- }
408
- function releaseNotesConfigIsConsistent() {
409
- const content = readFile(".config/release-kit.config.ts");
410
- if (content === void 0) return true;
411
- const changelogJsonDisabled = /changelogJson\s*:\s*\{[^}]*enabled\s*:\s*false/.test(content);
412
- if (!changelogJsonDisabled) return true;
413
- const hasReadmeInjection = /shouldInjectIntoReadme\s*:\s*true/.test(content);
414
- return !hasReadmeInjection;
415
- }
416
- function releaseNotesInjectsIntoReadme() {
417
- const content = readFile(".config/release-kit.config.ts");
418
- if (content === void 0) return false;
419
- return /shouldInjectIntoReadme\s*:\s*true/.test(content);
420
- }
421
- function reportWorkspacesOmitting(path, label = path) {
422
- const failing = [];
423
- const packageWorkspaces = discoverWorkspaces({ filter: (w) => w.isPackage });
424
- for (const { dir, packageJson } of packageWorkspaces) {
425
- if (!packsPath(packageJson["files"], path)) {
426
- failing.push(dir === "." ? "package.json" : `${dir}/package.json`);
427
- }
428
- }
429
- if (failing.length === 0) return true;
430
- return {
431
- ok: false,
432
- detail: `files field omits ${label}: ${failing.join(", ")}`
433
- };
434
- }
435
- function resolveChangelogJsonOutputPath() {
436
- const content = readFile(".config/release-kit.config.ts");
437
- if (content === void 0) return DEFAULT_CHANGELOG_JSON_PATH;
438
- const match = /changelogJson\s*:\s*\{[^}]*outputPath\s*:\s*['"]([^'"]+)['"]/.exec(content);
439
- return match?.[1] ?? DEFAULT_CHANGELOG_JSON_PATH;
440
- }
441
- function scopeLabelsHaveNoDescriptions() {
442
- const content = readFile(".github/labels.yaml");
443
- if (content === void 0) return true;
444
- const described = [];
445
- let currentName;
446
- for (const line of content.split("\n")) {
447
- const nameMatch = /^- name:\s*(.*?)\s*$/.exec(line);
448
- if (nameMatch) {
449
- currentName = stripYamlQuotes(nameMatch[1] ?? "");
450
- continue;
451
- }
452
- const descriptionMatch = /^\s+description:\s*(.*?)\s*$/.exec(line);
453
- if (descriptionMatch && currentName?.startsWith("scope:") && stripYamlQuotes(descriptionMatch[1] ?? "") !== "") {
454
- described.push(currentName);
455
- }
456
- }
457
- if (described.length === 0) return true;
458
- return {
459
- ok: false,
460
- detail: `scope labels with a description: ${described.join(", ")}`
461
- };
462
- }
463
- function stripYamlQuotes(value) {
464
- const match = /^(['"])(.*)\1$/.exec(value);
465
- return match?.[2] ?? value;
466
- }
467
476
  export {
468
- COMMON_PRESET_HASH,
469
- CREATE_GITHUB_RELEASE_WORKFLOW_HASH_MONOREPO,
470
- CREATE_GITHUB_RELEASE_WORKFLOW_HASH_SINGLE,
471
- DEFAULT_CHANGELOG_JSON_PATH,
472
- PUBLISH_WORKFLOW_HASH_MONOREPO,
473
- PUBLISH_WORKFLOW_HASH_SINGLE,
474
- RELEASE_WORKFLOW_HASH_MONOREPO,
475
- RELEASE_WORKFLOW_HASH_SINGLE,
476
- SYNC_LABELS_WORKFLOW_HASH,
477
- changelogArchivesAreEnabled,
478
- changelogJsonIsEnabled,
479
- configFileExportsConfig,
480
- default_default as default,
481
- packagesShipChangelog,
482
- packagesShipChangelogArchives,
483
- packagesShipChangelogJson,
484
- readmeHasReleaseNotesMarkers,
485
- readmesHaveReleaseNotesMarkers,
486
- resolveChangelogJsonOutputPath,
487
- scopeLabelsHaveNoDescriptions
477
+ default_default as default
488
478
  };