Add support for 'deep' extension#112
Conversation
Codecov Report
@@ Coverage Diff @@
## master #112 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 4 4
Lines 129 129
Branches 52 52
======================================
Misses 129 129 Continue to review full report at Codecov.
|
|
Hi @jonaskello, any change of checking this out and getting it merged? :) |
|
hey @jonaskello I'm running into the same problem trying to use a tool many steps removed from your own library (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 https://typestrong.org/ts-node/api/interfaces/TSCommon.html#readConfigFile you should be able to use something like the following import typescript from 'typescript';
const rawConfig = typescript.readConfigFile('tsconfig.json', typescript.sys.readFile);
const fullConfig = typescript.parseJsonConfigFileContent(
rawConfig.config,
typescript.sys,
'path/to/repo',
{},
'tsconfig.json'
);
fullConfig.options; // tsconfig compiler options (with all inherited values)ironically I originally saw this while exploring the codebase of I'm also happy to make a PR with the above change if you like the solution but don't have the time to implement it |
Typescript has support for deep config
extensions, but it seems liketsconfig-pathsisn't handling this too well and stops after the first 'extend'.This rewrite makes sure it 'keeps on extending' until no 'extends' property is found.