Closed effervescentia closed 1 year ago
Patch coverage: 100.00
% and project coverage change: -1.62
:warning:
Comparison is base (
910a138
) 68.16% compared to head (9a46e67
) 66.54%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This seems interesting :-) Is there some docs that state that parseJsonConfigFileContent
is a public api in the typescript package?
This seems interesting :-) Is there some docs that state that
parseJsonConfigFileContent
is a public api in the typescript package?
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 ts-node
that I referenced indicate that it's a common method shared across multiple versions of typescript
.
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 typescript
to provide the config file resolution, but does claim to test against it for correctness (I haven't confirmed this for myself).
@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 https://github.com/bokeh/bokeh https://github.com/AssemblyScript/assemblyscript https://github.com/GoogleChromeLabs/squoosh https://github.com/vuejs/vetur
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 thetsconfig
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 issue https://github.com/sverweij/dependency-cruiser/blob/master/src/config-utl/extract-ts-config.js#L52