-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add support for extends as array of strings. #245
Add support for extends as array of strings. #245
Conversation
TypeScript 5.0 added support for defining "extends" as an array of strings. This commit adds support for this use case. It's important to note that even with this change, "baseUrl" and "paths" are still always being completely overwritten if a later tsconfig redefines any of those values. This might be confusing because a tsconfig may define "baseUrl=value1" and its own set of "paths" based on that baseUrl, but if a later tsconfig defines its own "baseUrl=value2", the overall config ends up becoming "baseUrl=value2" with the "paths" from the first config. This behaviour hasn't changed even when "extends" is an array of strings, so this commit maintains this behaviour.
@jonaskello pinging you because you seem to handle merging PRs in this repo. What's your review and release process like? This PR will help me migrate a bunch of projects I have to TypeScript 5.0 (as long as tsconfig-paths-webpack-plugin also works well with this change, but I'll take a look at that one once this PR is done). |
I'm blocked by this as well (via |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #245 +/- ##
==========================================
+ Coverage 68.16% 68.43% +0.27%
==========================================
Files 9 9
Lines 311 320 +9
Branches 96 99 +3
==========================================
+ Hits 212 219 +7
Misses 93 93
- Partials 6 8 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
It'd be great if this could be backported to v3 as well, which has 3-4 times the downloads of v4. |
Would be great to merge this one because it is blocking projects that uses esbuild to migrate to typescript 5 |
Pending [GH/dividab/tsconfig-paths#245](dividab/tsconfig-paths#245). Signed-off-by: William So <[email protected]>
@DanielSidhion If I understand correctly this change is not breaking and could be released in a minor version? |
That's correct, I kept the same behaviour as before for any |
Released in 4.2.0 |
@jonaskello any plans to backport this to v3? |
…b#245) TypeScript 5.0 added support for defining "extends" as an array of strings. This commit adds support for this use case.
Fixes #244.
TypeScript 5.0 added support for defining "extends" as an array of strings. This commit adds support for this use case.
It's important to note that even with this change, "baseUrl" and "paths" are still always being completely overwritten if a later tsconfig redefines any of those values.
This might be confusing because a tsconfig may define "baseUrl=value1" and its own set of "paths" based on that baseUrl, but if a later tsconfig defines its own "baseUrl=value2", the overall config ends up becoming "baseUrl=value2" with the "paths" from the first config.
This behaviour hasn't changed even when "extends" is an array of strings, so this commit maintains this behaviour.