@schematics/angular 20.0.0-next.8 → 20.0.0-next.9

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.
@@ -1,4 +1,4 @@
1
- import { NgModule, provideBrowserGlobalErrorListeners<% if(experimentalZoneless) { %>, provideExperimentalZonelessChangeDetection<% } %> } from '@angular/core';
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 (experimentalZoneless) { %>,
17
- provideExperimentalZonelessChangeDetection()<% } %>
16
+ provideBrowserGlobalErrorListeners()<% if (zoneless) { %>,
17
+ provideZonelessChangeDetection()<% } %>
18
18
  ],
19
19
  bootstrap: [App]
20
20
  })
@@ -1,4 +1,4 @@
1
- <% if(experimentalZoneless) { %>import { provideExperimentalZonelessChangeDetection } from '@angular/core';
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(experimentalZoneless) { %>
15
- providers: [provideExperimentalZonelessChangeDetection()]<% } %>
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(!experimentalZoneless) { %>ngZoneEventCoalescing: true,<% } %><% if(!!viewEncapsulation) { %>
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(!experimentalZoneless) { %>provideZoneChangeDetection<% } else { %>provideExperimentalZonelessChangeDetection<% } %> } from '@angular/core';<% if (routing) { %>
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(experimentalZoneless) { %>provideExperimentalZonelessChangeDetection()<% } else { %>provideZoneChangeDetection({ eventCoalescing: true })<% } %>,
9
+ <% if(zoneless) { %>provideZonelessChangeDetection()<% } else { %>provideZoneChangeDetection({ eventCoalescing: true })<% } %>,
10
10
  <% if (routing) {%>provideRouter(routes)<% } %>
11
11
  ]
12
12
  };
@@ -1,12 +1,12 @@
1
- <% if(experimentalZoneless) { %>import { provideExperimentalZonelessChangeDetection } from '@angular/core';
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(experimentalZoneless) { %>
9
- providers: [provideExperimentalZonelessChangeDetection()]<% } %>
8
+ imports: [App],<% if(zoneless) { %>
9
+ providers: [provideZonelessChangeDetection()]<% } %>
10
10
  }).compileComponents();
11
11
  });
12
12
 
@@ -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
@@ -214,7 +214,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
214
214
  options: {
215
215
  index: `${sourceRoot}/index.html`,
216
216
  browser: `${sourceRoot}/main.ts`,
217
- polyfills: options.experimentalZoneless ? [] : ['zone.js'],
217
+ polyfills: options.zoneless ? undefined : ['zone.js'],
218
218
  tsConfig: `${projectRoot}tsconfig.app.json`,
219
219
  inlineStyleLanguage,
220
220
  assets: [{ 'glob': '**/*', 'input': `${projectRoot}public` }],
@@ -253,7 +253,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
253
253
  : {
254
254
  builder: workspace_models_1.Builders.BuildKarma,
255
255
  options: {
256
- polyfills: options.experimentalZoneless ? [] : ['zone.js', 'zone.js/testing'],
256
+ polyfills: options.zoneless ? undefined : ['zone.js', 'zone.js/testing'],
257
257
  tsConfig: `${projectRoot}tsconfig.spec.json`,
258
258
  inlineStyleLanguage,
259
259
  assets: [{ 'glob': '**/*', 'input': `${projectRoot}public` }],
@@ -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.
@@ -118,8 +118,9 @@
118
118
  "default": false,
119
119
  "x-user-analytics": "ep.ng_ssr"
120
120
  },
121
- "experimentalZoneless": {
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
  }
@@ -1,6 +1,6 @@
1
- Chrome >= 105
2
- ChromeAndroid >= 105
3
- Edge >= 105
1
+ Chrome >= 107
2
+ ChromeAndroid >= 107
3
+ Edge >= 107
4
4
  Firefox >= 104
5
5
  FirefoxAndroid >= 104
6
6
  Safari >= 16
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
- experimentalZoneless: options.experimentalZoneless,
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)(), [
@@ -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.
@@ -139,8 +139,9 @@
139
139
  "type": "boolean",
140
140
  "x-user-analytics": "ep.ng_ssr"
141
141
  },
142
- "experimentalZoneless": {
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-next.8",
3
+ "version": "20.0.0-next.9",
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-next.8",
26
- "@angular-devkit/schematics": "20.0.0-next.8",
25
+ "@angular-devkit/core": "20.0.0-next.9",
26
+ "@angular-devkit/schematics": "20.0.0-next.9",
27
27
  "jsonc-parser": "3.3.1"
28
28
  },
29
29
  "repository": {
@@ -8,7 +8,7 @@
8
8
  "@types/node": "^20.17.19",
9
9
  "browser-sync": "^3.0.0",
10
10
  "express": "^5.1.0",
11
- "jasmine-core": "~5.6.0",
11
+ "jasmine-core": "~5.7.0",
12
12
  "jasmine-spec-reporter": "~7.0.0",
13
13
  "karma-chrome-launcher": "~3.2.0",
14
14
  "karma-coverage": "~2.2.0",
@@ -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-next.8',
20
- AngularBuild: '^20.0.0-next.8',
21
- AngularSSR: '^20.0.0-next.8',
19
+ DevkitBuildAngular: '^20.0.0-next.9',
20
+ AngularBuild: '^20.0.0-next.9',
21
+ AngularSSR: '^20.0.0-next.9',
22
22
  };