Avoid rc package deep imports#603
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 (10)
💤 Files with no reviewable changes (1)
演进说明本 PR 对 变更概述该 PR 统一了 Drawer 组件库对 变更范围
预估评审工作量🎯 2 (Simple) | ⏱️ ~10 分钟 可能相关的 PR
建议的评审者
庆祝诗
🚥 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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/Drawer.tsxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. src/DrawerPanel.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. src/DrawerPopup.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.
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 |
There was a problem hiding this comment.
Code Review
This pull request updates the @rc-component/util dependency to version 1.11.1 and refactors the codebase to use named imports from the package root instead of deep imports from the /lib directory. Additionally, DrawerPopupProps is now exported from the main entry point, and obsolete module declarations in typings/custom.d.ts have been removed. I have no feedback to provide.
背景
antd 侧限制继续使用 rc 包的
lib/es深路径导入,需要将 drawer 中对 rc 包内部路径的依赖迁移到包根入口。调整内容
@rc-component/father-plugin,使用插件统一拦截 rc 包lib/es深路径导入。@rc-component/util。useLayoutEffect、pickAttrs、useComposeRef、useLockFocus、useEvent、canUseDom、warning等内部路径引用改为从@rc-component/util根入口导入。useLockFocusmock 目标,保留原有测试语义。DrawerPopupProps类型。验证
npm run lintnpm test -- --runInBandnpm run compileSummary by CodeRabbit
发布说明
新功能
依赖更新
@rc-component/util至 ^1.11.1 版本。@rc-component/father-plugin至 ^2.2.0 版本。