fix: add cursor-marketplace as release-please component (#315)
This commit is contained in:
@@ -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<string, ReleaseComponent> = {
|
||||
"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<VersionS
|
||||
const ce = await readJson<PluginManifest>(`${cwd}/plugins/compound-engineering/.claude-plugin/plugin.json`)
|
||||
const codingTutor = await readJson<PluginManifest>(`${cwd}/plugins/coding-tutor/.claude-plugin/plugin.json`)
|
||||
const marketplace = await readJson<MarketplaceManifest>(`${cwd}/.claude-plugin/marketplace.json`)
|
||||
const cursorMarketplace = await readJson<MarketplaceManifest>(`${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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -135,12 +135,14 @@ export async function syncReleaseMetadata(options: SyncOptions = {}): Promise<Me
|
||||
const codingTutorClaudePath = path.join(root, "plugins", "coding-tutor", ".claude-plugin", "plugin.json")
|
||||
const codingTutorCursorPath = path.join(root, "plugins", "coding-tutor", ".cursor-plugin", "plugin.json")
|
||||
const marketplaceClaudePath = path.join(root, ".claude-plugin", "marketplace.json")
|
||||
const marketplaceCursorPath = path.join(root, ".cursor-plugin", "marketplace.json")
|
||||
|
||||
const compoundClaude = await readJson<ClaudePluginManifest>(compoundClaudePath)
|
||||
const compoundCursor = await readJson<CursorPluginManifest>(compoundCursorPath)
|
||||
const codingTutorClaude = await readJson<ClaudePluginManifest>(codingTutorClaudePath)
|
||||
const codingTutorCursor = await readJson<CursorPluginManifest>(codingTutorCursorPath)
|
||||
const marketplaceClaude = await readJson<MarketplaceManifest>(marketplaceClaudePath)
|
||||
const marketplaceCursor = await readJson<MarketplaceManifest>(marketplaceCursorPath)
|
||||
const expectedCompoundVersion = resolveExpectedVersion(
|
||||
versions["compound-engineering"],
|
||||
compoundClaude.version,
|
||||
@@ -211,5 +213,23 @@ export async function syncReleaseMetadata(options: SyncOptions = {}): Promise<Me
|
||||
updates.push({ path: marketplaceClaudePath, changed })
|
||||
if (write && changed) await writeJson(marketplaceClaudePath, marketplaceClaude)
|
||||
|
||||
changed = false
|
||||
if (versions["cursor-marketplace"] && marketplaceCursor.metadata.version !== versions["cursor-marketplace"]) {
|
||||
marketplaceCursor.metadata.version = versions["cursor-marketplace"]
|
||||
changed = true
|
||||
}
|
||||
|
||||
for (const plugin of marketplaceCursor.plugins) {
|
||||
if (plugin.name === "compound-engineering") {
|
||||
if (plugin.description !== compoundMarketplaceDescription) {
|
||||
plugin.description = compoundMarketplaceDescription
|
||||
changed = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updates.push({ path: marketplaceCursorPath, changed })
|
||||
if (write && changed) await writeJson(marketplaceCursorPath, marketplaceCursor)
|
||||
|
||||
return { updates }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export type ReleaseComponent = "cli" | "compound-engineering" | "coding-tutor" | "marketplace"
|
||||
export type ReleaseComponent = "cli" | "compound-engineering" | "coding-tutor" | "marketplace" | "cursor-marketplace"
|
||||
|
||||
export type BumpLevel = "patch" | "minor" | "major"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user