@williamthorsen/release-kit 18.1.1 → 18.3.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 (95) hide show
  1. package/.meta/changelog.json +150 -0
  2. package/.readyup/kits/default.js +596 -32
  3. package/.readyup/kits/npm-auto-publish.js +1 -1
  4. package/.readyup/manifest.json +55 -33
  5. package/CHANGELOG.md +44 -0
  6. package/README.md +19 -2
  7. package/dist/esm/assertCleanWorkingTree.d.ts +2 -1
  8. package/dist/esm/assertCleanWorkingTree.js +4 -8
  9. package/dist/esm/assertReleasesOnNpm.js +2 -9
  10. package/dist/esm/assertTarballsComplete.js +2 -9
  11. package/dist/esm/buildChangelogEntries.d.ts +5 -3
  12. package/dist/esm/buildChangelogEntries.js +9 -4
  13. package/dist/esm/buildChangelogItem.d.ts +1 -1
  14. package/dist/esm/buildDependencyGraph.js +2 -16
  15. package/dist/esm/buildReleasedResult.d.ts +15 -3
  16. package/dist/esm/buildReleasedResult.js +23 -2
  17. package/dist/esm/changelogJsonFile.d.ts +3 -2
  18. package/dist/esm/changelogJsonFile.js +14 -17
  19. package/dist/esm/changelogJsonUtils.d.ts +22 -2
  20. package/dist/esm/changelogJsonUtils.js +19 -10
  21. package/dist/esm/cli/maintenanceCommands.js +1 -1
  22. package/dist/esm/commitCommand.d.ts +2 -1
  23. package/dist/esm/commitCommand.js +8 -11
  24. package/dist/esm/configSchema.d.ts +3 -1
  25. package/dist/esm/configSchema.js +1 -0
  26. package/dist/esm/createGithubRelease.d.ts +13 -10
  27. package/dist/esm/createGithubRelease.js +9 -13
  28. package/dist/esm/createGithubReleaseCommand.d.ts +1 -1
  29. package/dist/esm/createGithubReleaseCommand.js +25 -3
  30. package/dist/esm/createTags.d.ts +2 -1
  31. package/dist/esm/createTags.js +12 -12
  32. package/dist/esm/decideDirectReleases.d.ts +2 -1
  33. package/dist/esm/decideDirectReleases.js +5 -5
  34. package/dist/esm/decideRelease.d.ts +1 -1
  35. package/dist/esm/defaults.d.ts +4 -2
  36. package/dist/esm/defaults.js +1 -0
  37. package/dist/esm/deriveDirectoryConfig.js +5 -4
  38. package/dist/esm/deriveWorkspaceConfig.js +2 -9
  39. package/dist/esm/detectUndeclaredTagPrefixes.d.ts +2 -1
  40. package/dist/esm/detectUndeclaredTagPrefixes.js +4 -13
  41. package/dist/esm/determineBumpType.d.ts +2 -1
  42. package/dist/esm/determineBumpType.js +5 -0
  43. package/dist/esm/enumerateReleaseWindows.d.ts +3 -11
  44. package/dist/esm/enumerateReleaseWindows.js +17 -60
  45. package/dist/esm/findUnroutedEntryScopes.d.ts +1 -1
  46. package/dist/esm/git.d.ts +61 -0
  47. package/dist/esm/git.js +101 -0
  48. package/dist/esm/init/checks.d.ts +2 -1
  49. package/dist/esm/init/checks.js +5 -10
  50. package/dist/esm/init/eligibility.d.ts +12 -0
  51. package/dist/esm/init/eligibility.js +50 -0
  52. package/dist/esm/init/initCommand.d.ts +0 -2
  53. package/dist/esm/init/initCommand.js +4 -45
  54. package/dist/esm/init/managed-workflows.d.ts +10 -0
  55. package/dist/esm/init/managed-workflows.js +18 -0
  56. package/dist/esm/init/templates.js +2 -2
  57. package/dist/esm/init/updateTemplatesCommand.js +9 -42
  58. package/dist/esm/injectReleaseNotesIntoReadme.d.ts +29 -7
  59. package/dist/esm/injectReleaseNotesIntoReadme.js +13 -21
  60. package/dist/esm/loadConfig.js +3 -16
  61. package/dist/esm/mergeConfig.d.ts +2 -1
  62. package/dist/esm/packFromCleanCheckout.js +3 -9
  63. package/dist/esm/planVersionBump.js +2 -16
  64. package/dist/esm/prepareCommand.js +2 -1
  65. package/dist/esm/prepareComposite.js +1 -1
  66. package/dist/esm/prepareReleaseTargets.d.ts +2 -1
  67. package/dist/esm/prepareReleaseTargets.js +3 -2
  68. package/dist/esm/prepareRunContext.d.ts +2 -0
  69. package/dist/esm/prepareTarget.d.ts +6 -4
  70. package/dist/esm/prepareTarget.js +9 -3
  71. package/dist/esm/previewTagPrefixes.d.ts +9 -2
  72. package/dist/esm/previewTagPrefixes.js +22 -22
  73. package/dist/esm/publishCommand.d.ts +1 -1
  74. package/dist/esm/publishCommand.js +27 -2
  75. package/dist/esm/pushRelease.d.ts +2 -1
  76. package/dist/esm/pushRelease.js +11 -11
  77. package/dist/esm/readJsonFile.d.ts +2 -0
  78. package/dist/esm/readJsonFile.js +17 -0
  79. package/dist/esm/reportPrepare.js +68 -114
  80. package/dist/esm/resolveReleaseTags.d.ts +2 -1
  81. package/dist/esm/resolveReleaseTags.js +4 -12
  82. package/dist/esm/showTagPrefixesCommand.d.ts +6 -6
  83. package/dist/esm/showTagPrefixesCommand.js +94 -39
  84. package/dist/esm/sync-labels/generateCommand.js +0 -4
  85. package/dist/esm/sync-labels/initCommand.js +0 -4
  86. package/dist/esm/sync-labels/syncCommand.js +0 -4
  87. package/dist/esm/types.d.ts +8 -2
  88. package/docs/configuration.md +15 -6
  89. package/docs/labels.md +2 -2
  90. package/docs/releasing.md +3 -2
  91. package/docs/work-types.md +2 -0
  92. package/package.json +7 -7
  93. package/presets/labels/common.yaml +14 -0
  94. package/dist/esm/sync-labels/retiredConfig.d.ts +0 -11
  95. package/dist/esm/sync-labels/retiredConfig.js +0 -12
