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

fix: type roots behavior is inconsistent with tsc #716

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

PeachScript
Copy link
Member

@PeachScript PeachScript commented Sep 19, 2023

修复解析 typeRoots 的默认行为与 tsc 不一致的问题。

问题触发的情形:在 monorepo 使用根目录 tsconfig.json 的情况下,tsc 的 typeRoots 默认从根目录开始解析,仅包含根目录的 node_modules/@types,但 father 由于没有指定 configFilePath 则会从 cwd 开始解析,将会包含子包的 node_modules/@types,与 tsc 的差异行为会导致某些 IDE 不报错的情形但 father d.ts 生成报错,详细 case 可参考下方 issue。

Close #713

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (b8a7a79) 94.39% compared to head (bd1f942) 94.39%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #716   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files          55       55           
  Lines        1551     1551           
  Branches      369      367    -2     
=======================================
  Hits         1464     1464           
+ Misses         87       82    -5     
- Partials        0        5    +5     
Files Changed Coverage Δ
src/builder/bundless/dts/index.ts 98.63% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PeachScript PeachScript merged commit 25086fa into master Sep 19, 2023
9 checks passed
@delete-merged-branch delete-merged-branch bot deleted the hotfix/diff-type-roots-with-tsc branch September 19, 2023 08:29
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.

Father build类型生成问题
1 participant