Skip to content

chore: Migrate monorepo to use Bun instead of PNPM#2009

Open
aklinker1 wants to merge 61 commits intomainfrom
bun-try-2
Open

chore: Migrate monorepo to use Bun instead of PNPM#2009
aklinker1 wants to merge 61 commits intomainfrom
bun-try-2

Conversation

@aklinker1
Copy link
Member

@aklinker1 aklinker1 commented Dec 18, 2025

Overview

I've been migrating all my repos to use Bun. WXT is my last project that uses PNPM.

Task PNPM Bun Diff
Install --ignore-scripts (no node_modules)
Install --ignore-scripts (with node_modules)
Build all packages (buildc all)
CI checks
CI linux tests
CI windows tests
Netlify build & deploy

Manual Testing

I've tested most dev scripts, but we'll probably have to fix a few things as they're used for the first time after merging this PR.

Related Issue

@netlify
Copy link

netlify bot commented Dec 18, 2025

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 1d56ed1
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/698d194ab0b97e00082dc174
😎 Deploy Preview https://deploy-preview-2009--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

"dev": "buildc --deps-only -- wxt",
"build": "buildc --deps-only -- wxt build",
"build:all": "buildc --deps-only -- pnpm run --reporter-hide-prefix /^build:all:.*/",
"build:all": "buildc --deps-only -- bun run build:all:chrome-mv3 && bun run build:all:chrome-mv2 && bun run build:all:firefox-mv3 && bun run build:all:firefox-mv2",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wish bun had a built-in way to do this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'--prod',
'--json',
]);
const { stdout } = await spawn('bun', ['why', 'esbuild', '--prod', '--json']);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Bun doesn't have a JSON output, load the lockfile instead.

@PatrykKuniczak
Copy link
Collaborator

PatrykKuniczak commented Dec 18, 2025

This is a good idea, Bun is a way faster than pnpm :)

@aklinker1
Copy link
Member Author

aklinker1 commented Dec 18, 2025

This is a good idea, Bun is a way faster than pnpm :)

Yeah, I'll add benchmarks once checks are passing. Which is going... slowly lol

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.15%. Comparing base (1940e35) to head (1d56ed1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2009      +/-   ##
==========================================
+ Coverage   76.27%   79.15%   +2.87%     
==========================================
  Files         113      125      +12     
  Lines        3031     3617     +586     
  Branches      680      809     +129     
==========================================
+ Hits         2312     2863     +551     
- Misses        636      669      +33     
- Partials       83       85       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

pnpm pack
bun pm pack
sudo npm i -g npm@latest
/usr/local/bin/npm publish *.tgz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No that we don't have to run setup-node action, there is only one version of NPM installed and we don't need to specify the whole path.

Comment on lines +76 to +79
- name: Setup PNPM
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: latest
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install the other package managers required for tests (was just bun, now it's just pnpm)

@aklinker1
Copy link
Member Author

pkg.pr.new is failing due to stackblitz-labs/pkg.pr.new#458

@aklinker1 aklinker1 marked this pull request as ready for review February 11, 2026 23:16
@aklinker1 aklinker1 requested a review from Timeraa as a code owner February 11, 2026 23:16
@aklinker1
Copy link
Member Author

Alright, pkg.pr.new is the last issue.

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.

Migrate package manager to Bun

3 participants