-
Notifications
You must be signed in to change notification settings - Fork 192
refactor: rm legacy code #617
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
概述遍历此次更改主要集中在 变更
诗歌
Finishing Touches
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 @@
## master #617 +/- ##
==========================================
- Coverage 90.15% 90.01% -0.15%
==========================================
Files 36 36
Lines 914 881 -33
Branches 314 291 -23
==========================================
- Hits 824 793 -31
+ Misses 88 86 -2
Partials 2 2 ☔ 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 (1)
src/React/render.ts (1)
21-27
: 建议优化 unmount 函数的异步处理方式当前的
unmount
函数声明为async
,但内部使用了Promise.resolve().then()
。可以直接使用await
简化代码,提高可读性。建议修改如下:
export async function unmount(container: ContainerType) { // Delay to unmount to avoid React 18 sync warning - return Promise.resolve().then(() => { + await Promise.resolve(); container[MARK]?.unmount(); delete container[MARK]; - }); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/React/render.ts
(1 hunks)tests/react.test.tsx
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test / react component workflow
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
tests/react.test.tsx (1)
2-2
: 确认测试覆盖率是否完整删除了 “React 17 render & unmount” 的测试用例,请确保当前的测试用例充分覆盖了所有关键功能,避免因删除测试而导致测试覆盖率下降。
Summary by CodeRabbit
新功能
重构
测试