package/docs/releasing.md CHANGED
@@ -31,13 +31,14 @@ The workflows are managed files: release-kit renders them, and a change made by
31
31
 
32
32
  Runs release preparation with automatic workspace discovery.
33
33
 
34
- `--only` names the release targets from which the release starts, by target name: a workspace's directory name (e.g., `arrays`, `release-kit`) unless a [`releases`](configuration.md#releases) entry renames it, or a `releases` composite's name. A named composite releases from its own window, whether or not the run includes its members; a run narrowed by `--only` skips every composite that it doesn't name. The run also releases every workspace that depends on one of them, directly or transitively: A dependent with commits of its own releases at its own bump, and one without releases at a propagated patch bump, so that it publishes against the new version. Workspaces outside that set are left out of the run.
34
+ `--only` names the release targets from which the release starts, by target name: a workspace's directory name (e.g., `arrays`, `release-kit`) unless a [`releases`](configuration.md#releases) entry renames it, or a `releases` composite's name. A named composite releases from its own window, whether or not the run includes its members; a run narrowed by `--only` skips every composite that it doesn't name. The run also releases every workspace that depends on one of them, directly or transitively: A dependent whose commits call for a bump releases at its own bump, and one whose commits don't releases at a propagated patch bump, so that it publishes against the new version; its changelog entry lists its own items, if any, with the dependencies. Workspaces outside that set are left out of the run.
35
35
 
36
36
  `prepare` reads each target's history once and builds the changelog items of its unreleased commits. The bump is the highest level that those items call for, under [`versionPatterns`](configuration.md#versionpatterns), so the bump and the changelog describe the same release: A `feat` entry in a [change-record block](changelogs.md#change-record-blocks) bumps minor under a `docs:` title, and a breaking item bumps major.
37
37
 
38
38
  - A commit that doesn't yield an item doesn't bump anything: one without a ticket-ID prefix, one of a type excluded from the changelog (such as `fmt`), and one whose change-record entries are all undeclared or excluded.
39
39
  - A `BREAKING CHANGE:` footer doesn't raise a major bump. Only a subject's `!` and an entry's `breaking: true` mark an item breaking; on a type whose policy forbids `!`, the footer is reported as a [policy violation](work-types.md#policy-enforcement).
