Skip to content

Commit d314f17

Browse files
aklinker1okineadev
andcommitted
chore: Migrate monorepo to use Bun instead of PNPM (#2009)
Co-authored-by: Okinea Dev <hi@okinea.dev>
1 parent 3679dff commit d314f17

67 files changed

Lines changed: 3518 additions & 10652 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
pnpm-lock.yaml linguist-generated
88
package-lock.json linguist-generated
99
bun.lockb linguist-generated
10+
bun.lock linguist-generated
1011
yarn.lock linguist-generated
1112

1213
# Exclude templates from language statistics

.github/actions/setup/action.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
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'
7-
description: Whether or not to run 'pnpm install'
8-
9-
installArgs:
10-
default: ''
11-
description: Additional args to append to "pnpm install"
7+
description: Whether or not to run 'bun install'
128

139
runs:
1410
using: composite
1511

1612
steps:
17-
- name: 🛠️ Setup PNPM
18-
uses: pnpm/action-setup@f2b2b233b538f500472c7274c7012f57857d8ce0 # v4.1.0
19-
20-
- name: 🛠️ Setup NodeJS
21-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
13+
- name: 🛠️ Setup Bun
14+
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
2215
with:
23-
node-version: 20
24-
cache: pnpm
16+
bun-version-file: '.tool-versions'
2517

2618
- name: 📦 Install Dependencies
2719
if: ${{ inputs.install == 'true' }}
2820
shell: bash
29-
run: pnpm install ${{ inputs.installArgs }}
21+
run: bun ci ${{ inputs.installArgs }}

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ jobs:
2323
uses: ./.github/actions/setup
2424

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

2828
- name: Publish
29-
run: pnpx pkg-pr-new publish --compact --pnpm './packages/*'
29+
run: bun pkg-pr-new publish --compact --bun './packages/*'
30+
31+
- name: DEBUG
32+
if: always()
33+
run: ls -lhA
34+
working-directory: packages/analytics

.github/workflows/publish-docs.yml

Lines changed: 1 addition & 1 deletion
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 run 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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,18 @@ jobs:
5656
5757
- name: Bump and Tag
5858
run: |
59-
pnpm tsx scripts/bump-package-version.ts ${{ inputs.package }}
59+
bun run scripts/bump-package-version.ts ${{ inputs.package }}
6060
git push
6161
git push --tags
6262
6363
- name: Publish to NPM
6464
working-directory: packages/${{ inputs.package }}
6565
run: |
66-
pnpm pack
66+
bun pm pack
6767
sudo npm i -g npm@latest
68-
/usr/local/bin/npm publish *.tgz
68+
npm publish *.tgz
6969
7070
- name: Create GitHub release
71-
run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }}
71+
run: bun run scripts/create-github-release.ts ${{ inputs.package }}
7272
env:
7373
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sync-releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ jobs:
3939
installArgs: --ignore-scripts
4040

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

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ jobs:
2828

2929
- name: Generate Latest Code
3030
working-directory: packages/browser
31-
run: pnpm gen
31+
run: bun run gen
3232

3333
- name: Run Checks
3434
working-directory: packages/browser
35-
run: pnpm check
35+
run: bun run check
3636

3737
- name: Commit Changes
3838
id: commit
@@ -46,6 +46,6 @@ jobs:
4646
if: steps.commit.outputs.changes_detected == 'true'
4747
working-directory: packages/browser
4848
run: |
49-
pnpm pack
49+
bun pm pack
5050
sudo npm i -g npm@latest
51-
/usr/local/bin/npm publish *.tgz
51+
npm publish *.tgz

.github/workflows/validate.yml

Lines changed: 14 additions & 12 deletions
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 run 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 run 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 run build:all
5151
working-directory: packages/wxt-demo
5252

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

5757
tests:
@@ -73,16 +73,18 @@ jobs:
7373
- name: Setup
7474
uses: ./.github/actions/setup
7575

76-
- name: Setup Bun
77-
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
76+
- name: Setup PNPM
77+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
78+
with:
79+
version: latest
7880

7981
- name: Run Tests
8082
if: ${{ ! matrix.coverage }}
81-
run: pnpm test
83+
run: bun run test
8284

8385
- name: Run Tests (Coverage)
8486
if: matrix.coverage
85-
run: pnpm test:coverage --reporter=default --reporter=hanging-process
87+
run: bun run test:coverage --reporter=default --reporter=hanging-process
8688

8789
- name: Upload Coverage
8890
if: matrix.coverage
@@ -110,7 +112,7 @@ jobs:
110112
uses: ./.github/actions/setup
111113

112114
- name: Pack WXT package
113-
run: pnpm pack
115+
run: bun pm pack
114116
working-directory: packages/wxt
115117

116118
- name: Install Dependencies
@@ -122,15 +124,15 @@ jobs:
122124
working-directory: templates/${{ matrix.template }}
123125

124126
- name: Type Check Template
125-
run: pnpm compile
127+
run: bun run compile
126128
if: matrix.template != 'svelte'
127129
working-directory: templates/${{ matrix.template }}
128130

129131
- name: Type Check Template
130-
run: pnpm check
132+
run: bun run check
131133
if: matrix.template == 'svelte'
132134
working-directory: templates/${{ matrix.template }}
133135

134136
- name: Build Template
135-
run: pnpm build
137+
run: bun run build
136138
working-directory: templates/${{ matrix.template }}

.github/workflows/vhs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ jobs:
2020
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
ref: ${{ github.ref_name }}
23+
- name: Setup PNPM
24+
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
2325

24-
- name: Setup
25-
uses: ./.github/actions/setup
26+
- name: Setup NodeJS
27+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
2628
with:
27-
install: false
29+
cache: pnpm
2830

2931
- name: Setup Go
3032
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.wxt
88
.wxt-runner
99
*.log
10+
*.tgz
1011
/docs/.vitepress/cache
1112
docs/.vitepress/.temp
1213
coverage
@@ -20,6 +21,5 @@ templates/*/yarn.lock
2021
templates/*/package-lock.json
2122
docs/api/reference
2223
stats.html
23-
.tool-versions
2424
.cache
2525
*-stats.txt

0 commit comments

Comments
 (0)