Skip to content

Avoid util deep imports#380

Open
QDyanbing wants to merge 2 commits into
react-component:masterfrom
QDyanbing:avoid-deep-imports
Open

Avoid util deep imports#380
QDyanbing wants to merge 2 commits into
react-component:masterfrom
QDyanbing:avoid-deep-imports

Conversation

@QDyanbing
Copy link
Copy Markdown

@QDyanbing QDyanbing commented May 20, 2026

变更内容

  • 升级 @rc-component/util 到当前 latest ^1.11.1
  • 升级 @rc-component/father-plugin^2.2.0,交由插件统一处理 rc 深路径 import 限制。
  • 将源码中对 @rc-component/util/lib/* 的引用改为从 @rc-component/util 根入口导入。

背景

配合 rc 包统一避免依赖其他 rc 包的 es / lib 构建产物内部路径,改为使用公开根入口 API。

验证

  • git diff --check
  • 此前批量调整中已跑通 npm run compilenpm run lintnpm test

Summary by CodeRabbit

发布说明

  • Chores
    • 升级若干构建与工具依赖版本以保持兼容性与安全性。
    • 统一模块导入为包入口导出,替换深层路径引用以简化构建和维护。

Review Change Stack

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 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

coderabbitai Bot commented May 20, 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: c6df46f3-78d7-40da-8cb7-fa92dd7aa39d

📥 Commits

Reviewing files that changed from the base of the PR and between fbcc30a and 10750d9.

📒 Files selected for processing (1)
  • src/StepIcon.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/StepIcon.tsx

Walkthrough

升级 package.json 中的 @rc-component/util@rc-component/father-plugin 版本,并把组件中对 KeyCodepickAttrs 的导入从深层路径改为从 @rc-component/util 顶层命名导出,未修改运行逻辑。

Changes

依赖版本升级与导入修复

层 / 文件(s) 说明
依赖版本升级
package.json
@rc-component/util^1.2.1 升级到 ^1.11.1@rc-component/father-plugin^2.0.2 升级到 ^2.2.0
组件导入语句调整
src/Step.tsx, src/StepIcon.tsx
KeyCodepickAttrs 的导入从 @rc-component/util/lib/* 调整为从 @rc-component/util 的顶层命名导出;组件行为未改动。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 分钟

Possibly related PRs

Poem

🐰 依赖跳箱到新层,
导入换路不改颜,
键入回车仍相见,
属性筛选照旧安,
步骤组件稳又闲。

🚥 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 的主要变更,即避免从 @rc-component/util 的深层导入路径导入,改为使用顶层导入。
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 imports in Step.tsx and StepIcon.tsx to use named imports from the package root instead of deep imports. A review comment suggests reordering the imports in StepIcon.tsx to place external dependencies before local ones to maintain consistency and improve code structure.

Comment thread src/StepIcon.tsx Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6748468) to head (fbcc30a).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #380   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines           99        99           
  Branches        38        38           
=========================================
  Hits            99        99           

☔ 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.

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