Skip to content

chore: Use Bun for package management #1649

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

chore: Use Bun for package management #1649

wants to merge 14 commits into from

Conversation

aklinker1
Copy link
Collaborator

@aklinker1 aklinker1 commented May 2, 2025

This closes #1643.

  • Update scripts
  • Migrate E2E tests to use bun

@aklinker1 aklinker1 self-assigned this May 2, 2025
Copy link

netlify bot commented May 2, 2025

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit e2a89ae
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/68161095ad4d7d0008f869d8
😎 Deploy Preview https://deploy-preview-1649--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 site configuration.

@aklinker1 aklinker1 changed the title chore: Migrate repo to use Bun as the package manager chore: Use Bun for package management May 2, 2025
Copy link

pkg-pr-new bot commented May 2, 2025

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@1649

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@1649

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@1649

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@1649

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@1649

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@1649

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@1649

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@1649

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@1649

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@1649

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@1649

wxt

npm i https://pkg.pr.new/wxt@1649

commit: e2a89ae

@@ -6,6 +6,7 @@
# Mark lock files as generated to avoid diffing
pnpm-lock.yaml linguist-generated
package-lock.json linguist-generated
bun.lock linguist-generated
bun.lockb linguist-generated
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
bun.lockb linguist-generated

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's still a test fixture containing a binary lockfile, I'll try and remove this one when I update E2E tests to use bun.

Copy link
Contributor

Choose a reason for hiding this comment

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

There's still a test fixture containing a binary lockfile, I'll try and remove this one when I update E2E tests to use bun.

Okay

Comment on lines +63 to +64
bun run build
bun publish
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend using npm instead in this case, because Bun does not yet support the --provenance flag for signing releases (see oven-sh/bun#15601)

Suggested change
bun run build
bun publish
bunx npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}"
bunx npm publish --provenance --access public

Copy link
Collaborator Author

@aklinker1 aklinker1 May 3, 2025

Choose a reason for hiding this comment

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

WXT doesn't have provenance right now, so I'll do this in a separate PR.

#1654

Copy link
Contributor

Choose a reason for hiding this comment

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

WXT doesn't have provenance right now, so I'll do this in a separate PR.

#1654

Ok

@okineadev
Copy link
Contributor

After merging this PR, we can then migrate all vitest tests to bun:test

It's not urgent, everything is drop-in replacement there except mocks, in Bun it's a bit specific

@aklinker1
Copy link
Collaborator Author

After merging this PR, we can then migrate all vitest tests to bun:test

It's not urgent, everything is drop-in replacement there except mocks, in Bun it's a bit specific

Yeah, if we decide to migrate tests, we'll do that in a separate PR.

@okineadev
Copy link
Contributor

1e81f7c (#1649)

Please add Co-Authored-By: Okinea Dev <[email protected]> next time 🙏

@okineadev
Copy link
Contributor

Errors in tests due to lack of pnpm?

It seems that Node.js and pnpm should be added to the test workflows

@aklinker1
Copy link
Collaborator Author

Errors in tests due to lack of pnpm?

It seems that Node.js and pnpm should be added to the test workflows

Yeah, boarding a plane rn and traveling all day today, so this will have to wait until tomorrow.

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
2 participants