Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/design-workspace-metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@reddb-io/redcode": patch
---

Include the internal Design workspace in Changesets version planning and validate the real version command before merging release changes.
1 change: 1 addition & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/design/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@reddb-io/redcode-design",
"version": "0.0.0",
"private": true,
"type": "module",
"exports": {
Expand Down
25 changes: 25 additions & 0 deletions script/test-redcode-release-contract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bun

import path from "path"
import os from "os"
import fs from "fs/promises"

const root = path.resolve(import.meta.dir, "..")
const workflows = path.join(root, ".github", "workflows")
Expand Down Expand Up @@ -157,4 +159,27 @@ const staleDefault = sources.flatMap((source) =>
)
if (staleDefault.length > 0) throw new Error(`workflow still targets dev: ${staleDefault.join(", ")}`)

// `changeset status` does not validate the skipped-package dependency graph.
// Exercise the real version command without changing the checkout's versions.
const preview = await fs.mkdtemp(path.join(os.tmpdir(), "redcode-version-check-"))
try {
const workspace = await Bun.file(path.join(root, "package.json")).json()
await Bun.write(path.join(preview, "package.json"), Bun.file(path.join(root, "package.json")))
for (const pattern of workspace.workspaces.packages) {
for await (const file of new Bun.Glob(`${pattern}/package.json`).scan({ cwd: root })) {
await Bun.write(path.join(preview, file), Bun.file(path.join(root, file)))
}
}
await fs.cp(path.join(root, ".changeset"), path.join(preview, ".changeset"), { recursive: true })
await fs.symlink(path.join(root, "node_modules"), path.join(preview, "node_modules"), "junction")
const version = Bun.spawn(["node", path.join(root, "node_modules", "@changesets", "cli", "bin.js"), "version"], {
cwd: preview,
stdout: "inherit",
stderr: "inherit",
})
if ((await version.exited) !== 0) throw new Error("Changesets version rehearsal failed")
} finally {
await fs.rm(preview, { recursive: true, force: true })
}

console.log("Redcode release posture: binary-only")
Loading