Skip to content

chore: update dependencies: upgrade TypeScript to ^6#9636

Open
zzjiaxiang wants to merge 7 commits into
ant-design:masterfrom
zzjiaxiang:ts6
Open

chore: update dependencies: upgrade TypeScript to ^6#9636
zzjiaxiang wants to merge 7 commits into
ant-design:masterfrom
zzjiaxiang:ts6

Conversation

@zzjiaxiang
Copy link
Copy Markdown
Contributor

@zzjiaxiang zzjiaxiang commented May 10, 2026

升级到 ts6

Summary by CodeRabbit

发布说明

  • Chores
    • 升级开发工具链版本,增强稳定性
    • 优化项目编译配置,改进构建流程和模块加载策略

Review Change Stack

…pt-eslint packages to 8.59.2, adjust module resolution in tsconfig
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 10, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ad3e0706-8f8c-49ef-a708-8d7c95f035ba

📥 Commits

Reviewing files that changed from the base of the PR and between b09c545 and debf28a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

此 PR 升级 TypeScript 至 6.0.3,并更新 tsconfig 编译器选项:moduleResolution 从 node 改为 Bundler@@/* 路径别名添加相对路径前缀 ./

Changes

TypeScript 配置与依赖升级

Layer / File(s) Summary
TypeScript 编译器配置更新
tsconfig.json
moduleResolutionnode 改为 Bundler@@/* 路径别名规范化为 ./.dumi/tmp/*(添加 ./ 前缀)。
TypeScript 版本升级
package.json
devDependencies 中 typescript^5.9.3 升级至 ^6.0.3

估计代码审查工作量

🎯 1 (极简) | ⏱️ ~3 分钟

Poem

🐰 TypeScript 升级来,
版本六点零开怀,
Bundler 解析新面貌,
路径别名更规范,
工具链焕然一新!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题清晰准确地反映了主要变更内容——将TypeScript升级到6.x版本,与package.json和tsconfig.json的变更相符。
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot Bot added the dependencies Pull requests that update a dependency file label May 10, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades TypeScript to version 6.0.3 along with its associated ESLint plugins and updates the tsconfig.json configuration, including a shift to Bundler module resolution and the removal of baseUrl. Feedback focuses on addressing type regressions introduced by the major version upgrade to ensure a green build. Additionally, the reviewer highlights potential risks associated with the configuration changes, specifically the possibility of broken absolute imports due to the missing baseUrl and compatibility issues between the Bundler resolution strategy and runtime tools like ts-node.

Comment thread package.json
"ts-node": "^10.9.2",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"typescript": "^6.0.3",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

PR 描述中确认了升级后存在 tsc 类型错误。在合并编译器主版本升级时,保持构建通过(Green Build)是最佳实践。忽略这些错误会增加后续维护成本并可能导致 CI 流程中断,建议在合并前修复这些类型回归。

Comment thread tsconfig.json
@@ -1,9 +1,8 @@
{
"compilerOptions": {
"baseUrl": "./",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

移除 baseUrl 会导致项目中所有未在 paths 中定义的绝对导入(如 import ... from 'src/...')失效。这要求项目内部必须完全使用相对路径或通过 paths 进行显式映射,否则会引起解析错误。

Comment thread tsconfig.json
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"moduleResolution": "Bundler",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

moduleResolution 设置为 Bundler 可能会导致 ts-node 等运行时工具无法正确解析模块。这类工具通常需要 nodenode16 策略。如果脚本执行受影响,使用 node16 通常能提供更好的兼容性。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant