@williamthorsen/release-kit 11.0.0 → 13.0.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 +274 -2
- package/.readyup/kits/default.js +18 -33
- package/.readyup/kits/npm-auto-publish.js +24 -23
- package/.readyup/manifest.json +16 -11
- package/CHANGELOG.md +98 -0
- package/README.md +57 -69
- package/bin/release-kit.js +1 -1
- package/dist/esm/assertCleanWorkingTree.d.ts +1 -5
- package/dist/esm/assertTaggedBaseline.d.ts +29 -0
- package/dist/esm/assertTaggedBaseline.js +41 -0
- package/dist/esm/attachChangelogDiagnostics.d.ts +4 -0
- package/dist/esm/attachChangelogDiagnostics.js +14 -0
- package/dist/esm/bin/release-kit.js +88 -24
- package/dist/esm/buildChangelogEntries.d.ts +69 -17
- package/dist/esm/buildChangelogEntries.js +222 -120
- package/dist/esm/buildDependencyGraph.d.ts +6 -6
- package/dist/esm/buildEmptyReleaseEntry.d.ts +1 -8
- package/dist/esm/buildReleaseSummary.d.ts +2 -8
- package/dist/esm/buildReleaseSummary.js +2 -2
- package/dist/esm/buildSyntheticChangelogEntry.d.ts +3 -5
- package/dist/esm/buildSyntheticChangelogEntry.js +2 -2
- package/dist/esm/bumpVersion.d.ts +1 -8
- package/dist/esm/changelogJsonFile.d.ts +5 -7
- package/dist/esm/changelogJsonFile.js +2 -17
- package/dist/esm/changelogJsonUtils.d.ts +7 -10
- package/dist/esm/changelogOverrides.d.ts +79 -100
- package/dist/esm/changelogOverrides.js +138 -58
- package/dist/esm/classifyChangelogCommit.d.ts +36 -0
- package/dist/esm/classifyChangelogCommit.js +34 -0
- package/dist/esm/commitCommand.d.ts +2 -4
- package/dist/esm/compareVersions.d.ts +10 -4
- package/dist/esm/compareVersions.js +16 -0
- package/dist/esm/configFlagSchema.d.ts +1 -1
- package/dist/esm/createGithubRelease.d.ts +7 -19
- package/dist/esm/createGithubReleaseCommand.d.ts +5 -5
- package/dist/esm/createGithubReleaseCommand.js +9 -9
- package/dist/esm/createTags.d.ts +2 -3
- package/dist/esm/decideRelease.d.ts +11 -41
- package/dist/esm/decideRelease.js +5 -27
- package/dist/esm/defaults.d.ts +5 -24
- package/dist/esm/defaults.js +7 -5
- package/dist/esm/defineConfig.d.ts +1 -1
- package/dist/esm/deleteFileIfExists.d.ts +1 -1
- package/dist/esm/deriveReleaseNotesConfig.d.ts +20 -0
- package/dist/esm/deriveReleaseNotesConfig.js +21 -0
- package/dist/esm/deriveWorkspaceConfig.d.ts +3 -5
- package/dist/esm/detectPackageManager.d.ts +2 -4
- package/dist/esm/detectUndeclaredTagPrefixes.d.ts +4 -6
- package/dist/esm/detectUndeclaredTagPrefixes.js +1 -1
- package/dist/esm/determineBumpType.d.ts +11 -11
- package/dist/esm/determineBumpType.js +6 -7
- package/dist/esm/discoverWorkspaces.d.ts +14 -15
- package/dist/esm/discoverWorkspaces.js +12 -12
- package/dist/esm/enterRepoRoot.d.ts +12 -0
- package/dist/esm/enterRepoRoot.js +16 -0
- package/dist/esm/enumerateReleaseWindows.d.ts +50 -0
- package/dist/esm/enumerateReleaseWindows.js +124 -0
- package/dist/esm/extractMigration.d.ts +6 -8
- package/dist/esm/findUnroutedEntryScopes.d.ts +16 -0
- package/dist/esm/findUnroutedEntryScopes.js +57 -0
- package/dist/esm/formatExcludedSkip.d.ts +3 -0
- package/dist/esm/formatExcludedSkip.js +3 -0
- package/dist/esm/formatPrivateSkip.d.ts +1 -6
- package/dist/esm/generateChangelogs.d.ts +13 -26
- package/dist/esm/generateChangelogs.js +0 -14
- package/dist/esm/glyphs.d.ts +2 -2
- package/dist/esm/help/prepareHelp.d.ts +3 -4
- package/dist/esm/help/prepareHelp.js +7 -8
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/init/checks.d.ts +3 -3
- package/dist/esm/init/checks.js +4 -1
- package/dist/esm/init/detectRepoType.d.ts +2 -3
- package/dist/esm/init/hasProvenance.d.ts +2 -0
- package/dist/esm/init/hasProvenance.js +3 -0
- package/dist/esm/init/initCommand.d.ts +3 -6
- package/dist/esm/init/initCommand.js +11 -11
- package/dist/esm/init/parseJsonRecord.d.ts +1 -4
- package/dist/esm/init/scaffold.d.ts +1 -3
- package/dist/esm/init/scaffold.js +2 -30
- package/dist/esm/init/templates.d.ts +9 -11
- package/dist/esm/init/templates.js +12 -11
- package/dist/esm/init/updateTemplatesCommand.d.ts +13 -0
- package/dist/esm/init/updateTemplatesCommand.js +64 -0
- package/dist/esm/injectReleaseNotesIntoReadme.d.ts +12 -17
- package/dist/esm/injectSection.d.ts +3 -3
- package/dist/esm/loadConfig.d.ts +16 -14
- package/dist/esm/loadConfig.js +2 -5
- package/dist/esm/loadValidatedConfig.d.ts +16 -19
- package/dist/esm/loadValidatedConfig.js +6 -1
- package/dist/esm/packsPath.d.ts +9 -9
- package/dist/esm/parseChangeRecordBlock.d.ts +37 -0
- package/dist/esm/parseChangeRecordBlock.js +134 -0
- package/dist/esm/parseCommitMessage.d.ts +42 -32
- package/dist/esm/parseCommitMessage.js +33 -41
- package/dist/esm/parseRequestedTags.d.ts +3 -3
- package/dist/esm/planReleaseNotesPreviews.d.ts +6 -6
- package/dist/esm/planVersionBump.d.ts +5 -3
- package/dist/esm/planVersionBump.js +3 -0
- package/dist/esm/prepareCommand.d.ts +4 -7
- package/dist/esm/prepareCommand.js +17 -18
- package/dist/esm/previewTagPrefixes.d.ts +8 -10
- package/dist/esm/propagateBumps.d.ts +6 -7
- package/dist/esm/publish.d.ts +1 -1
- package/dist/esm/publishCommand.d.ts +4 -3
- package/dist/esm/publishCommand.js +8 -8
- package/dist/esm/pushCommand.d.ts +4 -3
- package/dist/esm/pushCommand.js +8 -2
- package/dist/esm/pushRelease.d.ts +2 -2
- package/dist/esm/readChangelogSections.d.ts +33 -0
- package/dist/esm/readChangelogSections.js +80 -0
- package/dist/esm/releaseFiles.d.ts +5 -7
- package/dist/esm/releasePlan.d.ts +11 -13
- package/dist/esm/releasePrepare.d.ts +25 -25
- package/dist/esm/releasePrepare.js +80 -80
- package/dist/esm/releasePrepareMono.d.ts +9 -7
- package/dist/esm/releasePrepareMono.js +114 -99
- package/dist/esm/releasePrepareProject.d.ts +19 -29
- package/dist/esm/releasePrepareProject.js +46 -45
- package/dist/esm/renderChangelogMarkdown.d.ts +10 -4
- package/dist/esm/renderChangelogMarkdown.js +27 -2
- package/dist/esm/renderReleaseNotes.d.ts +3 -11
- package/dist/esm/renderReleaseNotes.js +2 -6
- package/dist/esm/reportPrepare.d.ts +4 -5
- package/dist/esm/reportPrepare.js +67 -42
- package/dist/esm/resolveCommandTags.d.ts +15 -11
- package/dist/esm/resolveCommandTags.js +35 -5
- package/dist/esm/resolveConfigFlag.d.ts +7 -0
- package/dist/esm/resolveConfigFlag.js +4 -0
- package/dist/esm/resolveReleaseTags.d.ts +6 -8
- package/dist/esm/resolveReleaseTags.js +1 -1
- package/dist/esm/resolveStylesOrExit.d.ts +2 -2
- package/dist/esm/showTagPrefixesCommand.d.ts +7 -10
- package/dist/esm/showTagPrefixesCommand.js +4 -4
- package/dist/esm/stripEmojiPrefix.d.ts +1 -0
- package/dist/esm/stripScope.d.ts +2 -2
- package/dist/esm/stripScope.js +3 -3
- package/dist/esm/sync-labels/generateCommand.d.ts +11 -10
- package/dist/esm/sync-labels/generateCommand.js +11 -8
- package/dist/esm/sync-labels/initCommand.d.ts +6 -7
- package/dist/esm/sync-labels/initCommand.js +2 -2
- package/dist/esm/sync-labels/presets.d.ts +5 -4
- package/dist/esm/sync-labels/presets.js +9 -9
- package/dist/esm/sync-labels/resolveLabels.d.ts +7 -7
- package/dist/esm/sync-labels/resolveLabels.js +1 -1
- package/dist/esm/sync-labels/retiredConfig.d.ts +4 -5
- package/dist/esm/sync-labels/syncCommand.d.ts +1 -4
- package/dist/esm/sync-labels/templates.d.ts +3 -3
- package/dist/esm/sync-labels/templates.js +3 -3
- package/dist/esm/sync-labels/typeLabels.d.ts +14 -0
- package/dist/esm/sync-labels/typeLabels.js +38 -0
- package/dist/esm/sync-labels/types.d.ts +1 -1
- package/dist/esm/tagCommand.d.ts +1 -1
- package/dist/esm/typeGuards.d.ts +2 -2
- package/dist/esm/types.d.ts +185 -116
- package/dist/esm/types.js +2 -2
- package/dist/esm/validateConfig.d.ts +2 -11
- package/dist/esm/validateConfig.js +5 -1
- package/dist/esm/validateOnlyExcludesStrandedDependents.d.ts +14 -12
- package/dist/esm/validateOverridesCommand.d.ts +19 -21
- package/dist/esm/validateOverridesCommand.js +16 -23
- package/docs/api.md +6 -6
- package/docs/changelogs.md +90 -28
- package/docs/configuration.md +30 -29
- package/docs/editorial-overrides.md +90 -31
- package/docs/labels.md +21 -19
- package/docs/project-releases.md +14 -14
- package/docs/publishing.md +5 -5
- package/docs/readiness-checks.md +3 -3
- package/docs/releasing.md +54 -24
- package/docs/work-types.md +46 -58
- package/package.json +7 -7
- package/presets/labels/common.yaml +1 -41
- package/schemas/changelog-overrides.json +39 -0
- package/cliff.toml.template +0 -65
- package/dist/esm/collectPolicyViolations.d.ts +0 -15
- package/dist/esm/collectPolicyViolations.js +0 -12
- package/dist/esm/determineBumpFromCommits.d.ts +0 -17
- package/dist/esm/determineBumpFromCommits.js +0 -28
- package/dist/esm/getCommitsSinceTarget.d.ts +0 -21
- package/dist/esm/getCommitsSinceTarget.js +0 -66
- package/dist/esm/resolveCliffConfigPath.d.ts +0 -11
- package/dist/esm/resolveCliffConfigPath.js +0 -20
- package/dist/esm/resolveReleaseNotesConfig.d.ts +0 -26
- package/dist/esm/resolveReleaseNotesConfig.js +0 -29
- package/dist/esm/runGitCliff.d.ts +0 -38
- package/dist/esm/runGitCliff.js +0 -25
- package/dist/esm/workTypesData.d.ts +0 -50
- package/dist/esm/workTypesData.js +0 -145
- package/schemas/label-map.json +0 -24
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Editorial overrides
|
|
2
2
|
|
|
3
|
-
How to correct a generated changelog entry without rewriting history: where override files live, how they compose, what an entry may set, and how to validate the files.
|
|
3
|
+
How to correct a generated changelog entry without rewriting history: where override files live, how they compose, how a key targets items, what an entry may set, and how to validate the files.
|
|
4
4
|
|
|
5
|
-
Generated changelogs occasionally need editorial correction
|
|
5
|
+
Generated changelogs occasionally need editorial correction: typos, redacted scope, reworded entries, or historical commits whose bodies contain verbatim PR-template scaffolding (`## What`, `## Why`, etc.) that renders as literal text in user-facing release notes. Rewriting git history is not viable, and any in-place edit to a version that release-kit renders in `CHANGELOG.md` or `.meta/changelog.json` is overwritten on the next release, because release-kit regenerates that version in both artifacts from its entries.
|
|
6
6
|
|
|
7
|
-
Override files are the supported escape hatch.
|
|
7
|
+
Override files are the supported escape hatch. Add a checked-in JSON file at the conventional path for the scope that it should affect, keyed by commit hash or by commit hash and entry position, and `release-kit prepare` applies the overrides between `buildChangelogEntries` and serialization. Both `CHANGELOG.md` and `.meta/changelog.json` reflect the post-override view, so downstream consumers (the GitHub Release body, the in-app release-notes page, etc.) see the same content.
|
|
8
8
|
|
|
9
9
|
## File-location convention
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ Override files are the supported escape hatch. Drop a checked-in JSON file at th
|
|
|
14
14
|
| Workspace | `packages/<ws>/.meta/changelog-overrides.json` | Only that workspace's changelog |
|
|
15
15
|
| Single-package mode | `.meta/changelog-overrides.json` | The package's changelog (collapses to the project case) |
|
|
16
16
|
|
|
17
|
-
Filenames have
|
|
17
|
+
Filenames don't have a leading dot, because the `.meta/` directory already provides the visibility property and parallels its sibling artifacts (`changelog.json`, `label-map.json`).
|
|
18
18
|
|
|
19
19
|
## Composition: per-key shadowing
|
|
20
20
|
|
|
@@ -22,26 +22,30 @@ When a workspace's changelog is rendered, both files are consulted:
|
|
|
22
22
|
|
|
23
23
|
- The root file's overrides apply globally.
|
|
24
24
|
- The workspace file's overrides apply only to that workspace.
|
|
25
|
-
- When the **same
|
|
26
|
-
-
|
|
25
|
+
- When the **same key** (string-equal, byte-for-byte) appears in both files, the **workspace entry wins entirely** for that workspace's changelog: release-kit doesn't merge the two entries field by field; the workspace entry replaces the root entry.
|
|
26
|
+
- Non-identical keys that match the same item, such as a root `abc1234` beside a workspace `abc1234:2`, or two prefixes of one commit, do **not** shadow. The run fails with the [overlapping-keys error](#conflicting-keys), which names both keys.
|
|
27
27
|
- Other keys in the root file still apply for that workspace.
|
|
28
28
|
|
|
29
|
-
The project-level changelog applies only the root file. Per-workspace files describe per-workspace editorial intent and have
|
|
29
|
+
The project-level changelog applies only the root file. Per-workspace files describe per-workspace editorial intent and don't have any meaning at the aggregated project tier.
|
|
30
30
|
|
|
31
31
|
## Stale-key warnings
|
|
32
32
|
|
|
33
33
|
A key that doesn't match any commit gets a stale-reference warning. The warning's scope mirrors the file's scope:
|
|
34
34
|
|
|
35
35
|
- **Per-workspace files** are warned against their own apply context. A key in `packages/foo/.meta/changelog-overrides.json` that doesn't match any commit in foo's changelog is unambiguously stale and is warned immediately.
|
|
36
|
-
- **Root file** keys are aggregated globally
|
|
36
|
+
- **Root file** keys are aggregated globally: A root key that matches in any workspace or in the project changelog is non-stale; a root key matched nowhere is warned exactly once after all batches complete.
|
|
37
37
|
|
|
38
38
|
## File shape
|
|
39
39
|
|
|
40
40
|
```json
|
|
41
41
|
{
|
|
42
|
+
"$schema": "https://github.com/williamthorsen/node-monorepo-tools/raw/release-kit-v<version>/packages/release-kit/schemas/changelog-overrides.json",
|
|
42
43
|
"82962311": {
|
|
43
44
|
"audience": "skip"
|
|
44
45
|
},
|
|
46
|
+
"3f0c9a1:2": {
|
|
47
|
+
"description": "Reworded headline for the second change-record entry"
|
|
48
|
+
},
|
|
45
49
|
"abc1234d": {
|
|
46
50
|
"body": "Cleaned-up prose without the original PR-template scaffolding."
|
|
47
51
|
},
|
|
@@ -52,7 +56,7 @@ A key that doesn't match any commit gets a stale-reference warning. The warning'
|
|
|
52
56
|
}
|
|
53
57
|
```
|
|
54
58
|
|
|
55
|
-
Per-entry fields are all optional, but at least one must be present per entry:
|
|
59
|
+
The top-level `$schema` key is optional and names the [published JSON Schema](#published-json-schema) for editor support; it is not an override. Per-entry fields are all optional, but at least one must be present per entry:
|
|
56
60
|
|
|
57
61
|
| Field | Type | Effect |
|
|
58
62
|
| ------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -61,29 +65,62 @@ Per-entry fields are all optional, but at least one must be present per entry:
|
|
|
61
65
|
| `body` | `string` | Replaces the entry's body (the prose that renders below the bullet). Other fields are preserved. |
|
|
62
66
|
| `breaking` | `boolean` | Toggles the `🚨 **Breaking:** ` marker on the bullet. |
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
An override entry doesn't take a `migration` key: On a title-derived item the field is derived from `body`, so an override that replaces `body` re-derives it, and an item derived from a change-record entry keeps its entry's `migration`. See [The `migration` field](changelogs.md#the-migration-field).
|
|
69
|
+
|
|
70
|
+
## Keys
|
|
71
|
+
|
|
72
|
+
A key takes one of two forms. In both, the hash part is lowercase hex and matches as a prefix of the commit hash.
|
|
73
|
+
|
|
74
|
+
| Key | Targets |
|
|
75
|
+
| ------------ | ---------------------------------------------------------------- |
|
|
76
|
+
| `<hash>` | Every item of the commit |
|
|
77
|
+
| `<hash>:<n>` | The one item derived from the commit's `n`th change-record entry |
|
|
78
|
+
|
|
79
|
+
`n` counts from 1 over the `entries` of the commit's [change-record block](changelogs.md#change-record-blocks), in the order in which the PR lists them, including entries that don't yield an item. An item derived from the commit's title doesn't have an entry position, so `<hash>:<n>` never matches it. Any other key fails loading.
|
|
80
|
+
|
|
81
|
+
The hash part can be the full 40-character SHA or a prefix. `prepare` resolves it against the distinct commit hashes in the changelog:
|
|
82
|
+
|
|
83
|
+
- **One commit**: The override applies to the items that the key targets. A 7-character prefix is usually unambiguous within a single repo's history; longer prefixes are always safe.
|
|
84
|
+
- **No commit**: The override is treated as a stale reference (probably from a rebase or branch deletion) and prepare reports a warning. The release continues. An ordinal key whose commit doesn't have an item at position `n` is stale in the same way.
|
|
85
|
+
- **Several commits**: The release aborts with an error naming the key and the matching hashes. Lengthen the prefix or use the full SHA.
|
|
86
|
+
|
|
87
|
+
### Conflicting keys
|
|
65
88
|
|
|
66
|
-
|
|
89
|
+
Two further conditions abort the release. Each counts the items within one changelog.
|
|
67
90
|
|
|
68
|
-
|
|
91
|
+
- **A bare key that sets `description` or `body` on a commit with several items.** One headline or body cannot replace several different ones, so the error names the ordinal keys to use instead: `Override key 'abc1234' sets description on a commit with several items; use abc1234:1, abc1234:2`. `audience` and `breaking` on a bare key still apply to every item.
|
|
92
|
+
- **Two non-identical keys that match the same item.** The error names both keys, such as `Override keys 'abc1234' and 'abc1234:2' both match the item at abc1234:2; keep one`. Neither override applies to the item.
|
|
93
|
+
|
|
94
|
+
### Example: one commit, several items
|
|
95
|
+
|
|
96
|
+
Suppose commit `3f0c9a1` merged a PR whose change record lists three entries. Its changelog contains three items, and each key below targets one of them:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"3f0c9a1:2": { "description": "Reworded headline for the second entry" },
|
|
101
|
+
"3f0c9a1:3": { "audience": "skip" }
|
|
102
|
+
}
|
|
103
|
+
```
|
|
69
104
|
|
|
70
|
-
|
|
71
|
-
- **No matches (0 hits)** — the override is treated as a stale reference (probably from a rebase or branch deletion) and prepare reports a warning. The release continues.
|
|
72
|
-
- **Ambiguous prefix (2+ hits)** — the release aborts with an error naming the key and the matching hashes. Lengthen the prefix or use the full SHA.
|
|
105
|
+
A bare `"3f0c9a1": { "audience": "skip" }` would skip all three items instead. Adding it beside the keys above fails the run, because it overlaps each of them.
|
|
73
106
|
|
|
74
|
-
Override application errors abort the run with a non-zero exit; warnings (zero-match keys) are non-fatal and
|
|
107
|
+
Override application errors abort the run with a non-zero exit; warnings (zero-match keys) are non-fatal and appear in `PrepareResult.warnings`.
|
|
75
108
|
|
|
76
109
|
## Validation
|
|
77
110
|
|
|
78
|
-
The override file is validated when `release-kit prepare` loads it. Each error names the offending key so
|
|
111
|
+
The override file is validated when `release-kit prepare` loads it. Each error names the offending key so that the developer can locate it in the file:
|
|
79
112
|
|
|
80
|
-
- Missing file → empty map, no error (the no-op default
|
|
113
|
+
- Missing file → empty map, no error (the no-op default: Projects that do not need overrides skip the file entirely).
|
|
81
114
|
- Malformed JSON → error.
|
|
115
|
+
- A key that is neither `<hash>` nor `<hash>:<n>` (uppercase hex, non-hex characters, `:0`, a leading zero in `n`) → error.
|
|
116
|
+
- A top-level `$schema` that is not a string → error.
|
|
82
117
|
- Wrong top-level shape (e.g., array, primitive) → error.
|
|
83
118
|
- Unknown fields on an entry → error.
|
|
84
119
|
- Wrong field types (e.g., `description` as a number) → error.
|
|
85
120
|
- An entry with no fields set → error (a copy-paste mistake more often than not).
|
|
86
|
-
- `audience: 'all'` or `audience: 'dev'` → error in the current release:
|
|
121
|
+
- `audience: 'all'` or `audience: 'dev'` → error in the current release: Only `'skip'` is supported (see below).
|
|
122
|
+
|
|
123
|
+
Applying the overrides then aborts the run on an ambiguous prefix and on either of the [conflicting-key conditions](#conflicting-keys): a bare key setting `description` or `body` on a commit with several items, and two keys matching the same item.
|
|
87
124
|
|
|
88
125
|
### Standalone validation: `release-kit overrides validate`
|
|
89
126
|
|
|
@@ -95,25 +132,47 @@ pnpm exec release-kit overrides validate
|
|
|
95
132
|
|
|
96
133
|
This walks every `.meta/changelog-overrides.json` file across the project tier and per-workspace tier, reporting three classes of finding:
|
|
97
134
|
|
|
98
|
-
| Class | Examples
|
|
99
|
-
| ------------------- |
|
|
100
|
-
| Schema/parse errors | malformed JSON, unknown fields, wrong field types, no-field entries, unsupported `audience` | `2` |
|
|
101
|
-
| Ambiguous-prefix | an override key resolves to 2+ commit hashes
|
|
102
|
-
|
|
|
135
|
+
| Class | Examples | Exit code |
|
|
136
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------- | --------- |
|
|
137
|
+
| Schema/parse errors | malformed JSON, malformed keys, unknown fields, wrong field types, no-field entries, unsupported `audience` | `2` |
|
|
138
|
+
| Ambiguous-prefix | an override key resolves to 2+ commit hashes | `2` |
|
|
139
|
+
| Conflicting keys | a bare key sets `description` or `body` on a commit with several items; two keys match the same item | `2` |
|
|
140
|
+
| Stale-key warnings | an override key doesn't resolve to any item in its applicable scope | `1` |
|
|
141
|
+
|
|
142
|
+
Tier-aware stale-key semantics match `release-kit prepare`'s match-set exactly: A workspace-tier key is stale if it does not match in its own workspace's history; a root-tier key is stale only if it doesn't match in **any** scope (neither any workspace nor the project release window).
|
|
103
143
|
|
|
104
|
-
|
|
144
|
+
Conflicting keys are found within one file and across the root and workspace files, as `prepare` composes them. An overlap between a root key and a workspace key is reported against the workspace file.
|
|
105
145
|
|
|
106
146
|
The same logic is also exposed programmatically via the `validateAllChangelogOverrides` function exported from `@williamthorsen/release-kit`, for callers that want to integrate the check into their own tooling.
|
|
107
147
|
|
|
148
|
+
## Published JSON Schema
|
|
149
|
+
|
|
150
|
+
release-kit publishes a JSON Schema for the override file. The schema lives at `packages/release-kit/schemas/changelog-overrides.json` in this repo and is reachable via the stable raw URL:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
https://github.com/williamthorsen/node-monorepo-tools/raw/release-kit-v<version>/packages/release-kit/schemas/changelog-overrides.json
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
An override file references it from its top-level `$schema` key:
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
{
|
|
160
|
+
"$schema": "https://github.com/williamthorsen/node-monorepo-tools/raw/release-kit-v<version>/packages/release-kit/schemas/changelog-overrides.json",
|
|
161
|
+
"82962311": { "audience": "skip" }
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The schema states the key form and the entry fields. It accepts `audience` values `'all'` and `'dev'`, which the file format declares; the loader still rejects them (see below).
|
|
166
|
+
|
|
108
167
|
## Audience semantics: v1 supports `'skip'` only
|
|
109
168
|
|
|
110
|
-
The on-disk format declares the full `'all' | 'dev' | 'skip'` audience vocabulary so the file format will not need to change when the v2 reclassification feature
|
|
169
|
+
The on-disk format declares the full `'all' | 'dev' | 'skip'` audience vocabulary so that the file format will not need to change when the v2 reclassification feature is released. In the current release, only `'skip'` is supported at runtime; `'all'` and `'dev'` are rejected with an explicit "not yet supported" error.
|
|
111
170
|
|
|
112
|
-
The eventual v2 behavior will let an override move a single item to a different audience section (e.g., reclassifying a `Documentation` entry as `Internal features` to keep it out of public-facing release notes). v1 deliberately leaves that as a separate change so the override mechanism can
|
|
171
|
+
The eventual v2 behavior will let an override move a single item to a different audience section (e.g., reclassifying a `Documentation` entry as `Internal features` to keep it out of public-facing release notes). v1 deliberately leaves that as a separate change so that the override mechanism can be released now and the section-split logic can be added later.
|
|
113
172
|
|
|
114
173
|
## Worked example 1: cleaning up scaffolded historical commits (root file)
|
|
115
174
|
|
|
116
|
-
Suppose a year-old commit `82962311` was authored from a PR template that left `## What` / `## Why` headings in the body, and that commit now appears in
|
|
175
|
+
Suppose a year-old commit `82962311` was authored from a PR template that left `## What` / `## Why` headings in the body, and that commit now appears in the project's in-app release notes as literal Markdown headings. Add an override at the project tier:
|
|
117
176
|
|
|
118
177
|
```json
|
|
119
178
|
// .meta/changelog-overrides.json
|
|
@@ -128,9 +187,9 @@ On the next `release-kit prepare` run, the matched item's body is replaced befor
|
|
|
128
187
|
|
|
129
188
|
## Worked example 2: suppressing a cross-attribution spillover (workspace file)
|
|
130
189
|
|
|
131
|
-
Release-kit attributes commits to workspaces by file path, so a commit that primarily belongs to one workspace can
|
|
190
|
+
Release-kit attributes commits to workspaces by file path, so a commit that primarily belongs to one workspace can appear in another's changelog if it touched files there. Suppose commit `1ce3d2f` renamed the `audit-deps` package to `v11y-check` (scope `v11y-check`) but also edited `packages/nmr/src/default-scripts.ts` and `packages/nmr/README.md`. The commit correctly appears in `packages/v11y-check/CHANGELOG.md`, but it also appears in `packages/nmr/CHANGELOG.md`, where it isn't the right editorial framing.
|
|
132
191
|
|
|
133
|
-
|
|
192
|
+
Add a workspace-tier override at `packages/nmr/.meta/changelog-overrides.json`:
|
|
134
193
|
|
|
135
194
|
```json
|
|
136
195
|
// packages/nmr/.meta/changelog-overrides.json
|
|
@@ -141,4 +200,4 @@ Drop a workspace-tier override at `packages/nmr/.meta/changelog-overrides.json`:
|
|
|
141
200
|
}
|
|
142
201
|
```
|
|
143
202
|
|
|
144
|
-
The commit is now suppressed in nmr's changelog only
|
|
203
|
+
The commit is now suppressed in nmr's changelog only; it still appears in v11y-check's, where it belongs. A root-tier `'skip'` would have removed it from both, which is the wrong outcome.
|
package/docs/labels.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# Labels
|
|
2
2
|
|
|
3
|
-
How to declare the repository's labels in `.config/release-kit.config.ts`, how the scaffolded workflow applies them, and the
|
|
3
|
+
How to declare the repository's labels in `.config/release-kit.config.ts`, how the scaffolded workflow applies them, and where the schema for `.meta/label-map.json` is published.
|
|
4
4
|
|
|
5
5
|
## `release-kit sync-labels`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Manages GitHub label definitions via the `repoLabels` block of `.config/release-kit.config.ts`.
|
|
8
8
|
|
|
9
|
-
`init` scaffolds the `.github/workflows/sync-labels.yaml` caller workflow and seeds a `repoLabels` block with scope labels discovered from workspaces and declared `retiredPackages`. When `.config/release-kit.config.ts` does not exist, `init` writes it; when it does, `init` prints the block for manual paste
|
|
9
|
+
`init` scaffolds the `.github/workflows/sync-labels.yaml` caller workflow and seeds a `repoLabels` block with scope labels discovered from workspaces and declared `retiredPackages`. When `.config/release-kit.config.ts` does not exist, `init` writes it; when it does, `init` prints the block for manual paste; a hand-authored config is never rewritten. `generate` resolves the block and writes `.github/labels.yaml`; with `--check` it regenerates in memory and exits non-zero if the committed file is stale or missing, writing nothing. `sync` triggers the workflow remotely; it requires the `gh` CLI and an existing workflow file.
|
|
10
10
|
|
|
11
11
|
`init` and `generate` accept `--config <path>` to read a config elsewhere; `sync` reads none and rejects the flag. Under `--config`, `init` reads the named file and prints the block for manual paste, and fails when that file does not exist rather than scaffolding one, so its write target stays `.config/release-kit.config.ts`. See [Config file location](configuration.md#config-file-location).
|
|
12
12
|
|
|
13
|
-
Every `sync-labels` subcommand refuses to run while the retired `.config/sync-labels.config.ts` is present, so custom labels cannot be silently dropped mid-migration, and the refusal names what to move and where.
|
|
13
|
+
Every `sync-labels` subcommand refuses to run while the retired `.config/sync-labels.config.ts` is present, so that custom labels cannot be silently dropped mid-migration, and the refusal names what to move and where.
|
|
14
14
|
|
|
15
15
|
### Label configuration
|
|
16
16
|
|
|
@@ -29,20 +29,22 @@ export default defineConfig({
|
|
|
29
29
|
});
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
The block declares the repository's label registry
|
|
32
|
+
The block declares the repository's label registry: the set of labels defined on the GitHub repo, distinct from labels applied to PRs and issues. Resolution is an ordered fold with last-writer-wins:
|
|
33
33
|
|
|
34
|
-
1. Presets, in `extends` order
|
|
35
|
-
2. The `labels` record
|
|
34
|
+
1. Presets, in `extends` order: A later preset wins on a shared name.
|
|
35
|
+
2. The `labels` record: An entry adds a label, replaces one that an earlier layer defined, or removes it (`null`). Replacement is wholesale: An entry omitting `description` resolves to a label without a description rather than inheriting the one that an earlier layer supplied.
|
|
36
|
+
|
|
37
|
+
The `common` preset defines a label for every work type in change-grammar's taxonomy, named by the type's `trackerLabel`, in addition to the labels in its bundled YAML file.
|
|
36
38
|
|
|
37
39
|
Names match case-insensitively, as GitHub matches them: `Bug` in the `labels` record replaces a preset's `bug`, and `Bug: null` removes it. A label takes the spelling of the last layer to write it.
|
|
38
40
|
|
|
39
41
|
`description` is optional throughout, in a preset as in the `labels` record, and `sync-labels init` generates none for a scope label. The generated file spells an absent description `''` because `github-label-sync` reads an omitted description as "leave the label's current one alone"; the empty form clears it.
|
|
40
42
|
|
|
41
|
-
Overlaps between layers are never errors; order resolves them, and the committed `.github/labels.yaml` diff
|
|
43
|
+
Overlaps between layers are never errors; order resolves them, and the committed `.github/labels.yaml` diff shows any unexpected change at review. Two misstatements are config errors, because neither is visible in the output diff: a dangling `null`, which removes a name not defined by any preset, and `labels` keys that differ only in case, all but one of which the fold would discard.
|
|
42
44
|
|
|
43
45
|
### When labels are applied
|
|
44
46
|
|
|
45
|
-
The scaffolded workflow
|
|
47
|
+
The scaffolded workflow declares three triggers:
|
|
46
48
|
|
|
47
49
|
| Trigger | Job | Token | Effect |
|
|
48
50
|
| --------------------------------------------------------- | ------- | --------------- | --------------------------------- |
|
|
@@ -50,36 +52,36 @@ The scaffolded workflow carries three triggers:
|
|
|
50
52
|
| Manual dispatch (`release-kit sync-labels sync`) | `sync` | `issues: write` | Applies the labels |
|
|
51
53
|
| Pull request touching `.github/labels.yaml` | `check` | `issues: read` | Logs the diff without applying it |
|
|
52
54
|
|
|
53
|
-
Applying on merge closes the window in which a regenerated `.github/labels.yaml`
|
|
55
|
+
Applying on merge closes the window in which a regenerated `.github/labels.yaml` remains unapplied. In that window, a later manual dispatch would apply an unreviewed label set.
|
|
54
56
|
|
|
55
|
-
The `check` job runs the same sync in dry-run. Its **Label diff** log group lists every create, edit, rename, and deletion the sync would perform, including deletions of labels the file does not declare
|
|
57
|
+
The `check` job runs the same sync in dry-run. Its **Label diff** log group lists every create, edit, rename, and deletion that the sync would perform, including deletions of labels that the file does not declare: the destructive edits that a diff of `.github/labels.yaml` alone cannot show, because a label created by hand or by another workflow is absent from the file both before and after. Read that log; the check reports success whether or not the diff is destructive, so a green check is not evidence that nothing will be deleted.
|
|
56
58
|
|
|
57
|
-
The two jobs are split because a job's permissions are fixed when the run is created and cannot vary by trigger. The split
|
|
59
|
+
The two jobs are split because a job's permissions are fixed when the run is created and cannot vary by trigger. The split keeps a write-scoped token out of pull-request runs.
|
|
58
60
|
|
|
59
|
-
The push trigger filters on the path alone; the `sync` job compares `github.ref_name` against the repository's default branch. The workflow therefore
|
|
61
|
+
The push trigger filters on the path alone; the `sync` job compares `github.ref_name` against the repository's default branch. The workflow therefore doesn't need a per-repo edit, whatever that branch is named, and a push touching `.github/labels.yaml` on any other branch produces a run whose jobs all skip.
|
|
60
62
|
|
|
61
63
|
Manual dispatch is not a preview. It matches the `sync` job, so it applies the labels, deletions included; only the pull-request path runs in dry-run.
|
|
62
64
|
|
|
63
65
|
### Dry-run checks on fork pull requests
|
|
64
66
|
|
|
65
|
-
GitHub issues a read-only `GITHUB_TOKEN` to pull requests from forks, and by default
|
|
67
|
+
GitHub issues a read-only `GITHUB_TOKEN` to pull requests from forks, and by default pauses runs from first-time contributors until a maintainer approves them. Because the dry-run reads labels and writes nothing, the check normally runs once approved. A repo that disables workflows on fork pull requests doesn't get a check at all; to preview such a change, push the branch to the base repo and open the pull request from there.
|
|
66
68
|
|
|
67
|
-
###
|
|
69
|
+
### JSON Schema for `.meta/label-map.json`
|
|
68
70
|
|
|
69
|
-
|
|
71
|
+
`.meta/label-map.json` is a separate, generic data file that maps commit-prefix scopes and types to GitHub label names. `@williamthorsen/change-grammar` publishes its JSON Schema, reachable via the stable raw URL:
|
|
70
72
|
|
|
71
73
|
```
|
|
72
|
-
https://github.com/williamthorsen/node-monorepo-tools/raw/
|
|
74
|
+
https://github.com/williamthorsen/node-monorepo-tools/raw/change-grammar-v<version>/packages/change-grammar/schemas/label-map.json
|
|
73
75
|
```
|
|
74
76
|
|
|
75
77
|
Consumers reference it from the top of their `.meta/label-map.json`:
|
|
76
78
|
|
|
77
79
|
```json
|
|
78
80
|
{
|
|
79
|
-
"$schema": "https://github.com/williamthorsen/node-monorepo-tools/raw/
|
|
81
|
+
"$schema": "https://github.com/williamthorsen/node-monorepo-tools/raw/change-grammar-v<version>/packages/change-grammar/schemas/label-map.json",
|
|
80
82
|
"types": { "feat": "feature", "fix": "fix" },
|
|
81
83
|
"scopes": { "audit": "scope:audit" }
|
|
82
84
|
}
|
|
83
85
|
```
|
|
84
86
|
|
|
85
|
-
release-kit
|
|
87
|
+
Earlier releases published the same schema from release-kit, and URLs under existing `release-kit-v*` tags keep resolving. release-kit does not generate `.meta/label-map.json`; change-grammar's `deriveLabelMap` derives one from the taxonomy and the workspace scopes.
|
package/docs/project-releases.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
How to add a project-level release to a monorepo, what the `project` block accepts, and how that release interacts with `prepare`'s flags.
|
|
4
4
|
|
|
5
|
-
Some monorepos
|
|
5
|
+
Some monorepos release a single combined deliverable, such as a Chrome extension, a CLI binary, or a packaged desktop app, for which the per-workspace tags and changelogs alone do not describe what the user actually receives. Declare the optional `project` block to add a project-level release stage that runs alongside the per-workspace pipeline.
|
|
6
6
|
|
|
7
7
|
```typescript
|
|
8
8
|
import type { ReleaseKitConfig } from '@williamthorsen/release-kit/config';
|
|
@@ -19,12 +19,12 @@ When configured, each `release-kit prepare` run additionally:
|
|
|
19
19
|
|
|
20
20
|
- Computes commits since the last project tag (`<tagPrefix><version>`), filtered to `paths` (by default, the union of every contributing workspace's paths).
|
|
21
21
|
- Bumps the root `package.json`'s `version` field using the same bump-derivation rules as workspaces (or the `--bump=...` override).
|
|
22
|
-
- Regenerates the root `./CHANGELOG.md` from the structured `ChangelogEntry[]`
|
|
22
|
+
- Regenerates the root `./CHANGELOG.md` from the structured `ChangelogEntry[]` built from the project's release history (scoped to the project's `tagPrefix` and the same `paths`) and any matching editorial overrides, keeping the [existing sections](changelogs.md#existing-changelogmd-sections) whose versions those entries lack.
|
|
23
23
|
- Emits `./.meta/changelog.json` (when `changelogJson.enabled`).
|
|
24
24
|
- With `--with-release-notes`, additionally emits `./docs/RELEASE_NOTES.v<version>.md`.
|
|
25
|
-
- Appends the project tag to `tmp/.release-tags` so `release-kit commit` and `release-kit tag` pick it up alongside per-workspace tags.
|
|
25
|
+
- Appends the project tag to `tmp/.release-tags` so that `release-kit commit` and `release-kit tag` pick it up alongside per-workspace tags.
|
|
26
26
|
|
|
27
|
-
If
|
|
27
|
+
If the history since the last project tag doesn't contain any commit under `paths`, the project release is silently skipped, as a per-workspace release is.
|
|
28
28
|
|
|
29
29
|
## `ProjectConfig`
|
|
30
30
|
|
|
@@ -37,14 +37,14 @@ interface ProjectConfig {
|
|
|
37
37
|
|
|
38
38
|
| Field | Default | Description |
|
|
39
39
|
| ----------- | ----------------------- | -------------------------------------------------------------------- |
|
|
40
|
-
| `paths` | Contributing-path union | Patterns selecting the commits the project release considers
|
|
40
|
+
| `paths` | Contributing-path union | Patterns selecting the commits that the project release considers |
|
|
41
41
|
| `tagPrefix` | `'v'` | Prefix for project tags. The full tag is `${tagPrefix}${newVersion}` |
|
|
42
42
|
|
|
43
|
-
By default the contributing workspaces are implicit:
|
|
43
|
+
By default the contributing workspaces are implicit: Every non-excluded discovered workspace contributes its `<dir>/**` glob, and the project release considers commits under their union.
|
|
44
44
|
|
|
45
|
-
Declare `paths` to choose the window
|
|
45
|
+
Declare `paths` to choose the window explicitly. Each entry is a git pathspec, which both the bump and the changelog read. A declared value **replaces** the workspace union rather than extending it: `paths: ['docs/**']` drops every workspace commit from the project release.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
In a repo whose content lives at the root, commits don't match any `<dir>/**` glob, so the project release would skip every run. Such a repo declares the whole tree:
|
|
48
48
|
|
|
49
49
|
```typescript
|
|
50
50
|
const config: ReleaseKitConfig = {
|
|
@@ -54,21 +54,21 @@ const config: ReleaseKitConfig = {
|
|
|
54
54
|
|
|
55
55
|
`'**'` is the whole-tree pattern, matching root-level files, dotfiles, and nested paths alike.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
A bare directory such as `'aws'` selects its whole subtree, as `'aws/**'` does.
|
|
58
58
|
|
|
59
59
|
Validation rules:
|
|
60
60
|
|
|
61
61
|
- The root `package.json` must exist and declare a `version` field. release-kit reports an error at config-load time if either is missing.
|
|
62
62
|
- The `project` block is rejected in single-package mode (the package's own release already covers the whole repo, so a project tier would only duplicate it).
|
|
63
|
-
- `paths`, when declared, must
|
|
63
|
+
- `paths`, when declared, must contain at least one non-empty string. An empty array is rejected, because git would read it as the absence of a filter: the inverse of how the array reads.
|
|
64
64
|
- Unknown fields inside `project` are rejected.
|
|
65
65
|
|
|
66
66
|
CLI flag interactions:
|
|
67
67
|
|
|
68
|
-
- `--dry-run` previews project artifacts alongside workspace artifacts;
|
|
69
|
-
- `--bump=major|minor|patch` propagates to the project release as a level chooser. It does not trigger a release on its own when
|
|
70
|
-
- `--force` runs the project release even when
|
|
71
|
-
- `--only` narrows the run to the named workspaces and skips the project release, which is reported as a warning. The project release rolls up every contributing workspace, and `--only` changes which workspaces those are, so rolling up a narrowed set would release a project version covering work the run excluded. Run a full `prepare` (
|
|
68
|
+
- `--dry-run` previews project artifacts alongside workspace artifacts; it doesn't write any files.
|
|
69
|
+
- `--bump=major|minor|patch` propagates to the project release as a level chooser. It does not trigger a release on its own when the window doesn't have any commits or any bump-worthy commits.
|
|
70
|
+
- `--force` runs the project release even when the history since the last project tag doesn't have any commits or any bump-worthy commits. Defaults to patch when `--bump` is not given; combine with `--bump=X` to release at a different level.
|
|
71
|
+
- `--only` narrows the run to the named workspaces and skips the project release, which is reported as a warning. The project release rolls up every contributing workspace, and `--only` changes which workspaces those are, so rolling up a narrowed set would release a project version covering work that the run excluded. Run a full `prepare` (without `--only`) to include the project release.
|
|
72
72
|
- `--set-version` is rejected with an error when `project` is configured. `--set-version` operates on a single workspace, but a project release rolls up every contributing workspace; the two semantics don't compose. To use `--set-version`, run on a config without a `project` block.
|
|
73
73
|
|
|
74
74
|
How `--bump` and `--force` combine for every target is in [Releasing](releasing.md#release-kit-prepare).
|
package/docs/publishing.md
CHANGED
|
@@ -4,16 +4,16 @@ How `release-kit publish` and `release-kit create-github-release` choose which p
|
|
|
4
4
|
|
|
5
5
|
## `release-kit publish`
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Publishes packages that have release tags on HEAD. The publish workflow's reusable workflow `publish.reusable.yaml` invokes this command in CI.
|
|
8
8
|
|
|
9
9
|
### Publishability filter
|
|
10
10
|
|
|
11
|
-
`publish` and `create-github-release` operate only on workspaces
|
|
11
|
+
`publish` and `create-github-release` operate only on workspaces whose `package.json#private` is absent or `false`. A workspace marked `private: true` is "versioned but not published": It can still be tagged by `release-kit tag` and get a `CHANGELOG.md` entry, but it is skipped by both `release-kit publish` (no registry publish) and `release-kit create-github-release` (no GitHub Release). `private: true` alone excludes a workspace from publish and announce; it doesn't require any extra release config. Other commands ignore this filter and operate on private workspaces unchanged.
|
|
12
12
|
|
|
13
13
|
An unpublishable tag is always skipped cleanly, never fatal. For `release-kit publish`, whether the skip is announced depends on how the tag was resolved:
|
|
14
14
|
|
|
15
|
-
- **Without `--tags`** (implicit resolution):
|
|
16
|
-
- **With `--tags`** (explicit naming):
|
|
15
|
+
- **Without `--tags`** (implicit resolution): Unpublishable tags on HEAD are silently filtered. The pre-publish listing shows only the publishable subset. If the filter empties the set, `release-kit publish` prints `Nothing to publish.` and exits 0.
|
|
16
|
+
- **With `--tags`** (explicit naming): Each named tag pointing at an unpublishable workspace is skipped with a warning, and any publishable tags named in the same command are still published.
|
|
17
17
|
|
|
18
18
|
`release-kit create-github-release` skips unpublishable workspaces with a warning regardless of `--tags`; an all-private tag set is a clean no-op.
|
|
19
19
|
|
|
@@ -25,6 +25,6 @@ Skipping basic-v1.0.0 (packages/basic): package.json#private is true.
|
|
|
25
25
|
|
|
26
26
|
## `release-kit create-github-release`
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Creates GitHub Releases from `changelog.json` for tags on HEAD. Independent of `npm publish`: Invoking this command creates Releases for publishable packages whether or not they were published to a registry. Private workspaces are skipped (see [Publishability filter](#publishability-filter)).
|
|
29
29
|
|
|
30
30
|
When `--tags` is omitted, every release tag pointing at HEAD is processed. The CLI requires the `gh` CLI on `PATH` and `contents: write` permission. The bundled `create-github-release.reusable.yaml` GitHub Actions workflow runs this command in CI.
|
package/docs/readiness-checks.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
What release-kit's two readyup kits check, how to run each, and what `npm-auto-publish` needs from the npm session.
|
|
4
4
|
|
|
5
|
-
release-kit publishes two [readyup](https://www.npmjs.com/package/readyup) kits that check a consuming repo against the release it has installed:
|
|
5
|
+
release-kit publishes two [readyup](https://www.npmjs.com/package/readyup) kits that check a consuming repo against the release that it has installed: The `default` kit covers release-kit's own setup (workflows matching the current templates, config free of removed fields, sync-labels wiring), and `npm-auto-publish` covers a repo's OIDC-based npm publishing setup. Both are included in the package, so they check against the installed version rather than whatever a repository ref happens to point at, and a check added in a release becomes available to a repo when it upgrades.
|
|
6
6
|
|
|
7
7
|
The [README](../README.md#readiness-checks) shows how to name release-kit in the readyup config.
|
|
8
8
|
|
|
@@ -13,6 +13,6 @@ rdy run --from npm:@williamthorsen/release-kit npm-auto-publish # the npm-auto-
|
|
|
13
13
|
rdy list --from npm:@williamthorsen/release-kit # what release-kit publishes
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
`--packages` is the form that
|
|
16
|
+
`--packages` is the form that keeps working when release-kit publishes further kits.
|
|
17
17
|
|
|
18
|
-
`npm-auto-publish` queries the npm registry for each package's trusted publisher,
|
|
18
|
+
Because `npm-auto-publish` queries the npm registry for each package's trusted publisher, it needs an npm session elevated by two-factor authentication, and is meant to be invoked deliberately rather than included in an unattended run. A session that cannot answer those queries, whether it is missing a login, missing the elevation, or facing an unreachable registry, is reported once by the `npm session can answer trust queries` gate. The rows that would repeat the failed query are then skipped: the trusted-publisher rows in every case, and `published to npm` when the registry itself is unreachable. Each package's `package.json` checks report throughout, since they don't read a registry.
|