-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix(core): Respect extends
in local plugin TS options
#30062
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit b6fbb59.
☁️ Nx Cloud last updated this comment at |
|
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.
Thank you for contributing!
The change makes sense. I just requested a couple of changes to the test file but nothing major. If you don't have time to address them, please let me know and I'll update the PR.
@leosvelperez it still fails for workspace plugins (see the stack trace above). Edit 1: While debugging I noticed the issue is not with the Edit 2: Somehow it fails when parsing the Edit 3: I noticed |
@alumni thanks for the extra feedback and testing! @ethantkoenig we should update the host to: const host: Partial<ts.ParseConfigHost> = {
...tsModule.sys,
readDirectory: () => [],
}; That way, we have everything that's needed to read the config files (including extended config files from third-party packages) while still avoiding scanning directories, which are only used to identify the Please add extra test cases that cover extending from third-party packages. |
Seems to work for the project config that I have.
Thanks both :) |
Done
Added a test, though I was unable to come up with a third-party test case that fails with the old code, so the test might not be super useful. @alumni if you have a minimal reproducible example you are able to easily share, that would be helpful. |
Fix a bug introduced in #29774. ## Current Behavior If a local plugin's `tsconfig.json` uses `extends`, the referenced base config is not loaded. ## Expected Behavior If a local plugin's `tsconfig.json` uses `extends`, the referenced base config is loaded. ## Related Issue(s) Fixes #30007 --------- Co-authored-by: Leosvel Pérez Espinosa <leosvel.perez.espinosa@gmail.com>
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Fix a bug introduced in #29774.
Current Behavior
If a local plugin's
tsconfig.json
usesextends
, the referenced base config is not loaded.Expected Behavior
If a local plugin's
tsconfig.json
usesextends
, the referenced base config is loaded.Related Issue(s)
Fixes #30007