Skip to content

Commit 98bd861

Browse files
Switch from Yarn to Bun as package manager
1 parent cc565a3 commit 98bd861

File tree

9 files changed

+42
-982
lines changed

9 files changed

+42
-982
lines changed

.github/workflows/github-pages.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,16 @@ jobs:
3737
with:
3838
node-version: '22.9.0'
3939

40-
- name: Setup Yarn Corepack
41-
run: corepack enable
40+
- name: Setup Bun
41+
uses: oven-sh/setup-bun@v1
42+
with:
43+
bun-version: '1.2.20'
4244

4345
- name: Install dependencies
44-
run: yarn install
46+
run: bun install --frozen-lockfile
4547

4648
- name: Build Storybook
47-
run: yarn build-storybook
49+
run: bun run build-storybook
4850

4951
- name: Setup Pages
5052
uses: actions/configure-pages@v5
@@ -59,3 +61,4 @@ jobs:
5961
- name: Deploy to GitHub Pages
6062
id: deployment
6163
uses: actions/deploy-pages@v4
64+

.github/workflows/pr-preview.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,16 @@ jobs:
3636
with:
3737
node-version: '22.9.0'
3838

39-
- name: Setup Yarn Corepack
40-
run: corepack enable
39+
- name: Setup Bun
40+
uses: oven-sh/setup-bun@v1
41+
with:
42+
bun-version: '1.2.20'
4143

4244
- name: Install dependencies
43-
run: yarn install
45+
run: bun install --frozen-lockfile
4446

4547
- name: Build Storybook
46-
run: yarn build-storybook
48+
run: bun run build-storybook
4749

4850
# Verify the build output
4951
- name: Verify build output
@@ -164,4 +166,5 @@ jobs:
164166
git push
165167
else
166168
echo "PR preview directory not found"
167-
fi
169+
fi
170+

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ jobs:
2020
with:
2121
node-version: 20.x
2222

23-
- name: Enable Corepack
24-
run: corepack enable
25-
26-
- name: Install Correct Yarn Version
27-
run: corepack prepare yarn@4.4.1 --activate
23+
- name: Setup Bun
24+
uses: oven-sh/setup-bun@v1
25+
with:
26+
bun-version: '1.2.20'
2827

2928
- name: Install Dependencies
30-
run: yarn
29+
run: bun install --frozen-lockfile
3130

3231
- name: Create Release Pull Request or Publish to npm
3332
id: changesets
3433
uses: changesets/action@v1
3534
with:
3635
# This expects you to have a script called release which does a build for your packages and calls changeset publish
37-
publish: yarn release
36+
publish: bun run release
3837
env:
3938
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4039
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+

.github/workflows/test.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,21 @@ jobs:
2323
with:
2424
node-version: '22.9.0'
2525

26-
- name: Setup Yarn Corepack
27-
run: corepack enable
26+
- name: Setup Bun
27+
uses: oven-sh/setup-bun@v1
28+
with:
29+
bun-version: '1.2.20'
2830

2931
- name: Install dependencies
30-
run: yarn install
32+
run: bun install --frozen-lockfile
3133

3234
- uses: dtinth/setup-github-actions-caching-for-turbo@v1
3335

3436
- name: Install Playwright Chromium
35-
run: npx playwright install chromium
37+
run: bun x playwright install chromium
3638

3739
- name: Run tests
38-
run: yarn test
40+
run: bun test
3941

4042
- name: Upload artifacts on failure
4143
if: failure()
@@ -44,3 +46,4 @@ jobs:
4446
name: test-failure
4547
path: packages/components/storybook-static
4648
retention-days: 2
49+

.gitignore

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
logs
66
_.log
7-
npm-debug.log_
7+
npm-debug.log*
88
yarn-debug.log*
99
yarn-error.log*
1010
lerna-debug.log*
@@ -16,7 +16,7 @@ lerna-debug.log*
1616

1717
# Diagnostic reports (https://nodejs.org/api/report.html)
1818

19-
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
19+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
2020

2121
# Runtime data
2222

@@ -71,7 +71,7 @@ web_modules/
7171

7272
.npm
7373

74-
# npm package-lock.json (we use yarn)
74+
# npm package-lock.json (we use bun)
7575
package-lock.json
7676

7777
# Optional eslint cache
@@ -97,10 +97,6 @@ package-lock.json
9797

9898
*.tgz
9999

100-
# Yarn Integrity file
101-
102-
.yarn-integrity
103-
104100
# dotenv environment variable files
105101

106102
.env
@@ -186,3 +182,8 @@ storybook-static
186182

187183
# React Router v7
188184
.react-router/
185+
186+
# Bun
187+
# Keep bun.lockb in version control
188+
# bun.lockb
189+

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 0 additions & 948 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

bun.lockb

438 KB
Binary file not shown.

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"packages/*"
88
],
99
"scripts": {
10-
"start": "yarn dev",
10+
"start": "bun run dev",
1111
"dev": "turbo run dev",
1212
"build": "turbo run build",
1313
"serve": "turbo run serve",
1414
"test": "turbo run test",
15-
"clean": "find . -name '.turbo' -type d -prune -exec rm -rf {} + && find . -name 'node_modules' -type d -prune -exec rm -rf {} + && find . -name 'yarn.lock' -type f -delete",
15+
"clean": "find . -name '.turbo' -type d -prune -exec rm -rf {} + && find . -name 'node_modules' -type d -prune -exec rm -rf {} + && find . -name 'bun.lockb' -type f -delete",
1616
"format-and-lint": "biome check .",
1717
"format-and-lint:fix": "biome check . --write",
1818
"prerelease": "turbo run build",
@@ -25,8 +25,9 @@
2525
},
2626
"dependencies": {
2727
"@changesets/cli": "^2.27.11",
28+
"ajv": "^8.17.1",
2829
"react-phone-number-input": "^3.4.12",
2930
"react-router-dom": "^7.6.2"
3031
},
31-
"packageManager": "yarn@4.9.1"
32+
"packageManager": "bun@1.2.20"
3233
}

0 commit comments

Comments
 (0)