fix(FN-XXX): sync workspace version on release

This commit is contained in:
gsxdsm
2026-04-29 08:15:38 -07:00
parent d250f866d6
commit daf6dfa2c2
4 changed files with 43 additions and 4 deletions

View File

@@ -24,13 +24,22 @@ describe("Changeset configuration", () => {
});
it("should have changeset scripts in root package.json", () => {
// These scripts drive the changesets CLI workflow: changeset (add), version (bump), release:version (apply)
// These scripts drive the changesets CLI workflow: changeset (add), version (bump), release:version (apply + sync workspace version)
const pkgPath = join(repoRoot, "package.json");
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
expect(pkg.scripts.changeset).toBe("changeset");
expect(pkg.scripts.version).toBe("changeset version");
expect(pkg.scripts["release:version"]).toBe("changeset version");
expect(pkg.scripts["release:version"]).toBe("changeset version && node scripts/sync-workspace-version.mjs");
});
it("should keep the workspace package.json version aligned with the published CLI package", () => {
const workspacePkgPath = join(repoRoot, "package.json");
const cliPkgPath = join(repoRoot, "packages", "cli", "package.json");
const workspacePkg = JSON.parse(readFileSync(workspacePkgPath, "utf-8"));
const cliPkg = JSON.parse(readFileSync(cliPkgPath, "utf-8"));
expect(workspacePkg.version).toBe(cliPkg.version);
});
it("should have .github/workflows/version.yml configured for manual releases", () => {