Skip to content

fix(migrations): skip tsconfig files of non-Angular projects#69846

Open
lazerg wants to merge 1 commit into
angular:mainfrom
lazerg:fix/issue-69837-non-angular-tsconfig
Open

fix(migrations): skip tsconfig files of non-Angular projects#69846
lazerg wants to merge 1 commit into
angular:mainfrom
lazerg:fix/issue-69837-non-angular-tsconfig

Conversation

@lazerg

@lazerg lazerg commented Jul 19, 2026

Copy link
Copy Markdown

The strict-templates-default and strict-safe-navigation-narrow migrations add angularCompilerOptions to every tsconfig that's referenced by a target in angular.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

@pullapprove
pullapprove Bot requested a review from atscott July 19, 2026 14:42
@angular-robot angular-robot Bot added the area: migrations Issues related to `ng update`/`ng generate` migrations label Jul 19, 2026
@google-cla

This comment was marked as outdated.

@ngbot ngbot Bot added this to the Backlog milestone Jul 19, 2026

@JeanMeche JeanMeche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/',
];

@lazerg

lazerg commented Jul 20, 2026

Copy link
Copy Markdown
Author

I will check.

@lazerg

lazerg commented Jul 20, 2026

Copy link
Copy Markdown
Author

Done

@JeanMeche JeanMeche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@JeanMeche

Copy link
Copy Markdown
Member

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.

@JeanMeche JeanMeche added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jul 20, 2026
@lazerg
lazerg force-pushed the fix/issue-69837-non-angular-tsconfig branch 2 times, most recently from f90af93 to f68c698 Compare July 20, 2026 15:57
@lazerg

lazerg commented Jul 20, 2026

Copy link
Copy Markdown
Author

Done

@lazerg
lazerg requested a review from JeanMeche July 20, 2026 21:17
Comment thread packages/core/schematics/utils/project_tsconfig_paths.ts
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
@lazerg
lazerg force-pushed the fix/issue-69837-non-angular-tsconfig branch from f68c698 to 1f73d85 Compare July 21, 2026 15:14
@JeanMeche JeanMeche removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jul 22, 2026
@JeanMeche
JeanMeche removed the request for review from atscott July 22, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: migrations Issues related to `ng update`/`ng generate` migrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrations modify non-Angular tsconfig.json

2 participants