ReviewOS

also looking at this

craft-native/craft

fix: validate complete workspace release before tagging

#365
Merged chris wants to merge codex/native-sdk-workspace-release into main
5 files +73 -33

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

package.jsonmodified+1-1
Changes to package.json
@@ -60,7 +60,7 @@
6060 "changelog:preview": "bun scripts/changelog-preview.ts",
6161 "changelog:generate": "bun scripts/generate-release-changelog.ts",
6262 "test:release": "bun test ./scripts/changelog-preview.test.ts ./scripts/release-workflow.test.ts ./scripts/release-manifest.test.ts ./scripts/verify-sbom.test.ts",
63 "release": "bun scripts/release-version.ts --preflight && bun x --bun @stacksjs/bumpx prompt --recursive",
63 "release": "bun scripts/release-version.ts --preflight && bun x --bun @stacksjs/bumpx prompt --recursive --commit --tag --push --no-changelog --execute \"bun scripts/release-version.ts --pending && bun scripts/generate-release-changelog.ts && git add CHANGELOG.md\"",
6464 "release:patch": "bun scripts/release-version.ts --preflight && bun x --bun @stacksjs/bumpx patch --recursive --commit --tag --push --yes --no-changelog --execute \"bun scripts/release-version.ts --pending && bun scripts/generate-release-changelog.ts && git add CHANGELOG.md\"",
6565 "release:version": "bun scripts/release-version.ts --preflight && bun x --bun @stacksjs/bumpx --recursive --commit --tag --push --yes --no-changelog --execute \"bun scripts/release-version.ts --pending && bun scripts/generate-release-changelog.ts && git add CHANGELOG.md\""
6666 },
scripts/changelog-preview.test.tsmodified+7-5
Changes to scripts/changelog-preview.test.ts
@@ -124,12 +124,14 @@ test('release notes can include changes since the last published release after a
124124
125125test('patch release uses the guarded changelog generator before committing', () => {
126126 const project = JSON.parse(readFileSync(join(import.meta.dir, '..', 'package.json'), 'utf8'))
127 const command = project.scripts['release:patch'] as string
128127 expect(project.scripts['changelog:generate']).toBe('bun scripts/generate-release-changelog.ts')
129 expect(command).toContain('--no-changelog')
130 expect(command).toContain('bun scripts/generate-release-changelog.ts')
131 expect(command).not.toContain('--files')
132 expect(command).toContain('bun scripts/release-version.ts --pending && bun scripts/generate-release-changelog.ts')
128 for (const name of ['release', 'release:patch', 'release:version']) {
129 const command = project.scripts[name] as string
130 expect(command).toContain('bun scripts/release-version.ts --preflight')
131 expect(command).toContain('--no-changelog')
132 expect(command).not.toContain('--files')
133 expect(command).toContain('bun scripts/release-version.ts --pending && bun scripts/generate-release-changelog.ts')
134 }
133135})
134136
135137function nativeWorkspace(directory: string, git: (...args: string[]) => string): string[] {