-
Notifications
You must be signed in to change notification settings - Fork 4.9k
chore: node24 #18578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: node24 #18578
Conversation
Walkthrough更新了两个 GitHub Actions 工作流的矩阵与宿主/目标映射:将 Node.js 版本矩阵由 18/20 升级为 22/24,统一或替换为 Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Matrix as CI Matrix
participant Runner as Runner (macos-latest / windows-latest / ubuntu-latest)
participant Setup as Setup Node.js
participant Install as pnpm install
participant Build as Build/Test/Package
Note over Matrix: 生成 matrix: node-version [22,24] & hosts [macos-latest, windows-latest, ubuntu-latest]
Matrix->>Runner: 派发作业(按 host 与 node-version)
Runner->>Setup: 安装指定 Node.js 版本
Setup->>Install: 运行 `pnpm install --frozen-lockfile`
Install->>Build: 执行构建/测试/打包步骤(按目标三元组)
alt macos-latest (Apple Silicon)
Note right of Runner: 使用 target aarch64-apple-darwin
else ubuntu-latest
Note right of Runner: 使用 targets x86_64-unknown-linux-gnu & x86_64-unknown-linux-musl
end
Build->>Matrix: 上传工件 / 报告结果
Estimated code review effort🎯 3 (中等) | ⏱️ ~20 分钟
Possibly related PRs
Suggested reviewers
诗歌
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (4)📚 Learning: 2025-05-25T18:02:31.387ZApplied to files:
📚 Learning: 2025-09-05T18:40:45.775ZApplied to files:
📚 Learning: 2025-08-08T02:32:58.265ZApplied to files:
📚 Learning: 2025-08-25T22:16:50.118ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/nodejs.yml (1)
149-261: 建议重构:大量代码重复需要整合
nodejs-testing-newjob与原有的nodejs-testingjob几乎完全相同(约110行重复代码),仅在矩阵配置和第191行的安装命令有差异。这违反了DRY原则,增加了维护成本。根据PR描述,旧的
nodejs-testing最终会被移除,建议考虑以下方案:
- 短期:直接合并两个矩阵到一个job中(更新
node-version和host,调整exclude/include规则)- 或 使用GitHub Actions的reusable workflows来消除重复
这样可以避免未来维护两份相同代码的问题。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/nodejs.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/nodejs.yml (1)
156-165: 澄清矩阵排除规则的设计意图新job的矩阵配置中,Node 22被排除在所有非ubuntu平台上(macos-13、macos-latest、windows-latest),这意味着:
- Node 22:仅在ubuntu-latest上测试
- Node 24:在所有平台上测试
请确认这是否为故意设计(例如Node 22在其他平台上还不稳定),还是需要扩展Node 22的测试覆盖范围。
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18578 +/- ##
==========================================
+ Coverage 55.97% 56.32% +0.35%
==========================================
Files 416 447 +31
Lines 21563 23342 +1779
Branches 5283 5756 +473
==========================================
+ Hits 12070 13148 +1078
- Misses 8013 8372 +359
- Partials 1480 1822 +342
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/build-rust-binding.yml (1)
22-22: 使用-latest运行器版本的风险提示。主机矩阵从特定版本(
ubuntu-22.04、macos-13)更改为-latest版本。这可能会导致 CI/CD 行为的不可预测性,因为运行器 OS 可能会在没有通知的情况下更改。鉴于此更改与 PR 目标中提到的"更新分支保护规则后移除旧的 nodejs-testing 配置"相关,这似乎是有意为之的基础设施现代化计划的一部分。建议确保有适当的监控和回滚计划,以便在发现不兼容性时处理。
Also applies to: 30-30, 34-34
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/build-rust-binding.yml(1 hunks).github/workflows/nodejs.yml(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/nodejs.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
- GitHub Check: Build Rust WASM / stable - wasm32-wasi
- GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-musl
- GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
- GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-gnu
🔇 Additional comments (2)
.github/workflows/build-rust-binding.yml (2)
34-38: macOS ARM 架构支持很好。将 macOS 目标从 x86_64 更改为
aarch64-apple-darwin是正确的,符合 PR 目标中提到的"macOS ARM 架构"支持。构建命令(第 37-38 行)正确指定了目标并使用了适当的 strip 命令。
71-71: 安装命令改进良好。使用
--filter @tarojs/binding... --frozen-lockfile提高了 CI 构建的可预测性和可重现性。这符合 CI/CD 最佳实践。
| fail-fast: false | ||
| matrix: | ||
| node-version: [18.x] | ||
| node-version: [22] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR 目标与代码不匹配:缺少 Node.js 24 版本。
PR 标题为"chore: node24",PR 目标明确提到"为 Node.js 22、Node.js 24 和 macOS ARM 架构添加测试",但矩阵中仅包含 [22],缺少 Node.js 24。根据最新信息,Node.js 24 已于 2025 年 10 月 31 日正式进入长期支持(LTS)并将继续接收维护和安全更新至 2028 年 4 月。
请确认是否应在矩阵中添加 Node.js 24。如果是有意为之,请更新 PR 描述以反映实际的测试范围。
建议的修复:
- node-version: [22]
+ node-version: [22, 24]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| node-version: [22] | |
| node-version: [22, 24] |
🤖 Prompt for AI Agents
.github/workflows/build-rust-binding.yml around line 17: the GitHub Actions
node-version matrix currently lists only [22] while the PR title/description
claims tests for Node.js 22 and 24; update the matrix to include Node.js 24
(e.g., node-version: [22, 24]) so CI runs for both versions, or if 24 is
intentionally omitted, adjust the PR title/description to accurately reflect the
actual tested versions.
这个 PR 做了什么? (简要描述所做更改)
更新 node 版本为 node22, node24
更新 macOS 至 latest arm 架构,actions/runner-images#13046
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit
Chores
Tests