stackflow icon indicating copy to clipboard operation
stackflow copied to clipboard

chore: migrate package manager to bun

Open orionmiz opened this issue 4 months ago • 4 comments

  • Remove Yarn-specific files (.yarnrc.yml, .yarn/, .pnp.cjs, .pnp.loader.mjs, yarn.lock)
  • Add bun.lock for dependency locking
  • Update package.json:
    • Change all scripts from 'yarn' to 'bun'
    • Update packageManager field to '[email protected]'
    • Convert 'resolutions' to 'overrides' (Bun/npm format)
    • Remove Yarn-specific 'dependenciesMeta'
  • Update documentation:
    • README.md: Update installation command
    • AGENTS.md/CLAUDE.md: Update all development commands
    • CONTRIBUTING.md: Update setup and build instructions
    • Individual package READMEs: Update installation commands
  • Update .gitignore to remove Yarn-specific entries
  • Add workflows-bun-migration.patch for CI/CD workflow updates (to be applied separately with workflow permissions)

🤖 Generated with Claude Code

orionmiz avatar Oct 26 '25 17:10 orionmiz

⚠️ No Changeset found

Latest commit: 1bc78eb0d8183cafd1178b7d408c8becc6278b93

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Oct 26 '25 17:10 changeset-bot[bot]

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
stackflow-docs 1bc78eb0 Oct 26 2025, 06:51 PM

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Transitioned from Yarn to Bun as the package manager for dependency management and project builds
    • Updated all CI/CD workflows to use Bun for installation, testing, building, and publishing
    • Updated .gitignore to reflect new dependency management approach
    • Removed Yarn-specific configuration files and VSCode workspace settings

Walkthrough

Removed Yarn PnP/zero-install artifacts, deleted the PnP loader, updated .gitignore to ignore node_modules, removed PnP/Yarn-specific VSCode settings, and converted CI workflows from Node/Yarn to Bun and Bun-based commands.

Changes

Cohort / File(s) Change Summary
Git ignore / dependency config
./.gitignore
Removed Yarn zero-install / PnP-specific ignore entries (e.g., .yarn/*, .pnp.* and related negations) and added a # Dependencies header that ignores node_modules.
PnP loader removal
./.pnp.loader.mjs
Deleted entire file implementing Yarn PnP virtual filesystem, module resolution, and related utilities.
CI workflows → Bun adoption
./.github/workflows/build.yml, ./.github/workflows/integration.yml, ./.github/workflows/release.yml
Replaced Node setup with Bun setup, swapped node-versionbun-version, removed Yarn cache/unplugged logic, replaced yarn install --immutable with bun install --frozen-lockfile, and converted yarn commands to bun run equivalents across build/test/typecheck/release jobs.
Editor settings cleanup
./.vscode/settings.json
Removed VSCode workspace settings that referenced Yarn/PnP (search.exclude for hidden Yarn/PnP folders and TypeScript SDK workspace path); retained formatter and format-on-save settings.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer push
  participant GH as GitHub Actions
  participant Checkout as actions/checkout
  participant SetupOld as setup-node (old)
  participant SetupNew as oven-sh/setup-bun (new)
  participant InstallOld as yarn install --immutable
  participant InstallNew as bun install --frozen-lockfile
  participant BuildOld as yarn build / yarn run
  participant BuildNew as bun run build / bun run

  Dev->>GH: push
  GH->>Checkout: checkout repo
  alt Before (Yarn/Node)
    GH->>SetupOld: setup-node (node-version)
    GH->>InstallOld: yarn install --immutable
    GH->>BuildOld: yarn build / yarn test / yarn changeset
  else After (Bun)
    GH->>SetupNew: setup-bun (bun-version)
    GH->>InstallNew: bun install --frozen-lockfile
    GH->>BuildNew: bun run build / bun run test / bun run changeset
  end
  Note right of GH: Cache keys and paths updated to Bun-specific locations

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify no remaining references to .pnp.loader.mjs or PnP APIs in code, scripts, or docs.
  • Confirm CI job inputs, cache keys, and secrets remain valid after switching to Bun.
  • Ensure project scripts in package.json are compatible with Bun and that lockfile/state align with bun install --frozen-lockfile.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "chore: migrate package manager to bun" is directly and accurately related to the main change in the changeset. The raw summary clearly shows that the primary modification is a comprehensive migration from Yarn to Bun, including removal of Yarn-specific files (.pnp.loader.mjs, .gitignore updates), replacement of Yarn commands with Bun in all workflows, and updates to package configuration files. The title is concise, specific, and uses standard convention with the "chore:" prefix. It clearly communicates the primary change without vagueness or unnecessary noise.
Description Check ✅ Passed The PR description is clearly related to the changeset and accurately describes the modifications being made. It covers the key aspects of the migration: removal of Yarn-specific files, addition of bun.lock, updates to package.json with Bun-specific configurations, documentation updates, .gitignore changes, and CI/CD workflow updates. All items mentioned in the description align with the raw summary of changes provided, with no off-topic or misleading statements. While the description is written at a high level, this level of detail is appropriate and expected for a migration of this scope.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch claude/migrate-yarn-to-bun-011CUW9K7B57YzmrRECn6RT3

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a0f8a80ed4fba838a09be03d81e53fff2191f0a4 and 1bc78eb0d8183cafd1178b7d408c8becc6278b93.

📒 Files selected for processing (1)
  • .vscode/settings.json (0 hunks)
💤 Files with no reviewable changes (1)
  • .vscode/settings.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Workers Builds: stackflow-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Oct 26 '25 17:10 coderabbitai[bot]

Deploying stackflow-demo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1bc78eb
Status:🚫  Build failed.

View logs