Goal
Fork cormoran/dya-studio into a clean bun-native project (local working dir ~/Projects/fork, e.g. published as rdlu/dya-studio), so mise run studio (and dev in general) needs no npm/run-script-os workarounds.
Why: running it locally today works but is finicky — bun blocks the two git-dependency client packages' npm-oriented postinstall builds, so our mise run studio task has to build them by hand with tsc (see PR #28 fix(dya): build cormoran Studio client packages). A bun-native fork removes that.
Not worth it? The hosted app (studio.dya.cormoran.works) and the now-fixed mise run studio both work without a fork. This issue is only for wanting a clean codebase to own/hack on.
Feasibility: YES
- The app is React 19 + Vite + TypeScript — bun runs all of it (
bun install, bun run dev, bun run build, bun test). packageManager is unpinned, so no Corepack fight.
- Its own proto codegen uses
buf generate (works under bun already).
- License: AGPL-3.0 — a public fork must remain open-source + keep attribution. OK for a personal/public fork.
The only real friction (the 2 git-dep client packages)
@cormoran/zmk-studio-react-hook → github:cormoran/react-zmk-studio, postinstall npm run build (tsc).
@zmkfirmware/zmk-studio-ts-client → github:cormoran/zmk-studio-ts-client#custom-studio-protocol+bluefy, postinstall run-script-os → git-submodule proto + protoc/ts-proto generate + tsc.
@types/web-bluetooth / @types/w3c-web-serial are missing → tsc type errors (non-fatal; lib/ still emits).
Plan — Option A (recommended, single fork)
git clone https://github.com/cormoran/dya-studio ~/Projects/fork/dya-studio; set origin to your fork.
- Drop
package-lock.json + pnpm-lock.yaml; commit bun.lock. Optionally pin "packageManager": "bun@1.3.x".
- Convert scripts npm→bun:
dev/build/generate/test etc. (dev = bun run generate && vite, …).
- Tame the git-dep builds (pick one):
- keep them as git deps + add a
postinstall/prepare (or scripts/setup.ts) that builds both with tsc (ts-client first), mirroring the working step in our mise task; or
- vendor prebuilt
lib/ for each; or
- replace
run-script-os invocations with bun-friendly equivalents.
- Add
@types/web-bluetooth + @types/w3c-web-serial devDeps so the client builds type-clean.
- Convert CI (
.github/workflows/test.yml, release.yml) to oven-sh/setup-bun + bun install/bun run. Decide whether to keep the Cloudflare (wrangler.toml) deploy.
- Point
zmk-sofle's mise run studio at the fork URL and drop the manual tsc build-loop once the fork builds cleanly under bun.
Option B (thorough, 3 forks)
Also fork cormoran/react-zmk-studio + cormoran/zmk-studio-ts-client, make each build bun-native (replace run-script-os, use bun build/tsc), and point the dya-studio fork at your forks. Cleanest long-term; more maintenance.
Decision needed
Refs: PR #28 (DYA Studio adoption), Issue #29 (v2.5.0 release).
Goal
Fork
cormoran/dya-studiointo a clean bun-native project (local working dir~/Projects/fork, e.g. published asrdlu/dya-studio), somise run studio(and dev in general) needs no npm/run-script-osworkarounds.Why: running it locally today works but is finicky — bun blocks the two git-dependency client packages'
npm-oriented postinstall builds, so ourmise run studiotask has to build them by hand withtsc(see PR #28fix(dya): build cormoran Studio client packages). A bun-native fork removes that.Feasibility: YES
bun install,bun run dev,bun run build,bun test).packageManageris unpinned, so no Corepack fight.buf generate(works under bun already).The only real friction (the 2 git-dep client packages)
@cormoran/zmk-studio-react-hook→github:cormoran/react-zmk-studio, postinstallnpm run build(tsc).@zmkfirmware/zmk-studio-ts-client→github:cormoran/zmk-studio-ts-client#custom-studio-protocol+bluefy, postinstallrun-script-os→ git-submodule proto +protoc/ts-protogenerate + tsc.@types/web-bluetooth/@types/w3c-web-serialare missing → tsc type errors (non-fatal; lib/ still emits).Plan — Option A (recommended, single fork)
git clone https://github.com/cormoran/dya-studio ~/Projects/fork/dya-studio; setoriginto your fork.package-lock.json+pnpm-lock.yaml; commitbun.lock. Optionally pin"packageManager": "bun@1.3.x".dev/build/generate/testetc. (dev = bun run generate && vite, …).postinstall/prepare(orscripts/setup.ts) that builds both withtsc(ts-client first), mirroring the working step in our mise task; orlib/for each; orrun-script-osinvocations with bun-friendly equivalents.@types/web-bluetooth+@types/w3c-web-serialdevDeps so the client builds type-clean..github/workflows/test.yml,release.yml) tooven-sh/setup-bun+bun install/bun run. Decide whether to keep the Cloudflare (wrangler.toml) deploy.zmk-sofle'smise run studioat the fork URL and drop the manual tsc build-loop once the fork builds cleanly under bun.Option B (thorough, 3 forks)
Also fork
cormoran/react-zmk-studio+cormoran/zmk-studio-ts-client, make each build bun-native (replacerun-script-os, usebun build/tsc), and point the dya-studio fork at your forks. Cleanest long-term; more maintenance.Decision needed
Refs: PR #28 (DYA Studio adoption), Issue #29 (v2.5.0 release).