Showing the changes to scripts (1 of 35 files). Show all
Unified · Split
| @@ -3,15 +3,16 @@ · 2 unmodified lines | ||
| 3 | 3 | * Verifies every workspace package directory has a `CHANGELOG.md` file. |
| 4 | 4 | * |
| 5 | 5 | * `changesets/action@v1` (the GitHub Action wrapping the Changesets CLI in |
| 6 | − * `release.yml`) reads every workspace package's `CHANGELOG.md` to build | |
| 7 | − * the Version Packages PR description. If any is missing, the action | |
| 8 | − * crashes with `ENOENT` at release time and blocks the release. | |
| 6 | + * `release.yml`) creates the Version Packages PR after `changeset version` | |
| 7 | + * updates package versions and changelogs. Every workspace package should have | |
| 8 | + * a `CHANGELOG.md` seed so Changesets has a stable file to update and the | |
| 9 | + * action never falls back to missing-file behavior. Keep seed files H1-only: | |
| 10 | + * Changesets inserts generated version sections immediately after the H1, so | |
| 11 | + * any placeholder prose would become part of the first generated release notes. | |
| 9 | 12 | * |
| 10 | − * The CLI alone (with `changelog: false` in `.changeset/config.json`) | |
| 11 | − * doesn't need them — but we run via the Action, which does. | |
| 12 | − * | |
| 13 | − * The stubs themselves are not user-facing. Canonical release notes are | |
| 14 | − * at `apps/cli/release-notes/next.md` and on the GitHub Releases page. | |
| 13 | + * GitHub Release notes are still authored separately at | |
| 14 | + * `apps/cli/release-notes/next.md`; package changelogs are generated from | |
| 15 | + * `.changeset/*.md`. | |
| 15 | 16 | * |
| 16 | 17 | * Usage: |
| 17 | 18 | * bun run scripts/check-changelog-stubs.ts # fail on missing |
| @@ -39,12 +40,7 @@ const findWorkspacePackages = (): string[] => { · 21 unmodified lines | ||
| 39 | 40 | return [...dirs].sort(); |
| 40 | 41 | }; |
| 41 | 42 | |
| 42 | −const STUB_TEMPLATE = (name: string) => | |
| 43 | − `# ${name} changelog\n\n` + | |
| 44 | − "This file exists for `changesets/action@v1` compatibility (it reads every\n" + | |
| 45 | − "workspace package's `CHANGELOG.md` to build the Version Packages PR).\n" + | |
| 46 | − "Canonical user-facing release notes are at `apps/cli/release-notes/next.md`\n" + | |
| 47 | − "and on the GitHub Releases page.\n"; | |
| 43 | +const STUB_TEMPLATE = (name: string) => `# ${name}\n`; | |
| 48 | 44 | |
| 49 | 45 | const fix = process.argv.includes("--fix"); |
| 50 | 46 | const missing: string[] = []; |
| @@ -67,9 +63,8 @@ for (const pkgDir of findWorkspacePackages()) { · 16 unmodified lines | ||
| 67 | 63 | if (!fix && missing.length > 0) { |
| 68 | 64 | console.error( |
| 69 | 65 | `\nMissing CHANGELOG.md in ${missing.length} workspace package(s):\n - ${missing.join("\n - ")}\n\n` + |
| 70 | − "These are required by `changesets/action@v1` (the GitHub Action wrapping\n" + | |
| 71 | − "Changesets in release.yml). Without them, release.yml crashes with ENOENT\n" + | |
| 72 | − "and the Version Packages PR can't open.\n\n" + | |
| 66 | + "These seed files are required so Changesets can update every affected\n" + | |
| 67 | + "workspace changelog during the Version Packages PR.\n\n" + | |
| 73 | 68 | "Run `bun run scripts/check-changelog-stubs.ts --fix` to create stubs.\n", |
| 74 | 69 | ); |
| 75 | 70 | process.exit(1); |