Skip to content

Commit f064723

Browse files
committed
perf: migrate to bun (WIP)
1 parent 564d818 commit f064723

File tree

10 files changed

+49
-11954
lines changed

10 files changed

+49
-11954
lines changed

.github/workflows/ci.yml

+8-26
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,26 @@ jobs:
1919
runs-on: ubuntu-latest
2020

2121
steps:
22-
- uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: 18
26-
27-
- name: Load cache
28-
uses: actions/cache@v3
29-
with:
30-
path: ~/.npm
31-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
32-
restore-keys: ${{ runner.os }}-node-
22+
- uses: actions/checkout@v4
23+
- uses: oven-sh/setup-bun@v1
3324

3425
- name: Install
35-
run: npm ci
26+
run: bun install --frozen-lockfile
3627

3728
- name: Lint
38-
run: npm run format
29+
run: bun run format
3930

4031
test:
4132
name: Test
4233
timeout-minutes: 10
4334
runs-on: ubuntu-latest
4435

4536
steps:
46-
- uses: actions/checkout@v3
47-
- uses: actions/setup-node@v3
48-
with:
49-
node-version: 18
50-
51-
- name: Load cache
52-
uses: actions/cache@v3
53-
with:
54-
path: ~/.npm
55-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
56-
restore-keys: ${{ runner.os }}-node-
37+
- uses: actions/checkout@v4
38+
- uses: oven-sh/setup-bun@v1
5739

5840
- name: Install
59-
run: npm ci
41+
run: bun install --frozen-lockfile
6042

6143
- name: Test
62-
run: npm run test:cov
44+
run: bun test --coverage

.github/workflows/publish.yml

+5-14
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,17 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-node@v3
20-
with:
21-
node-version: 18
22-
23-
- name: Load cache
24-
uses: actions/cache@v3
25-
with:
26-
path: ~/.npm
27-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28-
restore-keys: ${{ runner.os }}-node-
18+
- uses: actions/checkout@v4
19+
- uses: oven-sh/setup-bun@v1
2920

3021
- name: Install
31-
run: npm ci
22+
run: bun install --frozen-lockfile
3223

3324
- name: Build extension
34-
run: npm run build
25+
run: bun run build
3526

3627
- name: Bundle extension
37-
run: npm run bundle
28+
run: bun run bundle
3829

3930
- name: Bundle source
4031
run: git archive --format=zip ${{ github.event.release.tag_name }} --output out/replace_maps_source.zip

AMO-README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22

33
## Prequisites
44

5-
- Node 18
6-
- npm
5+
- [Bun](https://bun.sh/)
76

87
## Installation
98

109
```shell
11-
npm ci
10+
bun install --frozen-lockfile
1211
```
1312

1413
This uses the `package-lock.json` file for installation to avoid package changes and have reproducible builds.
1514

1615
## Building
1716

1817
```shell
19-
npm run build && npm run bundle
18+
bun run build && bun run bundle
2019
```
2120

2221
This transpiles and minifies the TypeScript, copies static resources and bundles the output to `out/replace_maps.zip`.

bun.lockb

292 KB
Binary file not shown.

0 commit comments

Comments
 (0)