Skip to content

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 failed.

Name Link
🔨 Latest commit c640f53
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/69457fd461320e0009ad90b4

"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.

'--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
Contributor

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


console.log('Getting latest version of \x1b[36m@types/chrome\x1b[0m');
await spawn('pnpm', ['i', '--ignore-scripts', '-D', '@types/chrome@latest']);
await Bun.$`bun install --ignore-scripts -D @types/chrome@latest`;
Copy link
Contributor

Choose a reason for hiding this comment

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

That change should fix nodejs/help#5063
Which we have on the latest version of node.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I already fixed that in another one of my packages: aklinker1/check#10. The error and docs implied there wasn't a solution, but the solution was just don't use that override lol.

Also, in this specific case, we're using nano-spawn, not node:child_process, so it handles escaping args correctly.

<p id="three"></p>
</div>
`;
// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

Use specified ignore if it's possible, because JetBrains IDE(Maybe other also, but i have been using it) doesn't like it, and treating it as a warning

Copy link
Member Author

@aklinker1 aklinker1 Dec 18, 2025

Choose a reason for hiding this comment

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

Yeah, I'll probably convert this to a @ts-expect-error, was getting annoyed by all the errors while integrating bun's types into the project.

@PatrykKuniczak
Copy link
Contributor

@aklinker1 Keep pushing, i'll be watching ;)

@aklinker1
Copy link
Member Author

@aklinker1 Keep pushing, i'll be watching ;)

I got the easy checks working, just the hard two left...

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