-
Notifications
You must be signed in to change notification settings - Fork 273
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
chore: show unadapted components for HarmonyOS in Mini Programs and H5 #2999
chore: show unadapted components for HarmonyOS in Mini Programs and H5 #2999
Conversation
Warning Rate limit exceeded@oasis-cloud has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 4 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Walkthrough此次修改主要针对 Changes
Sequence Diagram(s)sequenceDiagram
participant U as 用户
participant S as 脚本执行器
participant P as package.json 脚本
participant E as update-taro-entry.js
U->>S: 触发 dev 或 build 命令
S->>P: 执行 predev/prebuild 脚本设置环境变量(SKIPDD=1 或 JD=1)
S->>P: 调用 update:taro:entry 命令
P->>E: 运行入口更新逻辑
E->>E: 检查 SKIPDD 环境变量与组件适配状态
E->>S: 返回组件导出结果
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 @@
## feat_v3.x #2999 +/- ##
==========================================
Coverage 85.79% 85.79%
==========================================
Files 281 281
Lines 18527 18527
Branches 2810 2810
==========================================
Hits 15896 15896
Misses 2626 2626
Partials 5 5 ☔ View full report in Codecov by Sentry. |
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)
scripts/harmony/update-taro-entry.js (1)
23-23
: 建议优化条件判断的可读性当前的条件判断使用了双重否定,可以重构为更易读的形式。
建议修改为:
-if (!dd && !process.env.SKIPDD) return // 未适配不导出 +if (dd || process.env.SKIPDD) { + // 继续执行导出逻辑 +} else { + return // 未适配不导出 +}package.json (1)
67-67
: 建议统一环境变量的设置方式为了保持一致性,建议将
JD=1
的设置也移动到预处理脚本中。建议修改为:
-"dev:taro:jmapp": "JD=1 pnpm --dir ./packages/nutui-taro-demo dev:jmapp", +"predev:taro:jmapp": "SKIPDD=1 JD=1 pnpm run update:taro:entry", +"dev:taro:jmapp": "pnpm --dir ./packages/nutui-taro-demo dev:jmapp",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
package.json
(1 hunks)scripts/harmony/update-taro-entry.js
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: test
🔇 Additional comments (3)
scripts/harmony/update-taro-entry.js (1)
21-23
: 代码注释清晰地解释了功能目的注释很好地说明了这个改动的目的和具体场景,有助于其他开发者理解代码的意图。
package.json (2)
60-61
: 预处理脚本的添加确保了一致的组件导出行为通过添加
pre
脚本并设置SKIPDD=1
,在开发环境中统一了组件的导出行为,这是一个很好的实践。Also applies to: 63-65
73-75
: 构建脚本的修改保持了与开发环境的一致性构建脚本的修改与开发环境保持了相同的行为,这种一致性有助于避免环境差异导致的问题。
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 (1)
README_ZH.md (1)
74-77
: 新增 Taro 环境说明段落
在本次修改中,新增了“### 本地运行 Taro 环境”标题以及后续的说明文字,详细说明了在 Taro 环境下通过 pnpm pre 钩子展示未适配鸿蒙组件的目的和方法。这能帮助开发者更好理解预览时的组件显示逻辑。建议确认该说明与实际脚本逻辑保持一致,同时可在后续文档中补充启用/关闭钩子时可能的行为差异。
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
README_ZH.md
(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: test
🔇 Additional comments (1)
README_ZH.md (1)
101-101
: 更新 JDTaro 预览标题
对“本地运行 JDTaro 相关的预览”标题进行了格式调整,使其在整体排版中与其它环境说明部分保持一致。该修改属于格式和可读性提升,建议确认下方说明内容与标题对应无误。
jdf2e#2999) * chore: 通过 pre 命令在 h5 和小程序预览或构建的时候,去掉鸿蒙适配的限制,从而展示出未适配鸿蒙的组件 * docs: update docs * docs: update docs
Summary by CodeRabbit