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(compiler-cli): don't try to tag non-ts files as shims #36987
Conversation
8ff5a40
to
0fb8a6d
Compare
Some projects include .js source files (via the TypeScript allowJs option). Previously, the compiler would attempt to tag these files for shims, which caused errors as the regex used to create shim filenames assumes a .ts file. This commit fixes the bug by filtering out non-ts files during tagging.
0fb8a6d
to
a34233e
Compare
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.
LGTM
@@ -59,6 +59,7 @@ export class NgtscTestEnvironment { | |||
"outDir": "built", | |||
"rootDir": ".", | |||
"baseUrl": ".", | |||
"allowJs": true, |
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.
I would move this local to the test, as the test continues to pass without this flag (so anyone removing this in the future won't be able to see the effect of it, but it would render the test useless.)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
) Some projects include .js source files (via the TypeScript allowJs option). Previously, the compiler would attempt to tag these files for shims, which caused errors as the regex used to create shim filenames assumes a .ts file. This commit fixes the bug by filtering out non-ts files during tagging. PR Close angular#36987
Some projects include .js source files (via the TypeScript allowJs option).
Previously, the compiler would attempt to tag these files for shims, which
caused errors as the regex used to create shim filenames assumes a .ts file.
This commit fixes the bug by filtering out non-ts files during tagging.