Skip to content
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

chore: upgrade typescript to 5.4.2 #802

Merged
merged 5 commits into from
Feb 11, 2025
Merged

Conversation

PeachScript
Copy link
Member

@PeachScript PeachScript commented Feb 10, 2025

升级 TypeScript 到 5.4.2 以获得 Array.isArray 情形下更好的推导能力,例如 这个场景 在 5.3.3 下就无法正确推导成数组,但从 5.4.x 开始就可以

  • 为什么不是最新版(5.7.3)?father 需要保持与 @microsoft/api-extractor 相同的 TypeScript 版本以避免多个 TypeScript 导致安装体积膨胀,最新版 @microsoft/[email protected] 依赖的是 TypeScript 5.7.2
  • 为什么不是 5.7.2?尝试升级后发现要连带升级 typescript-transform-paths,但该插件存在用法上的 Breaking Change,这会扩大改造面导致 PR 膨胀,这个任务交给 @Jinbao1001 跟进了,father 落后最新 TypeScript 有点多
  • 为什么是 5.4.2?这是 @microsoft/api-extractor 在升级 TypeScript 5.7.2 前最近的版本,刚好能解原始问题,且能与当前版本 typescript-transform-paths 正常工作

@PeachScript PeachScript marked this pull request as draft February 10, 2025 06:42
@PeachScript PeachScript changed the title chore: upgrade typescript to 5.7.2 chore: upgrade typescript to 5.4.2 Feb 10, 2025
@PeachScript PeachScript marked this pull request as ready for review February 10, 2025 08:07
@PeachScript PeachScript merged commit 06ed664 into master Feb 11, 2025
7 checks passed
@PeachScript PeachScript deleted the support/upgrade-typescript branch February 11, 2025 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants