T-M7QX-migrate-pumice-frontend-to-bun
Status: closed/done · Impact: high · Complexity: large
Migrate pumice’s frontend (apps/pumice/src-nuxt plus the apps/pumice/packages/*
libraries) from pnpm to Bun, retiring the three pnpm lockfiles, so pumice
satisfies D-0012-monorepo-tooling’s Bun-everywhere standard and its
“no stray lockfiles” success criterion. This is the highest-risk Phase-1 task
and should be de-risked with a spike before full commitment.
After T-K3PN, pumice is vendored under apps/pumice and its frontend still
installs with pnpm.
| Location | Role today |
|---|---|
apps/pumice/pnpm-lock.yaml | Root pnpm lockfile |
apps/pumice/src-nuxt/pnpm-lock.yaml | Nuxt app lockfile |
apps/pumice/packages/nuxt_admin_layer/pnpm-lock.yaml | Layer lockfile |
apps/pumice/package.json (pnpm field) | onlyBuiltDependencies (native builds) |
apps/dashboard/bun.lock | The per-app Bun lockfile shape to match |
Proposed
Section titled “Proposed”Convert every frontend install to Bun and produce a single apps/pumice/bun.lock
(per-app, matching apps/dashboard), verifying the native-dependency and
Storybook paths that Bun handles differently from pnpm.
Approach
Section titled “Approach”- Spike first (highest-risk pieces). Before committing, prove Bun can run
Storybook and the browser-mode Vitest (Playwright) suite, and can build the
native deps (
better-sqlite3,@parcel/watcher,esbuild,unrs-resolver). These are the parts a paper migration cannot de-risk. - Convert installs. Replace pnpm invocations in pumice’s
package.jsonscripts,justfile, andtauri.conf.json(beforeDevCommand/beforeBuildCommand) with Bun equivalents; translateonlyBuiltDependenciesto Bun’strustedDependencies. - Reconcile nested packages. The
packages/admin-typesandnuxt_admin_layerfile:deps and the Nuxt layer resolution must resolve under Bun (workspace/file:protocol); verify@ontogen/admin-typesresolves. - Regenerate the lockfile. Delete the three
pnpm-lock.yamlfiles andbun installto produceapps/pumice/bun.lock. - Verify end-to-end.
bun runthe Nuxt build, typecheck, unit tests, Storybook build, and confirm the Tauri build still consumes the generated frontend dist.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
apps/pumice/package.json | edit | pnpm scripts → Bun; onlyBuiltDependencies → trustedDependencies |
apps/pumice/src-nuxt/package.json | edit | packageManager/scripts → Bun |
apps/pumice/**/pnpm-lock.yaml | delete | Retire all three pnpm lockfiles |
apps/pumice/bun.lock | new | Single per-app Bun lockfile |
apps/pumice/tauri.conf.json | edit | beforeDevCommand/beforeBuildCommand → Bun |
apps/pumice/justfile | edit | pnpm recipes → Bun |
apps/pumice/moon.yml | edit | Task commands → bun/bunx |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: No
pnpm-lock.yamlremains underapps/pumice; a singleapps/pumice/bun.lockexists. - AC-2:
bun installsucceeds and native deps build (better-sqlite3et al. load at runtime). - AC-3: Nuxt build, typecheck, unit tests, and Storybook build all pass under Bun.
- AC-4: The Tauri build consumes the Bun-produced frontend dist unchanged.
- AC-5:
moon run pumice:build/pumice:testdrive the Bun commands.
Out of scope
Section titled “Out of scope”- Rust/codegen changes —
T-P4LZ,T-R9WT. - CI wiring —
T-T2HB(this task proves local Bun builds; CI folds them in next).
Dependencies
Section titled “Dependencies”T-K3PN(hard): the vendored tree is what this migrates.
Depends on
Section titled “Depends on”T-K3PN