Skip to content

Avoid rc package deep imports#970

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

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

Conversation

@QDyanbing
Copy link
Copy Markdown
Contributor

背景

antd 侧限制继续使用 rc 包的 lib / es 深路径导入,需要将 picker 中对 rc 包内部路径的依赖迁移到包根入口。

调整内容

  • 升级 @rc-component/father-plugin,使用插件统一拦截 rc 包 lib / es 深路径导入。
  • 升级 @rc-component/util
  • 将源码中对 @rc-component/util@rc-component/trigger 等 rc 包内部路径的引用改为从包根入口导入。
  • 将测试中 KeyCoderesetWarnedspyElementPrototypes 等工具改为从 @rc-component/util 根入口导入。
  • 更新 README 中 locale 示例路径,避免继续展示 lib 深路径。

验证

  • 本次按本地核对后的改动提交。

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

@QDyanbing is attempting to deploy a commit to the React Component Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 22, 2026

Warning

Rate limit exceeded

@QDyanbing has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 56 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: be1d2dca-dac0-47bd-9904-8f8e32a98eb4

📥 Commits

Reviewing files that changed from the base of the PR and between 0087213 and 5101cf0.

📒 Files selected for processing (27)
  • README.md
  • package.json
  • src/PickerInput/RangePicker.tsx
  • src/PickerInput/Selector/Input.tsx
  • src/PickerInput/Selector/hooks/useClearIcon.tsx
  • src/PickerInput/Selector/hooks/useInputProps.ts
  • src/PickerInput/SinglePicker.tsx
  • src/PickerInput/hooks/useDelayState.ts
  • src/PickerInput/hooks/useLockEffect.ts
  • src/PickerInput/hooks/usePresets.ts
  • src/PickerInput/hooks/useRangePickerValue.ts
  • src/PickerInput/hooks/useRangeValue.ts
  • src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx
  • src/PickerPanel/TimePanel/TimePanelBody/useScrollTo.ts
  • src/PickerPanel/index.tsx
  • src/PickerTrigger/index.tsx
  • src/generate/moment.ts
  • src/utils/warnUtil.ts
  • tests/disabledTime.spec.tsx
  • tests/keyboard.spec.tsx
  • tests/loop.spec.tsx
  • tests/multiple.spec.tsx
  • tests/new-range.spec.tsx
  • tests/panel.spec.tsx
  • tests/picker.spec.tsx
  • tests/range.spec.tsx
  • tests/time.spec.tsx
✨ 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.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​rc-component/​father-plugin@​2.2.0821007990100

View full report

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (0087213) to head (5101cf0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #970   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files          65       65           
  Lines        2695     2695           
  Branches      744      749    +5     
=======================================
  Hits         2663     2663           
  Misses         29       29           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@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 refactors the codebase to use named imports from the root @rc-component/util package instead of deep imports from subdirectories. It also includes dependency updates for @rc-component/util and @rc-component/father-plugin, along with corresponding documentation updates in the README for locale import paths. I have no feedback to provide as there are no review comments.

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