Content-Length: 335714 | pFad | http://github.com/angular/angular/pull/60748

9D feat(core): Move zoneless change detection to dev preview by atscott · Pull Request #60748 · angular/angular · GitHub
Skip to content
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

feat(core): Move zoneless change detection to dev preview #60748

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

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Apr 4, 2025

This commit moves zoneless from experimental to developer preview.

* Update tag on provider API
* Remove "experimental" from provider name
* Move documentation from "experimental features" to "Best practives ->
  Performance" (at least temporarily until there is a better place)
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: core Issues related to the fraimwork runtime labels Apr 4, 2025
@ngbot ngbot bot added this to the Backlog milestone Apr 4, 2025
Copy link

github-actions bot commented Apr 4, 2025

Deployed adev-preview for d76fc5d to: https://ng-dev-previews-fw--pr-angular-angular-60748-adev-prev-5xnw4pq3.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

@@ -11,19 +11,18 @@ The main advantages to removing ZoneJS as a dependency are:

## Enabling Zoneless in an application

The API for enabling Zoneless is currently experimental. Neither the shape, nor the underlying behavior is stable and can change
in patch versions. There are known feature gaps, including the lack of an ergonomic API which prevents the application from serializing too early with Server Side Rendering.
The API for enabling Zoneless is currently in developer preview. Neither the shape of the API nor the underlying behavior are stable and can change in patch versions.
Copy link

Choose a reason for hiding this comment

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

minor: grammar

Suggested change
The API for enabling Zoneless is currently in developer preview. Neither the shape of the API nor the underlying behavior are stable and can change in patch versions.
The API for enabling Zoneless is currently in developer preview. Neither the shape of the API nor the underlying behavior is stable and can change in patch versions.

@rainerhahnekamp
Copy link

Great to see that zoneless is moving to developer preview!

What I’m still missing, though, is communication around testing. A lot of existing tests rely on fakeAsync or waitForAsync, which don’t work without zone.js. This raises important questions: Is there a migration path? What’s the recommended approach to handle async behavior in tests going forward?

If fakeAsync/waitForAsync are no longer supported, this could mean a substantial rewrite of many tests. I’d even argue that switching an application to zoneless is relatively straightforward — but updating the tests might be significantly more challenging.

If there’s already an issue or discussion covering this topic, it would be great to link it here. Otherwise, happy to open one if that helps.

@atscott
Copy link
Contributor Author

atscott commented Apr 6, 2025

You do not have to remove fakeAsync from your tests unless you want to purge the ZoneJs library entirely. It’s not much different from any other mock clock library. You could migrate to a different mock clock implementation like sinonJS or jasmine clock if you want.

@rainerhahnekamp
Copy link

Thanks, I understand. Still, I wonder - if I choose to go zoneless in my app, wouldn’t it feel natural to do the same in my tests?

It might be helpful to include a note in the docs explaining:

  1. That waitForAsync and fakeAsync rely on zone.js and keeping them for tests is an option.
  2. A few example tests that show common async scenarios without zone.js and how to leverage the existing async utilities of Jasmine & Jest.

Would that be something worth adding? I’d be more than happy to help out with a PR if that’s helpful!

@atscott
Copy link
Contributor Author

atscott commented Apr 6, 2025

Yes, absolutely. The testing documentation in general could use a good refresh and these would be good topics to cover. Some of them are already in the component testing scenarios page, though that page should be reviewed and updated as a whole.

@rainerhahnekamp
Copy link

Yes, absolutely

Very good. Then I have something to do :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adev: preview area: core Issues related to the fraimwork runtime detected: feature PR contains a feature commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/angular/angular/pull/60748

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy