Skip to content

chore: node22#17905

Closed
ianzone wants to merge 6 commits intoNervJS:mainfrom
ianzone:node22
Closed

chore: node22#17905
ianzone wants to merge 6 commits intoNervJS:mainfrom
ianzone:node22

Conversation

@ianzone
Copy link
Contributor

@ianzone ianzone commented Jun 28, 2025

这个 PR 做了什么? (简要描述所做更改)
CI 引入 node 22

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

  • 构建优化 (Chore)

Summary by CodeRabbit

  • Chores
    • 更新了 GitHub Actions 中的 Node.js 测试矩阵:将测试版本调整为 Node.js 20 与 22,并相应更新在 macOS 与 Windows 运行器上的排除规则。
    • 将 actions/setup-node 从 v4 升级到 v6,适配多个工作流的 Node.js 安装步骤。
    • 规范并修复了工作流的 YAML 语法与字符串引号样式(缩进、run 步骤语法、引号一致性),工作流行为保持不变。

@coderabbitai
Copy link

coderabbitai bot commented Jun 28, 2025

Walkthrough

更新多个 GitHub Actions 工作流:将 Node.js 测试矩阵从 18.x, 20.x 改为 20, 22(去掉 .x),并在若干工作流中把 actions/setup-node@v4 升级为 actions/setup-node@v6,同时修正若干 YAML 格式/引号样式和 run 行的空格。

Changes

Cohort / File(s) Change Summary
Node.js 测试工作流
./.github/workflows/nodejs.yml
将 Node.js 测试矩阵从 18.x, 20.x 更新为 20, 22(移除 .x);调整针对 macos-13windows-latest 的排除规则以跳过 Node.js 20。
Setup Node 版本升级
./.github/workflows/build-rust-binding.yml, ./.github/workflows/publish.yml, ./.github/workflows/sync-components-types.yml
actions/setup-node@v4 升级为 actions/setup-node@v6
YAML 格式与字符串规范化
./.github/workflows/publish.yml, ./.github/workflows/sync-components-types.yml
修复 - run :- run: 的空格问题,统一或调整部分字符串引号样式(双引号→单引号)和少量格式化细节。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

需额外关注的点:

  • actions/setup-node@v6 的输入/行为兼容性(检查是否需要调整后续步骤的用法)。
  • nodejs.yml 中新版矩阵与排除规则是否按预期覆盖所有 runner(macOS/Windows)。
  • publish/workflow 中格式化改动是否影响字符串解析(如 tag 前缀、PR 元数据)。

Suggested reviewers

  • luckyadam
  • tutuxxx

Poem

我是小兔跳上线,
把旧节点换新装,
二十二来敲键盘,
工作流里舞翩跹,
小改小修喜洋洋 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed 标题"chore: node22"与变更集的主要目标直接相关。根据PR目标和raw_summary,该拉取请求的核心目的是在CI中添加Node.js 22支持,并升级相关的工作流配置。标题简洁明了,使用了标准的提交消息格式("chore"类型),具体指出了"node22"作为主要变更点。开发人员扫描历史记录时能够清楚地理解这是关于Node.js版本管理的更新。
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 29be99c and 8ced832.

📒 Files selected for processing (4)
  • .github/workflows/build-rust-binding.yml (1 hunks)
  • .github/workflows/nodejs.yml (3 hunks)
  • .github/workflows/publish.yml (5 hunks)
  • .github/workflows/sync-components-types.yml (3 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 - x86_64-pc-windows-msvc
  • GitHub Check: Build Rust Binding / stable - x86_64-apple-darwin
  • GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
  • GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-gnu
  • GitHub Check: Build Rust WASM / stable - wasm32-wasi
🔇 Additional comments (9)
.github/workflows/build-rust-binding.yml (2)

54-54: 验证 setup-node v6 的兼容性。

从 v4 升级到 v6 是一个主版本升级。请确认:

  • v6 与当前工作流中的 Node.js 18.x、pnpm、Rust 工具链兼容
  • 所有缓存机制(pnpm cache)仍能正常工作
  • 构建输出结果一致

17-17: 注意:Node 版本矩阵未更新。

PR 目标提到将 Node.js 测试矩阵从 18.x, 20.x 更新为 20, 22。但此文件中第 17 行仍为 [18.x]。请确认这是有意为之(例如 Rust 绑定构建的兼容性要求)还是遗漏。

.github/workflows/sync-components-types.yml (3)

22-22: ✓ 正确的 YAML 语法修正。

run: | 的格式对于多行脚本是正确的,改善了 YAML 的可读性和规范性。


46-46: 验证 setup-node v6 升级的兼容性。

从 v4 升级到 v6。请确认:

  • v6 与 Node 18、pnpm、taro 构建流程兼容
  • 缓存功能正常(pnpm 缓存)
  • Pull Request 创建工作流正常

64-64: YAML 字符串引号样式修改。

已将创建 PR 的参数从双引号改为单引号。这是纯粹的格式调整,在 YAML 中没有功能差异。建议检查所有工作流中的引号样式是否一致。

Also applies to: 65-65, 66-66, 68-68

.github/workflows/publish.yml (4)

39-39: 步骤名称重复。

"GITHUB CONTEXT" 步骤在 need-publish 任务(第 39 行)和 publish 任务(第 120 行)中都出现了。这在不同的 job 中是允许的,不会导致冲突。无需修改。

Also applies to: 120-120


50-50: ✓ 正确的 echo 命令格式。

环境变量展开和输出格式正确。


106-106: 验证 setup-node v6 在发布流程中的兼容性。

从 v4 升级到 v6 用于 npm 发布。请确认:

  • v6 与 Node 18、npm 注册表交互兼容
  • NPM_TOKEN 认证仍能正常工作
  • 缓存机制(pnpm cache)完整可用
  • git 标签创建流程不受影响

370-370: YAML 字符串引号样式修改。

git_tag_prefix 从双引号改为单引号。这是纯格式调整,在 YAML 中功能相同(最终都传递 v 字符串)。建议保持跨工作流的引号风格一致。


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

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e123a5a and bc9be4b.

📒 Files selected for processing (1)
  • .github/workflows/nodejs.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Build Rust Binding / stable - x86_64-apple-darwin
  • GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
  • GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
🔇 Additional comments (1)
.github/workflows/nodejs.yml (1)

39-39: 确认是否有意放弃 Node 18 LTS 支持?

Node 18 仍处于主动 LTS(直到 2025-04),不少用户及依赖链依然基于 18。CI 中移除 18 会导致潜在的兼容性回归无法被及时捕获。如果并未正式在 release note 中宣布终止对 18 的支持,建议继续在矩阵中保留它。

-        node-version: [20, 22]
+        node-version: [18, 20, 22]

@codecov
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.97%. Comparing base (914dbd4) to head (b9fd98f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #17905      +/-   ##
==========================================
- Coverage   55.97%   55.97%   -0.01%     
==========================================
  Files         416      416              
  Lines       21563    21563              
  Branches     5299     5284      -15     
==========================================
- Hits        12070    12069       -1     
+ Misses       8013     7910     -103     
- Partials     1480     1584     +104     
Flag Coverage Δ
taro-cli 72.69% <ø> (-0.17%) ⬇️
taro-runtime 59.87% <ø> (ø)
taro-web 53.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 51 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.

@coderabbitai coderabbitai bot requested a review from yechunxi June 28, 2025 06:18
@ianzone
Copy link
Contributor Author

ianzone commented Jun 28, 2025

需要管理员更新分支保护规则 https://github.com/orgs/community/discussions/25720

@ianzone
Copy link
Contributor Author

ianzone commented Jun 28, 2025

@tutuxxx @luckyadam 请更新一下分支保护规则

This was referenced Jul 5, 2025
@ianzone
Copy link
Contributor Author

ianzone commented Oct 29, 2025

求跟进 @tutuxxx @luckyadam 🙏

This was referenced Nov 1, 2025
@ianzone ianzone mentioned this pull request Nov 4, 2025
27 tasks
@ianzone ianzone closed this Nov 6, 2025
@ianzone ianzone deleted the node22 branch November 6, 2025 03:41
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.

1 participant