fix: remove plugin versions from marketplace.json and fix brittle test

- Remove plugin version fields from marketplace.json -- canonical
  versions live in each plugin's plugin.json. Duplicating them created
  drift that release-please couldn't maintain.
- Remove version sync logic from metadata.ts (description sync kept)
- Fix release-preview test to compute expected versions dynamically
  from current manifests instead of hardcoding them
This commit is contained in:
Trevin Chow
2026-03-18 01:45:49 -07:00
parent 8827524af4
commit 4952007cab
3 changed files with 8 additions and 14 deletions

View File

@@ -12,7 +12,6 @@
{ {
"name": "compound-engineering", "name": "compound-engineering",
"description": "AI-powered development tools that get smarter with every use. Make each unit of engineering work easier than the last.", "description": "AI-powered development tools that get smarter with every use. Make each unit of engineering work easier than the last.",
"version": "2.42.0",
"author": { "author": {
"name": "Kieran Klaassen", "name": "Kieran Klaassen",
"url": "https://github.com/kieranklaassen", "url": "https://github.com/kieranklaassen",
@@ -33,7 +32,6 @@
{ {
"name": "coding-tutor", "name": "coding-tutor",
"description": "Personalized coding tutorials that build on your existing knowledge and use your actual codebase for examples. Includes spaced repetition quizzes to reinforce learning. Includes 3 commands and 1 skill.", "description": "Personalized coding tutorials that build on your existing knowledge and use your actual codebase for examples. Includes spaced repetition quizzes to reinforce learning. Includes 3 commands and 1 skill.",
"version": "1.2.1",
"author": { "author": {
"name": "Nityesh Agarwal" "name": "Nityesh Agarwal"
}, },

View File

@@ -198,20 +198,14 @@ export async function syncReleaseMetadata(options: SyncOptions = {}): Promise<Me
for (const plugin of marketplaceClaude.plugins) { for (const plugin of marketplaceClaude.plugins) {
if (plugin.name === "compound-engineering") { if (plugin.name === "compound-engineering") {
if (plugin.version !== expectedCompoundVersion) {
plugin.version = expectedCompoundVersion
changed = true
}
if (plugin.description !== compoundMarketplaceDescription) { if (plugin.description !== compoundMarketplaceDescription) {
plugin.description = compoundMarketplaceDescription plugin.description = compoundMarketplaceDescription
changed = true changed = true
} }
} }
// Plugin versions are not synced in marketplace.json -- the canonical
if (plugin.name === "coding-tutor" && plugin.version !== expectedCodingTutorVersion) { // version lives in each plugin's own plugin.json. Duplicating versions
plugin.version = expectedCodingTutorVersion // here creates drift that release-please can't maintain.
changed = true
}
} }
updates.push({ path: marketplaceClaudePath, changed }) updates.push({ path: marketplaceClaudePath, changed })

View File

@@ -1,8 +1,9 @@
import { describe, expect, test } from "bun:test" import { describe, expect, test } from "bun:test"
import { buildReleasePreview } from "../src/release/components" import { buildReleasePreview, bumpVersion, loadCurrentVersions } from "../src/release/components"
describe("release preview", () => { describe("release preview", () => {
test("uses changed files to determine affected components and next versions", async () => { test("uses changed files to determine affected components and next versions", async () => {
const versions = await loadCurrentVersions()
const preview = await buildReleasePreview({ const preview = await buildReleasePreview({
title: "fix: adjust ce:plan-beta wording", title: "fix: adjust ce:plan-beta wording",
files: ["plugins/compound-engineering/skills/ce-plan-beta/SKILL.md"], files: ["plugins/compound-engineering/skills/ce-plan-beta/SKILL.md"],
@@ -11,10 +12,11 @@ describe("release preview", () => {
expect(preview.components).toHaveLength(1) expect(preview.components).toHaveLength(1)
expect(preview.components[0].component).toBe("compound-engineering") expect(preview.components[0].component).toBe("compound-engineering")
expect(preview.components[0].inferredBump).toBe("patch") expect(preview.components[0].inferredBump).toBe("patch")
expect(preview.components[0].nextVersion).toBe("2.42.1") expect(preview.components[0].nextVersion).toBe(bumpVersion(versions["compound-engineering"], "patch"))
}) })
test("supports per-component overrides without affecting unrelated components", async () => { test("supports per-component overrides without affecting unrelated components", async () => {
const versions = await loadCurrentVersions()
const preview = await buildReleasePreview({ const preview = await buildReleasePreview({
title: "fix: update coding tutor prompts", title: "fix: update coding tutor prompts",
files: ["plugins/coding-tutor/README.md"], files: ["plugins/coding-tutor/README.md"],
@@ -27,7 +29,7 @@ describe("release preview", () => {
expect(preview.components[0].component).toBe("coding-tutor") expect(preview.components[0].component).toBe("coding-tutor")
expect(preview.components[0].inferredBump).toBe("patch") expect(preview.components[0].inferredBump).toBe("patch")
expect(preview.components[0].effectiveBump).toBe("minor") expect(preview.components[0].effectiveBump).toBe("minor")
expect(preview.components[0].nextVersion).toBe("1.3.0") expect(preview.components[0].nextVersion).toBe(bumpVersion(versions["coding-tutor"], "minor"))
}) })
test("docs-only changes remain non-releasable by default", async () => { test("docs-only changes remain non-releasable by default", async () => {