Avoid rc deep imports#788
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 (13)
总体说明该 PR 统一调整项目对 变更内容依赖升级与导入路径统一
可能相关的 PR
建议审查人
代码审查工作量估计🎯 2 (简单) | ⏱️ ~8 分钟 庆祝诗
🚥 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/FieldContext.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct. The config "prettier" was referenced from the config file in "/.eslintrc.js". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. src/utils/delayUtil.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct. The config "prettier" was referenced from the config file in "/.eslintrc.js". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team. src/hooks/useForm.tsOops! Something went wrong! :( ESLint: 8.57.1 ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct. The config "prettier" was referenced from the config file in "/.eslintrc.js". If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.
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 #788 +/- ##
=======================================
Coverage 99.54% 99.54%
=======================================
Files 20 20
Lines 1328 1328
Branches 325 329 +4
=======================================
Hits 1322 1322
Misses 6 6 ☔ 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 updates dependencies and refactors imports from @rc-component/util to use the package's main entry point instead of internal paths across the project. It also reorganizes and expands the type exports in the main entry file. Feedback was provided to further increase the API's completeness by exporting additional common types such as FieldData, Callbacks, and ValidateOptions from the root.
| export type { | ||
| FormInstance, | ||
| FormRef, | ||
| InternalNamePath, | ||
| Meta, | ||
| NamePath, | ||
| Rule, | ||
| RuleObject, | ||
| RuleRender, | ||
| Store, | ||
| StoreValue, | ||
| ValidateErrorEntity, | ||
| ValidateMessages, | ||
| ValidatorRule, | ||
| } from './interface'; |
There was a problem hiding this comment.
建议在此处补充导出更多常用的类型,例如 FieldData, Callbacks, ValidateOptions, ValidateFields 和 RuleType。这些类型在外部(如 antd)使用时非常常见,统一从根入口导出可以提升开发体验并保持 API 的完整性。
| export type { | |
| FormInstance, | |
| FormRef, | |
| InternalNamePath, | |
| Meta, | |
| NamePath, | |
| Rule, | |
| RuleObject, | |
| RuleRender, | |
| Store, | |
| StoreValue, | |
| ValidateErrorEntity, | |
| ValidateMessages, | |
| ValidatorRule, | |
| } from './interface'; | |
| export type { | |
| FormInstance, | |
| FormRef, | |
| InternalNamePath, | |
| Meta, | |
| NamePath, | |
| Rule, | |
| RuleObject, | |
| RuleRender, | |
| Store, | |
| StoreValue, | |
| ValidateErrorEntity, | |
| ValidateMessages, | |
| ValidatorRule, | |
| FieldData, | |
| Callbacks, | |
| ValidateOptions, | |
| ValidateFields, | |
| RuleType, | |
| } from './interface'; |
变更内容
@rc-component/util到当前 latest^1.11.1,并升级@rc-component/father-plugin到^2.2.0。@rc-component/util/lib/*、@rc-component/async-validator/lib/*的引用改为从包根入口导入。src/index.tsx补充导出 antd 侧迁移所需的表单类型。背景
为配合 rc 包统一避免依赖其他 rc 包的
es/lib构建产物内部路径,改为使用公开根入口 API。验证
git diff --checknpm run compile、npm run lint、npm test。Summary by CodeRabbit
发布说明
@rc-component/util和相关开发工具依赖版本,优化性能和稳定性