@schematics/angular 18.0.0-next.0 → 18.0.0-next.2

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.
@@ -3,11 +3,8 @@
3
3
 
4
4
  import { AppModule } from './app/app.module';
5
5
 
6
- <% if(!!viewEncapsulation) { %>
7
6
  platformBrowserDynamic().bootstrapModule(AppModule, {
8
- defaultEncapsulation: ViewEncapsulation.<%= viewEncapsulation %>
7
+ ngZoneEventCoalescing: true<% if(!!viewEncapsulation) { %>,
8
+ defaultEncapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } %>
9
9
  })
10
- .catch(err => console.error(err));<% } else { %>
11
- platformBrowserDynamic().bootstrapModule(AppModule)
12
10
  .catch(err => console.error(err));
13
- <% } %>
@@ -1,8 +1,8 @@
1
- import { ApplicationConfig } from '@angular/core';<% if (routing) { %>
1
+ import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';<% if (routing) { %>
2
2
  import { provideRouter } from '@angular/router';
3
3
 
4
4
  import { routes } from './app.routes';<% } %>
5
5
 
6
6
  export const appConfig: ApplicationConfig = {
7
- providers: [<% if (routing) { %>provideRouter(routes)<% } %>]
7
+ providers: [provideZoneChangeDetection({ eventCoalescing: true })<% if (routing) { %>, provideRouter(routes)<% } %>]
8
8
  };
@@ -201,7 +201,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
201
201
  polyfills: ['zone.js'],
202
202
  tsConfig: `${projectRoot}tsconfig.app.json`,
203
203
  inlineStyleLanguage,
204
- assets: [`${sourceRoot}/favicon.ico`, `${sourceRoot}/assets`],
204
+ assets: [{ 'glob': '**/*', 'input': 'public' }],
205
205
  styles: [`${sourceRoot}/styles.${options.style}`],
206
206
  scripts: [],
207
207
  },
@@ -244,7 +244,7 @@ function addAppToWorkspaceFile(options, appDir, folderName) {
244
244
  polyfills: ['zone.js', 'zone.js/testing'],
245
245
  tsConfig: `${projectRoot}tsconfig.spec.json`,
246
246
  inlineStyleLanguage,
247
- assets: [`${sourceRoot}/favicon.ico`, `${sourceRoot}/assets`],
247
+ assets: [{ 'glob': '**/*', 'input': 'public' }],
248
248
  styles: [`${sourceRoot}/styles.${options.style}`],
249
249
  scripts: [],
250
250
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "18.0.0-next.0",
3
+ "version": "18.0.0-next.2",
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": "18.0.0-next.0",
26
- "@angular-devkit/schematics": "18.0.0-next.0",
25
+ "@angular-devkit/core": "18.0.0-next.2",
26
+ "@angular-devkit/schematics": "18.0.0-next.2",
27
27
  "jsonc-parser": "3.2.1"
28
28
  },
29
29
  "repository": {
@@ -21,8 +21,7 @@
21
21
  "updateMode": "prefetch",
22
22
  "resources": {
23
23
  "files": [
24
- "/assets/**",
25
- "<%= resourcesOutputPath %>/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
24
+ "/**/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
26
25
  ]
27
26
  }
28
27
  }
@@ -110,11 +110,9 @@ function default_1(options) {
110
110
  }
111
111
  const buildOptions = buildTarget.options;
112
112
  let browserEntryPoint;
113
- let resourcesOutputPath = '';
114
113
  const ngswConfigPath = (0, core_1.join)((0, core_1.normalize)(project.root), 'ngsw-config.json');
115
114
  if (buildTarget.builder === workspace_models_1.Builders.Application) {
116
115
  browserEntryPoint = buildOptions.browser;
117
- resourcesOutputPath = '/media';
118
116
  const productionConf = buildTarget.configurations?.production;
119
117
  if (productionConf) {
120
118
  productionConf.serviceWorker = ngswConfigPath;
@@ -124,9 +122,6 @@ function default_1(options) {
124
122
  browserEntryPoint = buildOptions.main;
125
123
  buildOptions.serviceWorker = true;
126
124
  buildOptions.ngswConfigPath = ngswConfigPath;
127
- if (buildOptions.resourcesOutputPath) {
128
- resourcesOutputPath = (0, core_1.normalize)(`/${buildOptions.resourcesOutputPath}`);
129
- }
130
125
  }
131
126
  await (0, utility_1.writeWorkspace)(host, workspace);
132
127
  return (0, schematics_1.chain)([
@@ -134,7 +129,6 @@ function default_1(options) {
134
129
  (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
135
130
  (0, schematics_1.applyTemplates)({
136
131
  ...options,
137
- resourcesOutputPath,
138
132
  relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(project.root),
139
133
  }),
140
134
  (0, schematics_1.move)(project.root),
@@ -3,6 +3,7 @@
3
3
  "comment": "This file is needed so that dependencies are synced by Renovate.",
4
4
  "private": true,
5
5
  "dependencies": {
6
+ "@angular/core": "^18.0.0-next.0",
6
7
  "@types/express": "^4.17.17",
7
8
  "@types/jasmine": "~5.1.0",
8
9
  "@types/node": "^18.18.0",
@@ -8,12 +8,13 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.latestVersions = void 0;
11
+ // We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe,
12
+ // but ts_library doesn't support JSON inputs.
13
+ const dependencies = require('./latest-versions/package.json')['dependencies'];
11
14
  exports.latestVersions = {
12
- // We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe,
13
- // but ts_library doesn't support JSON inputs.
14
- ...require('./latest-versions/package.json')['dependencies'],
15
+ ...dependencies,
15
16
  // As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
16
- Angular: '^18.0.0-next.0',
17
- DevkitBuildAngular: '^18.0.0-next.0',
18
- AngularSSR: '^18.0.0-next.0',
17
+ Angular: dependencies['@angular/core'],
18
+ DevkitBuildAngular: '^18.0.0-next.2',
19
+ AngularSSR: '^18.0.0-next.2',
19
20
  };