Problem
After the dev hot-reload fix (#514), I tried running the in-repo apps under Bun (bun --bun run dev / start) and hit a resolution divergence: Bun resolves @webjsdev/* and @prisma/client from its OWN global install cache (~/.cache/.bun/install/cache/...) instead of the npm-linked workspace node_modules. Concretely, booting examples/blog under Bun loaded @webjsdev/server@0.8.27 from the Bun cache (not the workspace 0.8.28), and @prisma/client@7.8.0 from the Bun cache (not the npm-installed 5.22.0 with the generated client). A stray bun install had created a parallel, divergent dependency tree.
The effect: running the monorepo apps under Bun exercises STALE PUBLISHED packages, not the local framework, which defeats dogfooding (and crashed on an old un-guarded module.registerHooks seed-hook path that the current 0.8.28 already guards). This is the prerequisite for any Bun-app work: until Bun resolves the workspace, every Bun run is testing the wrong code.
Design / approach
Make the monorepo Bun-install-aware so a bun run resolves the LOCAL workspace packages (and the generated Prisma client) the same way npm does:
- Confirm the root
package.json workspaces are honoured by bun install (Bun supports workspaces; the divergence suggests an app-level bun install ran instead of a root one, or Bun’s isolated-cache linking needs configuring).
- Decide the policy: either a committed Bun lockfile/workspace setup alongside npm, or a documented
bun install flow at the repo root that links @webjsdev/* to the workspace.
- Keep npm as the primary toolchain (no npm regression); Bun support is additive.
Acceptance criteria
Problem
After the dev hot-reload fix (#514), I tried running the in-repo apps under Bun (
bun --bun run dev/start) and hit a resolution divergence: Bun resolves@webjsdev/*and@prisma/clientfrom its OWN global install cache (~/.cache/.bun/install/cache/...) instead of the npm-linked workspacenode_modules. Concretely, bootingexamples/blogunder Bun loaded@webjsdev/server@0.8.27from the Bun cache (not the workspace0.8.28), and@prisma/client@7.8.0from the Bun cache (not the npm-installed5.22.0with the generated client). A straybun installhad created a parallel, divergent dependency tree.The effect: running the monorepo apps under Bun exercises STALE PUBLISHED packages, not the local framework, which defeats dogfooding (and crashed on an old un-guarded
module.registerHooksseed-hook path that the current0.8.28already guards). This is the prerequisite for any Bun-app work: until Bun resolves the workspace, every Bun run is testing the wrong code.Design / approach
Make the monorepo Bun-install-aware so a
bunrun resolves the LOCAL workspace packages (and the generated Prisma client) the same way npm does:package.jsonworkspaces are honoured bybun install(Bun supports workspaces; the divergence suggests an app-levelbun installran instead of a root one, or Bun’s isolated-cache linking needs configuring).bun installflow at the repo root that links@webjsdev/*to the workspace.Acceptance criteria
bun install(or equivalent) at the repo root links every@webjsdev/*workspace package so a Bun run resolves the local source, verified by booting an app under Bun and asserting the resolved path is underpackages/, not~/.cache/.bun.node_modules(generated copy), not the Bun global cache.agent-docs/framework-dev.md(monorepo Bun dev) and/orAGENTS.md.