Skip to content

Commit e616cd4

Browse files
committed
fix: Replace all pnpm calls with bun
1 parent c133498 commit e616cd4

File tree

32 files changed

+2528
-9574
lines changed

32 files changed

+2528
-9574
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Mark lock files as generated to avoid diffing
77
pnpm-lock.yaml linguist-generated
88
package-lock.json linguist-generated
9+
bun.lock linguist-generated
910
bun.lockb linguist-generated
1011
yarn.lock linguist-generated
1112

.github/actions/setup/action.yml

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
11
name: Basic Setup
2-
description: Install PNPM, Node, and dependencies
2+
description: Install Bun and Dependencies
33

44
inputs:
55
install:
66
default: 'true'
77
type: boolean
8-
description: Whether or not to run 'pnpm install'
8+
description: Whether or not to run 'bun i'
99

1010
installArgs:
1111
default: ''
1212
type: string
13-
description: Additional args to append to "pnpm install"
13+
description: Additional args to append to "bun i"
1414

1515
runs:
1616
using: composite
1717

1818
steps:
19-
- name: 🛠️ Setup PNPM
20-
uses: pnpm/action-setup@v4
21-
22-
- name: 🛠️ Setup NodeJS
23-
uses: actions/setup-node@v4
19+
- name: 🛠️ Setup Bun
20+
uses: oven-sh/setup-bun@v2
2421
with:
25-
node-version: 18
26-
cache: pnpm
22+
bun-version-file: package.json
2723

2824
- name: 📦 Install Dependencies
2925
if: ${{ inputs.install == 'true' }}
3026
shell: bash
31-
run: pnpm install ${{ inputs.installArgs }}
27+
run: bun i ${{ inputs.installArgs }}

.github/workflows/pkg.pr.new.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: ./.github/actions/setup
2424

2525
- name: Build All Packages
26-
run: pnpm buildc all
26+
run: bun buildc all
2727

2828
- name: Publish
29-
run: pnpx pkg-pr-new publish --compact --pnpm './packages/*'
29+
run: bunx pkg-pr-new publish --compact './packages/*'

.github/workflows/publish-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
- name: Build docs
3939
run: |
40-
pnpm docs:build
40+
bun docs:build
4141
docker build docs/.vitepress -t ${{ secrets.DOCKER_REGISTRY_HOSTNAME }}/wxt/docs:${{ github.event.inputs.tag || 'latest' }}
4242
4343
- name: Push Image

.github/workflows/release.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ jobs:
5252
5353
- name: Bump and Tag
5454
run: |
55-
pnpm tsx scripts/bump-package-version.ts ${{ inputs.package }}
55+
bun scripts/bump-package-version.ts ${{ inputs.package }}
5656
git push
5757
git push --tags
5858
5959
- name: Publish to NPM
6060
working-directory: packages/${{ inputs.package }}
6161
run: |
6262
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
63-
pnpm build
64-
pnpm publish
63+
bun run build
64+
bun publish
6565
6666
- name: Create GitHub release
67-
run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }}
67+
run: bun scripts/create-github-release.ts ${{ inputs.package }}
6868
env:
6969
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sync-releases.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ jobs:
3737
installArgs: --ignore-scripts
3838

3939
- name: Sync Releases
40-
run: pnpm tsx scripts/sync-releases.ts ${{ inputs.package }}
40+
run: bun scripts/sync-releases.ts ${{ inputs.package }}
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/update-browser-package.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424

2525
- name: Generate Latest Code
2626
working-directory: packages/browser
27-
run: pnpm gen
27+
run: bun gen
2828

2929
- name: Run Checks
3030
working-directory: packages/browser
31-
run: pnpm check
31+
run: bun check
3232

3333
- name: Commit Changes
3434
id: commit
@@ -43,4 +43,4 @@ jobs:
4343
working-directory: packages/browser
4444
run: |
4545
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
46-
pnpm publish
46+
bun publish

.github/workflows/validate.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: ./.github/actions/setup
2222

2323
- name: Basic Checks
24-
run: pnpm check
24+
run: bun check
2525

2626
builds:
2727
name: Builds
@@ -34,7 +34,7 @@ jobs:
3434
uses: ./.github/actions/setup
3535

3636
- name: Build All Packages
37-
run: pnpm buildc all
37+
run: bun buildc all
3838

3939
build-demo:
4040
name: Build Demo
@@ -47,11 +47,11 @@ jobs:
4747
uses: ./.github/actions/setup
4848

4949
- name: Build
50-
run: pnpm build:all
50+
run: bun build:all
5151
working-directory: packages/wxt-demo
5252

5353
- name: ZIP
54-
run: pnpm wxt zip
54+
run: bun wxt zip
5555
working-directory: packages/wxt-demo
5656

5757
tests:
@@ -68,7 +68,7 @@ jobs:
6868
uses: oven-sh/setup-bun@v2
6969

