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

Lookup tsconfig.json from location of dangerfile #1068

Merged
merged 4 commits into from
Sep 3, 2020

Conversation

Igorbek
Copy link

@Igorbek Igorbek commented Sep 2, 2020

Closes #1067

Now ts transpiler looks for tsconfig.json file starting from the location of the danger file. If the current directory is an ancestor of that location, it climbs up to it and returns the first found config file. Otherwise only additionally checks the current working directory.

cc @orta

Copy link
Member

@orta orta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this looks perfect - thanks

expect(dirContains(`c:\\a`, `c:\\a`)).toBe(true)
expect(dirContains(`c:\\a`, `d:\\a\\b`)).toBe(false)
expect(dirContains(`c:\\a`, `d:\\a`)).toBe(false)
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work

@orta orta merged commit 385accf into danger:master Sep 3, 2020
@Igorbek Igorbek deleted the tsconfig-lookup branch September 3, 2020 16:52
@orta
Copy link
Member

orta commented Sep 3, 2020

if we get another PR landing soon I'll ship this with that, otherwise I'll do it in a few days

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.

tsconfig.json lookup issue
2 participants