@schematics/angular 20.0.0-next.8 → 20.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/application/files/module-files/src/app/app-module.ts.template +3 -3
- package/application/files/module-files/src/app/app.spec.ts.template +3 -3
- package/application/files/module-files/src/main.ts.template +1 -1
- package/application/files/standalone-files/src/app/app.config.ts.template +2 -2
- package/application/files/standalone-files/src/app/app.spec.ts.template +3 -3
- package/application/index.js +3 -4
- package/application/schema.d.ts +4 -4
- package/application/schema.json +2 -1
- package/config/.browserslistrc +3 -3
- package/ng-new/index.js +1 -1
- package/ng-new/schema.d.ts +4 -4
- package/ng-new/schema.json +2 -1
- package/package.json +4 -4
- package/utility/latest-versions/package.json +1 -1
- package/utility/latest-versions.js +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NgModule, provideBrowserGlobalErrorListeners<% if(
|
|
1
|
+
import { NgModule, provideBrowserGlobalErrorListeners<% if(zoneless) { %>, provideZonelessChangeDetection<% } %> } from '@angular/core';
|
|
2
2
|
import { BrowserModule } from '@angular/platform-browser';
|
|
3
3
|
<% if (routing) { %>
|
|
4
4
|
import { AppRoutingModule } from './app-routing-module';<% } %>
|
|
@@ -13,8 +13,8 @@ import { App } from './app';
|
|
|
13
13
|
AppRoutingModule<% } %>
|
|
14
14
|
],
|
|
15
15
|
providers: [
|
|
16
|
-
provideBrowserGlobalErrorListeners()<% if (
|
|
17
|
-
|
|
16
|
+
provideBrowserGlobalErrorListeners()<% if (zoneless) { %>,
|
|
17
|
+
provideZonelessChangeDetection()<% } %>
|
|
18
18
|
],
|
|
19
19
|
bootstrap: [App]
|
|
20
20
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<% if(
|
|
1
|
+
<% if(zoneless) { %>import { provideZonelessChangeDetection } from '@angular/core';
|
|
2
2
|
<% } %>import { TestBed } from '@angular/core/testing';<% if (routing) { %>
|
|
3
3
|
import { RouterModule } from '@angular/router';<% } %>
|
|
4
4
|
import { App } from './app';
|
|
@@ -11,8 +11,8 @@ describe('App', () => {
|
|
|
11
11
|
],<% } %>
|
|
12
12
|
declarations: [
|
|
13
13
|
App
|
|
14
|
-
],<% if(
|
|
15
|
-
providers: [
|
|
14
|
+
],<% if(zoneless) { %>
|
|
15
|
+
providers: [provideZonelessChangeDetection()]<% } %>
|
|
16
16
|
}).compileComponents();
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { AppModule } from './app/app-module';
|
|
4
4
|
|
|
5
5
|
platformBrowser().bootstrapModule(AppModule, {
|
|
6
|
-
<% if(!
|
|
6
|
+
<% if(!zoneless) { %>ngZoneEventCoalescing: true,<% } %><% if(!!viewEncapsulation) { %>
|
|
7
7
|
defaultEncapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } %>
|
|
8
8
|
})
|
|
9
9
|
.catch(err => console.error(err));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApplicationConfig, provideBrowserGlobalErrorListeners, <% if(!
|
|
1
|
+
import { ApplicationConfig, provideBrowserGlobalErrorListeners, <% if(!zoneless) { %>provideZoneChangeDetection<% } else { %>provideZonelessChangeDetection<% } %> } from '@angular/core';<% if (routing) { %>
|
|
2
2
|
import { provideRouter } from '@angular/router';
|
|
3
3
|
|
|
4
4
|
import { routes } from './app.routes';<% } %>
|
|
@@ -6,7 +6,7 @@ import { routes } from './app.routes';<% } %>
|
|
|
6
6
|
export const appConfig: ApplicationConfig = {
|
|
7
7
|
providers: [
|
|
8
8
|
provideBrowserGlobalErrorListeners(),
|
|
9
|
-
<% if(
|
|
9
|
+
<% if(zoneless) { %>provideZonelessChangeDetection()<% } else { %>provideZoneChangeDetection({ eventCoalescing: true })<% } %>,
|
|
10
10
|
<% if (routing) {%>provideRouter(routes)<% } %>
|
|
11
11
|
]
|
|
12
12
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<% if(
|
|
1
|
+
<% if(zoneless) { %>import { provideZonelessChangeDetection } from '@angular/core';
|
|
2
2
|
<% } %>import { TestBed } from '@angular/core/testing';
|
|
3
3
|
import { App } from './app';
|
|
4
4
|
|
|
5
5
|
describe('App', () => {
|
|
6
6
|
beforeEach(async () => {
|
|
7
7
|
await TestBed.configureTestingModule({
|
|
8
|
-
imports: [App],<% if(
|
|
9
|
-
providers: [
|
|
8
|
+
imports: [App],<% if(zoneless) { %>
|
|
9
|
+
providers: [provideZonelessChangeDetection()]<% } %>
|
|
10
10
|
}).compileComponents();
|
|
11
11
|
});
|
|
12
12
|
|
package/application/index.js
CHANGED
|
@@ -36,7 +36,7 @@ function default_1(options) {
|
|
|
36
36
|
return (0, schematics_1.chain)([
|
|
37
37
|
addAppToWorkspaceFile(options, appDir, folderName),
|
|
38
38
|
addTsProjectReference('./' + (0, core_1.join)((0, core_1.normalize)(appDir), 'tsconfig.app.json')),
|
|
39
|
-
options.skipTests
|
|
39
|
+
options.skipTests || options.minimal
|
|
40
40
|
? (0, schematics_1.noop)()
|
|
41
41
|
: addTsProjectReference('./' + (0, core_1.join)((0, core_1.normalize)(appDir), 'tsconfig.spec.json')),
|
|
42
42
|
options.standalone
|
|
@@ -212,9 +212,8 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
|
|
|
212
212
|
builder: workspace_models_1.Builders.BuildApplication,
|
|
213
213
|
defaultConfiguration: 'production',
|
|
214
214
|
options: {
|
|
215
|
-
index: `${sourceRoot}/index.html`,
|
|
216
215
|
browser: `${sourceRoot}/main.ts`,
|
|
217
|
-
polyfills: options.
|
|
216
|
+
polyfills: options.zoneless ? undefined : ['zone.js'],
|
|
218
217
|
tsConfig: `${projectRoot}tsconfig.app.json`,
|
|
219
218
|
inlineStyleLanguage,
|
|
220
219
|
assets: [{ 'glob': '**/*', 'input': `${projectRoot}public` }],
|
|
@@ -253,7 +252,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
|
|
|
253
252
|
: {
|
|
254
253
|
builder: workspace_models_1.Builders.BuildKarma,
|
|
255
254
|
options: {
|
|
256
|
-
polyfills: options.
|
|
255
|
+
polyfills: options.zoneless ? undefined : ['zone.js', 'zone.js/testing'],
|
|
257
256
|
tsConfig: `${projectRoot}tsconfig.spec.json`,
|
|
258
257
|
inlineStyleLanguage,
|
|
259
258
|
assets: [{ 'glob': '**/*', 'input': `${projectRoot}public` }],
|
package/application/schema.d.ts
CHANGED
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
* routing, styling, and testing.
|
|
6
6
|
*/
|
|
7
7
|
export type Schema = {
|
|
8
|
-
/**
|
|
9
|
-
* Generate an application that does not use `zone.js`.
|
|
10
|
-
*/
|
|
11
|
-
experimentalZoneless?: boolean;
|
|
12
8
|
/**
|
|
13
9
|
* Include the styles for the root component directly within the `app.component.ts` file.
|
|
14
10
|
* Only CSS styles can be included inline. By default, a separate stylesheet file (e.g.,
|
|
@@ -85,6 +81,10 @@ export type Schema = {
|
|
|
85
81
|
* component styles are scoped and applied.
|
|
86
82
|
*/
|
|
87
83
|
viewEncapsulation?: ViewEncapsulation;
|
|
84
|
+
/**
|
|
85
|
+
* Generate an application that does not use `zone.js`.
|
|
86
|
+
*/
|
|
87
|
+
zoneless?: boolean;
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
90
|
* The type of stylesheet files to be created for components in the application.
|
package/application/schema.json
CHANGED
|
@@ -118,8 +118,9 @@
|
|
|
118
118
|
"default": false,
|
|
119
119
|
"x-user-analytics": "ep.ng_ssr"
|
|
120
120
|
},
|
|
121
|
-
"
|
|
121
|
+
"zoneless": {
|
|
122
122
|
"description": "Generate an application that does not use `zone.js`.",
|
|
123
|
+
"x-prompt": "Do you want to create a 'zoneless' application without zone.js (Developer Preview)?",
|
|
123
124
|
"type": "boolean",
|
|
124
125
|
"default": false
|
|
125
126
|
}
|
package/config/.browserslistrc
CHANGED
package/ng-new/index.js
CHANGED
|
@@ -40,7 +40,7 @@ function default_1(options) {
|
|
|
40
40
|
minimal: options.minimal,
|
|
41
41
|
standalone: options.standalone,
|
|
42
42
|
ssr: options.ssr,
|
|
43
|
-
|
|
43
|
+
zoneless: options.zoneless,
|
|
44
44
|
};
|
|
45
45
|
return (0, schematics_1.chain)([
|
|
46
46
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.empty)(), [
|
package/ng-new/schema.d.ts
CHANGED
|
@@ -20,10 +20,6 @@ export type Schema = {
|
|
|
20
20
|
* the workspace will be created in the current directory.
|
|
21
21
|
*/
|
|
22
22
|
directory?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Create an initial application that does not utilize `zone.js`.
|
|
25
|
-
*/
|
|
26
|
-
experimentalZoneless?: boolean;
|
|
27
23
|
/**
|
|
28
24
|
* Include the styles for the initial application's root component directly within the
|
|
29
25
|
* `app.component.ts` file. By default, a separate stylesheet file (e.g.,
|
|
@@ -110,6 +106,10 @@ export type Schema = {
|
|
|
110
106
|
* encapsulated using Shadow DOM).
|
|
111
107
|
*/
|
|
112
108
|
viewEncapsulation?: ViewEncapsulation;
|
|
109
|
+
/**
|
|
110
|
+
* Create an initial application that does not utilize `zone.js`.
|
|
111
|
+
*/
|
|
112
|
+
zoneless?: boolean;
|
|
113
113
|
};
|
|
114
114
|
/**
|
|
115
115
|
* Configure the initial Git commit for the new repository.
|
package/ng-new/schema.json
CHANGED
|
@@ -139,8 +139,9 @@
|
|
|
139
139
|
"type": "boolean",
|
|
140
140
|
"x-user-analytics": "ep.ng_ssr"
|
|
141
141
|
},
|
|
142
|
-
"
|
|
142
|
+
"zoneless": {
|
|
143
143
|
"description": "Create an initial application that does not utilize `zone.js`.",
|
|
144
|
+
"x-prompt": "Do you want to create a 'zoneless' application without zone.js (Developer Preview)?",
|
|
144
145
|
"type": "boolean",
|
|
145
146
|
"default": false
|
|
146
147
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematics/angular",
|
|
3
|
-
"version": "20.0.0-
|
|
3
|
+
"version": "20.0.0-rc.0",
|
|
4
4
|
"description": "Schematics specific to Angular",
|
|
5
5
|
"homepage": "https://github.com/angular/angular-cli",
|
|
6
6
|
"keywords": [
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"schematics": "./collection.json",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@angular-devkit/core": "20.0.0-
|
|
26
|
-
"@angular-devkit/schematics": "20.0.0-
|
|
25
|
+
"@angular-devkit/core": "20.0.0-rc.0",
|
|
26
|
+
"@angular-devkit/schematics": "20.0.0-rc.0",
|
|
27
27
|
"jsonc-parser": "3.3.1"
|
|
28
28
|
},
|
|
29
29
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"packageManager": "pnpm@9.15.6",
|
|
34
34
|
"engines": {
|
|
35
|
-
"node": "^20.11.1 ||
|
|
35
|
+
"node": "^20.11.1 || ^22.11.0 || >=24.0.0",
|
|
36
36
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
37
37
|
"yarn": ">= 1.13.0"
|
|
38
38
|
},
|
|
@@ -16,7 +16,7 @@ exports.latestVersions = {
|
|
|
16
16
|
// As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
|
|
17
17
|
Angular: '^20.0.0-next.0',
|
|
18
18
|
NgPackagr: '^20.0.0-next.0',
|
|
19
|
-
DevkitBuildAngular: '^20.0.0-
|
|
20
|
-
AngularBuild: '^20.0.0-
|
|
21
|
-
AngularSSR: '^20.0.0-
|
|
19
|
+
DevkitBuildAngular: '^20.0.0-rc.0',
|
|
20
|
+
AngularBuild: '^20.0.0-rc.0',
|
|
21
|
+
AngularSSR: '^20.0.0-rc.0',
|
|
22
22
|
};
|