-
Notifications
You must be signed in to change notification settings - Fork 105
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: use typescript library to resolve tsconfig files #246
fix: use typescript library to resolve tsconfig files #246
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #246 +/- ##
==========================================
- Coverage 68.16% 66.54% -1.62%
==========================================
Files 9 9
Lines 311 284 -27
Branches 96 86 -10
==========================================
- Hits 212 189 -23
+ Misses 93 88 -5
- Partials 6 7 +1
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. |
This seems interesting :-) Is there some docs that state that |
That's a good question... I haven't seen anywhere that states that it is explicitly available for use or what the expected longterm support for it is. The docs from The other (or one of the other) options is to use a library that is purpose-built for resolving a typescript config file such as this one, get-tsconfig. It has no dependency on |
@jonaskello I collected a list of notable repositories using this approach in their own source code, not sure if that helps to sell my change 😅 https://github.com/quasarframework/quasar |
hey @jonaskello any update from your end? are you looking for a different kind of solution? |
hey @jonaskello I'm running into this problem when trying to use a library that depends on yours
(dependency-cruiser)
My company has a fairly complex typescript configuration setup which we have extracted to a config that is extended from multiple levels deep, as a result the
paths
configuration that is inherited is unfortunately ignored by your library.This change updates the
tsconfig
resolution to use what is provided out-of-the-box bytypescript
itself to avoid needing to concern yourself with the details of how config extension actually workshttps://typestrong.org/ts-node/api/interfaces/TSCommon.html#readConfigFile
https://typestrong.org/ts-node/api/interfaces/TSCommon.html#parseJsonConfigFileContent
ironically I originally saw this while exploring the codebase of
dependency-cruiser
trying to get to the bottom of this issuehttps://github.com/sverweij/dependency-cruiser/blob/master/src/config-utl/extract-ts-config.js#L52