Skip to content

Commit c8c480d

Browse files
authored
chore(ci): align node/pnpm versions (#399)
1 parent 38e8750 commit c8c480d

File tree

9 files changed

+24
-15
lines changed

9 files changed

+24
-15
lines changed

.github/workflows/ci-docker-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ jobs:
3535
- name: Setup Node.js
3636
uses: actions/setup-node@v4
3737
with:
38-
node-version: "22"
38+
node-version-file: '.node-version'
3939

4040
- name: Setup pnpm
4141
uses: pnpm/action-setup@v4
4242
with:
43-
version: latest
43+
package_json_file: web/package.json
4444

4545
- name: Build frontend
4646
working-directory: web

.github/workflows/ci-wails-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- uses: actions/setup-node@v4
3333
with:
34-
node-version: "22"
34+
node-version-file: ".node-version"
3535

3636
- uses: pnpm/action-setup@v4
3737
with:
@@ -115,7 +115,7 @@ jobs:
115115

116116
- uses: actions/setup-node@v4
117117
with:
118-
node-version: "22"
118+
node-version-file: ".node-version"
119119

120120
- uses: pnpm/action-setup@v4
121121
with:
@@ -182,7 +182,7 @@ jobs:
182182

183183
- uses: actions/setup-node@v4
184184
with:
185-
node-version: "22"
185+
node-version-file: ".node-version"
186186

187187
- name: Install Linux Build Dependencies
188188
run: |

.github/workflows/e2e-playwright.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
go-version-file: go.mod
1818
cache: true
1919

20-
- name: Build frontend
21-
uses: pnpm/action-setup@v4
20+
- uses: actions/setup-node@v4
2221
with:
23-
version: 9
22+
node-version-file: '.node-version'
2423

25-
- uses: actions/setup-node@v4
24+
- name: Build frontend
25+
uses: pnpm/action-setup@v4
2626
with:
27-
node-version: '22'
27+
package_json_file: web/package.json
2828

2929
- name: Install and build web
3030
working-directory: web

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v4
1717

18-
- uses: pnpm/action-setup@v4
18+
- uses: actions/setup-node@v4
1919
with:
20-
version: 9
20+
node-version-file: '.node-version'
2121

22-
- uses: actions/setup-node@v4
22+
- uses: pnpm/action-setup@v4
2323
with:
24-
node-version: '20'
24+
package_json_file: web/package.json
2525

2626
- name: Get pnpm store directory
2727
shell: bash
@@ -30,7 +30,7 @@ jobs:
3030
- uses: actions/cache@v4
3131
with:
3232
path: ${{ env.STORE_PATH }}
33-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('web/package.json') }}
33+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('web/pnpm-lock.yaml') }}
3434
restore-keys: |
3535
${{ runner.os }}-pnpm-store-
3636

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.11.0

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.11.0

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ go install github.com/wailsapp/wails/v2/cmd/wails@latest
114114
wails dev
115115
```
116116

117+
**Frontend requirements:** Node.js 22.11.0 (see `.node-version` / `.nvmrc`) and pnpm 10.7.0 (locked via `web/package.json`).
118+
117119
## Configure AI Coding Tools
118120

119121
### Claude Code

README_CN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ go install github.com/wailsapp/wails/v2/cmd/wails@latest
114114
wails dev
115115
```
116116

117+
**前端开发环境要求:** Node.js 22.11.0(见 `.node-version` / `.nvmrc`)以及 pnpm 10.7.0(在 `web/package.json` 中锁定)。
118+
117119
## 配置 AI 编程工具
118120

119121
### Claude Code

web/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"version": "0.1.1",
55
"type": "module",
66
"packageManager": "pnpm@10.7.0",
7+
"engines": {
8+
"node": ">=22.11.0 <23"
9+
},
710
"scripts": {
811
"dev": "vite",
912
"build": "tsc -b && vite build",

0 commit comments

Comments
 (0)