fix(release): remove stale release-as pin (#674)
Some checks failed
CI / pr-title (push) Has been cancelled
CI / test (push) Has been cancelled
Release PR / release-pr (push) Has been cancelled
Release PR / publish-cli (push) Has been cancelled

This commit is contained in:
Trevin Chow
2026-04-24 07:23:02 -07:00
committed by GitHub
parent f0433d9150
commit ab44d89b0b
3 changed files with 27 additions and 2 deletions

View File

@@ -14,7 +14,6 @@
".": {
"release-type": "simple",
"package-name": "cli",
"release-as": "3.0.2",
"exclude-paths": [
"AGENTS.md",
"CLAUDE.md",
@@ -47,7 +46,6 @@
"plugins/compound-engineering": {
"release-type": "simple",
"package-name": "compound-engineering",
"release-as": "3.0.2",
"extra-files": [
{
"type": "json",

View File

@@ -3,6 +3,7 @@ import path from "path"
type ReleasePleasePackageConfig = {
"changelog-path"?: string
"skip-changelog"?: boolean
"release-as"?: string
}
type ReleasePleaseConfig = {
@@ -13,6 +14,13 @@ export function validateReleasePleaseConfig(config: ReleasePleaseConfig): string
const errors: string[] = []
for (const [packagePath, packageConfig] of Object.entries(config.packages)) {
const releaseAs = packageConfig["release-as"]
if (releaseAs) {
errors.push(
`Package "${packagePath}" uses temporary release-as pin "${releaseAs}". Remove release-as after the pinned release ships so future releases can bump normally.`,
)
}
const changelogPath = packageConfig["changelog-path"]
if (!changelogPath) continue

View File

@@ -36,4 +36,23 @@ describe("release-please config validation", () => {
expect(errors).toEqual([])
})
test("rejects checked-in release-as pins", () => {
const errors = validateReleasePleaseConfig({
packages: {
".": {
"release-as": "3.0.2",
},
"plugins/compound-engineering": {
"release-as": "3.0.2",
},
},
})
expect(errors).toHaveLength(2)
expect(errors[0]).toContain('Package "."')
expect(errors[0]).toContain("release-as")
expect(errors[1]).toContain('Package "plugins/compound-engineering"')
expect(errors[1]).toContain("3.0.2")
})
})