Skip to content

fix(core): Remove Zone-based change provider from internals by default - #63382

Closed
atscott wants to merge 2 commits into
angular:mainfrom
atscott:zonelessbydefault
Closed

atscott wants to merge 2 commits into
angular:mainfrom
atscott:zonelessbydefault

Conversation

@atscott

@atscott atscott commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

This change removes the internally provided ZoneJS-based change detection scheduler. This makes Angular Zoneless by default and allows tree-shaking of the Zone change detection providers.

BREAKING CHANGE: Angular no longer provides a change detection scheduler for ZoneJS-based change detection by default. Add
provideZoneChangeDetection to the providers of your bootstrapApplication function or your AppModule (if using bootstrapModule). This provider addition will be covered by an automated migration.

@atscott atscott added area: core Issues related to the framework runtime target: major This PR is targeted for the next major release labels Aug 25, 2025
@ngbot ngbot Bot added this to the Backlog milestone Aug 25, 2025
@angular-robot angular-robot Bot added the detected: breaking change PR contains a commit with a breaking change label Aug 25, 2025
@atscott
atscott force-pushed the zonelessbydefault branch 17 times, most recently from 70b753b to 03a3260 Compare August 27, 2025 22:28
@atscott
atscott force-pushed the zonelessbydefault branch from 03a3260 to 0537bcc Compare August 28, 2025 03:04
@atscott

atscott commented Aug 28, 2025 •

Copy link
Copy Markdown
Contributor Author

First commit is in #63404

Blocked by: #63042 (blocked by #63457)
Blocked by: running above migration in g3
Blocked by: #63814

@atscott
atscott force-pushed the zonelessbydefault branch 2 times, most recently from 4d87ee0 to 57c91ac Compare August 29, 2025 19:15
atscott added a commit to atscott/angular that referenced this pull request Sep 9, 2025
This updates tests and examples only to prepare for zoneless by default.

These changes were identified and made as part of angular#63382. Anything that
failed gets `provideZoneChangeDetection` unless the fixes were easily
and quickly determined.
atscott added a commit to atscott/angular that referenced this pull request Sep 9, 2025
This updates tests and examples only to prepare for zoneless by default.

These changes were identified and made as part of angular#63382. Anything that
failed gets `provideZoneChangeDetection` unless the fixes were easily
and quickly determined.

It also adds the zoneless provider to the `initTestEnvironment` calls
for tests in this repo to prevent regressions before angular#63382 is merged.
atscott added a commit to atscott/angular that referenced this pull request Sep 9, 2025
This updates tests and examples only to prepare for zoneless by default.

These changes were identified and made as part of angular#63382. Anything that
failed gets `provideZoneChangeDetection` unless the fixes were easily
and quickly determined.

It also adds the zoneless provider to the `initTestEnvironment` calls
for tests in this repo to prevent regressions before angular#63382 is merged.
This makes the zoneless-by-default change a flag flip that can be
individually enabled in tests, createApplication, and bootstrapModule
for gradual rollout. In addition, the "require on CD provider" check is
also made individually flippable for gradual rollout.
@atscott

atscott commented Sep 16, 2025

Copy link
Copy Markdown
Contributor Author

caretaker note: this will need an update to the internal patches for gradual rollout: https://critique.corp.google.com/cl/807750644

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just a couple of comments.

Comment thread packages/core/testing/src/test_bed_compiler.ts
Comment thread packages/platform-browser/testing/src/browser.ts
@atscott atscott added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Sep 16, 2025
@thePunderWoman
thePunderWoman removed the request for review from JeanMeche September 16, 2025 18:54
@thePunderWoman

Copy link
Copy Markdown
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

thePunderWoman pushed a commit that referenced this pull request Sep 16, 2025
This makes the zoneless-by-default change a flag flip that can be
individually enabled in tests, createApplication, and bootstrapModule
for gradual rollout. In addition, the "require on CD provider" check is
also made individually flippable for gradual rollout.

PR Close #63382
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 17, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 17, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 17, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 17, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 17, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 17, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 17, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 18, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
wildcardalice pushed a commit to wildcardalice/angular that referenced this pull request Sep 18, 2025
angular#63382)

This change removes the internally provided `ZoneJS`-based change
detection scheduler. This makes Angular Zoneless by default and allows
tree-shaking of the Zone change detection providers.

BREAKING CHANGE: Angular no longer provides a change detection scheduler
for ZoneJS-based change detection by default. Add
`provideZoneChangeDetection` to the providers of your
`bootstrapApplication` function or your `AppModule` (if using
`bootstrapModule`). This provider addition will be covered by an
automated migration.

PR Close angular#63382
wildcardalice pushed a commit to wildcardalice/angular that referenced this pull request Sep 18, 2025
…lar#63382)

This makes the zoneless-by-default change a flag flip that can be
individually enabled in tests, createApplication, and bootstrapModule
for gradual rollout. In addition, the "require on CD provider" check is
also made individually flippable for gradual rollout.

PR Close angular#63382
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 18, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
atscott added a commit to atscott/angular-cli that referenced this pull request Sep 19, 2025
This change updates applications to omit the ZoneJS dependency by
default. It depends on angular/angular#63382,
which allows us to also exclude the `provideZonelessChangeDetection`
provider.

This change also includes the addition of `provideZoneChangeDetection`
in the `initTestEnvironment` when ZoneJS is detected in the
configuration (either on window or in the polyfills).
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Oct 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime area: upgrade Issues related to AngularJS → Angular upgrade APIs detected: breaking change PR contains a commit with a breaking change merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants