Revert/main#18685
Conversation
Walkthrough将多个 GitHub Actions 的 Changes
Sequence Diagram(s)(此变更以配置、测试框架迁移与拼写/依赖调整为主,未引入新的多组件顺序控制流,故省略序列图。) Estimated code review effort🎯 3 (中等复杂度) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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.
Actionable comments posted: 4
♻️ Duplicate comments (7)
.github/workflows/build-rust-wasm.yml (1)
12-12: Checkout action 版本回退此文件中的 checkout action 也从 v6 回退到 v5,与 PR 中其他工作流文件的更改保持一致。
.github/workflows/issue-labeler.yml (1)
20-20: Checkout action 版本回退此文件中的 checkout action 从 v6 回退到 v5,与 PR 中其他工作流的更改一致。
.github/workflows/auto-review.yml (1)
14-14: Checkout action 版本回退此文件中的 checkout action 从 v6 回退到 v5,与 PR 中其他工作流的更改一致。
.github/workflows/publish.yml (1)
32-32: Checkout action 版本回退此工作流中的三个 checkout 步骤都从 v6 回退到 v5,与 PR 中其他工作流的更改保持一致。
Also applies to: 94-94, 279-279
.github/workflows/dependabot-update-lockfile.yml (1)
15-15: Checkout action 版本回退此文件中的 checkout action 从 v6 回退到 v5,与 PR 中其他工作流的更改一致。这是回退 PR 中的最后一个工作流文件更改。
.github/workflows/nodejs.yml (2)
66-66: 验证 actions/checkout@v5 的兼容性与其他工作流文件一致,此处也将 checkout action 降级到 v5。请参考
.github/workflows/build-rust-binding.yml中的验证建议。
154-154: 验证 actions/checkout@v5 的兼容性与其他工作流文件一致,此处也将 checkout action 降级到 v5。请参考前面的验证建议。
🧹 Nitpick comments (2)
packages/taro-components/src/components/pull-to-refresh/pull-to-refresh.tsx (2)
119-119: 注释中的错别字。注释中"组建"应为"组件"(component)。
139-139: 确认 removeChild 代理模式的设计意图和潜在风险。第 139 行
this.el.removeChild = child?.removeChild.bind(child)是有意的设计模式。该模式在 appendChild、insertBefore、replaceChild 上一致应用,表明所有子元素 DOM 操作都意图通过.rmc-pull-to-refresh-content包装元素进行路由。潜在问题:
- 若 querySelector 未找到目标元素,
child?.removeChild.bind(child)返回 undefined,调用this.el.removeChild(node)将抛出"undefined is not a function"而非预期的 DOM 错误- 此设计限制了
this.el的 API,外部代码只能移除属于 child 的节点建议审视:
- 此设计模式是否与该组件的预期使用方式一致
- 是否应添加防御性检查,处理 child 为 null 的场景
- 是否有相关的用户报告或实际使用问题
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/tests/__snapshots__/index.spec.ts.snapis excluded by!**/*.snappackages/babel-plugin-transform-taroapi/tests/__snapshots__/harmony.spec.ts.snapis excluded by!**/*.snappackages/babel-plugin-transform-taroapi/tests/__snapshots__/index.spec.ts.snapis excluded by!**/*.snappackages/taro-cli-convertor/report/static/js/bundle.js.mapis excluded by!**/*.mappnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (26)
.github/workflows/auto-review.yml(1 hunks).github/workflows/build-rust-binding.yml(1 hunks).github/workflows/build-rust-wasm.yml(1 hunks).github/workflows/dependabot-update-lockfile.yml(1 hunks).github/workflows/issue-labeler.yml(1 hunks).github/workflows/nodejs.yml(4 hunks).github/workflows/publish.yml(3 hunks).github/workflows/sync-components-types.yml(1 hunks)package.json(3 hunks)packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json(0 hunks)packages/babel-plugin-transform-solid-jsx/jest.config.js(1 hunks)packages/babel-plugin-transform-solid-jsx/package.json(1 hunks)packages/babel-plugin-transform-solid-jsx/test/unique-transform.spec.js(1 hunks)packages/babel-plugin-transform-solid-jsx/vitest.config.mts(0 hunks)packages/babel-plugin-transform-taroapi/package.json(1 hunks)packages/taro-components-react/src/components/input/index.tsx(5 hunks)packages/taro-components/__tests__/form.e2e.ts(0 hunks)packages/taro-components/package.json(2 hunks)packages/taro-components/scripts/stencil/stencil.config.ts(2 hunks)packages/taro-components/src/components/input/input.tsx(6 hunks)packages/taro-components/src/components/pull-to-refresh/pull-to-refresh.tsx(4 hunks)packages/taro-components/src/components/scroll-view/readme.md(0 hunks)packages/taro-router/src/tabbar.ts(1 hunks)packages/taro/package.json(1 hunks)scripts/download.mjs(0 hunks)vitest.config.ts(1 hunks)
💤 Files with no reviewable changes (5)
- scripts/download.mjs
- packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json
- packages/taro-components/tests/form.e2e.ts
- packages/taro-components/src/components/scroll-view/readme.md
- packages/babel-plugin-transform-solid-jsx/vitest.config.mts
🧰 Additional context used
🧠 Learnings (9)
📚 Learning: 2025-08-25T22:16:50.118Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18150
File: packages/babel-plugin-transform-taroapi/tests/__mocks__/h5-definition.json:2356-2356
Timestamp: 2025-08-25T22:16:50.118Z
Learning: The file `packages/babel-plugin-transform-taroapi/tests/__mocks__/h5-definition.json` is auto-generated by the post-build script `packages/taro-platform-h5/scripts/post-build.mjs`, which copies content from `taro-platform-h5/dist/definition.json`. This file should not be manually edited.
Applied to files:
packages/babel-plugin-transform-taroapi/package.jsonpackages/babel-plugin-transform-solid-jsx/jest.config.jspackages/babel-plugin-transform-solid-jsx/test/unique-transform.spec.jspackages/taro-components/scripts/stencil/stencil.config.tspackages/babel-plugin-transform-solid-jsx/package.jsonpackages/taro-router/src/tabbar.tspackages/taro/package.jsonpackages/taro-components/package.jsonvitest.config.ts
📚 Learning: 2025-08-08T02:32:58.265Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18146
File: packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json:12-14
Timestamp: 2025-08-08T02:32:58.265Z
Learning: 在 Taro 项目的 pnpm 工作区中,Vitest 相关依赖(vitest 和 vitest/coverage-istanbul)被管理在根目录的 package.json 中,而不是各个子包的 devDependencies 中。这是 monorepo 中依赖提升的标准做法。
Applied to files:
packages/babel-plugin-transform-taroapi/package.jsonpackages/babel-plugin-transform-solid-jsx/package.json.github/workflows/nodejs.ymlpackages/taro/package.jsonpackage.jsonpackages/taro-components/package.jsonvitest.config.ts
📚 Learning: 2025-06-23T00:09:31.233Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17842
File: packages/jest-helper/tsconfig.json:9-9
Timestamp: 2025-06-23T00:09:31.233Z
Learning: 在 jest-helper 包中,src 目录下没有 __tests__ 测试目录,只包含 resolver.ts、sequencer.ts 和 snapshot 目录。不要假设包中存在测试目录结构。
Applied to files:
packages/babel-plugin-transform-solid-jsx/jest.config.jsvitest.config.ts
📚 Learning: 2025-05-25T18:02:31.387Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17746
File: packages/taro-runtime/tsdown.config.ts:10-16
Timestamp: 2025-05-25T18:02:31.387Z
Learning: 在 taro-runtime 包的 tsdown 配置中,必须禁用 treeshake 来保留 dom-external/index.js 文件。
Applied to files:
packages/taro-components/scripts/stencil/stencil.config.tspackages/taro-router/src/tabbar.tspackages/taro/package.jsonpackages/taro-components/package.json
📚 Learning: 2025-09-05T18:40:45.775Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18150
File: packages/taro-platform-harmony-hybrid/package.json:43-45
Timestamp: 2025-09-05T18:40:45.775Z
Learning: 在 tarojs/plugin-platform-harmony-hybrid 包中,tarojs/components-library-react、tarojs/components-library-solid 和 tarojs/components-library-vue3 必须作为直接依赖(dependencies)而不能作为 peer 依赖,因为插件源码中有对这些包的直接引用,包括 componentAdapter* getter 方法和 webpack 别名配置。
Applied to files:
packages/taro-components/scripts/stencil/stencil.config.tspackages/taro/package.jsonpackages/taro-components/package.json
📚 Learning: 2025-11-21T07:15:22.634Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18646
File: packages/taro/package.json:40-40
Timestamp: 2025-11-21T07:15:22.634Z
Learning: 在 tarojs/taro 包中添加 vite 作为 devDependency 是为了让 tarojs/vite-runner 能够依赖正确的 vite 类型版本,确保 monorepo 中的类型兼容性。
Applied to files:
packages/taro-components/scripts/stencil/stencil.config.tspackages/taro/package.jsonpackage.jsonpackages/taro-components/package.json
📚 Learning: 2025-07-01T15:46:08.457Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17937
File: .github/workflows/issue-labeler.yml:31-31
Timestamp: 2025-07-01T15:46:08.457Z
Learning: stefanbuck/github-issue-parserv3 GitHub Action 的输出字段名称是 `jsonString`,不是 `json`。在工作流中应该使用 `${{ steps.issue-parser.outputs.jsonString }}` 来引用解析后的 JSON 数据。
Applied to files:
.github/workflows/issue-labeler.yml
📚 Learning: 2025-08-09T21:41:18.741Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17842
File: .github/workflows/merged.yml:34-41
Timestamp: 2025-08-09T21:41:18.741Z
Learning: 在 NervJS/taro 项目中,merged.yml workflow 故意使用 actions/upload-artifact 而非 actions/cache/save 来保存公共 NX 缓存,因为 Artifact 具有更长的保留时间(最多 90 天),而 Actions Cache 仅保留 7 天。缓存键采用精确匹配策略,不使用 restore-keys 前缀匹配。
Applied to files:
.github/workflows/nodejs.yml
📚 Learning: 2025-07-22T09:16:21.180Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18056
File: packages/taro-runtime/tsconfig.json:10-10
Timestamp: 2025-07-22T09:16:21.180Z
Learning: 在使用 rollup-plugin-dts 的项目中,rollup.config.ts 等构建配置文件会被自动排除,不需要在 tsconfig.json 中手动排除。
Applied to files:
vitest.config.ts
🧬 Code graph analysis (1)
packages/babel-plugin-transform-solid-jsx/test/unique-transform.spec.js (2)
packages/babel-preset-taro/index.js (1)
path(1-1)packages/taro-components-library-solid/scripts/fix.js (1)
path(2-2)
⏰ 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). (2)
- GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-gnu
- GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
🔇 Additional comments (19)
packages/taro-components/scripts/stencil/stencil.config.ts (2)
92-94: 文档说明清晰。注释清楚地解释了为何不在构建时转换为 ES5,而是将此包加入项目的 babel 编译中以避免低版本白屏问题。文档修改合理。
50-50:autoDefineCustomElements: false是 dist-custom-elements 输出目标的标准配置。此配置选项在 Stencil 2.x 中是推荐的标准设置,允许更好的 tree-shaking 并减小包体积。该设置与当前使用的 Stencil 2.22.3 版本完全兼容。此配置会被 Stencil v3.0.0+ 中的
customElementsExportBehavior选项取代。vitest.config.ts (1)
5-5: vitest 配置文件扩展名与 glob 模式一致项目中所有 vitest 配置文件均使用
.ts扩展名,glob 模式projects: ['packages/*/vitest.config.ts']正确匹配了 packages 目录下的 10 个 vitest 配置文件。扩展名从.mts回退到.ts保持了与实际文件的一致性。.github/workflows/sync-components-types.yml (1)
14-14: 确认 checkout v5 版本在所有工作流中保持一致验证结果确认:
- v5 仍由 GitHub 维护,持续提供安全补丁和必要的修复
- 所有工作流文件(6 个文件,12 处使用)已统一使用 v5
- v6 与 v5 的主要差异为凭证处理机制,对大多数工作流无影响
建议补充此次回退的原因说明(若存在与 v6 的兼容性考虑,应在 PR 描述中记录)。
.github/workflows/nodejs.yml (2)
77-77: 验证递归安装命令的必要性安装命令从
pnpm install改为pnpm -r install --frozen-lockfile。-r标志会递归安装所有工作区包。请确认:
- 这是回退到之前的行为
- 递归安装不会显著增加 CI 时间
113-113: 移除 pretest:ci 的变更是安全的
pretest:ci是 packages/taro-components 中的 npm 生命周期钩子,当执行test:ci脚本时会自动运行。根目录的 test 脚本通过pnpm --if-present -r ... test:ci递归调用各包的test:ci,pnpm 会自动触发对应的pretest:ci钩子执行 Puppeteer 安装。无需额外迁移设置,原有流程通过 npm 标准生命周期机制自动保证。packages/babel-plugin-transform-solid-jsx/jest.config.js (1)
1-8: Jest 配置正确此配置文件是从 Vitest 回退到 Jest 的一部分。配置项设置合理:
jsdom环境适用于 DOM 测试babel-jest转换器正确处理 JSX- 覆盖率收集目标明确
- 模块解析路径配置正确
packages/babel-plugin-transform-solid-jsx/test/unique-transform.spec.js (1)
1-10: 从 ES 模块迁移到 CommonJS 的实现正确测试文件正确地从 ES 模块风格迁移到 CommonJS,以配合 Jest 测试运行器:
- 使用
require替代importbabel-plugin-tester通过.default正确导入- 路径处理简化为直接使用
__dirname- 插件从
../dist加载(匹配打包输出)packages/taro-components/package.json (5)
41-41: pretest:ci 脚本正确添加添加 Puppeteer 安装步骤以确保 CI 环境中测试所需的浏览器二进制文件可用。这与在
.github/workflows/nodejs.yml中移除 pretest:ci 调用的变化一致。
60-60: hammerjs 依赖添加合理添加
hammerjs用于触摸手势支持,这是移动端组件库的常见需求。
88-94: 测试工具依赖正确回退添加的 Jest 相关依赖(jest、jest-cli、jest-runner、jest-environment-node)以及 rollup 工具链正确配置,版本选择与从 Vitest 回退到 Jest 的目标一致。
86-86: Puppeteer 版本为较旧版本使用的 Puppeteer 版本是 v19.2.0(发布于 2022 年 10 月),当前最新版本是 v24.30.0。由于是回退变更,请注意该版本可能不支持最新的 Chrome/Chromium 特性。建议在后续更新中考虑升级至较新版本。
59-59: 验证 Stencil 主版本降级的兼容性
@stencil/core从 3.4.2 降级到 2.22.3 涉及主版本回退。请确保:
- 代码不依赖 v3 特性(如 assetsDirs、dist-custom-elements、inputCapture 事件类型更新)
- 配置文件与 v2 兼容(无 __deprecated__safari10、sourceMap 默认值差异)
- 构建系统正常工作
- 所有 Stencil 组件在 v2.22.3 环境下正常运行
packages/taro/package.json (1)
30-39: vite 依赖已安全移除vite-runner 在自身的 package.json 中声明了 vite 为 devDependency(^4.2.0)和 peerDependency(^4),因此无需依赖 @tarojs/taro 中的 vite 版本。在 pnpm 工作区中,各个包会独立解析自身的依赖,vite-runner 的类型兼容性由其自身的 vite 声明保证。移除此依赖不会影响 vite-runner 的正常工作和类型解析。
packages/taro-router/src/tabbar.ts (1)
1-1: 桶导出路径正确导入路径已正确更改为桶导出。
defineCustomElementTaroTabbar是由 Stencil 的 dist-custom-elements 编译输出生成的,在@tarojs/components/dist/components中被正确导出,与整个代码库中类似的导入模式(如defineCustomElementTaroPullToRefreshCore)保持一致。package.json (2)
34-34: LGTM!测试脚本添加
--aggregate-output标志可以改善输出格式,这是一个无害的改进。
112-112: Vitest 版本从 v4.0.14 降级到 v3.2.4 是安全的。仓库中的 vitest 配置不使用任何 v4 特定功能:
- 无 coverage.all 配置(v4 中已移除)
- 无 v4 特定的池配置变化(VITEST_MAX_WORKERS、maxWorkers)
- 无 Module Runner 或 standalone 模式依赖
- 所有配置使用基础的
provider: 'istanbul'+include模式,与 v3.2.4 完全兼容此降级不会导致任何配置破损。
Also applies to: 167-167
Likely an incorrect or invalid review comment.
packages/taro-components/src/components/input/input.tsx (1)
277-278: 验证 Composition 事件属性的大小写。JSX 中的事件属性从
onCompositionStart/onCompositionEnd改为onCompositionstart/onCompositionend(小写)。通常在 React/JSX 中,事件属性使用驼峰命名(camelCase),但 Stencil 可能有不同的约定。由于这是回退 Stencil 更新的 PR,请确认:
- 小写命名是旧版 Stencil 所需的格式吗?
- 事件处理是否能正常工作?
注意:
addEventListener使用的原生事件名(第 103-104 行)确实是小写的compositionstart/compositionend,但 JSX 属性的命名可能不同。packages/babel-plugin-transform-solid-jsx/package.json (1)
25-27: Jest 配置和依赖验证完成,无需进一步调整。测试脚本已成功迁移至 Jest,配置完整。验证结果:
- jest.config.js 存在于包目录
- 测试文件 (test/unique-transform.spec.js) 已就位
- 所有三个测试脚本均正确配置 Jest 标志
- Jest 依赖 (@types/jest ^29.5.0) 在根 package.json 中可用
- 无遗留 vitest 配置文件
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| uses: actions/checkout@v5 |
There was a problem hiding this comment.
确认 v5 继续获得维护和安全更新
v5 版本继续获得安全更新和主要破坏性变更的修复。v5.0.0 在 2024 年 8 月发布,v5.0.1 在 2024 年 11 月发布,表明该版本仍在主动维护中。
但需要注意:v6 存在与非 GitHub 平台自托管运行器的兼容性问题,因为 v6 使用硬编码的 GitHub Actions 路径,导致 Git 认证失败并造成工作流挂起和超时。对于自托管运行器,建议使用 v5,因为它采用通用 HTTP 授权标头方式,适用于所有平台。
如果项目使用 GitHub 托管的运行器,两个版本都可以工作。如果使用自托管或第三方运行器(Forgejo、Gitea 等),v5 实际上是更好的选择。建议确认此次降级的具体原因。
| "test:ci": "vitest run --coverage", | ||
| "test:dev": "vitest", | ||
| "updateSnapshot": "vitest run --update" | ||
| "updateSnapshot": "vitest run --updateSnapshot" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Step 1: Find Vitest version in root package.json
echo "=== Checking Vitest version in root package.json ==="
cat package.json | grep -A5 '"vitest'
# Step 2: Check all snapshot update scripts in packages
echo -e "\n=== Searching for snapshot update scripts with --update flag ==="
rg -n 'vitest.*--update["\s]' packages/*/package.json
echo -e "\n=== Searching for snapshot update scripts with --updateSnapshot flag ==="
rg -n 'vitest.*--updateSnapshot' packages/*/package.json
# Step 3: Check the specific file mentioned in the review
echo -e "\n=== Content of packages/babel-plugin-transform-taroapi/package.json ==="
cat -n packages/babel-plugin-transform-taroapi/package.json | head -30Repository: NervJS/taro
Length of output: 1544
🌐 Web query:
Vitest correct flag update snapshots --update vs --updateSnapshot
💡 Result:
Use --update (or -u). Vitest's official docs and config option are named update (CLI: -u / --update) to update snapshots; --updateSnapshot is not an official/recognized Vitest CLI flag. [1][2]
Sources:
- Vitest snapshot guide (shows --update / -u). [1]
- Vitest config reference (test.update option, CLI: -u / --update). [2]
--updateSnapshot 不是 Vitest 的有效标志,应改为 --update
根据 Vitest 官方文档,更新快照的正确标志是 --update 或 -u。--updateSnapshot 不是官方支持的标志。此外,存在包内不一致:packages/taro-rn-runner/package.json 使用了正确的 --update 标志,而该文件使用了无效的 --updateSnapshot。将第 15 行改为 "updateSnapshot": "vitest run --update"。
🤖 Prompt for AI Agents
In packages/babel-plugin-transform-taroapi/package.json around line 15, the
"updateSnapshot" script uses the invalid Vitest flag "--updateSnapshot"; change
it to use the supported flag "--update" (or "-u") so the script becomes "vitest
run --update", matching other packages and restoring correct snapshot update
behavior.
| this.handleBeforeInput = this.handleBeforeInput.bind(this) | ||
| this.isOnComposition = false | ||
| this.onInputExecuted = false | ||
| this.onInputExcuted = false |
There was a problem hiding this comment.
严重拼写错误:将正确的 "Executed" 改为错误的 "Excuted"
此变更将标识符从 onInputExecuted 重命名为 onInputExcuted,这是引入拼写错误而非修复错误:
- ✅ "Executed" 是正确的英语拼写(表示"已执行")
- ❌ "Excuted" 是拼写错误
虽然 AI 摘要提到这是为了"镜像核心输入实现中的相关重命名",但即使是为了保持一致性,也不应该传播拼写错误。
建议:
- 如果核心实现中也存在此拼写错误,应该在两处都修正为
onInputExecuted - 这是一个内部标志,修复不会破坏公共 API
🔎 建议的修复方案
constructor (props) {
super(props)
this.handleInput = this.handleInput.bind(this)
this.handlePaste = this.handlePaste.bind(this)
this.handleFocus = this.handleFocus.bind(this)
this.handleBlur = this.handleBlur.bind(this)
this.handleKeyDown = this.handleKeyDown.bind(this)
this.handleComposition = this.handleComposition.bind(this)
this.handleBeforeInput = this.handleBeforeInput.bind(this)
this.isOnComposition = false
- this.onInputExcuted = false
+ this.onInputExecuted = false
}
inputRef: HTMLInputElement
isOnComposition: boolean
- onInputExcuted: boolean
+ onInputExecuted: boolean以及所有其他使用处(93、96、118、125、137、162 行)都应相应修正。
#!/bin/bash
# 检查核心组件实现中是否也存在相同的拼写错误
rg -n "onInputExcuted|onInputExecuted" packages/taro-components/src/components/input/
# 在整个代码库中搜索这两个变体
rg -n "onInputExcuted" --type=ts --type=tsx
rg -n "onInputExecuted" --type=ts --type=tsxAlso applies to: 56-56, 93-93, 96-96, 118-118, 125-125, 137-137, 162-162
🤖 Prompt for AI Agents
In packages/taro-components-react/src/components/input/index.tsx around lines
51,56,93,96,118,125,137,162 the identifier was misspelled as onInputExcuted;
rename every occurrence to onInputExecuted to fix the spelling, update all
internal references and assignments in this file accordingly, and run a
repo-wide search (including core package packages/taro-components) to find and
replace any other onInputExcuted usages so both implementations use the correct
onInputExecuted identifier.
| private isOnComposition = false | ||
| private isOnPaste = false | ||
| private onInputExecuted = false | ||
| private onInputExcuted = false |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Find and examine the input.tsx file
find . -path "*/packages/taro-components/src/components/input/input.tsx" -type fRepository: NervJS/taro
Length of output: 112
🏁 Script executed:
# Search for the misspelled field name to verify it exists
rg "onInputExcuted|onInputExecuted" --type ts --type tsxRepository: NervJS/taro
Length of output: 82
🏁 Script executed:
# Search for the misspelled field name to verify it exists (corrected file type)
rg "onInputExcuted|onInputExecuted"Repository: NervJS/taro
Length of output: 1385
🏁 Script executed:
# Check the input.tsx file structure and line numbers
cat -n packages/taro-components/src/components/input/input.tsx | head -250Repository: NervJS/taro
Length of output: 8042
🏁 Script executed:
# Check git history to see if this is a revert
git log --oneline -20 -- packages/taro-components/src/components/input/input.tsxRepository: NervJS/taro
Length of output: 129
🏁 Script executed:
# Get more detailed git history for this file
git log --oneline -50 -- packages/taro-components/src/components/input/input.tsxRepository: NervJS/taro
Length of output: 129
🏁 Script executed:
# Check the current PR or branch context
git log --oneline -1Repository: NervJS/taro
Length of output: 129
🏁 Script executed:
# Check if there's a recent commit that changed this field name
git log -p --follow -S "onInputExecuted" -- packages/taro-components/src/components/input/input.tsx | head -100Repository: NervJS/taro
Length of output: 37
🏁 Script executed:
# Search for commits that mention the field name or spelling
git log --all --grep="onInputExecuted\|onInputExcuted\|Input" --oneline -- packages/taro-components/src/components/input/input.tsxRepository: NervJS/taro
Length of output: 197
🏁 Script executed:
# Look at the recent changes to understand context better
git log --oneline --all -30 | head -30Repository: NervJS/taro
Length of output: 1741
🏁 Script executed:
# Check git show for the file to see recent changes
git diff HEAD~10..HEAD -- packages/taro-components/src/components/input/input.tsx 2>/dev/null || echo "Not found in last 10 commits"Repository: NervJS/taro
Length of output: 83
🏁 Script executed:
# Search for any recent changes that might have fixed the spelling
git log --all --oneline -100 | grep -i "input\|typo\|spell\|executed"Repository: NervJS/taro
Length of output: 123
🏁 Script executed:
# Look at the actual differences across recent commits
git log --all -p -S "onInputExcuted" -- packages/taro-components/src/components/input/input.tsx | head -150Repository: NervJS/taro
Length of output: 4405
修正拼写错误:onInputExcuted 应为 onInputExecuted
字段 onInputExcuted 拼写错误,"Excuted" 应为 "Executed"。此错误出现在多个位置(第 31、129、132、155、169、202 行)。虽然这是私有字段,不影响公开 API,但应修正代码拼写。
由于本次是回退提交,建议同时修复此拼写错误,或确认是否有特殊原因保留此错误。
🤖 Prompt for AI Agents
packages/taro-components/src/components/input/input.tsx lines
31,129,132,155,169,202: the private field name `onInputExcuted` is misspelled
and should be `onInputExecuted`; rename the field declaration and update all
references at the listed lines to `onInputExecuted`, keeping visibility and
behavior unchanged; search the file for any other occurrences (including
comments, handlers, and bindings) and update them consistently, then run type
checks/compile to ensure no remaining references break.
|
vite及stencil等关键关联库更新过于激进,未充分补充测试用例,目前对一些核心插件的编译和使用造成了严重影响,故先执行回退操作。 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/nodejs.yml:
- Around line 112-120: The test job currently conditionally skips some package
tests when matrix.host equals "macos-latest" by running a filtered pnpm command
(see the "test" step and the conditional checking matrix.host), which reduces
macOS coverage; update the workflow to stop excluding @tarojs/components on
macOS (remove the special-case filtered pnpm call) or make the macOS branch run
the same pnpm -r --aggregate-output command as other hosts, and add an
accompanying TODO->ISSUE: create a tracking issue documenting the macOS test
failures (include reproduction steps, failing packages, and impact) and add a CI
reminder (e.g., a comment or an automated periodic job) so this temporary
workaround is triaged and resolved promptly.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/build-rust-binding.yml.github/workflows/nodejs.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/build-rust-binding.yml
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-08-08T02:32:58.265Z
Learnt from: ianzone
Repo: NervJS/taro PR: 18146
File: packages/babel-plugin-transform-react-jsx-to-rn-stylesheet/package.json:12-14
Timestamp: 2025-08-08T02:32:58.265Z
Learning: 在 Taro 项目的 pnpm 工作区中,Vitest 相关依赖(vitest 和 vitest/coverage-istanbul)被管理在根目录的 package.json 中,而不是各个子包的 devDependencies 中。这是 monorepo 中依赖提升的标准做法。
Applied to files:
.github/workflows/nodejs.yml
📚 Learning: 2025-08-09T21:41:18.741Z
Learnt from: ianzone
Repo: NervJS/taro PR: 17842
File: .github/workflows/merged.yml:34-41
Timestamp: 2025-08-09T21:41:18.741Z
Learning: 在 NervJS/taro 项目中,merged.yml workflow 故意使用 actions/upload-artifact 而非 actions/cache/save 来保存公共 NX 缓存,因为 Artifact 具有更长的保留时间(最多 90 天),而 Actions Cache 仅保留 7 天。缓存键采用精确匹配策略,不使用 restore-keys 前缀匹配。
Applied to files:
.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-unknown-linux-gnu
- GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
- GitHub Check: Build Rust Binding / stable - x86_64-apple-darwin
- GitHub Check: Build Rust WASM / stable - wasm32-wasi
🔇 Additional comments (3)
.github/workflows/nodejs.yml (3)
43-60: macOS 镜像更新合理。将
macos-13更新为macos-latest符合 commit 消息中提到的替换过期镜像的目的,确保 CI 使用当前稳定的 macOS 运行器。
66-66:actions/checkout@v5的选择是合理的。v6 针对 Docker 容器操作存在已知兼容性问题,且需要 runner 版本 >= v2.329.0 才能在容器中正常工作。由于该项目的工作流广泛使用 Docker 容器(如
dtolnay/rust-toolchain@stable、pnpm/action-setup),保持使用 v5 是更安全的做法。如果后续升级到 v6,需要确保:
- 所有 runner 已升级至 v2.329.0 或更高版本
- 在 staging 环境充分测试 Docker 容器场景
77-77: 无需修改 -pnpm -r标志在此上下文中是等效的且无害的。根据 Taro 项目的 pnpm 工作区配置,
pnpm install在根目录执行时会自动启用递归安装(因为recursiveInstall默认为 true),所以pnpm install --frozen-lockfile和pnpm -r install --frozen-lockfile在根目录是等效的。此外,-r标志已在.github/workflows/publish.yml:171中使用,与本改动保持一致,不存在兼容性问题或依赖管理冲突。此更改是冗余但无害的,无需修改。Likely an incorrect or invalid review comment.
| - name: test | ||
| run: pnpm run pretest:ci && pnpm test | ||
| #TODO: 需要优化测试流程,目前 macos 无法正常执行测试,暂时跳过,等待后续优化 | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ matrix.host }}" = "macos-latest" ]; then | ||
| pnpm -r --aggregate-output --filter=./packages/* --filter=./tests --filter=!@tarojs/components test:ci | ||
| else | ||
| pnpm test | ||
| fi |
There was a problem hiding this comment.
条件测试执行降低了 macOS 平台的测试覆盖率。
新增的条件测试流程在 macos-latest 上跳过了部分包(如 @tarojs/components)的测试,仅在其他平台执行完整测试。这存在以下风险:
- 平台特定 bug 可能被遗漏:被排除的包在 macOS 上的问题无法被及时发现
- 测试覆盖率下降:macOS 平台的可靠性保障减弱
- 技术债务:TODO 注释表明这是临时方案,但可能长期存在
建议:
- 记录 macOS 测试失败的具体原因和影响范围
- 创建跟踪 issue 来优先修复 macOS 测试问题
- 考虑添加 CI 提醒,定期检查此临时方案的状态
您是否需要我帮助创建一个跟踪 issue 来记录 macOS 测试问题和后续优化计划?
🤖 Prompt for AI Agents
In @.github/workflows/nodejs.yml around lines 112 - 120, The test job currently
conditionally skips some package tests when matrix.host equals "macos-latest" by
running a filtered pnpm command (see the "test" step and the conditional
checking matrix.host), which reduces macOS coverage; update the workflow to stop
excluding @tarojs/components on macOS (remove the special-case filtered pnpm
call) or make the macOS branch run the same pnpm -r --aggregate-output command
as other hosts, and add an accompanying TODO->ISSUE: create a tracking issue
documenting the macOS test failures (include reproduction steps, failing
packages, and impact) and add a CI reminder (e.g., a comment or an automated
periodic job) so this temporary workaround is triaged and resolved promptly.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18685 +/- ##
==========================================
+ Coverage 52.63% 56.33% +3.69%
==========================================
Files 463 447 -16
Lines 25108 23342 -1766
Branches 6629 5774 -855
==========================================
- Hits 13215 13149 -66
+ Misses 9726 8366 -1360
+ Partials 2167 1827 -340
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
这个 PR 做了什么? (简要描述所做更改)
回退核心版本
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit
发布说明
Bug 修复
文档更新
测试
基础设施 / 运维
✏️ Tip: You can customize this high-level summary in your review settings.