Following what was suggested in the issue to mimic what ts-node is doing to resolve the tsconfig.json here.
Their method is quite a bit more complex since they need to resolve custom ts-node compiler options.
For our purposes, reading the config file using ts.readConfigFile and then parsing it with ts.parseJsonConfigFileContent produces the expected tsconfig.json even when it extends another one.
Tests
Added a test to confirm that danger resolves extended tsconfigs.
Follow up the PR https://github.com/danger/danger-js/pull/1313
Description copied from https://github.com/danger/danger-js/pull/1313:
What does the PR do?
Fixes issue https://github.com/danger/danger-js/issues/1283.
Following what was suggested in the issue to mimic what ts-node is doing to resolve the tsconfig.json here. Their method is quite a bit more complex since they need to resolve custom ts-node compiler options.
For our purposes, reading the config file using ts.readConfigFile and then parsing it with ts.parseJsonConfigFileContent produces the expected tsconfig.json even when it extends another one.
Tests
Added a test to confirm that danger resolves extended tsconfigs.