Skip to content

Commit 2be5a81

Browse files
authored
migrate from yarn to pnpm (#1206)
* migrate from yarn to pnpm * fix * fix(github-actions): install nodejs and pnpm with mise * fix unocss config * fix * fix Dockerfile
1 parent 7e64ac3 commit 2be5a81

12 files changed

Lines changed: 3623 additions & 5284 deletions

File tree

.github/workflows/dashboard-ci.yaml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,56 +20,51 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v6
23-
- uses: actions/setup-node@v6
23+
- uses: jdx/mise-action@v4
2424
with:
25-
node-version: 22
26-
- run: corepack enable
27-
- run: yarn install --immutable
25+
install_args: node pnpm
26+
- run: pnpm install --frozen-lockfile
2827
rome:
2928
name: Format and Lint
3029
runs-on: ubuntu-latest
3130
needs: [packages]
3231
steps:
3332
- uses: actions/checkout@v6
34-
- uses: actions/setup-node@v6
33+
- uses: jdx/mise-action@v4
3534
with:
36-
node-version: 22
37-
- run: corepack enable
38-
- run: yarn install --immutable
39-
- run: yarn ci
35+
install_args: node pnpm
36+
- run: pnpm install --frozen-lockfile
37+
- run: pnpm run ci
4038
typecheck:
4139
name: Check types
4240
runs-on: ubuntu-latest
4341
needs: [packages]
4442
steps:
4543
- uses: actions/checkout@v6
46-
- uses: actions/setup-node@v6
44+
- uses: jdx/mise-action@v4
4745
with:
48-
node-version: 22
49-
- run: corepack enable
50-
- run: yarn install --immutable
51-
- run: yarn typecheck
46+
install_args: node pnpm
47+
- run: pnpm install --frozen-lockfile
48+
- run: pnpm typecheck
5249
test:
5350
name: Test
5451
runs-on: ubuntu-latest
5552
needs: [packages]
5653
steps:
5754
- uses: actions/checkout@v6
58-
- uses: actions/setup-node@v6
55+
- uses: jdx/mise-action@v4
5956
with:
60-
node-version: 22
61-
- run: corepack enable
62-
- run: yarn install --immutable
63-
- run: yarn test
57+
install_args: node pnpm
58+
- run: pnpm install --frozen-lockfile
59+
- run: pnpm test
6460
build:
6561
name: Build
6662
runs-on: ubuntu-latest
6763
needs: [packages]
6864
steps:
6965
- uses: actions/checkout@v6
70-
- uses: actions/setup-node@v6
66+
- uses: jdx/mise-action@v4
7167
with:
72-
node-version: 22
73-
- run: corepack enable
74-
- run: yarn install --immutable
75-
- run: yarn build
68+
install_args: node pnpm
69+
- run: pnpm install --frozen-lockfile
70+
- run: pnpm build

dashboard/.dockerignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
.pnp.*
2-
.yarn/*
3-
!.yarn/.gitkeep
4-
!.yarn/patches
5-
!.yarn/plugins
6-
!.yarn/releases
7-
!.yarn/sdks
8-
!.yarn/versions
9-
101
dist
112
node_modules
123

dashboard/.gitignore

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
.pnp.*
2-
.yarn/*
3-
!.yarn/.gitkeep
4-
!.yarn/patches
5-
!.yarn/plugins
6-
!.yarn/releases
7-
!.yarn/sdks
8-
!.yarn/versions
9-
101
node_modules
112
dist
123

13-
yarn-error.log
14-
154
!.vscode

dashboard/.yarn/.gitkeep

Whitespace-only changes.

dashboard/.yarnrc.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

dashboard/Dockerfile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
FROM --platform=$BUILDPLATFORM node:25-slim AS base
1+
FROM --platform=$BUILDPLATFORM node:24-slim AS base
2+
3+
ENV PNPM_HOME="/pnpm"
4+
ENV PATH="$PNPM_HOME:$PATH"
25

36
WORKDIR /work
47

5-
# use --force to replace existing yarn v1 binaries
6-
RUN npm install -g corepack@latest --force
8+
COPY package.json pnpm-lock.yaml ./
79
RUN corepack enable
8-
9-
COPY package.json yarn.lock .yarnrc.yml ./
10-
COPY .yarn .yarn
11-
RUN yarn --immutable
10+
RUN --mount=type=cache,target=/pnpm/store \
11+
pnpm install --frozen-lockfile
1212

1313
FROM --platform=$BUILDPLATFORM base AS dev
14-
15-
ENTRYPOINT ["yarn", "dev"]
14+
COPY . .
15+
ENTRYPOINT ["pnpm", "dev"]
1616
CMD ["--host", "--port=80"]
1717

1818
FROM --platform=$BUILDPLATFORM base AS builder
19-
2019
COPY . .
21-
RUN yarn build
20+
RUN pnpm build
2221

2322
FROM caddy:2 AS prod
24-
2523
COPY Caddyfile /etc/caddy/Caddyfile
2624
COPY --from=builder /work/dist/ /usr/share/caddy/

dashboard/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"lint": "biome check src",
1212
"lint:apply": "biome check src --write",
1313
"lint:force": "biome check src --write --unsafe",
14-
"fix": "yarn fmt:apply && yarn lint:apply",
14+
"fix": "pnpm fmt:apply && pnpm lint:apply",
1515
"typecheck": "tsc --noEmit",
1616
"ci": "biome ci src",
1717
"analyze": "vite build --mode analyze",
@@ -22,6 +22,7 @@
2222
"@biomejs/biome": "2.4.10",
2323
"@iconify-json/material-symbols": "1.2.65",
2424
"@types/node": "25.5.2",
25+
"@unocss/preset-mini": "66.6.7",
2526
"jsdom": "27.4.0",
2627
"rollup-plugin-visualizer": "6.0.5",
2728
"typescript": "5.9.3",
@@ -55,7 +56,7 @@
5556
"tippy.js": "6.3.7",
5657
"ts-pattern": "5.9.0",
5758
"valibot": "1.3.1",
58-
"virtua": "^0.49.0"
59+
"virtua": "0.49.0"
5960
},
60-
"packageManager": "yarn@4.13.0"
61+
"packageManager": "pnpm@10.33.0"
6162
}

0 commit comments

Comments
 (0)