Skip to content

B-SFHO-watch-bun-s-git-subdirectory-path-support-before-revisiting

We looked at migrating the monorepo from bun to pnpm for package-sharing/stability reasons and decided against it. Bun’s default linker (unmodified in this repo, no bunfig.toml override) already produces a content-hash-plus-symlink node_modules structure comparable to pnpm’s store, so the dedup/phantom-dependency argument for pnpm doesn’t hold here. Raw install performance is comparable to or better than pnpm in general benchmarks.

The one confirmed, concrete gap: bun cannot install a git dependency pinned to a subdirectory (pnpm’s github:owner/repo#tag&path:subdir syntax). That’s the sole reason apps/ontological-legacy stays on pnpm instead of the repo’s bun convention (its src-nuxt depends on @ontogen/admin-layer and @ontogen/admin-types via that syntax).

Tracked upstream: oven-sh/bun#15506 (opened Nov 2024, still open). A first implementation (oven-sh/bun#27892) got fairly complete before being closed as stale when bun’s package manager was rewritten from Zig to Rust — not rejected on merits. A second attempt (oven-sh/bun#33251) is open now, explicitly a Rust port of the same design, but has no maintainer (oven-sh/bun org member) approval yet — only automated review bots. No committed timeline.

Decision: stay on pnpm for ontological-legacy, don’t chase a repo-wide migration. Revisit only if bun#33251 (or a successor) actually merges into a bun release.


← Back to Backlog