@williamthorsen/release-kit 10.4.4 → 10.5.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.
Files changed (93) hide show
  1. package/.readyup/kits/default.js +10 -3
  2. package/.readyup/kits/npm-auto-publish.js +11 -3
  3. package/.readyup/manifest.json +11 -11
  4. package/CHANGELOG.md +20 -0
  5. package/README.md +10 -2
  6. package/dist/esm/assertCleanWorkingTree.d.ts +5 -0
  7. package/dist/esm/buildChangelogEntries.d.ts +22 -0
  8. package/dist/esm/buildDependencyGraph.d.ts +16 -0
  9. package/dist/esm/buildEmptyReleaseEntry.d.ts +8 -0
  10. package/dist/esm/buildReleaseSummary.d.ts +10 -0
  11. package/dist/esm/buildSyntheticChangelogEntry.d.ts +6 -0
  12. package/dist/esm/bumpVersion.d.ts +8 -0
  13. package/dist/esm/changelogJsonFile.d.ts +11 -0
  14. package/dist/esm/changelogJsonUtils.d.ts +16 -0
  15. package/dist/esm/changelogOverrides.d.ts +143 -0
  16. package/dist/esm/checkWorkTypesDrift.d.ts +25 -0
  17. package/dist/esm/collectPolicyViolations.d.ts +9 -0
  18. package/dist/esm/commitCommand.d.ts +6 -0
  19. package/dist/esm/compareVersions.d.ts +7 -0
  20. package/dist/esm/createGithubRelease.d.ts +30 -0
  21. package/dist/esm/createGithubReleaseCommand.d.ts +7 -0
  22. package/dist/esm/createTags.d.ts +5 -0
  23. package/dist/esm/decideRelease.d.ts +37 -0
  24. package/dist/esm/defaults.d.ts +25 -0
  25. package/dist/esm/defineConfig.d.ts +9 -0
  26. package/dist/esm/deleteFileIfExists.d.ts +1 -0
  27. package/dist/esm/deriveWorkspaceConfig.d.ts +9 -0
  28. package/dist/esm/detectPackageManager.d.ts +6 -0
  29. package/dist/esm/detectUndeclaredTagPrefixes.d.ts +18 -0
  30. package/dist/esm/determineBumpFromCommits.d.ts +5 -0
  31. package/dist/esm/determineBumpType.d.ts +12 -0
  32. package/dist/esm/discoverWorkspaces.d.ts +12 -0
  33. package/dist/esm/format.d.ts +3 -0
  34. package/dist/esm/formatPrivateSkip.d.ts +6 -0
  35. package/dist/esm/generateChangelogs.d.ts +25 -0
  36. package/dist/esm/getCommitsSinceTarget.d.ts +16 -0
  37. package/dist/esm/hasPrettierConfig.d.ts +6 -0
  38. package/dist/esm/help/prepareHelp.d.ts +6 -0
  39. package/dist/esm/init/checks.d.ts +4 -0
  40. package/dist/esm/init/detectRepoType.d.ts +7 -0
  41. package/dist/esm/init/initCommand.d.ts +6 -0
  42. package/dist/esm/init/parseJsonRecord.d.ts +4 -0
  43. package/dist/esm/init/scaffold.d.ts +3 -1
  44. package/dist/esm/init/templates.d.ts +13 -0
  45. package/dist/esm/injectReleaseNotesIntoReadme.d.ts +39 -0
  46. package/dist/esm/injectSection.d.ts +6 -0
  47. package/dist/esm/loadConfig.d.ts +46 -0
  48. package/dist/esm/loadValidatedConfig.d.ts +8 -0
  49. package/dist/esm/parseCommitMessage.d.ts +42 -0
  50. package/dist/esm/parseRequestedTags.d.ts +7 -0
  51. package/dist/esm/planReleaseNotesPreviews.d.ts +20 -0
  52. package/dist/esm/planVersionBump.d.ts +12 -0
  53. package/dist/esm/prepareCommand.d.ts +10 -0
  54. package/dist/esm/previewTagPrefixes.d.ts +21 -1
  55. package/dist/esm/propagateBumps.d.ts +15 -0
  56. package/dist/esm/publish.d.ts +1 -0
  57. package/dist/esm/publishCommand.d.ts +4 -0
  58. package/dist/esm/pushCommand.d.ts +4 -0
  59. package/dist/esm/pushRelease.d.ts +6 -0
  60. package/dist/esm/readCurrentVersion.d.ts +1 -0
  61. package/dist/esm/releaseFiles.d.ts +22 -0
  62. package/dist/esm/releasePlan.d.ts +23 -0
  63. package/dist/esm/releasePrepare.d.ts +40 -0
  64. package/dist/esm/releasePrepareMono.d.ts +8 -0
  65. package/dist/esm/releasePrepareProject.d.ts +42 -0
  66. package/dist/esm/renderChangelogMarkdown.d.ts +17 -0
  67. package/dist/esm/renderReleaseNotes.d.ts +25 -0
  68. package/dist/esm/reportPrepare.d.ts +14 -0
  69. package/dist/esm/resolveCliffConfigPath.d.ts +10 -0
  70. package/dist/esm/resolveCommandTags.d.ts +13 -1
  71. package/dist/esm/resolveReleaseNotesConfig.d.ts +14 -0
  72. package/dist/esm/resolveReleaseTags.d.ts +22 -0
  73. package/dist/esm/runGitCliff.d.ts +43 -0
  74. package/dist/esm/showTagPrefixesCommand.d.ts +11 -0
  75. package/dist/esm/stripScope.d.ts +7 -0
  76. package/dist/esm/sync-labels/generateCommand.d.ts +17 -0
  77. package/dist/esm/sync-labels/initCommand.d.ts +9 -0
  78. package/dist/esm/sync-labels/presets.d.ts +6 -0
  79. package/dist/esm/sync-labels/resolveLabels.d.ts +10 -0
  80. package/dist/esm/sync-labels/retiredConfig.d.ts +8 -0
  81. package/dist/esm/sync-labels/syncCommand.d.ts +6 -0
  82. package/dist/esm/sync-labels/templates.d.ts +14 -0
  83. package/dist/esm/sync-labels/types.d.ts +4 -0
  84. package/dist/esm/syncWorkTypes.d.ts +18 -0
  85. package/dist/esm/tagCommand.d.ts +1 -0
  86. package/dist/esm/typeGuards.d.ts +2 -0
  87. package/dist/esm/types.d.ts +293 -0
  88. package/dist/esm/validateConfig.d.ts +14 -1
  89. package/dist/esm/validateOnlyExcludesStrandedDependents.d.ts +21 -0
  90. package/dist/esm/validateOverridesCommand.d.ts +30 -0
  91. package/dist/esm/workTypesData.d.ts +27 -0
  92. package/dist/esm/workTypesUtils.d.ts +17 -0
  93. package/package.json +8 -8
