-
Notifications
You must be signed in to change notification settings - Fork 459
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
feat: support tsconfig references #4689
base: main
Are you sure you want to change the base?
feat: support tsconfig references #4689
Conversation
3644197
to
c2eee48
Compare
Would you pls add some tests for this change? |
@ahnpnl Absolutely. That is the reason I have left it in draft stage. Thanks. |
c2eee48
to
daec5b7
Compare
@ahnpnl I added an e2e test case covering the tsconfig project references scenario. Please check it out when you can. Thanks! |
@@ -218,6 +216,9 @@ export class ConfigSet { | |||
this._matchTestFilePath = globsToMatcher( | |||
this._matchablePatterns.filter((pattern: string | RegExp) => typeof pattern === 'string') as string[], | |||
) | |||
|
|||
this._setupConfigSet(options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_setupConfigSet
now depends on matchablePatterns
to exist when its called, because isTestFile
is used in finding the appropriate tsconfig reference project to use for ts compile/transpile process.
@@ -790,7 +790,6 @@ describe('_resolveTsConfig', () => { | |||
expect(conf.options.configFilePath).toBeUndefined() | |||
expect(findConfig).not.toHaveBeenCalled() | |||
expect(readConfig.mock.calls[0][0]).toBe('/foo/tsconfig.bar.json') | |||
expect(parseConfig).not.toHaveBeenCalled() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will now be called to find out if we there are project references in the tsconfig to check.
@@ -918,7 +917,6 @@ describe('_resolveTsConfig', () => { | |||
|
|||
const conf = cs.parsedTsConfig | |||
expect(conf.options.path).toBe(tscfgPathStub) | |||
expect(findConfig).not.toHaveBeenCalled() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will now be called to find out if we there are project references in the tsconfig to check.
Summary
Fixes #1648 -
isTestFile()
check.isTestFile()
check.Test plan
TODO
Does this PR introduce a breaking change?
Other information