chore: remove deprecated deps#9505
Conversation
- Removed resolutions for outdated @types packages in package.json and pnpm-lock.yaml. - Updated @types/react and @types/react-dom to their latest versions. - Changed type import from 'history' to the native 'Location' in getBreadcrumbProps.tsx for better compatibility.
Summary of ChangesHello @zzjiaxiang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在通过移除已废弃的依赖项和清理相关的包管理配置来优化项目依赖。主要关注点是移除不再需要的 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
本次提交移除了已弃用的 @types/history 依赖(history v5+ 已内置类型定义)以及冗余的 resolutions 配置,并同步更新了 pnpm-lock.yaml。这些更改有助于保持依赖的整洁。但在 src/layout/utils/getBreadcrumbProps.tsx 中,将 H.Location 替换为全局的 Location 类型会导致类型安全性下降,因为全局 Location 类型与路由库提供的 Location 接口在属性上存在显著差异。建议显式导入 history 提供的 Location 类型。
| BreadcrumbItemType, | ||
| ItemType, | ||
| } from 'antd/lib/breadcrumb/Breadcrumb'; | ||
| import type H from 'history'; |
| home?: string; | ||
| location?: | ||
| | H.Location | ||
| | Location |
WARN deprecated @types/history@5.0.0: This is a stub types definition. history provides its own type definitions, so you do not need this installed
close #7850
同时移除 resolutions