@@ -1,3 +1,17 @@
1
+ /**
2
+ * Canonical work-types data — runtime mirror of `work-types.json`.
3
+ *
4
+ * `work-types.json` is the canonical SSOT for the taxonomy and is the file
5
+ * `release-kit work-types check` / `:sync` operate on. This `.ts` mirror exists for
6
+ * runtime consumption: ESM JSON imports require an `import attributes` clause that
7
+ * esbuild's `bundle: false` mode strips, so a plain TS module is the most reliable way
8
+ * to ship the data to consumers.
9
+ *
10
+ * A drift test (`workTypesData.unit.test.ts`) asserts that this constant deep-equals the
11
+ * parsed contents of `work-types.json`. To change the taxonomy, edit BOTH files (or run
12
+ * `nmr work-types:sync` to pull from upstream).
13
+ */
14
+ /** Schema for a single entry. */
1
15
  export interface WorkTypeEntry {
2
16
  tier: string;
3
17
  key: string;
@@ -7,16 +21,29 @@ export interface WorkTypeEntry {
7
21
  breakingPolicy: 'forbidden' | 'optional' | 'required';
8
22
  excludedFromChangelog?: boolean;
9
23
  }
24
+ /**
25
+ * Schema for an orthogonal section marker (e.g., breaking-changes indicator).
26
+ *
27
+ * Stored as plain text — consumers add formatting (bold, prefix punctuation) when
28
+ * constructing the rendered form. Keeps the SSOT format-agnostic across Markdown,
29
+ * HTML, terminal, and plain-text consumers.
30
+ */
10
31
  export interface MarkerEntry {
11
32
  emoji: string;
12
33
  label: string;
13
34
  }
35
+ /** Schema for the full data. */
14
36
  export interface WorkTypesData {
15
37
  tiers: string[];
16
38
  types: WorkTypeEntry[];
39
+ /**
40
+ * Cross-cutting section markers keyed by marker name. The `breaking` marker is
41
+ * canonical and required; additional keys are permitted for forward-compatibility.
42
+ */
17
43
  markers: {
18
44
  [key: string]: MarkerEntry;
19
45
  breaking: MarkerEntry;
20
46
  };
21
47
  }
48
+ /** Canonical work-types data, kept in lockstep with `work-types.json`. */
22
49
  export declare const WORK_TYPES_DATA: WorkTypesData;
@@ -1,5 +1,22 @@
1
+ /**
2
+ * Shared helpers for the work-types canonical-source tooling.
3
+ *
4
+ * Both `checkWorkTypesDrift` and `syncWorkTypes` need to validate the upstream JSON's top-level
5
+ * shape and render unknown errors as strings. Keeping a single copy here avoids byte-for-byte
6
+ * duplication between the two entry points.
7
+ */
8
+ /** Sanity-check that the parsed upstream JSON carries the expected top-level shape. */
1
9
  export declare function hasExpectedTopLevelShape(value: unknown): value is {
2
10
  tiers: unknown[];
3
11
  types: unknown[];
4
12
  };
13
+ /**
14
+ * Build the `init` argument for `fetch` to reach codeassembly's canonical work-types files.
15
+ *
16
+ * Returns `{ headers: { Authorization: 'Bearer <token>' } }` when `GITHUB_TOKEN` is set in the
17
+ * environment; returns `undefined` otherwise so the call site stays byte-identical to an
18
+ * unauthenticated request. Centralised here so `checkWorkTypesDrift` and `syncWorkTypes`
19
+ * cannot diverge on auth handling. Tests stub the env via `vi.stubEnv` rather than parameter
20
+ * injection, so this reads `process.env` directly.
21
+ */
5
22
  export declare function buildFetchInit(): RequestInit | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@williamthorsen/release-kit",
3
- "version": "10.4.4",
3
+ "version": "10.5.0",
4
4
  "description": "Version-bumping and changelog-generation toolkit for release workflows",
5
5
  "keywords": [
6
6
  "changelog",
@@ -48,20 +48,20 @@
48
48
  "CHANGELOG.md"
49
49
  ],
50
50
  "dependencies": {
51
- "@williamthorsen/toolbelt.errors": "0.6.1",
51
+ "@williamthorsen/nmr-core": "0.10.4",
52
+ "@williamthorsen/toolbelt.errors": "0.6.3",
52
53
  "glob": "13.0.6",
53
54
  "json-stringify-pretty-compact": "4.0.0",
54
55
  "semver": "7.8.5",
55
56
  "yaml": "2.9.0",
56
- "zod": "4.4.3",
57
- "@williamthorsen/nmr-core": "0.10.3"
57
+ "zod": "4.4.3"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/semver": "7.8.0",
61
- "@williamthorsen/toolbelt.filesystem": "0.8.0",
62
- "@williamthorsen/toolbelt.testing": "0.4.0",
63
- "@williamthorsen/toolbelt.vitest": "0.6.0",
64
- "readyup": "0.32.0",
61
+ "@williamthorsen/toolbelt.filesystem": "0.8.2",
62
+ "@williamthorsen/toolbelt.testing": "0.5.0",
63
+ "@williamthorsen/toolbelt.vitest": "0.8.0",
64
+ "readyup": "0.35.0",
65
65
  "smol-toml": "1.8.0"
66
66
  },
67
67
  "engines": {