Skip to content

Avoid deep imports#285

Open
QDyanbing wants to merge 1 commit into
react-component:masterfrom
QDyanbing:avoid-deep-imports
Open

Avoid deep imports#285
QDyanbing wants to merge 1 commit into
react-component:masterfrom
QDyanbing:avoid-deep-imports

Conversation

@QDyanbing
Copy link
Copy Markdown

@QDyanbing QDyanbing commented May 21, 2026

变更内容

  • 升级 @rc-component/util 到包含根入口导出的版本,并升级 @rc-component/father-plugin
  • 将测试中 spyElementPrototypeslib 深路径导入调整为从 @rc-component/util 根入口导入。

验证

  • npm run lint 通过,保留既有 warning。
  • npm test 通过。

Summary by CodeRabbit

发布说明

  • Chores

    • 升级依赖库版本以改进兼容性
  • Tests

    • 更新测试导入配置

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d0eee583-74b4-4e02-b679-da0a2321d21f

📥 Commits

Reviewing files that changed from the base of the PR and between 77e1e7e and e4066f4.

📒 Files selected for processing (2)
  • package.json
  • tests/index.test.tsx

Walkthrough

此 PR 升级了 @rc-component/util@rc-component/father-plugin 的依赖版本,并更新了测试文件中的导入路径以适应新版本中的模块结构变更。

Changes

依赖版本更新与导入路径对齐

Layer / File(s) Summary
Dependency Upgrades and Import Alignment
package.json, tests/index.test.tsx
@rc-component/util 升级至 ^1.11.1@rc-component/father-plugin 升级至 ^2.2.0,同时更新测试文件中 spyElementPrototypes 的导入路径从 @rc-component/util/lib/test/domHook 改为 @rc-component/util 以匹配新版本的导出位置。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A hop and a skip through versions new,
Dependencies dance, imports align too,
From ^1.3 to ^1.11 we bound,
Utilities refreshed, tests safely crowned!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了PR的主要变更:避免深层导入,通过升级依赖版本并更新导入路径实现此目标。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the @rc-component/util and @rc-component/father-plugin dependencies and refactors a test import to use the root entry point of @rc-component/util. Feedback suggests moving @rc-component/util from dependencies to devDependencies if its usage is limited to testing, thereby reducing the production bundle size.

Comment thread package.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant