Skip to content

Commit 2e09d9d

Browse files
noodaneeclaude
andcommitted
fix: 升级 CI Node 版本到 v20 以支持最新依赖
问题: - npm ci 失败,package.json 与 package-lock.json 不同步 - vite@7.2.7 要求 Node ^20.19.0 || >=22.12.0 - vitest@4.0.18 要求 Node ^20.0.0 || ^22.0.0 || >=24.0.0 - CI 使用 Node 18 不满足依赖要求 修复内容: 1. 升级所有 CI job 的 Node 版本从 18 到 20 2. 更新 linux-gnu-* jobs (NodeSource setup_20.x) 3. 更新 linux-musl-x64 (node:20-alpine) 4. 更新 linux-musl-arm64, macos-universal, publish-npm 5. 重新同步 package-lock.json 添加缺失的依赖 影响范围: - .github/workflows/build.yml: 6 处 Node 版本更新 - package-lock.json: 同步 eslint、prettier、ts-node 等开发依赖 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent a1ef443 commit 2e09d9d

2 files changed

Lines changed: 1561 additions & 85 deletions

File tree

.github/workflows/build.yml

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

3232
- name: Install Node.js
3333
run: |
34-
curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
34+
curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
3535
yum install -y nodejs
3636
3737
- name: Setup Zig
@@ -119,7 +119,7 @@ jobs:
119119

120120
- name: Install Node.js
121121
run: |
122-
curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
122+
curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
123123
yum install -y nodejs
124124
125125
- name: Setup Zig
@@ -195,7 +195,7 @@ jobs:
195195
linux-musl-x64:
196196
runs-on: ubuntu-24.04
197197
container:
198-
image: node:18-alpine
198+
image: node:20-alpine
199199
env:
200200
ZIG_TARGET: x86_64-linux-musl
201201
steps:
@@ -286,7 +286,7 @@ jobs:
286286
- name: Setup Node.js
287287
uses: actions/setup-node@v4
288288
with:
289-
node-version: 18
289+
node-version: 20
290290

291291
- name: Install system dependencies
292292
run: sudo apt-get update && sudo apt-get install -y build-essential cmake ninja-build python3 curl unzip git autoconf automake libtool pkg-config
@@ -370,7 +370,7 @@ jobs:
370370
- name: Setup Node.js
371371
uses: actions/setup-node@v4
372372
with:
373-
node-version: 18
373+
node-version: 20
374374

375375
- name: Install build tools
376376
run: brew install cmake ninja xz autoconf automake libtool pkg-config
@@ -473,7 +473,7 @@ jobs:
473473
- name: Setup Node.js
474474
uses: actions/setup-node@v4
475475
with:
476-
node-version: 18
476+
node-version: 20
477477
registry-url: 'https://registry.npmjs.org'
478478

479479
- name: Download all artifacts

0 commit comments

Comments
 (0)