Skip to content

feat(node): add js:runtime to pin a site's JS runtime from the CLI#522

Merged
geodro merged 2 commits into
mainfrom
feat/js-runtime-command
Jun 12, 2026
Merged

feat(node): add js:runtime to pin a site's JS runtime from the CLI#522
geodro merged 2 commits into
mainfrom
feat/js-runtime-command

Conversation

@geodro

@geodro geodro commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Adds lerd js:runtime [bun|node|auto], the CLI counterpart to the dashboard's bun/Node toggle. Until now the only ways to pin a site's JS runtime were editing .lerd.yaml by hand or flipping the UI switch, so there was no scriptable, in-terminal way to do it.

The command resolves the current site from the working directory, writes the js_runtime field through config.SetProjectJSRuntime (the same helper the dashboard uses), then calls RegenerateHostWorkersForSite so a running Vite/dev worker switches runtime immediately, exactly as the UI does. bun forces bun, node (or npm) forces Node and opts out of bun auto-detection, and auto clears the pin so detection takes over again. Run with no argument and it prints the current setting plus what it currently resolves to.

The docs page gains the command in the Node table and a short paragraph in the runtime-pinning section, so the manual .lerd.yaml edit and the new command sit side by side.

geodro added 2 commits June 12, 2026 10:08
Adds `lerd js:runtime [bun|node|auto]`, the CLI counterpart to the dashboard's bun/Node toggle. Until now the only ways to pin js_runtime were editing .lerd.yaml by hand or flipping the UI switch. The command resolves the current site, writes the js_runtime field through the same config helper the UI uses, and re-syncs the host workers so a running Vite/dev worker switches runtime straight away. With no argument it prints the current setting and what it resolves to.
@geodro geodro merged commit f4e9aa1 into main Jun 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant