-
Notifications
You must be signed in to change notification settings - Fork 4.8k
fix(taro-components-advanced): 修复 Taro.xxx 调用报错 #17755
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
本次更改将对 Taro 相关 API 的导入方式进行了优化,由原本的整体命名空间引入改为只按需引入所需的函数。涉及的组件包括 water-flow 的 root、utils 和主文件,代码逻辑及功能未发生变化,仅调整了导入和调用方式。此外,多个包的 package.json 文件版本号统一从 4.1.1 更新为 4.1.2-alpha.0,未改动其他内容。
## Changes
| 文件/路径 | 变更摘要 |
|--------------------------------------------------------------------------------------------------|------------------------------------------------------------------|
| packages/taro-components-advanced/src/components/water-flow/root.ts<br>packages/taro-components-advanced/src/components/water-flow/water-flow.ts | 将 `Taro` 整体导入改为只按需导入 `nextTick`,并相应修改了调用方式。|
| packages/taro-components-advanced/src/components/water-flow/utils.ts | 将 `Taro` 整体导入改为只按需导入 `getEnv` 和 `getSystemInfoSync`,并相应修改了类型和调用方式。|
| 多个 package.json 文件(如 crates/native_binding/package.json、npm/darwin-arm64/package.json、packages/taro-components-advanced/package.json 等) | 版本号统一从 `4.1.1` 更新为 `4.1.2-alpha.0`,未改动其他内容。 |
## Suggested reviewers
- tutuxxx
## Poem
> 小兔敲键盘,代码轻轻换,
> Taro 不再全员到场,
> 按需引入更清爽,
> 逻辑未变心欢畅,
> 优雅如风,跃进一行,
> 组件依旧稳如磐。
> 🐇✨ 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (79)
✅ Files skipped from review due to trivial changes (33)
🚧 Files skipped from review as they are similar to previous changes (46)
⏰ Context from checks skipped due to timeout of 90000ms (5)
✨ Finishing Touches
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 (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17755 +/- ##
=======================================
Coverage 59.37% 59.37%
=======================================
Files 387 387
Lines 23417 23417
Branches 5129 5160 +31
=======================================
Hits 13903 13903
+ Misses 8048 8017 -31
- Partials 1466 1497 +31
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
ab8e505
to
1c264d9
Compare
这个 PR 做了什么? (简要描述所做更改)
修复 waterflow 组件里 Taro.xxx 相关调用报错,原因是 babel-plugin-transform-taroapi 对于 Taro.xxx 转换为 import {xxx} from '@tarojs/taro' 不会处理npm包
这个 PR 是什么类型? (至少选择一个)
这个 PR 涉及以下平台:
Summary by CodeRabbit