Migrate from Yarn to Bun (Vite retained) - #260
Merged
Merged
Conversation
Replace Yarn with Bun across the monorepo while keeping Vite as the bundler/dev-server. The repo is now bun-only (node removed from mise) and all yarn/npm/npx references are converted. Highlights: - Root/workspace scripts use `bun run --filter=<pkg> <script>`; lockfile is `bun.lock` (yarn.lock + yarn-error.log removed). - CI (.github/workflows/ci.yml) uses oven-sh/setup-bun and `bun install --frozen-lockfile`. - Makefile, deploy.sh, cli_test.sh, README/docs converted; Firebase CLI runs via `bunx firebase`. - Core CLI ported to bun-native: cli.ts exports `main`, new cli-run.ts is the direct-run entry, and bin/django-builder imports `main` (also fixes the previously-broken bin). - bunfig.toml sets `linker = "hoisted"` so Vite/Rollup resolves firebase's deep `@firebase/app` import (bun's default symlinked store broke the v4 build). - 32 selective `**/parent/child` resolutions dropped (Bun supports only flat pins); verified bun's fresh resolution already meets every version floor. 10 flat pins kept in `overrides`. Validated: build (io+v4), lint, test_smoke, test_core (174), test_io (5), CLI parity, and the Vite dev server all pass under Bun. See docs/superpowers/specs/2026-07-04-bun-migration-design.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JwrmFjP62vMVjTqCXc2rfR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces Yarn with Bun as the package manager and task runner across the monorepo. Vite is retained as the bundler/dev-server (executed through Bun). The repo is now bun-only (node removed from
mise) and everyyarn/npm/npxreference has been converted.What changed
yarn.lock+yarn-error.logremoved;bun.lockcommitted.packageManager: bun@1.3.14.bun run --filter=<pkg> <script>.bunfig.tomlsetslinker = "hoisted"so Vite/Rollup can resolve firebase's deep@firebase/appimport (bun's default symlinked store broke the djangobuilder4 build; io was unaffected as it usesfirebase/compat/app).oven-sh/setup-bun@v2+bun install --frozen-lockfile; everyyarn→bun run.Makefile,script/deploy.sh,script/cli_test.shconverted; the Firebase CLI now runs viabunx firebase.cli.tsnow exportsmain; newcli-run.tsis the direct-run entry;bin/django-builderimportsmain— which also fixes the previously-broken bin (django-builder in.json out.tarnow works).Selective resolutions
Bun 1.3.14 supports only flat overrides (not nested
resolutions/overrides). The 32**/parent/childsecurity pins were dropped after verifying Bun's fresh resolution already meets or exceeds every version floor (minimatch3.1.5/5.1.9/6.2.3/9.0.9/10.2.5,ajv6.15.0/8.20.0,path-to-regexpexpress→0.1.13 & router→8.4.2). The 10 flat pins are kept;bun.lockfreezes the tree. See thecomment:overrideskey and the spec.Validation (all pass under Bun)
bun install --frozen-lockfile— consistent, no driftbun run build(io + v4) — both build;PACKAGE_VERSIONstill injectedbun run lintbun run test— smoke ✓, core 174, v4 stub, io 5bun run cli+./bin/django-builder+make create— identical 39-entry tarVITE v6.4.3 ready, HTTP 200.bintools with no node on PATH (bun-only CI viable)Caveat
The
firebasedeploy path (Makefile deploy,deploy.sh) now usesbunx firebasebut wasn't exercised here (no CI coverage, needs Firebase auth). Verifybunx firebase --versionbefore the next deploy.Full design + outcomes:
docs/superpowers/specs/2026-07-04-bun-migration-design.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01JwrmFjP62vMVjTqCXc2rfR