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
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hyperframes",
"description": "HyperFrames by HeyGen. Write HTML, render video. Compositions, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website-to-video capture for HyperFrames.",
"version": "0.1.0",
"version": "0.6.40",
"author": {
"name": "HeyGen",
"email": "hyperframes@heygen.com",
Expand Down
2 changes: 1 addition & 1 deletion .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyperframes",
"version": "0.1.0",
"version": "0.6.40",
"description": "Write HTML, render video. Compositions, Tailwind v4 styles, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website-to-video capture for HyperFrames.",
"author": {
"name": "HeyGen",
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://cursor.com/schemas/cursor-plugin/plugin.json",
"name": "hyperframes",
"displayName": "HyperFrames by HeyGen",
"version": "0.1.0",
"version": "0.6.40",
"description": "Write HTML, render video. Compositions, Tailwind v4 styles, GSAP and runtime adapter animations, captions, voiceovers, audio-reactive visuals, and website-to-video capture for HyperFrames.",
"author": {
"name": "HeyGen",
Expand Down
39 changes: 33 additions & 6 deletions scripts/set-version.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#!/usr/bin/env tsx
/**
* Set the version across all publishable packages in the monorepo,
* Set the version across all publishable packages and plugins in the monorepo,
* then create a git commit and tag.
*
* Usage:
* bun run set-version 0.1.1 # stable release → npm "latest" tag
* bun run set-version 0.1.1-alpha.1 # pre-release → npm "alpha" tag
* bun run set-version 0.1.1 --no-tag # bump only (no commit or tag)
*
* All packages share a single version number (fixed versioning).
* All packages and plugins share a single version number (fixed versioning).
* Pre-release suffixes (-alpha, -beta, -rc, etc.) are detected by the
* publish workflow and published to the corresponding npm dist-tag.
*/
Expand All @@ -28,6 +28,8 @@ const PACKAGES = [
"packages/aws-lambda",
];

const PLUGINS = [".claude-plugin", ".codex-plugin", ".cursor-plugin"];

const ROOT = join(import.meta.dirname, "..");

function main() {
Expand Down Expand Up @@ -56,7 +58,21 @@ function main() {
console.log(` ${content.name}: ${oldVersion} -> ${version}`);
}

console.log(`\nSet ${PACKAGES.length} packages to v${version}`);
// Update each plugin.json. Replace just the version string rather than
// round-tripping through JSON.parse/stringify: oxfmt keeps these manifests'
// short arrays inline, but JSON.stringify expands them, which would fail the
// pre-commit format check on the release commit this script creates.
for (const plugin of PLUGINS) {
const pluginPath = join(ROOT, plugin, "plugin.json");
const text = readFileSync(pluginPath, "utf-8");
const oldVersion = text.match(/"version"\s*:\s*"([^"]*)"/)?.[1] ?? "unknown";
writeFileSync(pluginPath, text.replace(/("version"\s*:\s*)"[^"]*"/, `$1"${version}"`));
console.log(` ${plugin}: ${oldVersion} -> ${version}`);
}

console.log(
`\nSet ${PACKAGES.length} packages and ${PLUGINS.length} plugin manifests to v${version}`,
);

if (skipTag) {
console.log(`\nSkipped commit and tag (--no-tag). Remember to commit and tag manually.`);
Expand All @@ -70,19 +86,30 @@ function main() {
}).trim();
const unexpected = status
.split("\n")
.filter((line) => line && !PACKAGES.some((pkg) => line.includes(pkg)));
.filter(
(line) =>
line &&
!PACKAGES.some((pkg) => line.includes(pkg)) &&
!PLUGINS.some((plugin) => line.includes(plugin)),
);
if (unexpected.length > 0) {
console.error("\nUnexpected uncommitted changes:");
unexpected.forEach((line) => console.error(` ${line}`));
console.error("Commit or stash these before releasing.");
process.exit(1);
}

execSync(`git add ${PACKAGES.map((p) => join(p, "package.json")).join(" ")}`, {
execSync(
`git add ${[...PACKAGES.map((p) => join(p, "package.json")), ...PLUGINS.map((p) => join(p, "plugin.json"))].join(" ")}`,
{
cwd: ROOT,
stdio: "inherit",
},
);
execSync(`git commit -m "chore: release v${version}"`, {
cwd: ROOT,
stdio: "inherit",
});
execSync(`git commit -m "chore: release v${version}"`, { cwd: ROOT, stdio: "inherit" });
execSync(`git tag v${version}`, { cwd: ROOT, stdio: "inherit" });
console.log(`\nCreated commit and tag v${version}`);

Expand Down
Loading