-
-
Notifications
You must be signed in to change notification settings - Fork 431
chore: Migrate monorepo to use Bun instead of PNPM #2009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for creative-fairy-df92c4 failed.
|
| "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", |
There was a problem hiding this comment.
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']); |
There was a problem hiding this comment.
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.
Co-Authored-By: Okinea Dev <[email protected]>
|
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`; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
|
@aklinker1 Keep pushing, i'll be watching ;) |
I got the easy checks working, just the hard two left... |
Overview
I've been migrating all my repos to use Bun. WXT is my last project that uses PNPM.
--ignore-scripts(no node_modules)--ignore-scripts(with node_modules)buildc all)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