fix(bazel/rules_angular): fix 'NgtscCompilerHost' type incompatibility#3529
Conversation
There was a problem hiding this comment.
Code Review
The pull request renames the typescript-local dependency to typescript across the project. This involved updating package.json and pnpm-lock.yaml to reflect the new dependency name and directly reference typescript. Corresponding changes were made in MODULE.bazel and BUILD.bazel files to adjust the TypeScript dependency configuration and symlinking, ensuring all Bazel modules correctly reference the renamed typescript package. Additionally, internal tooling in ng-dev/misc/sync-module-bazel was updated to correctly parse the TypeScript version based on the new naming convention.
2f91132 to
3f90950
Compare
This change fixes an issue where the 'NgtscCompilerHost' was not assignable to 'CompilerHost' due to incompatible 'SourceFile' types from different TypeScript versions. The fix involves ensuring that the Angular compiler worker uses the user-configured TypeScript dependency instead of a potentially different version from the root. As part of this, the 'typescript-local' dependency alias is renamed to 'typescript' and the symlinking logic is moved to the worker package.
…-bazel' Removes the logic and interface definitions for handling the 'typescript-local' dependency alias, as it is no longer used.
3f90950 to
315b182
Compare
josephperrott
left a comment
There was a problem hiding this comment.
LGTM
We should keep an eye out to make sure this behaves as expected once its used elsewhere, it looks correct, but I know we have also run into alot of weirdness/edges with having the user provided versions of the packages coupled with multiple instances of the rules_angular module being set up within repositories.
|
This PR was merged into the repository. The changes were merged into the following branches:
|
For context, the issue was that angular/angular was broken. I did link it and tested it in both patch and main prior to opening the PR and it does seem to behave as expected. |
This change fixes an issue where the 'NgtscCompilerHost' was not assignable to 'CompilerHost'
due to incompatible 'SourceFile' types from different TypeScript versions.
The fix involves ensuring that the Angular compiler worker uses the user-configured
TypeScript dependency instead of a potentially different version from the root.
As part of this, the 'typescript-local' dependency alias is renamed to 'typescript'
and the symlinking logic is moved to the worker package.