From b7df133796df5a8a25a0cde95d40a2197331f45a Mon Sep 17 00:00:00 2001 From: Steve Calvert Date: Wed, 2 Sep 2026 17:12:16 -0700 Subject: [PATCH] fix: sync plugin changelogs after generation --- .release-it.json | 2 +- RELEASE.md | 10 +++++---- package.json | 3 ++- scripts/check-plugin-changelogs.mjs | 34 +++++++++++++++++++++++++++++ shared/glean-dev-docs/CHANGELOG.md | 6 +++++ shared/glean/CHANGELOG.md | 6 +++++ 6 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 scripts/check-plugin-changelogs.mjs diff --git a/.release-it.json b/.release-it.json index 4cff254..256b922 100644 --- a/.release-it.json +++ b/.release-it.json @@ -11,7 +11,7 @@ "publish": false }, "hooks": { - "after:bump": "npm run build" + "before:git:release": "npm run build" }, "plugins": { "@release-it/bumper": { diff --git a/RELEASE.md b/RELEASE.md index eec5b71..3ed4aec 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -59,10 +59,12 @@ release is what triggers the actual plugin distribution (below). minor, `fix` → patch, a `BREAKING CHANGE` footer → major). 2. Bump both the root `package.json` and `shared/glean/mcp/package.json` to the same version. Regenerate - `CHANGELOG.md`. Its `after:bump` hook then runs `npm run build`, which - syncs that changelog into `shared/glean` and `shared/glean-dev-docs`, then - rebuilds the generated plugin output — all of which is included in the - release commit. + `CHANGELOG.md`. Its `before:git:release` hook then runs `npm run build`, + after the changelog plugin has written the new entry and before release-it + commits and tags. The build syncs that changelog into `shared/glean` and + `shared/glean-dev-docs`, rebuilds the generated plugin output, and checks + that every shipped changelog matches the root — all of which is included + in the release commit. 3. Commit as `chore: release v${version}`, tag `v${version}`, and push both to `main`. 4. Create a GitHub Release from that tag. diff --git a/package.json b/package.json index 3c674c6..dd53fc4 100644 --- a/package.json +++ b/package.json @@ -10,10 +10,11 @@ }, "type": "module", "scripts": { - "build": "pluginpack build", + "build": "pluginpack build && npm run check:plugin-changelogs", "build:bundle": "node shared/glean/mcp/build.mjs", "clean": "pluginpack clean", "check:no-shell": "node scripts/check-no-shell-scripts.mjs", + "check:plugin-changelogs": "node scripts/check-plugin-changelogs.mjs", "check:release-version": "node scripts/check-release-version.mjs", "prune": "pluginpack prune", "typecheck:bundle": "tsc --noEmit -p shared/glean/mcp/tsconfig.json", diff --git a/scripts/check-plugin-changelogs.mjs b/scripts/check-plugin-changelogs.mjs new file mode 100644 index 0000000..fc915c4 --- /dev/null +++ b/scripts/check-plugin-changelogs.mjs @@ -0,0 +1,34 @@ +#!/usr/bin/env node +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { dirname, join } from "node:path"; + +const root = join(dirname(fileURLToPath(import.meta.url)), ".."); +const canonicalPath = join(root, "CHANGELOG.md"); +const canonical = readFileSync(canonicalPath, "utf8"); + +const paths = [ + "shared/glean/CHANGELOG.md", + "shared/glean-dev-docs/CHANGELOG.md", + "dist/claude/plugins/glean/CHANGELOG.md", + "dist/claude/plugins/glean-dev-docs/CHANGELOG.md", + "dist/cursor/glean/CHANGELOG.md", + "dist/cursor/glean-dev-docs/CHANGELOG.md", + "dist/codex/plugins/glean/CHANGELOG.md", + "dist/codex/plugins/glean-dev-docs/CHANGELOG.md", +]; + +const mismatches = paths.filter((relativePath) => { + const actual = readFileSync(join(root, relativePath), "utf8"); + return actual !== canonical; +}); + +if (mismatches.length > 0) { + throw new Error( + `Plugin changelogs differ from CHANGELOG.md:\n${mismatches + .map((relativePath) => `- ${relativePath}`) + .join("\n")}`, + ); +} + +console.log(`All ${paths.length} plugin changelogs match CHANGELOG.md.`); diff --git a/shared/glean-dev-docs/CHANGELOG.md b/shared/glean-dev-docs/CHANGELOG.md index b1d1fc0..068338f 100644 --- a/shared/glean-dev-docs/CHANGELOG.md +++ b/shared/glean-dev-docs/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [3.4.1](https://github.com/gleanwork/agent-plugins/compare/v3.4.0...v3.4.1) (2026-09-02) + +### Documentation + +* broaden Claude plugin surface guidance ([11d566c](https://github.com/gleanwork/agent-plugins/commit/11d566cf05dba9051c4a7675fe1035ea8ba2cb9f)) + ## [3.4.0](https://github.com/gleanwork/agent-plugins/compare/v3.3.0...v3.4.0) (2026-08-20) ### Features diff --git a/shared/glean/CHANGELOG.md b/shared/glean/CHANGELOG.md index b1d1fc0..068338f 100644 --- a/shared/glean/CHANGELOG.md +++ b/shared/glean/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [3.4.1](https://github.com/gleanwork/agent-plugins/compare/v3.4.0...v3.4.1) (2026-09-02) + +### Documentation + +* broaden Claude plugin surface guidance ([11d566c](https://github.com/gleanwork/agent-plugins/commit/11d566cf05dba9051c4a7675fe1035ea8ba2cb9f)) + ## [3.4.0](https://github.com/gleanwork/agent-plugins/compare/v3.3.0...v3.4.0) (2026-08-20) ### Features