From 838aeb79d069b57a80d15ff61d83913919b81aef Mon Sep 17 00:00:00 2001 From: Trevin Chow Date: Wed, 18 Mar 2026 18:47:00 -0700 Subject: [PATCH] fix: add cursor-marketplace as release-please component (#315) --- .cursor-plugin/marketplace.json | 2 +- .github/.release-please-manifest.json | 3 ++- .github/release-please-config.json | 11 +++++++++++ .github/workflows/release-preview.yml | 7 +++++++ scripts/release/validate.ts | 13 ++++++++++++- src/release/components.ts | 10 +++++++++- src/release/metadata.ts | 20 ++++++++++++++++++++ src/release/types.ts | 2 +- tests/release-components.test.ts | 11 ++++++++++- tests/release-metadata.test.ts | 16 ++++++++++++++++ 10 files changed, 89 insertions(+), 6 deletions(-) diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json index e9adfaa..c4bfcee 100644 --- a/.cursor-plugin/marketplace.json +++ b/.cursor-plugin/marketplace.json @@ -14,7 +14,7 @@ { "name": "compound-engineering", "source": "compound-engineering", - "description": "AI-powered development tools that get smarter with every use. Includes specialized agents, commands, skills, and Context7 MCP." + "description": "AI-powered development tools that get smarter with every use. Make each unit of engineering work easier than the last." }, { "name": "coding-tutor", diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 82fefb3..898817b 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -2,5 +2,6 @@ ".": "2.44.0", "plugins/compound-engineering": "2.44.0", "plugins/coding-tutor": "1.2.1", - ".claude-plugin": "1.0.2" + ".claude-plugin": "1.0.2", + ".cursor-plugin": "1.0.0" } diff --git a/.github/release-please-config.json b/.github/release-please-config.json index 73f0b22..298eef7 100644 --- a/.github/release-please-config.json +++ b/.github/release-please-config.json @@ -57,6 +57,17 @@ "jsonpath": "$.metadata.version" } ] + }, + ".cursor-plugin": { + "release-type": "simple", + "package-name": "cursor-marketplace", + "extra-files": [ + { + "type": "json", + "path": "marketplace.json", + "jsonpath": "$.metadata.version" + } + ] } } } diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index 5e335ee..3f3923e 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -31,6 +31,12 @@ on: type: choice options: [auto, patch, minor, major] default: auto + cursor_marketplace_bump: + description: "cursor-marketplace bump override" + required: false + type: choice + options: [auto, patch, minor, major] + default: auto jobs: preview: @@ -86,6 +92,7 @@ jobs: args+=(--override "compound-engineering=${{ github.event.inputs.compound_engineering_bump || 'auto' }}") args+=(--override "coding-tutor=${{ github.event.inputs.coding_tutor_bump || 'auto' }}") args+=(--override "marketplace=${{ github.event.inputs.marketplace_bump || 'auto' }}") + args+=(--override "cursor-marketplace=${{ github.event.inputs.cursor_marketplace_bump || 'auto' }}") bun run scripts/release/preview.ts "${args[@]}" | tee /tmp/release-preview.txt diff --git a/scripts/release/validate.ts b/scripts/release/validate.ts index 9d245e4..25bcbf6 100644 --- a/scripts/release/validate.ts +++ b/scripts/release/validate.ts @@ -4,12 +4,23 @@ import { validateReleasePleaseConfig } from "../../src/release/config" import { getCompoundEngineeringCounts, syncReleaseMetadata } from "../../src/release/metadata" import { readJson } from "../../src/utils/files" +type ReleasePleaseManifest = Record + const releasePleaseConfig = await readJson<{ packages: Record }>( path.join(process.cwd(), ".github", "release-please-config.json"), ) +const manifest = await readJson( + path.join(process.cwd(), ".github", ".release-please-manifest.json"), +) const configErrors = validateReleasePleaseConfig(releasePleaseConfig) const counts = await getCompoundEngineeringCounts(process.cwd()) -const result = await syncReleaseMetadata({ write: false }) +const result = await syncReleaseMetadata({ + write: false, + componentVersions: { + marketplace: manifest[".claude-plugin"], + "cursor-marketplace": manifest[".cursor-plugin"], + }, +}) const changed = result.updates.filter((update) => update.changed) if (configErrors.length === 0 && changed.length === 0) { diff --git a/src/release/components.ts b/src/release/components.ts index a33cd10..cd77cc2 100644 --- a/src/release/components.ts +++ b/src/release/components.ts @@ -13,6 +13,7 @@ const RELEASE_COMPONENTS: ReleaseComponent[] = [ "compound-engineering", "coding-tutor", "marketplace", + "cursor-marketplace", ] const FILE_COMPONENT_MAP: Array<{ component: ReleaseComponent; prefixes: string[] }> = [ @@ -30,7 +31,11 @@ const FILE_COMPONENT_MAP: Array<{ component: ReleaseComponent; prefixes: string[ }, { component: "marketplace", - prefixes: [".claude-plugin/marketplace.json", ".cursor-plugin/marketplace.json"], + prefixes: [".claude-plugin/marketplace.json"], + }, + { + component: "cursor-marketplace", + prefixes: [".cursor-plugin/marketplace.json"], }, ] @@ -40,6 +45,7 @@ const SCOPES_TO_COMPONENTS: Record = { "compound-engineering": "compound-engineering", "coding-tutor": "coding-tutor", marketplace: "marketplace", + "cursor-marketplace": "cursor-marketplace", } const NON_RELEASABLE_TYPES = new Set(["docs", "chore", "test", "ci", "build", "style"]) @@ -179,12 +185,14 @@ export async function loadCurrentVersions(cwd = process.cwd()): Promise(`${cwd}/plugins/compound-engineering/.claude-plugin/plugin.json`) const codingTutor = await readJson(`${cwd}/plugins/coding-tutor/.claude-plugin/plugin.json`) const marketplace = await readJson(`${cwd}/.claude-plugin/marketplace.json`) + const cursorMarketplace = await readJson(`${cwd}/.cursor-plugin/marketplace.json`) return { cli: root.version, "compound-engineering": ce.version, "coding-tutor": codingTutor.version, marketplace: marketplace.metadata.version, + "cursor-marketplace": cursorMarketplace.metadata.version, } } diff --git a/src/release/metadata.ts b/src/release/metadata.ts index 9fe90e2..e574b29 100644 --- a/src/release/metadata.ts +++ b/src/release/metadata.ts @@ -135,12 +135,14 @@ export async function syncReleaseMetadata(options: SyncOptions = {}): Promise(compoundClaudePath) const compoundCursor = await readJson(compoundCursorPath) const codingTutorClaude = await readJson(codingTutorClaudePath) const codingTutorCursor = await readJson(codingTutorCursorPath) const marketplaceClaude = await readJson(marketplaceClaudePath) + const marketplaceCursor = await readJson(marketplaceCursorPath) const expectedCompoundVersion = resolveExpectedVersion( versions["compound-engineering"], compoundClaude.version, @@ -211,5 +213,23 @@ export async function syncReleaseMetadata(options: SyncOptions = {}): Promise { ]) }) - test("maps marketplace metadata without bumping plugin components", () => { + test("maps claude marketplace metadata without bumping plugin components", () => { const components = detectComponentsFromFiles([".claude-plugin/marketplace.json"]) expect(components.get("marketplace")).toEqual([".claude-plugin/marketplace.json"]) + expect(components.get("cursor-marketplace")).toEqual([]) + expect(components.get("compound-engineering")).toEqual([]) + expect(components.get("coding-tutor")).toEqual([]) + }) + + test("maps cursor marketplace metadata to cursor-marketplace component", () => { + const components = detectComponentsFromFiles([".cursor-plugin/marketplace.json"]) + expect(components.get("cursor-marketplace")).toEqual([".cursor-plugin/marketplace.json"]) + expect(components.get("marketplace")).toEqual([]) expect(components.get("compound-engineering")).toEqual([]) expect(components.get("coding-tutor")).toEqual([]) }) diff --git a/tests/release-metadata.test.ts b/tests/release-metadata.test.ts index 547c2c7..0c2c79c 100644 --- a/tests/release-metadata.test.ts +++ b/tests/release-metadata.test.ts @@ -39,6 +39,7 @@ async function makeFixtureRoot(): Promise { recursive: true, }) await mkdir(path.join(root, ".claude-plugin"), { recursive: true }) + await mkdir(path.join(root, ".cursor-plugin"), { recursive: true }) await writeFile( path.join(root, "plugins", "compound-engineering", "agents", "review", "agent.md"), @@ -82,6 +83,20 @@ async function makeFixtureRoot(): Promise { 2, ), ) + await writeFile( + path.join(root, ".cursor-plugin", "marketplace.json"), + JSON.stringify( + { + metadata: { version: "1.0.0", description: "marketplace" }, + plugins: [ + { name: "compound-engineering", version: "2.41.0", description: "old" }, + { name: "coding-tutor", version: "1.2.0", description: "old" }, + ], + }, + null, + 2, + ), + ) return root } @@ -115,5 +130,6 @@ describe("release metadata", () => { expect(changedPaths).toContain(path.join(root, "plugins", "compound-engineering", ".cursor-plugin", "plugin.json")) expect(changedPaths).toContain(path.join(root, ".claude-plugin", "marketplace.json")) + expect(changedPaths).toContain(path.join(root, ".cursor-plugin", "marketplace.json")) }) })