Skip to content

chore: node22#18578

Open
ianzone wants to merge 9 commits intoNervJS:mainfrom
ianzone:node24
Open

chore: node22#18578
ianzone wants to merge 9 commits intoNervJS:mainfrom
ianzone:node24

Conversation

@ianzone
Copy link
Copy Markdown
Contributor

@ianzone ianzone commented Nov 6, 2025

这个 PR 做了什么? (简要描述所做更改)
更新 node 版本为 node22
更新 macOS 至 latest arm 架构,actions/runner-images#13046

这个 PR 是什么类型? (至少选择一个)

这个 PR 涉及以下平台:

  • 所有平台
  • Web 端(H5)
  • 移动端(React-Native)
  • 鸿蒙(Harmony)
  • 鸿蒙容器(Harmony Hybrid)
  • ASCF 元服务
  • 快应用(QuickApp)
  • 所有小程序
  • 微信小程序
  • 企业微信小程序
  • 京东小程序
  • 百度小程序
  • 支付宝小程序
  • 支付宝 IOT 小程序
  • 钉钉小程序
  • QQ 小程序
  • 飞书小程序
  • 快手小程序
  • 头条小程序

Summary by CodeRabbit

  • Chores
    • 更新 CI 所用 Node 版本至 22 并调整矩阵与主机标签为 -latest,更新各平台的构建与测试目标以改善覆盖和兼容性。
    • 简化并统一 macOS/Ubuntu 的构建步骤与目标(包括 macOS 架构调整、Ubuntu 同时支持 glibc 与 musl)。
    • 发布流程与依赖安装命令微调,修正步骤名称拼写。
  • Bug Fixes
    • 测试配置中加入无沙箱参数以提升容器环境稳定性。

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Nov 6, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

更新多个 GitHub Actions 工作流将 Node 版本切换到 22,统一部分 runner 为 *-latest;调整 nodejs.yml 的矩阵与包含/排除规则,macOS 目标改为 aarch64,Ubuntu 同时包含 gnu 与 musl 目标;在 Stencil 测试配置中新增无沙箱浏览器启动参数。

Changes

Cohort / File(s) 变更摘要
Node.js CI 工作流
​.github/workflows/nodejs.yml
node-version 矩阵从 [18.x, 20.x] 更新为 [22, 20];host 矩阵改为 macos-latest, windows-latest, ubuntu-latest;移除对 macos-13 的排除,新增对 macos-latest20 的排除规则调整;macOS 目标改为 aarch64-apple-darwin;Ubuntu 目标包含 x86_64-unknown-linux-gnux86_64-unknown-linux-musl。其它步骤(install/lint/artifact/coverage)与新矩阵对齐。
Rust 绑定 构建工作流
​.github/workflows/build-rust-binding.yml
node-version18.x 升级为 22;将 macOS runner 从 macos-13 改为 macos-latest 并简化该 host 的构建步骤(移除此前的 strip 步骤);ubuntu-22.04 更换为 ubuntu-latest;Windows 条目保持不变。
发布工作流 & 同步工作流
​.github/workflows/publish.yml, ​.github/workflows/sync-components-types.yml
将 Node 设定从 18 -> 22(步骤名由特定版本改为通用“Setup Node”);调整安装命令(pnpm -r install --frozen-lockfile -> pnpm install --frozen-lockfile)并修正拼写。缓存与 registry 配置保持一致。
Stencil 测试 配置
packages/taro-components/scripts/stencil/stencil.config.ts
在 testing 配置中新增 browserArgs: ['--no-sandbox', '--disable-setuid-sandbox'],并做了少量注释/空白调整;无其它 API/导出签名变更。

Estimated code review effort

🎯 3 (中等) | ⏱️ ~20 分钟

  • 关注点:matrix 的包含/排除规则是否与预期匹配(尤其 macOS aarch64 映射与对 macos-latest 的排除/包含);
  • 检查 macOS 上移除 strip 步骤是否影响构建产物(build-rust-binding.yml);
  • 验证 Stencil 新增的 browserArgs 在 CI 环境下能否正确启动无沙箱浏览器(packages/.../stencil.config.ts)。

Possibly related PRs

Suggested reviewers

  • yoyo837
  • tutuxxx
  • luckyadam

诗歌

🐰 我跳过 CI 草坪轻轻嚓,
节点换新靴子二二去,
苹果小芯朝云端,步伐快,
两条 Linux 路并肩不孤单,
无沙箱的风里我眯眼笑。

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning PR标题为 'chore: node22',但实际变更涉及Node.js 22和Node.js 24,以及macOS升级到最新架构和多个CI工作流的更新。标题未能准确反映主要变更内容。 建议更新标题为 'chore: upgrade Node.js to 22/24 and update CI runners' 或 'chore: update Node.js versions and macOS runner' 以更准确地描述所有关键变更。
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a 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-new job与原有的 nodejs-testing job几乎完全相同(约110行重复代码),仅在矩阵配置和第191行的安装命令有差异。这违反了DRY原则,增加了维护成本。

根据PR描述,旧的 nodejs-testing 最终会被移除,建议考虑以下方案:

  1. 短期:直接合并两个矩阵到一个job中(更新 node-versionhost,调整exclude/include规则)
  2. 使用GitHub Actions的reusable workflows来消除重复

这样可以避免未来维护两份相同代码的问题。

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a018f9d and 58ce338.

📒 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的测试覆盖范围。

Comment thread .github/workflows/nodejs.yml
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 6, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.83%. Comparing base (ef4a0b2) to head (b104fd7).
⚠️ Report is 25 commits behind head on main.

❌ Your project check has failed because the head coverage (51.83%) is below the target coverage (75.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #18578      +/-   ##
==========================================
- Coverage   52.63%   51.83%   -0.81%     
==========================================
  Files         463      545      +82     
  Lines       25108    28282    +3174     
  Branches     6629     7332     +703     
==========================================
+ Hits        13215    14659    +1444     
- Misses       9726    11331    +1605     
- Partials     2167     2292     +125     
Flag Coverage Δ
taro-cli 72.69% <ø> (-0.17%) ⬇️
taro-runtime 60.33% <ø> (ø)
taro-web 49.68% <ø> (-3.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 133 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This was referenced Nov 8, 2025
This was referenced Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants