Skip to content

refactor(@angular/cli): add a get Zoneless/OnPush MCP tool #30868

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Aug 11, 2025

This change adds a tool that identifies the next steps for migrating a project file or directory to Zoneless or OnPush. The priorities for migration are:

  1. Find and report any unsupported uses of ZoneJS APIs. These are easily verifiable. If they exist, they need to be removed and the tool provides suggested replacements
  2. Provide requirements for OnPush compatibility for any files with a Component. It is suggested to use an explicit ChangeDetectionStrategy.Default until it can be verified the migration is complete. The tool skips any components with explicit change detection strategy definitions. This is required since we have no way of statically verifying a component is compatible with OnPush, so we need some way to indicate the tool should move on from a component
  3. When nothing is identified in the above two steps, move on to test files and suggest migrating those to use zoneless. This is the best method to verify that components are zoneless compatible.

This change adds a tool that identifies the next steps for migrating a
project file or directory to Zoneless or OnPush. The priorities for
migration are:

1. Find and report any unsupported uses of ZoneJS APIs. These are easily
   verifiable. If they exist, they need to be removed and the tool
   provides suggested replacements
2. Provide requirements for OnPush compatibility for any files with a
   Component. It is suggested to use an explicit `ChangeDetectionStrategy.Default`
   until it can be verified the migration is complete. The tool skips
   any components with explicit change detection strategy definitions.
   This is required since we have no way of statically verifying a
   component is compatible with OnPush, so we need some way to indicate
   the tool should move on from a component
3. When nothing is identified in the above two steps, move on to test
   files and suggest migrating those to use zoneless. This is the best
   method to verify that components are zoneless compatible.
@atscott atscott force-pushed the zoneless-migration-mcp branch from 2854e1e to 5029414 Compare August 11, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant