chore: update maintenance dependencies#790
Conversation
|
Deployment failed with the following error: Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit |
|
Warning Review limit reached
Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
Walkthrough将 React 升级至 19.x、TypeScript 升级至 6.x、ESLint 升级至 9.x,新增 Changes工具链升级与 React 19 兼容
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
There was a problem hiding this comment.
Code Review
This pull request upgrades the project's development dependencies to support React 19 and TypeScript 6.0, introduces a flat ESLint configuration (eslint.config.mjs), adds global type declarations, and configures Dependabot grouping. Feedback on these changes focuses on maintaining type safety and configuration cleanliness: the reviewer advises against disabling strict type-checking flags in tsconfig.json, suggests avoiding declaring standard testing globals as any in global.d.ts to preserve proper Jest types, and recommends simplifying the ESLint configuration by removing obsolete workarounds for @typescript-eslint/ban-types.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
❌ Deploy failed
📋 Build log (last lines)🤖 Powered by surge-preview |
|||||||||
|
React Doctor found 1 issue in 1 file · 1 error · score 40 / 100 (Critical) · vs Errors
Reviewed by React Doctor for commit |
|
Deployment failed with the following error: Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #790 +/- ##
=======================================
Coverage 86.42% 86.42%
=======================================
Files 39 39
Lines 1068 1068
Branches 373 380 +7
=======================================
Hits 923 923
Misses 143 143
Partials 2 2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
global.d.ts (1)
11-20: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value尽量不要在这里继续声明全局
JSX命名空间。 仓库里已经没有其他JSX.*旧引用,兼容层可以收敛到React.JSX/declare module 'react'。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@global.d.ts` around lines 11 - 20, Remove the remaining global JSX namespace declaration in the ambient typings and migrate this compatibility layer to React.JSX or a declare module 'react' augmentation instead. Update the JSX-related type aliases/interfaces currently defined in global.d.ts so they no longer reopen global JSX, and keep the existing React.JSX symbols as the source of truth for Element, IntrinsicElements, and related types.tests/ref.test.tsx (1)
14-14: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win把版本判断改成按 major version 解析。
React.version.startsWith('19')只覆盖 19.x,升级到 React 20 后这些断言会回落到旧分支;这里改成isReact19OrNewer,与src/ref.ts的ReactMajorVersion >= 19保持一致。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/ref.test.tsx` at line 14, The React version check in the test file is too narrow because React.version.startsWith('19') only matches 19.x, so update the test’s version gate to parse the major version and rename it to align with src/ref.ts’s ReactMajorVersion >= 19 logic. Locate the existing isReact19 constant in tests/ref.test.tsx and replace it with an isReact19OrNewer-style check based on the parsed major version so the assertions follow the same branch as the production code for React 20+.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@react-compat.d.ts`:
- Around line 14-16: Remove the legacy react-dom hydrate compatibility
declaration from react-compat.d.ts so TypeScript no longer exposes an API that
is unavailable in React/ReactDOM 19. Update any callers that rely on this
declaration to use hydrateRoot from react-dom/client instead, and verify the
ReactDOM typings align with the new client-based hydration entry point.
---
Nitpick comments:
In `@global.d.ts`:
- Around line 11-20: Remove the remaining global JSX namespace declaration in
the ambient typings and migrate this compatibility layer to React.JSX or a
declare module 'react' augmentation instead. Update the JSX-related type
aliases/interfaces currently defined in global.d.ts so they no longer reopen
global JSX, and keep the existing React.JSX symbols as the source of truth for
Element, IntrinsicElements, and related types.
In `@tests/ref.test.tsx`:
- Line 14: The React version check in the test file is too narrow because
React.version.startsWith('19') only matches 19.x, so update the test’s version
gate to parse the major version and rename it to align with src/ref.ts’s
ReactMajorVersion >= 19 logic. Locate the existing isReact19 constant in
tests/ref.test.tsx and replace it with an isReact19OrNewer-style check based on
the parsed major version so the assertions follow the same branch as the
production code for React 20+.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4031d7ea-5dae-4dee-b58e-e3cc0318287c
📒 Files selected for processing (10)
.github/dependabot.ymlREADME.mdREADME.zh-CN.mdeslint.config.mjsglobal.d.tspackage.jsonreact-compat.d.tstests/hooks-17.test.tsxtests/ref.test.tsxtsconfig.json
|
Deployment failed with the following error: Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit |
|
Related to ant-design/ant-design#58514. |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the project’s maintenance/developer toolchain (React/TS/ESLint/testing libs) and associated configs, and aligns docs/tests for React 19 behavior changes.
Changes:
- Updates core dev dependencies (React/ReactDOM, TypeScript, ESLint 9 + TypeScript ESLint, Testing Library, etc.).
- Introduces ESLint flat config (
eslint.config.mjs) and removes legacy.eslintrc.js. - Tweaks TypeScript config and adjusts tests/READMEs for updated ecosystem behavior (React 19 + docs branding/linking).
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Updates TS module resolution and paths configuration; adds global.d.ts to compilation scope. |
eslint.config.mjs |
Adds ESLint 9 flat config with TS/React/Jest integration. |
.eslintrc.js |
Removes legacy ESLint config in favor of flat config. |
package.json |
Bumps devDependencies (React/TS/ESLint/testing tooling) and related lint deps. |
global.d.ts |
Adds global type references and ambient module declarations for toolchain compatibility. |
tests/ref.test.tsx |
Updates expectations to account for React 19 ref-related behavior changes; adds a null-case assertion. |
tests/hooks-17.test.tsx |
Updates useId fallback expectations to accommodate React 19 behavior. |
src/test/domHook.ts |
Removes now-unneeded eslint disable directive (typescript-eslint v8/ESLint 9 migration). |
README.md / README.zh-CN.md |
Links Ant Design logo to https://ant.design and minor formatting cleanup. |
.github/dependabot.yml |
Enables grouped Dependabot updates for npm and GitHub Actions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| parserOptions: { | ||
| projectService: true, | ||
| tsconfigRootDir: import.meta.dirname, | ||
| }, |

Summary
Test Plan
Summary by CodeRabbit
新功能
Bug 修复
文档