fix(release): treat the plugin manifests as release-version metadata

Release PRs now bump .claude-plugin/plugin.json and .codex-plugin/plugin.json,
but the publication history check rejected them as post-notes product
changes and the release configuration test still expected the previous
extra-files list. Admit both manifests in the release-only allowlist, expect
them in the Release Please configuration, and assert that each manifest
version matches package.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
GamerDubz
2026-10-12 00:07:33 +02:00
co-authored by Claude Opus 5.5
parent 4c945f570d
commit 15a5e08338
3 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -223,7 +223,8 @@ tag remains in main's ancestry. Keep the released tag unchanged.
The synchronization must include `.release-please-manifest.json`, The synchronization must include `.release-please-manifest.json`,
`package.json`, both root versions in `package-lock.json`, `CHANGELOG.md`, `package.json`, both root versions in `package-lock.json`, `CHANGELOG.md`,
`server.json`, and the versioned documentation examples. Run `server.json`, both plugin manifests (`.claude-plugin/plugin.json` and
`.codex-plugin/plugin.json`), and the versioned documentation examples. Run
`npm run docs:generate`, `npm run docs:check`, and the release configuration `npm run docs:generate`, `npm run docs:check`, and the release configuration
tests against the combined tree. After the merge, verify that the released tests against the combined tree. After the merge, verify that the released
tag is an ancestor of main: tag is an ancestor of main:
+2
View File
@@ -417,6 +417,8 @@ export async function verifyInventoryHistory(run, raw, source) {
"package.json", "package.json",
"package-lock.json", "package-lock.json",
"server.json", "server.json",
".claude-plugin/plugin.json",
".codex-plugin/plugin.json",
"src/generatedPackageMetadata.ts", "src/generatedPackageMetadata.ts",
"docs/installation.md", "docs/installation.md",
`docs/releases/${inventory.version}.contributions.json`, `docs/releases/${inventory.version}.contributions.json`,
@@ -8,6 +8,10 @@ const readJson = async (path: string): Promise<unknown> =>
JSON.parse(await readFile(path, "utf8")) as unknown; JSON.parse(await readFile(path, "utf8")) as unknown;
const versionedDocumentation = ["docs/installation.md"] as const; const versionedDocumentation = ["docs/installation.md"] as const;
const pluginManifests = [
".claude-plugin/plugin.json",
".codex-plugin/plugin.json",
] as const;
describe("release configuration", () => { describe("release configuration", () => {
it("keeps doctor and setup runtime support aligned with package engines", async () => { it("keeps doctor and setup runtime support aligned with package engines", async () => {
@@ -42,6 +46,11 @@ describe("release configuration", () => {
path: "server.json", path: "server.json",
jsonpath: "$.packages[0].version", jsonpath: "$.packages[0].version",
}, },
...pluginManifests.map((path) => ({
type: "json",
path,
jsonpath: "$.version",
})),
], ],
}, },
}, },
@@ -79,6 +88,19 @@ describe("release configuration", () => {
expect(/^## \[([^\]]+)\]/mu.exec(changelog)?.[1]).toBe(packageJson.version); expect(/^## \[([^\]]+)\]/mu.exec(changelog)?.[1]).toBe(packageJson.version);
}); });
it.each(pluginManifests)(
"keeps the plugin manifest %s aligned with the package version",
async (path) => {
const packageJson = (await readJson("package.json")) as {
version: string;
};
expect(await readJson(path)).toMatchObject({
version: packageJson.version,
});
},
);
it("keeps the npm package and MCP Registry metadata aligned", async () => { it("keeps the npm package and MCP Registry metadata aligned", async () => {
const packageJson = (await readJson("package.json")) as { const packageJson = (await readJson("package.json")) as {
name: string; name: string;