Skip to content
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 tsconfig.json files that have an extends property #1313

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jtupiter
Copy link

What does the PR do?

Fixes issue #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.

* Fix issue where dangerjs did not support extended tsconfigs

* Add tests to verify extending tsconfigs
@orta
Copy link
Member

orta commented Oct 1, 2022

Hi, I'm a little surprised by the failing tests here - do you have a sense of why it broke?

@Jtupiter
Copy link
Author

Jtupiter commented Oct 3, 2022

Hi, I'm a little surprised by the failing tests here - do you have a sense of why it broke?

Yeah, I was confused by this. It's completely unrelated to my change and it passes locally. The failing snapshot also looks correct, which makes me think it has something to do with line endings. Will see if I can resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants