fix(migrations): skip tsconfig files of non-Angular projects#69846
fix(migrations): skip tsconfig files of non-Angular projects#69846lazerg wants to merge 1 commit into
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
JeanMeche
left a comment
There was a problem hiding this comment.
AGENT: Thanks for the PR! Restricting the tsconfig collection to Angular builders is a great way to avoid polluting non-Angular projects in monorepos.
However, many users in the Angular ecosystem use third-party builders for their Angular apps, such as Nx (@nx/angular:...) or custom webpack builders (@angular-builders/custom-webpack:...). If we strictly check for @angular-devkit/build-angular: and @angular/build:, we risk skipping actual Angular projects that use these community builders, leaving them unmigrated.
Consider expanding the list of prefixes to cover the most common community Angular builders, or using a more relaxed check (e.g., checking if the builder name includes angular).
const angularBuilderPrefixes = [
'@angular-devkit/build-angular:',
'@angular/build:',
'@nx/angular:',
'@angular-builders/',
];
|
I will check. |
|
Done |
JeanMeche
left a comment
There was a problem hiding this comment.
AGENT: The updated allow-list of builder prefixes looks great and perfectly addresses the issue with third-party Angular builders like Nx and angular-builders. The tests are also comprehensive.
LGTM! Thanks for the update!
|
Can you please have a look at the linting issue. The commit message should 20+ char and also we'd like this change to be a single commit, could you also please squash both commits into one. Thank you. |
f90af93 to
f68c698
Compare
|
Done |
Only touch tsconfig files for targets that use an Angular builder, including community ones like Nx, so non-Angular projects in mixed workspaces are left alone. Fixes angular#69837
f68c698 to
1f73d85
Compare
The
strict-templates-defaultandstrict-safe-navigation-narrowmigrations addangularCompilerOptionsto every tsconfig that's referenced by a target inangular.json. In a mixed workspace like an Nx monorepo, that also covers non-Angular projects (Node, React, etc.), so their tsconfig files get rewritten too and show up as large, unrelated diffs.Both migrations now only look at targets that use an Angular builder, so non-Angular projects are left alone.
Fixes #69837