-
Notifications
You must be signed in to change notification settings - Fork 4.9k
chore: add react react-dom to root, update vitest #17810
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
Conversation
|
""" Walkthrough本次变更主要集中于各示例项目和核心包的 Changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 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 (6)
✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 3
🔭 Outside diff range comments (1)
packages/taro-components-library-react/package.json (1)
24-28: 🛠️ Refactor suggestion补充 React 相关 peerDependencies
由于移除了react和react-dom的 devDependencies,建议在peerDependencies中声明它们:"peerDependencies": { + "react": "^18", + "react-dom": "^18", "@tarojs/helper": "workspace:*" }
🧹 Nitpick comments (5)
packages/taro-components-advanced/package.json (1)
42-42: 版本规范不一致
此处将react的peerDependencies版本指定为">=18",而库内其他位置使用^18作为主版本范围,建议统一为^18以保持语义一致性。examples/new-blended/taro-project/package.json (1)
39-39: 请确认是否需要在非 TypeScript 示例中保留 @types/react
模板配置"typescript": false,如不使用 TS,建议移除冗余类型定义以精简依赖。examples/blended-taro-component/h5/package.json (1)
40-40: 请确认是否需要在非 TypeScript 示例中保留 @types/react
模板配置"typescript": false,如不使用 TS,建议移除冗余类型定义以精简依赖。examples/blended-taro-component/taro-project/package.json (1)
42-42: 请确认是否需要在非 TypeScript 示例中保留 @types/react
模板配置"typescript": false,如不使用 TS,建议移除冗余类型定义以精简依赖。examples/blended-apart/taro-project/package.json (1)
37-37: 请确认是否需要在非 TypeScript 示例中保留 @types/react
模板配置"typescript": false,如不使用 TS,建议移除冗余类型定义以精简依赖。
📜 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 (30)
examples/blended-apart/taro-project/package.json(1 hunks)examples/blended-basic/taro-project/package.json(1 hunks)examples/blended-taro-component/h5/package.json(1 hunks)examples/blended-taro-component/taro-project/package.json(1 hunks)examples/build-weapp-plugin/package.json(1 hunks)examples/custom-tabbar-react/package.json(1 hunks)examples/mini-program-example/package.json(2 hunks)examples/mini-split-chunks-plugin/package.json(1 hunks)examples/new-blended/taro-project/package.json(1 hunks)examples/swiper-effect/package.json(1 hunks)examples/taro-list/package.json(1 hunks)examples/weapp-independent-subpackages/package.json(1 hunks)package.json(4 hunks)packages/taro-components-advanced/package.json(1 hunks)packages/taro-components-library-react/package.json(1 hunks)packages/taro-components-react/package.json(0 hunks)packages/taro-components-rn/package.json(1 hunks)packages/taro-framework-react/package.json(0 hunks)packages/taro-h5/package.json(0 hunks)packages/taro-platform-harmony-cpp/package.json(0 hunks)packages/taro-react/package.json(0 hunks)packages/taro-rn-runner/package.json(1 hunks)packages/taro-rn-supporter/package.json(0 hunks)packages/taro-rn/package.json(1 hunks)packages/taro-router-rn/package.json(1 hunks)packages/taro-runtime-rn/package.json(0 hunks)packages/taro-runtime/package.json(0 hunks)packages/taro-with-weapp/package.json(0 hunks)packages/taro/package.json(0 hunks)tests/package.json(0 hunks)
💤 Files with no reviewable changes (11)
- tests/package.json
- packages/taro/package.json
- packages/taro-h5/package.json
- packages/taro-runtime/package.json
- packages/taro-platform-harmony-cpp/package.json
- packages/taro-react/package.json
- packages/taro-rn-supporter/package.json
- packages/taro-components-react/package.json
- packages/taro-runtime-rn/package.json
- packages/taro-with-weapp/package.json
- packages/taro-framework-react/package.json
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Build Rust Binding / stable - x86_64-unknown-linux-gnu
- GitHub Check: Build Rust WASM / stable - wasm32-wasi
- 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
🔇 Additional comments (20)
packages/taro-router-rn/package.json (1)
48-48: 确认根工作区依赖覆盖
已将react从devDependencies移除,并在peerDependencies中更新为^18,请验证根工作区已正确声明并安装react@^18,以避免打包或运行时缺失该依赖。examples/swiper-effect/package.json (1)
67-67: 类型依赖更新合理
将@types/react放宽到^18与依赖中的react@^18.0.0保持兼容,改动没有问题。packages/taro-rn-runner/package.json (1)
67-67: 放宽 React peerDependencies 版本至 ^18
已将react的peerDependencies从^18.2.0放宽为^18,提升兼容性。examples/build-weapp-plugin/package.json (1)
36-36: 放宽 @types/react 版本范围至 ^18
已将@types/react从^18.0.0扩展为^18,允许任何 18.x 小版本。packages/taro-components-rn/package.json (1)
67-67: 放宽 React peerDependencies 版本至 ^18
已将react的peerDependencies从^18.2.0放宽为^18,确保适配任意 React 18.x 版本。examples/taro-list/package.json (1)
66-66: 放宽 @types/react 版本范围至 ^18
已将@types/react从^18.0.0扩展为^18,与其他示例项目保持一致。packages/taro-rn/package.json (1)
98-98: 将 React 移动到 peerDependencies 以统一版本管理
将react从devDependencies移动到peerDependencies对 RN 使用场景更合理,确保宿主项目安装时按需引入。examples/mini-program-example/package.json (2)
5-5: 描述字段格式调整
将"小程序demo"更新为"小程序 demo",以统一项目间的描述格式。
67-67: 扩展 @types/react 版本范围
将@types/react从^18.2.0放宽为^18,增强对 React 18 各次版本的兼容性。package.json (5)
101-103: 升级 React 类型定义至最新次版本
将@types/react、@types/react-dom和@types/react-reconciler升级到^18.3.x、^18.3.x及^0.28.x,保持与 React 运行时版本一致。
111-111: 切换覆盖率工具至 Istanbul
将测试覆盖工具从@vitest/coverage-v8替换为@vitest/coverage-istanbul,以获得更完善的覆盖率报告兼容性。
153-154: 在根目录添加 React 运行时依赖
将react与react-dom升级至^18.3.1,统一根工作区与子包的 React 版本。
167-167: 升级测试框架 Vitest 版本
将vitest升级至^3.2.2,与新覆盖率插件保持兼容性。
179-179: 覆盖 react-native-root-siblings peerDependencies
将react-native-root-siblings的reactpeer 依赖锁定为18.3.1,确保与根依赖版本一致。examples/blended-basic/taro-project/package.json (2)
29-30: 升级示例项目 React 运行时依赖
将react和react-dom升级至^18,与其他示例和根版本保持一致。
34-34: 扩展示例项目 React 类型定义版本
将@types/react升级至^18,与运行时依赖版本同步。examples/new-blended/taro-project/package.json (1)
33-34: 统一升级 React 与 React-DOM 至 ^18
与根工作区依赖保持一致,确保所有示例项目使用相同版本。examples/blended-taro-component/h5/package.json (1)
34-35: 统一升级 React 与 React-DOM 至 ^18
与根工作区依赖保持一致,确保所有示例项目使用相同版本。examples/blended-taro-component/taro-project/package.json (1)
36-37: 统一升级 React 与 React-DOM 至 ^18
与根工作区依赖保持一致,确保所有示例项目使用相同版本。examples/blended-apart/taro-project/package.json (1)
29-30: 统一升级 React 与 React-DOM 至 ^18
与根工作区依赖保持一致,确保所有示例项目使用相同版本。
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17810 +/- ##
==========================================
- Coverage 59.83% 55.90% -3.94%
==========================================
Files 405 417 +12
Lines 23755 21693 -2062
Branches 5239 5364 +125
==========================================
- Hits 14214 12127 -2087
+ Misses 8052 7962 -90
- Partials 1489 1604 +115
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
这个 PR 做了什么? (简要描述所做更改)
将 react、react-dom 提升到根工作区,统一管理版本
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit
新功能
重构
杂项