Skip to content

Commit 760f810

Browse files
authored
chore: migrate from yarn/npm to bun (#157)
1 parent 845e393 commit 760f810

6 files changed

Lines changed: 500 additions & 6696 deletions

File tree

.github/workflows/ui.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ jobs:
1818
egress-policy: audit
1919

2020
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
21-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
21+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
2222
with:
23-
node-version: '20'
24-
cache: 'yarn'
23+
bun-version: latest
2524
- run: cp .env.example .env
26-
- run: yarn install
27-
- run: yarn lint
25+
- run: bun install --frozen-lockfile
26+
- run: bun run lint
2827

2928
type-check:
3029
name: Type Check
@@ -36,13 +35,12 @@ jobs:
3635
egress-policy: audit
3736

3837
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
39-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
38+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
4039
with:
41-
node-version: '20'
42-
cache: 'yarn'
40+
bun-version: latest
4341
- run: cp .env.example .env
44-
- run: yarn install
45-
- run: npx tsc --noEmit
42+
- run: bun install --frozen-lockfile
43+
- run: bun run tsc --noEmit
4644

4745
build:
4846
name: Build
@@ -54,10 +52,9 @@ jobs:
5452
egress-policy: audit
5553

5654
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
57-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
55+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
5856
with:
59-
node-version: '20'
60-
cache: 'yarn'
57+
bun-version: latest
6158
- run: cp .env.example .env
62-
- run: yarn install
63-
- run: yarn build
59+
- run: bun install --frozen-lockfile
60+
- run: bun run build

.gitignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
31
# dependencies
42
/node_modules
5-
/.pnp
6-
.pnp.*
7-
.yarn/*
8-
!.yarn/patches
9-
!.yarn/plugins
10-
!.yarn/releases
11-
!.yarn/versions
123

134
# testing
145
/coverage

Dockerfile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
FROM node:20-alpine AS deps
1+
FROM oven/bun:1 AS deps
22
WORKDIR /app
3-
COPY ui/package.json ui/yarn.lock ./
4-
RUN --mount=type=cache,target=/root/.yarn \
5-
yarn install --frozen-lockfile
3+
COPY ui/package.json ui/bun.lock ./
4+
RUN bun install --frozen-lockfile
65

7-
FROM node:20-alpine AS builder
6+
FROM oven/bun:1 AS builder
87
WORKDIR /app
98
COPY --from=deps /app/node_modules ./node_modules
109
COPY ./ui .
1110

1211
ENV NEXT_TELEMETRY_DISABLED=1
1312

14-
RUN --mount=type=cache,target=/app/.next/cache \
15-
yarn build
13+
RUN bun run build
1614

1715
FROM node:20-alpine AS runner
1816
WORKDIR /app
@@ -37,4 +35,4 @@ EXPOSE 3000
3735
ENV PORT=3000
3836
ENV HOSTNAME="0.0.0.0"
3937

40-
CMD ["node", "server.js"]
38+
CMD ["node", "server.js"]

0 commit comments

Comments
 (0)