Skip to content

build: migrate from pnpm to bun as package manager#28

Merged
vanceingalls merged 3 commits intomainfrom
va-851/05-bun-package-manager
Mar 24, 2026
Merged

build: migrate from pnpm to bun as package manager#28
vanceingalls merged 3 commits intomainfrom
va-851/05-bun-package-manager

Conversation

@vanceingalls
Copy link
Copy Markdown
Collaborator

@vanceingalls vanceingalls commented Mar 23, 2026

Summary

  • Replace pnpm with bun for dependency installation, script running, and ad-hoc execution
  • Keep pnpm for publish workflow only (publishConfig overrides + --provenance)
  • bun install replaces pnpm install (~4-5x faster cold installs)
  • bun run replaces pnpm run (~28x less startup overhead)
  • bunx replaces npx in lefthook hooks
  • CI workflows updated (oven-sh/setup-bun@v2 + actions/setup-node@v4)
  • pnpm-lock.yaml removed, bun.lock generated
  • pnpm-workspace.yaml kept for publish compatibility
  • CLI source code (packages/cli/src/) unchanged — shipped to end users who may not have bun

Part 5/5 of VA-851

Test plan

  • bun run lint — 0 errors
  • bun run format:check — all files pass
  • bun run build — all 5 packages build
  • 330 core tests pass
  • 18 engine tests pass
  • publish.yml unchanged (pnpm stays for npm publishing)
  • No bunx/bun run references in shipped source code (packages/*/src/)

@linear
Copy link
Copy Markdown

linear bot commented Mar 23, 2026

VA-851 [Pre-Migration] Configure ESLint, Prettier, and conventional commits

Context

The codebase currently has no linting or formatting enforcement. Code is clean by convention, but OSS contributors need automated guardrails. Team feedback: "I love when an open source repo has this."

What to do

  1. ESLint — add configuration at monorepo root with TypeScript rules. Extend from @typescript-eslint/recommended.
  2. Prettier — add .prettierrc at root. Configure for the existing code style (double quotes, no semicolons or with — match what's already there).
  3. Conventional commits — add commitlint config enforcing conventional commit format (feat:, fix:, refactor:, etc.). This enables automated changelog generation later.
  4. Run formatter across all source files to establish baseline (single "format" commit in internal repo before port).
  5. Add lint/format scripts to root package.json: pnpm lint, pnpm format, pnpm format:check
  6. Verify all existing code passes lint + format checks with zero errors

Why before port

We want the OSS repo's first commit to already have these configs in place and all code conforming. No "fix linting" commits in public history.

@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 44bcd24 to 89c1776 Compare March 23, 2026 21:57
@vanceingalls vanceingalls force-pushed the va-851/04-ci-and-docs branch 2 times, most recently from 5d0bd45 to 601afe2 Compare March 23, 2026 22:11
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 89c1776 to 432910e Compare March 23, 2026 22:11
@vanceingalls vanceingalls marked this pull request as ready for review March 23, 2026 22:21
@vanceingalls vanceingalls force-pushed the va-851/04-ci-and-docs branch from 601afe2 to cac6c16 Compare March 23, 2026 23:07
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch 2 times, most recently from 69344f0 to f4dd394 Compare March 23, 2026 23:08
@vanceingalls vanceingalls force-pushed the va-851/04-ci-and-docs branch from cac6c16 to 1d41ad2 Compare March 23, 2026 23:08
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch 3 times, most recently from ed54754 to 5db2d37 Compare March 23, 2026 23:18
@vanceingalls vanceingalls force-pushed the va-851/04-ci-and-docs branch from 1d41ad2 to 54ea1eb Compare March 23, 2026 23:42
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 5db2d37 to dd29d9c Compare March 23, 2026 23:43
@vanceingalls vanceingalls force-pushed the va-851/04-ci-and-docs branch from 54ea1eb to b2f5350 Compare March 24, 2026 01:43
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from dd29d9c to 0d8ca40 Compare March 24, 2026 01:43
@vanceingalls vanceingalls changed the base branch from va-851/04-ci-and-docs to graphite-base/28 March 24, 2026 01:49
vanceingalls and others added 2 commits March 24, 2026 01:49
Keep pnpm for publish workflow only (publishConfig overrides + provenance).
Bun handles install, run, and exec for all other workflows.

- Add workspaces field to root package.json for bun workspace support
- Replace pnpm setup with oven-sh/setup-bun in CI and release workflows
- Update all scripts to use bun run / bun run --filter / bunx
- Replace npx with bunx in lefthook hooks
- Update CONTRIBUTING.md with bun commands
- Delete pnpm-lock.yaml, add bun.lock
- Keep pnpm-workspace.yaml for publish workflow compatibility

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 0d8ca40 to 5b8e57f Compare March 24, 2026 01:49
@graphite-app graphite-app bot changed the base branch from graphite-base/28 to main March 24, 2026 01:49
@vanceingalls vanceingalls force-pushed the va-851/05-bun-package-manager branch from 5b8e57f to 0c5cc70 Compare March 24, 2026 01:50
@vanceingalls vanceingalls merged commit 94e2544 into main Mar 24, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants