-
Notifications
You must be signed in to change notification settings - Fork 4.9k
chore: stencil update #18649
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: stencil update #18649
Conversation
总体概述本变更包含依赖项重大升级(Stencil Core 2→4、Puppeteer 19→24、移除 Jest)、多个输入组件中的属性名修正(onInputExcuted→onInputExecuted)、ScrollView 文档新增 API 属性、pull-to-refresh 子节点移除逻辑优化、tabbar 导入路径更新及 Stencil 构建配置调整。 变更详情
预估代码审查工作量🎯 3 (中等复杂) | ⏱️ ~20-25 分钟 需要重点关注的区域:
建议审查人
诗
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)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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: 2
🧹 Nitpick comments (1)
packages/taro-cli-convertor/report/static/js/bundle.js (1)
2127-51707: 建议验证 bundle 文件是否应该提交到源码库。通常构建产物(如 bundle.js)应该在 CI/CD 过程中生成,而不是直接提交到版本控制系统。这样可以避免合并冲突、减小仓库体积,并确保代码和构建产物的一致性。
不过,如果这个文件是用于静态报告查看器且需要预构建资源,则提交它可能是合理的。请确认这是否是有意为之的设计决策。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
packages/taro-cli-convertor/report/static/js/bundle.js.mapis excluded by!**/*.mappnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
packages/taro-cli-convertor/report/static/js/bundle.js(22 hunks)packages/taro-components-react/src/components/input/index.tsx(1 hunks)packages/taro-components/package.json(1 hunks)packages/taro-components/src/components/input/input.tsx(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 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/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/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/package.json
📚 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/package.json
⏰ 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). (4)
- GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
- 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 - x86_64-unknown-linux-gnu
🔇 Additional comments (5)
packages/taro-components/src/components/input/input.tsx (1)
277-278: LGTM!事件名称更改与 Stencil 3.x 一致将事件处理器从
onCompositionStart/onCompositionEnd改为onCompositionstart/onCompositionend符合 Stencil 框架使用原生 DOM 事件命名的约定,与代码中 103-104 行的addEventListener调用保持一致。packages/taro-components/package.json (2)
77-94: 开发依赖添加合理新增的 devDependencies 包括:
@tarojs/helper:workspace 依赖(符合 Taro monorepo 标准实践)- Jest 测试套件(jest、jest-cli、jest-environment-node、jest-runner)
rollup-plugin-node-externals、sass、tsconfig-paths:构建工具这些依赖的添加有助于改进测试基础设施和构建配置。特别注意
rollup-plugin-node-externals从 dependencies 移至 devDependencies 是正确的分类调整。根据代码库学习经验,在 Taro monorepo 中使用 workspace 依赖是标准做法。
59-59: 验证 Stencil 3.x 升级已完成@stencil/core 从 2.22.3 升级到 3.4.2 需要参考官方的 Stencil v3.0.0 破坏性变更指南。根据官方迁移指南,主要的破坏性变更包括:
- onInput 和 onInputCapture 事件的接口已更新,从接受 Event 参数改为接受 InputEvent 参数
- 移除了 'angular' 输出目标,改为使用 @stencil/angular-output-target
- dist-custom-elements-bundle 输出目标已被移除,用户应迁移到 dist-custom-elements 输出目标
请确认已按照官方迁移指南更新了组件代码(特别是事件处理器的类型定义)并验证了依赖的输出目标配置。
packages/taro-cli-convertor/report/static/js/bundle.js (2)
8112-8112: LGTM!Webpack 样板代码的空白行更改不影响功能。
Also applies to: 8126-8126, 8129-8129, 8133-8133, 8146-8146, 8176-8176, 8188-8188, 8200-8200, 8205-8205, 8216-8216
14792-14792: 修正范围:仅 Input 组件确认了属性名称的破坏性改动。验证发现,本次提交仅修改了 Input 组件的事件属性名称,Search 和 TextArea 组件并未进行相应改动。
实际变更范围:
- packages/taro-components-react/src/components/input/index.tsx 第 261-262 行:
onCompositionStart→oncompositionstart,onCompositionEnd→oncompositionend- packages/taro-components/src/components/input/input.tsx 第 277-278 行:同上变更
这确实是破坏性的 API 改动(与 Stencil 框架更新相关),建议:
- 确认是否需要发布 major 版本
- 在 CHANGELOG 中明确标注此破坏性改动
- 如需平滑升级,考虑在过渡期提供向后兼容支持
Likely an incorrect or invalid review 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: 0
🧹 Nitpick comments (2)
packages/taro-cli-convertor/report/static/js/bundle.js (2)
33760-33832: 组合事件回调直接调用缺少空值保护,建议与其他事件写法保持一致这里通过解构拿到
_onCompositionstart/_onCompositionend,在onCompositionStart/End中被直接调用:
- 如果上层未传入
onCompositionStart/onCompositionEnd,_onCompositionstart/_onCompositionend可能为undefined,直接调用会抛TypeError。- 下方 Search 相关代码已经采用了
onCompositionStart === null || onCompositionStart === void 0 ? void 0 : onCompositionStart(e)这种可选调用形式,可以参考保持一致。建议在这里也加上空值保护,例如:
- onCompositionStart: function onCompositionStart(event) { - _onCompositionstart(event); + onCompositionStart: function onCompositionStart(event) { + _onCompositionstart === null || _onCompositionstart === void 0 ? void 0 : _onCompositionstart(event); if (onOriginCompositionStart) { onOriginCompositionStart(event); } }, - onCompositionEnd: function onCompositionEnd(event) { - _onCompositionend(event); + onCompositionEnd: function onCompositionEnd(event) { + _onCompositionend === null || _onCompositionend === void 0 ? void 0 : _onCompositionend(event); if (onOriginCompositionEnd) { onOriginCompositionEnd(event); }另外,变量名
_onCompositionstart/_onCompositionend与外部 prop 名(onCompositionStart/onCompositionEnd)大小写略不一致,阅读时稍有干扰,如后续有机会重编 bundle,可考虑在源码层面统一命名风格。
51175-51195: Search 组合输入事件逻辑合理,函数命名可按需微调这一段通过
handleonCompositionstart/handleonCompositionend维护composedRef状态,并用可选调用安全地转发到onCompositionStart/onCompositionEnd,行为上是合理的;随后作为onCompositionStart/onCompositionEndprop 传给输入组件也符合预期。唯一是函数名
handleonCompositionstart/handleonCompositionend略难读,如果不依赖当前命名与其他地方做字符串映射,后续在源码中可以考虑改成更常见的 camelCase,如handleCompositionStart/handleCompositionEnd,以提升可读性。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/taro-cli-convertor/report/static/js/bundle.js(11 hunks)packages/taro-components-react/src/components/input/index.tsx(5 hunks)packages/taro-components/src/components/pull-to-refresh/pull-to-refresh.tsx(4 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
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 别名配置。
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 文件。
⏰ 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 Binding / stable - x86_64-unknown-linux-gnu
- 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 WASM / stable - wasm32-wasi
🔇 Additional comments (3)
packages/taro-components-react/src/components/input/index.tsx (1)
51-51: 修正拼写错误,提升代码质量。将内部标志
onInputExcuted统一重命名为onInputExecuted,所有引用均已一致更新。这是一个纯粹的拼写修正,没有引入功能变更。Also applies to: 56-56, 93-93, 96-96, 118-118, 125-125, 137-137, 162-162
packages/taro-components/src/components/pull-to-refresh/pull-to-refresh.tsx (1)
140-146: 正确实现removeChild代理,保持 DOM 操作一致性。新增的
removeChild代理逻辑与已有的appendChild、insertBefore、replaceChild代理模式保持一致。通过检查node.parentNode === child来判断是否需要委托给内部内容元素的removeChild方法,否则回退到原始实现。这确保了嵌套节点移除操作的正确性。packages/taro-cli-convertor/report/static/js/bundle.js (1)
8109-8218: webpack runtime 生成代码的格式化变更,无功能影响这一段只是 webpack 引导/runtime 代码中的空行或注释格式调整,不改变执行逻辑,可以保持现状,无需额外修改。
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18649 +/- ##
==========================================
- Coverage 56.33% 55.03% -1.30%
==========================================
Files 447 529 +82
Lines 23342 26516 +3174
Branches 5763 6470 +707
==========================================
+ Hits 13149 14594 +1445
- Misses 8364 10084 +1720
- Partials 1829 1838 +9
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/taro-components/package.json(1 hunks)packages/taro-components/scripts/stencil/stencil.config.ts(3 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 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/taro-components/package.jsonpackages/taro-components/scripts/stencil/stencil.config.ts
📚 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/package.jsonpackages/taro-components/scripts/stencil/stencil.config.ts
📚 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/package.jsonpackages/taro-components/scripts/stencil/stencil.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/package.jsonpackages/taro-components/scripts/stencil/stencil.config.ts
📚 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/taro-components/scripts/stencil/stencil.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/taro-components/scripts/stencil/stencil.config.ts
⏰ 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). (6)
- GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
- 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-apple-darwin
- GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-gnu
- GitHub Check: Build Rust WASM / stable - wasm32-wasi
🔇 Additional comments (8)
packages/taro-components/scripts/stencil/stencil.config.ts (2)
92-93: 注释改进,LGTM!注释内容更加清晰,准确说明了为什么不在构建时转换为 ES5。
118-118: testRegex 格式更新正确将
testRegex从字符串格式改为数组格式,符合新版本 Jest/Stencil 的配置要求。测试匹配模式保持不变。packages/taro-components/package.json (6)
75-77: 输出目标包更新与核心版本对齐更新了 React 和 Vue3 的输出目标包版本,与 @stencil/core 4.38.3 保持兼容。新增的 @tarojs/helper 可能用于构建脚本中的辅助功能。
82-85: 显式声明 Jest 依赖改进了依赖管理现在明确声明了 Jest 相关依赖包,这与 stencil.config.ts 中第 97-100 行的注释相呼应。显式声明这些依赖有助于:
- 提高依赖管理的透明度
- 避免依赖提升带来的版本不确定性
- 便于其他开发者理解测试环境的要求
90-90: Puppeteer 更新合理Puppeteer 更新到 20.9.0,可能包含性能改进和更好的浏览器支持。
92-92: 依赖分类修正正确将
rollup-plugin-node-externals移至 devDependencies 是正确的,因为它是构建工具,仅在编译时需要。
93-94: 构建工具依赖完善明确声明了 sass 和 tsconfig-paths 依赖,分别用于样式编译和模块路径解析。版本选择合理。
59-59: 手动验证 Stencil 从 2.22.3 升级到 4.38.3 的适配情况该升级跨越两个大版本(2.x → 3.x → 4.x),包含多项破坏性变更。由于沙箱环境限制无法执行自动化构建和测试,需要手动验证以下内容:
Stencil 3.0 关键变更:
outputTargets配置更新(dist-custom-elements-bundle已移除)autoDefineCustomElements已重命名为customElementsExportBehavior- 默认启用 Source Maps(若需旧行为需显式设置
sourceMap: false)Stencil 4.0 关键变更:
transformAliasedImportPaths现默认为true- 删除
enableCacheStats等已弃用标志- 移除浏览器内编译支持
- 需要 Node 16+ 支持
需手动验证的项目:
packages/taro-components/stencil.config.ts是否正确适配上述配置变更- 构建产物完整性(
dist/components、loader 等)- 三个框架代理文件正确生成(React、Vue3、Solid)
- 完整的测试套件通过情况
- 生成的类型声明(
.d.ts文件)完整性请本地运行完整的构建和测试流程验证升级的正确性。
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)
packages/taro-components/package.json (1)
77-77: 说明 @tarojs/helper 的用途。新增的 @tarojs/helper devDependency 的具体用途不明确。请确认:
- 这个依赖在本包中的使用位置
- 是否在 stencil 配置或构建脚本中被引用
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
packages/taro-components/package.json(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 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/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/package.json
📚 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/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/package.json
📚 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/package.json
⏰ 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 Binding / stable - x86_64-unknown-linux-gnu
- GitHub Check: Build Rust Binding / stable - x86_64-apple-darwin
- GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
- GitHub Check: Build Rust WASM / stable - wasm32-wasi
🔇 Additional comments (3)
packages/taro-components/package.json (3)
75-77: 验证 Jest 依赖与单仓库测试配置的一致性。该 PR 在 devDependencies 中新增了 jest、jest-cli、jest-environment-node 和 jest-runner(版本 27.5.1)。根据项目中的依赖提升约定,测试框架和工具通常在根目录 package.json 中统一管理。请确认:
- 这些 Jest 依赖是否应该在根目录 package.json 中声明而不是在此子包中
- 是否与其他包的测试配置冲突
- stencil 官方是否要求在包级别声明特定版本的 Jest
92-92: 确认 rollup-plugin-node-externals 从 dependencies 移至 devDependencies 的正确性。rollup-plugin-node-externals 已从 dependencies 移至 devDependencies 并升级至 ^5.0.0。请确认:
- 这个插件仅在构建时使用,运行时不需要
- 该移动不会影响生产环境
90-90: 我需要进一步检查代码库中的测试脚本和 puppeteer 使用情况,以完整验证升级的影响。Based on the web search results, I have confirmed significant breaking changes between puppeteer 19.2.0 and 24.31.0. In v24.0.0 (released January 9, 2025), puppeteer includes URL fragments into HTTPRequest/Response instances and removes deprecated Launch and Connect options. Additionally, the v24.0.0 release removed support for Firefox over CDP.
These are definitive breaking changes documented in the official changelog. The URL fragment inclusion is particularly significant as it will affect any tests that rely on exact URL matching (URLs that previously matched without fragments will now include them, e.g.,
https://example.com/becomeshttps://example.com/#anchor).强烈需要验证测试脚本的兼容性。
根据 Puppeteer 官方文档确认,v24.0.0 引入了多个破坏性变更:
- 移除已弃用的 Launch 和 Connect 选项,需要检查测试脚本中的相关调用
- HTTPRequest/Response 返回的 URL 现在包含 URL 片段(#后缀),这会影响基于 URL 精确匹配的测试逻辑
- 移除对 Firefox 通过 CDP 的支持,若测试依赖 Firefox,需要调整
升级前必须:
- 审查第 41 行的 pretest:ci 脚本及其涉及的所有测试文件,检查是否使用被移除的选项、Firefox 或依赖 URL 精确匹配的逻辑
- 在 CI 环境运行完整测试以验证兼容性
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
.pnpmfile.cjs(0 hunks)packages/taro-components/package.json(2 hunks)
💤 Files with no reviewable changes (1)
- .pnpmfile.cjs
🧰 Additional context used
🧠 Learnings (4)
📚 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/taro-components/package.json
📚 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/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/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/package.json
⏰ 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 Binding / stable - x86_64-unknown-linux-gnu
- 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 WASM / stable - wasm32-wasi
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
packages/taro-components/package.json(1 hunks)packages/taroize/src/wxml.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📚 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/taroize/src/wxml.tspackages/taro-components/package.json
📚 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/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/package.json
📚 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/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/package.json
⏰ 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-unknown-linux-gnu
- GitHub Check: Build Rust Binding / stable - x86_64-apple-darwin
- GitHub Check: Build Rust Binding / stable - x86_64-pc-windows-msvc
- GitHub Check: Build Rust Binding / stable - aarch64-apple-darwin
- GitHub Check: Build Rust WASM / stable - wasm32-wasi
🔇 Additional comments (5)
packages/taro-components/package.json (5)
69-89: ✅ Jest 依赖项已正确移除。确认 devDependencies 中已完全移除 Jest 相关的依赖项(jest、jest-cli、jest-runner、jest-environment-node)以及不匹配的 @types/jest^27.4.1。该包现已正确继承根目录的 Jest 29.x 配置,避免了类型和运行时的不兼容问题。
58-58: ✅ Stencil 4.38.3 主版本升级与输出目标兼容。@stencil/core 从 2.22.3 升级至 4.38.3 并配套升级 @stencil/react-output-target(0.5.1)和 @stencil/vue-output-target(0.8.6)。已通过官方文档确认这些版本组合兼容。确保 stencil.config.ts 已适配 Stencil 4.x 的配置要求(如 transformAliasedImportPaths)。
Also applies to: 74-76
84-84: 验证 Puppeteer 24.31.0 与测试脚本的兼容性。Puppeteer 从 ^19.2.0 升级至 ^24.31.0(主版本跨度大)。请确认:
- 第 41-44 行的测试脚本(stencil test)能正常运行
- 与 Node 18+ 环保相兼容(第 55 行指定)
- 任何截图或 E2E 测试场景正常工作
63-63: 确认 hammerjs 的实际使用。hammerjs ^2.0.8 被添加到 dependencies(而非 devDependencies)。请确认此库确实在源代码中被引入且必要,避免无用依赖膨胀。
87-88: ✅ 构建工具链补充。新增 sass ^1.58.3 和 tsconfig-paths ^3.14.1 作为 devDependencies,支持 Stencil 4.x 的样式与路径解析。版本选择合理。
这个 PR 做了什么? (简要描述所做更改)
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit
发布说明
新增功能
enhanced和showScrollbar属性,提供更多自定义选项。错误修复
✏️ Tip: You can customize this high-level summary in your review settings.