Skip to content

Commit f452291

Browse files
committed
we bun nao
1 parent c4e68cd commit f452291

File tree

7 files changed

+2405
-12626
lines changed

7 files changed

+2405
-12626
lines changed

.github/workflows/CD.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [20.x]
15+
bun-version: [1.2.15]
1616
steps:
1717
- name: Install Native Dependencies
1818
run: |
@@ -35,39 +35,25 @@ jobs:
3535
echo "deploy_tag=FAILED" >> $GITHUB_OUTPUT
3636
fi
3737
38-
- name: Restore Yarn cache
39-
uses: actions/cache@v4
38+
- name: Use Bun ${{ matrix.bun-version }}
39+
uses: oven-sh/setup-bun@v2
4040
with:
41-
path: .yarn/cache
42-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
41+
bun-version: ${{ matrix.bun-version }}
4342

44-
- name: Use Node.js ${{ matrix.node-version }}
45-
uses: actions/setup-node@v4
46-
with:
47-
node-version: ${{ matrix.node-version }}
48-
49-
- name: Setup Yarn
50-
run: corepack enable
51-
52-
- name: Install Yarn Dependencies
53-
run: |
54-
unbuffer yarn install --immutable | tee yarn_output.log
55-
if cat yarn_output.log | grep YN0060; then
56-
echo "Detected incompatible peer dependencies!"
57-
exit 1
58-
fi
43+
- name: Install Dependencies
44+
run: bun install --frozen-lockfile
5945

6046
- name: Compile
6147
if: steps.get-tag.outputs.deploy_tag != 'FAILED'
62-
run: yarn run build --env GITHUB_CD --env GITHUB_SHA=$GITHUB_SHA --env GITHUB_TAG="${{ steps.get-tag.outputs.deploy_tag }}"
48+
run: bun run build --env GITHUB_CD --env GITHUB_SHA=$GITHUB_SHA --env GITHUB_TAG="${{ steps.get-tag.outputs.deploy_tag }}"
6349

6450
- name: Compile (no tag)
6551
if: steps.get-tag.outputs.deploy_tag == 'FAILED'
66-
run: yarn run build --env GITHUB_CD --env GITHUB_SHA=$GITHUB_SHA
52+
run: bun run build --env GITHUB_CD --env GITHUB_SHA=$GITHUB_SHA
6753

6854
#Safety against pushing broken code
6955
- name: Run ESLint
70-
run: yarn eslint "**/*.{js,jsx,ts,tsx}"
56+
run: bun eslint "**/*.{js,jsx,ts,tsx}"
7157

7258
- name: Create workdir
7359
run: |

.github/workflows/CI.yml

Lines changed: 15 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Node.js CI
1+
name: Bun CI
22

33
on:
44
push:
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
node-version: [20.x]
15+
bun-version: [1.2.15]
1616
steps:
1717
- name: Install Native Dependencies
1818
run: |
@@ -22,38 +22,24 @@ jobs:
2222
- name: Checkout
2323
uses: actions/checkout@v4
2424

25-
- name: Restore Yarn cache
26-
uses: actions/cache@v4
25+
- name: Use Bun ${{ matrix.bun-version }}
26+
uses: oven-sh/setup-bun@v2
2727
with:
28-
path: .yarn/cache
29-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
28+
bun-version: ${{ matrix.bun-version }}
3029

31-
- name: Use Node.js ${{ matrix.node-version }}
32-
uses: actions/setup-node@v4
33-
with:
34-
node-version: ${{ matrix.node-version }}
35-
36-
- name: Setup Yarn
37-
run: corepack enable
38-
39-
- name: Install Yarn Dependencies
40-
run: |
41-
unbuffer yarn install --immutable | tee yarn_output.log
42-
if cat yarn_output.log | grep YN0060; then
43-
echo "Detected incompatible peer dependencies!"
44-
exit 1
45-
fi
30+
- name: Install Dependencies
31+
run: bun install --frozen-lockfile
4632

4733
- name: Compile
48-
run: yarn build
34+
run: bun run build
4935

5036
lint:
5137
name: Run Linter
5238
runs-on: ubuntu-latest
5339

5440
strategy:
5541
matrix:
56-
node-version: [20.x]
42+
bun-version: [1.2.15]
5743

5844
steps:
5945
- name: Install Native Dependencies
@@ -64,27 +50,13 @@ jobs:
6450
- name: Checkout
6551
uses: actions/checkout@v4
6652

67-
- name: Restore Yarn cache
68-
uses: actions/cache@v4
53+
- name: Use Bun ${{ matrix.bun-version }}
54+
uses: oven-sh/setup-bun@v2
6955
with:
70-
path: .yarn/cache
71-
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
56+
bun-version: ${{ matrix.bun-version }}
7257

73-
- name: Use Node.js ${{ matrix.node-version }}
74-
uses: actions/setup-node@v4
75-
with:
76-
node-version: ${{ matrix.node-version }}
77-
78-
- name: Setup Yarn
79-
run: corepack enable
80-
81-
- name: Install Yarn Dependencies
82-
run: |
83-
unbuffer yarn install --immutable | tee yarn_output.log
84-
if cat yarn_output.log | grep YN0060; then
85-
echo "Detected incompatible peer dependencies!"
86-
exit 1
87-
fi
58+
- name: Install Dependencies
59+
run: bun install --frozen-lockfile
8860

8961
- name: Run ESLint
90-
run: yarn eslint "**/*.{js,jsx,ts,tsx}"
62+
run: bun eslint "**/*.{js,jsx,ts,tsx}"

.yarnrc.yml

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

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@ last 3 safari version
1616

1717
## Install
1818

19-
1. Install Node.JS from <https://nodejs.org/en>
20-
2. Install yarn by `corepack enable`
21-
3. Clone this repository
22-
4. Run `yarn` or `yarn install` on the cloned repository
19+
1. Install [Bun](https://bun.sh/)
20+
2. Clone the repository
21+
3. Run `bun install` to install dependencies
2322

2423
## Development
2524

26-
To run a test server, make sure you have ran `yarn` or `yarn install` beforehand to install dependencies then simply run `yarn start`, the first build may take anywhere from a dozen of seconds to 2 minutes depending on your machine but subsequent changes to the file system will get picked up by the dev server and those will usually be built much faster. The app will hot swap components.
25+
To run a test server, make sure you have ran `bun install` beforehand to install dependencies then simply run `bun start`, the first build may take anywhere from a dozen of seconds to 2 minutes depending on your machine but subsequent changes to the file system will get picked up by the dev server and those will usually be built much faster. The app will hot swap components.
2726

28-
Make sure to run `yarn` or `yarn install` again if you pull in new changes from the repo
27+
Make sure to run `bun install` again if you pull in new changes from the repo
2928

3029
## Scripts
3130

0 commit comments

Comments
 (0)