Skip to content

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Jul 15, 2025

This change updates applications to omit the ZoneJS dependency by
default.

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 atscott marked this pull request as draft July 15, 2025 22:42
@atscott atscott added target: major This PR is targeted for the next major release and removed area: @schematics/angular detected: feature PR contains a feature commit labels Jul 15, 2025
@atscott atscott force-pushed the zonelessdefaultv21 branch from b381f6b to 2381fc4 Compare July 16, 2025 18:01
@atscott atscott force-pushed the zonelessdefaultv21 branch from 2381fc4 to 79d6d09 Compare July 16, 2025 19:37
@atscott atscott force-pushed the zonelessdefaultv21 branch 4 times, most recently from ea4fb06 to 1a2767a Compare September 9, 2025 23:33
@atscott atscott force-pushed the zonelessdefaultv21 branch 9 times, most recently from 4b1459a to 1e10964 Compare September 18, 2025 19:29
@atscott atscott marked this pull request as ready for review September 18, 2025 21:51
This change updates applications to omit the ZoneJS dependency by
default.

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).
@alan-agius4 alan-agius4 removed the request for review from clydin September 24, 2025 07:37
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 24, 2025
…schema

The default should only be applied in the application schematic schema as otherwise the prompt will never be displayed.
Copy link
Collaborator

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM

},
"zoneless": {
"description": "Generate an application that does not use `zone.js`.",
"x-prompt": "Do you want to create a 'zoneless' application without zone.js?",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we keeping the prompt?

await setNPMConfigRegistry(true);

await ng('new', 'test-project', '--skip-install');
await ng('new', 'test-project', '--skip-install', '--no-zoneless');
Copy link
Collaborator

Choose a reason for hiding this comment

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

In a followup we should likely try to have most of the our tests test the default behavior (IE: zoneless).

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 24, 2025
@alan-agius4 alan-agius4 merged commit 728c34b into angular:main Sep 24, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: @schematics/angular detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: First-class zoneless support in @angular/build:unit-test (Vitest)
2 participants