-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(@umijs/plugins): model files may be collected more than once in some cases #12535
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Walkthrough这次变更主要涉及在 Changes
Sequence Diagram(s)这次更改主要集中在代码内部的数组操作逻辑,并未显著影响控制流程,故无需生成时序图。 Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/plugins/src/utils/modelUtils.ts (2 hunks)
Additional comments not posted (2)
packages/plugins/src/utils/modelUtils.ts (2)
14-14
: 导入lodash
是必要的。导入
lodash
是为了使用lodash.uniq
函数来确保模型文件路径的唯一性,这是一种有效的方式。
129-152
: 使用lodash.uniq
确保模型文件路径的唯一性。使用
lodash.uniq
来确保模型文件路径的唯一性是一种有效的方式,解决了模型文件可能被多次收集的问题。
|
已修改 |
e2e 挂了,我先 revert 下,有需要重新再提。 |
目测这里拿到全部路径之后需要进行一遍 有空的话可以再提交一遍试试。 |
model 文件的路径为 src/pages/**/models/model.ts 时,这两个 pattern 会重复收集 model 文件。