Avoid rc package deep imports#77
Conversation
|
@QDyanbing is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
漫步该PR通过升级 变更导入路径重构与API扩展
代码审查工作量估计🎯 2 (Simple) | ⏱️ ~12 minutes 可能相关的PRs
建议的审核人
诗
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #77 +/- ##
=======================================
Coverage 98.09% 98.09%
=======================================
Files 11 11
Lines 421 421
Branches 121 120 -1
=======================================
Hits 413 413
Misses 7 7
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request implements a restriction on importing package internals from 'es' or 'lib' directories by adding a 'no-restricted-imports' ESLint rule. Correspondingly, it refactors imports across the codebase to use package roots for '@rc-component/util' and 'rc-motion'. Additionally, the '@rc-component/util' dependency is updated to version 1.11.0, and 'genCSSMotion' and 'CSSMotionConfig' are now exported from the main index. I have no feedback to provide.
背景
antd 升级到 6.4.x 后,在 Yarn PnP、Vite、Vitest、Node 25 等环境下可能直接加载到 rc 包的 es 构建产物内部路径,导致 ESM 加载失败。这个问题暴露出 rc 包之间依赖 es/lib 构建产物内部路径的风险。
变更
验证
Summary by CodeRabbit
发行说明
新增功能
genCSSMotion函数和CSSMotionConfig类型,为用户提供更灵活的运动配置选项。依赖更新
@rc-component/util至^1.11.0@rc-component/father-plugin至^2.2.0代码优化