7070
- name: Run Tests
71-
run: pnpm test:coverage -- --reporter=default --reporter=hanging-process
71+
run: bun test:coverage -- --reporter=default --reporter=hanging-process
7272

7373
- name: Upload Coverage
7474
uses: codecov/codecov-action@v5
@@ -86,7 +86,7 @@ jobs:
8686
uses: ./.github/actions/setup
8787

8888
- name: Run Tests
89-
run: pnpm test
89+
run: bun run test
9090

9191
template:
9292
name: Template
@@ -108,7 +108,7 @@ jobs:
108108
uses: ./.github/actions/setup
109109

110110
- name: Pack WXT package
111-
run: pnpm pack
111+
run: bun pm pack
112112
working-directory: packages/wxt
113113

114114
- name: Install Dependencies
@@ -120,15 +120,15 @@ jobs:
120120
working-directory: templates/${{ matrix.template }}
121121

122122
- name: Type Check Template
123-
run: pnpm compile
123+
run: bun compile
124124
if: matrix.template != 'svelte'
125125
working-directory: templates/${{ matrix.template }}
126126

127127
- name: Type Check Template
128-
run: pnpm check
128+
run: bun check
129129
if: matrix.template == 'svelte'
130130
working-directory: templates/${{ matrix.template }}
131131

132132
- name: Build Template
133-
run: pnpm build
133+
run: bun run build
134134
working-directory: templates/${{ matrix.template }}

.github/workflows/vhs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
with:
2525
install: false
2626

27-
# This prevents pnpm dlx from downloading WXT in the video
27+
# This prevents bunx from downloading WXT in the video
2828
- name: Pre-install WXT
2929
run: |
30-
pnpm store add wxt@latest
31-
pnpm dlx wxt@latest --version
30+
bun i wxt@latest
31+
bunx wxt@latest --version
3232
3333
- name: Record VHS
3434
uses: charmbracelet/[email protected]

.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ coverage
33
dist
44
.wxt
55
docs/.vitepress/cache
6-
pnpm-lock.yaml
6+
bun.lock
77
CHANGELOG.md
88
packages/browser/src/gen

CONTRIBUTING.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The title of your pull request should follow the [conventional commit format](#c
2222

2323
## Setup
2424

25-
WXT uses `pnpm`, so make sure you have it installed.
25+
WXT uses `bun`, so make sure you have it installed.
2626

2727
```sh
2828
corepack enable
@@ -31,7 +31,7 @@ corepack enable
3131
Then, simply run the install command:
3232

3333
```sh
34-
pnpm i
34+
bun i
3535
```
3636

3737
## Development
@@ -41,44 +41,44 @@ Here are some helpful commands:
4141
```sh
4242
# Build WXT package
4343
cd packages/wxt
44-
pnpm build
44+
bun run build
4545
```
4646

4747
```sh
4848
# Build WXT package, then build demo extension
4949
cd packages/wxt-demo
50-
pnpm build
50+
bun run build
5151
```
5252

5353
```sh
5454
# Build WXT package, then start the demo extension in dev mode
5555
cd packages/wxt-demo
56-
pnpm dev
56+
bun dev
5757
```
5858

5959
```sh
6060
# Run unit and E2E tests
61-
pnpm test
61+
bun run test
6262
```
6363

6464
```sh
6565
# Start the docs website locally
66-
pnpm docs:dev
66+
bun docs:dev
6767
```
6868

6969
## Profiling
7070

7171
```sh
7272
# Build the latest version
73-
pnpm --filter wxt build
73+
bun run --filter wxt build
7474

7575
# CD to the demo directory
7676
cd packages/wxt-demo
7777

7878
# 1. Generate a flamechart with 0x
79-
pnpm dlx 0x node_modules/wxt/bin/wxt.mjs build
79+
bunx 0x node_modules/wxt/bin/wxt.mjs build
8080
# 2. Inspect the process with chrome @ chrome://inspect
81-
pnpm node --inspect node_modules/wxt/bin/wxt.mjs build
81+
node --inspect node_modules/wxt/bin/wxt.mjs build
8282
```
8383

8484
## Updating Docs
@@ -96,7 +96,7 @@ WXT has unit and E2E tests. When making a change or adding a feature, make sure
9696
To run tests for a specific file, add the filename at the end of the test command:
9797

9898
```sh
99-
pnpm test manifest-contents
99+
bun run test manifest-contents
100100
```
101101

102102
All test (unit and E2E) for all packages are ran together via [Vitest workspaces](https://vitest.dev/guide/#workspaces-support).
@@ -149,7 +149,7 @@ Releases are done with GitHub actions:
149149
Use [`taze`](https://www.npmjs.com/package/taze) to upgrade dependencies throughout the entire monorepo.
150150

151151
```sh
152-
pnpm dlx taze -r
152+
bunx taze@latest -r
153153
```
154154

155155
Configuration is in [`taze.config.ts`](./taze.config.ts).

0 commit comments

Comments
 (0)