40
- - A target whose commits don't yield an item is skipped. The prepare report lists the commits that could not be parsed and the change-record diagnostics, skipped targets included.
40
+ - An item of a type that [`versionPatterns.none`](configuration.md#versionpatterns) lists, such as `tests` or `ci` by default, doesn't bump anything unless it is breaking.
41
+ - A target whose items don't call for a bump is skipped, and so is one whose commits don't yield an item. The prepare report lists the commits that could not be parsed and the change-record diagnostics, skipped targets included.
41
42
 
42
43
  `--bump` and `--force` are orthogonal in every mode, single-package included: `--bump` is purely a level chooser; `--force` is purely a release trigger. Examples:
43
44
 
@@ -28,6 +28,8 @@ release-kit reads the taxonomy from `CANONICAL_TAXONOMY` in [`@williamthorsen/ch
28
28
  - **`internal`**: Dev-only. `internal`-tier sections appear in dev changelogs but not in public-facing release notes.
29
29
  - **`process`**: Dev-only. Same audience treatment as `internal`.
30
30
 
31
+ Tiers decide the audience, not the bump: [`versionPatterns`](configuration.md#versionpatterns) decides which types bump and which don't, and by default some `internal`- and `process`-tier types bump patch while others don't bump at all.
32
+
31
33
  Section render order is **tier order (`public` → `internal` → `process`), then row order within tier**. It comes from the declaration order of `CANONICAL_TAXONOMY`: `CANONICAL_SECTION_ORDER` in `buildChangelogEntries.ts` indexes each header by its row, and `transformReleases` sorts a release's sections by that index whatever order the commits arrived in.
32
34
 
33
35
  ## Subject forms
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@williamthorsen/release-kit",
3
- "version": "18.1.1",
3
+ "version": "18.3.0",
4
4
  "description": "Version-bumping and changelog-generation toolkit for release workflows",
5
5
  "keywords": [
6
6
  "changelog",
@@ -53,7 +53,7 @@
53
53
  "dependencies": {
54
54
  "@williamthorsen/change-grammar": "0.4.1",
55
55
  "@williamthorsen/nmr-core": "0.16.2",
56
- "@williamthorsen/toolbelt.errors": "0.9.1",
56
+ "@williamthorsen/toolbelt.errors": "0.10.1",
57
57
  "json-stringify-pretty-compact": "4.0.0",
58
58
  "semver": "7.8.6",
59
59
  "yaml": "2.9.1",
@@ -61,13 +61,13 @@
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/semver": "7.8.0",
64
- "@williamthorsen/nmr": "2.0.3",
65
- "@williamthorsen/toolbelt.filesystem": "0.10.1",
66
- "@williamthorsen/toolbelt.testing": "0.8.1",
67
- "@williamthorsen/toolbelt.vitest": "0.13.3",
64
+ "@williamthorsen/nmr": "2.2.2",
65
+ "@williamthorsen/toolbelt.filesystem": "0.11.0",
66
+ "@williamthorsen/toolbelt.testing": "0.8.3",
67
+ "@williamthorsen/toolbelt.vitest": "0.13.5",
68
68
  "actionlint": "2.0.6",
69
69
  "esbuild": "0.28.2",
70
- "readyup": "0.45.1",
70
+ "readyup": "0.46.2",
71
71
  "smol-toml": "1.9.1",
72
72
  "vitest": "5.1.0"
73
73
  },
@@ -44,6 +44,20 @@
44
44
  color: cfd3d7
45
45
  aliases: ['priority:low']
46
46
 
47
+ # Effort
48
+ - name: 'effort:1'
49
+ color: dbe9ff
50
+ - name: 'effort:2'
51
+ color: b9d4ff
52
+ - name: 'effort:3'
53
+ color: 8fb8fb
54
+ - name: 'effort:5'
55
+ color: 5b93f0
56
+ - name: 'effort:8'
57
+ color: '3470e0'
58
+ - name: 'effort:13'
59
+ color: 1d4ed8
60
+
47
61
  # Status
48
62
  - name: 'status:blocked'
49
63
  color: b83280
@@ -1,11 +0,0 @@
1
- /** Path of the retired standalone sync-labels config file. */
2
- export declare const RETIRED_SYNC_LABELS_CONFIG_PATH = ".config/sync-labels.config.ts";
3
- /**
4
- * Reports an actionable migration error when the retired standalone config file is present.
5
- *
6
- * Returns `true` when the file exists, in which case the caller must abort. The check is
7
- * unconditional on config content: File presence alone triggers it, so a half-migrated
8
- * repo cannot silently lose its custom labels. `configPath` names the config into which the
9
- * message directs the labels.
10
- */
11
- export declare function checkRetiredSyncLabelsConfig(configPath?: string): boolean;
@@ -1,12 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import { reportError } from '@williamthorsen/nmr-core';
3
- import { BIN } from "../bin.js";
4
- import { CONFIG_FILE_PATH } from "../loadConfig.js";
5
- export const RETIRED_SYNC_LABELS_CONFIG_PATH = '.config/sync-labels.config.ts';
6
- export function checkRetiredSyncLabelsConfig(configPath = CONFIG_FILE_PATH) {
7
- if (!existsSync(RETIRED_SYNC_LABELS_CONFIG_PATH)) {
8
- return false;
9
- }
10
- reportError(BIN, `${RETIRED_SYNC_LABELS_CONFIG_PATH} is no longer read. Move its labels into the \`repoLabels\` block of ${configPath} (presets move to \`repoLabels.extends\`; each label becomes a \`'name': { color, description }\` entry under \`repoLabels.labels\`), then delete the file.`);
11
- return true;
12
- }