@schematics/angular 20.0.0-next.6 → 20.0.0-next.7

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,7 +3,6 @@
3
3
  {
4
4
  "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json",
5
5
  "compilerOptions": {
6
- "composite": true,
7
6
  "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/app",
8
7
  "types": []
9
8
  },
@@ -3,7 +3,6 @@
3
3
  {
4
4
  "extends": "<%= relativePathToWorkspaceRoot %>/tsconfig.json",
5
5
  "compilerOptions": {
6
- "composite": true,
7
6
  "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/spec",
8
7
  "types": [
9
8
  "jasmine"
@@ -1,4 +1,4 @@
1
- import { NgModule<% if(experimentalZoneless) { %>, provideExperimentalZonelessChangeDetection<% } %> } from '@angular/core';
1
+ import { NgModule, provideBrowserGlobalErrorListeners<% if(experimentalZoneless) { %>, provideExperimentalZonelessChangeDetection<% } %> } from '@angular/core';
2
2
  import { BrowserModule } from '@angular/platform-browser';
3
3
  <% if (routing) { %>
4
4
  import { AppRoutingModule } from './app-routing-module';<% } %>
@@ -12,7 +12,10 @@ import { App } from './app';
12
12
  BrowserModule<% if (routing) { %>,
13
13
  AppRoutingModule<% } %>
14
14
  ],
15
- providers: [<% if (experimentalZoneless) { %>provideExperimentalZonelessChangeDetection()<% } %>],
15
+ providers: [
16
+ provideBrowserGlobalErrorListeners()<% if (experimentalZoneless) { %>,
17
+ provideExperimentalZonelessChangeDetection()<% } %>
18
+ ],
16
19
  bootstrap: [App]
17
20
  })
18
21
  export class AppModule { }
@@ -1,8 +1,12 @@
1
- import { ApplicationConfig, <% if(!experimentalZoneless) { %>provideZoneChangeDetection<% } else { %>provideExperimentalZonelessChangeDetection<% } %> } from '@angular/core';<% if (routing) { %>
1
+ import { ApplicationConfig, provideBrowserGlobalErrorListeners, <% if(!experimentalZoneless) { %>provideZoneChangeDetection<% } else { %>provideExperimentalZonelessChangeDetection<% } %> } 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(experimentalZoneless) { %>provideExperimentalZonelessChangeDetection()<% } else { %>provideZoneChangeDetection({ eventCoalescing: true })<% } %><% if (routing) {%>, provideRouter(routes)<% } %>]
7
+ providers: [
8
+ provideBrowserGlobalErrorListeners(),
9
+ <% if(experimentalZoneless) { %>provideExperimentalZonelessChangeDetection()<% } else { %>provideZoneChangeDetection({ eventCoalescing: true })<% } %>,
10
+ <% if (routing) {%>provideRouter(routes)<% } %>
11
+ ]
8
12
  };
@@ -35,10 +35,10 @@ function default_1(options) {
35
35
  const { appDir, appRootSelector, componentOptions, folderName, sourceDir } = await getAppOptions(host, options);
36
36
  return (0, schematics_1.chain)([
37
37
  addAppToWorkspaceFile(options, appDir, folderName),
38
- addTsProjectReference((0, core_1.join)((0, core_1.normalize)(appDir), 'tsconfig.app.json')),
38
+ addTsProjectReference('./' + (0, core_1.join)((0, core_1.normalize)(appDir), 'tsconfig.app.json')),
39
39
  options.skipTests
40
40
  ? (0, schematics_1.noop)()
41
- : addTsProjectReference((0, core_1.join)((0, core_1.normalize)(appDir), 'tsconfig.spec.json')),
41
+ : addTsProjectReference('./' + (0, core_1.join)((0, core_1.normalize)(appDir), 'tsconfig.spec.json')),
42
42
  options.standalone
43
43
  ? (0, schematics_1.noop)()
44
44
  : (0, schematics_1.schematic)('module', {
@@ -0,0 +1,7 @@
1
+ Chrome >= 105
2
+ ChromeAndroid >= 105
3
+ Edge >= 105
4
+ Firefox >= 104
5
+ FirefoxAndroid >= 104
6
+ Safari >= 16
7
+ iOS >= 16
@@ -2,16 +2,10 @@
2
2
  # For additional information regarding the format and rule options, please see:
3
3
  # https://github.com/browserslist/browserslist#queries
4
4
 
5
- # For the full list of supported browsers by the Angular framework, please see:
5
+ # For Angular's browser support policy, please see:
6
6
  # https://angular.dev/reference/versions#browser-support
7
7
 
8
8
  # You can see what browsers were selected by your queries by running:
9
9
  # npx browserslist
10
10
 
11
- last 2 Chrome versions
12
- last 1 Firefox version
13
- last 2 Edge major versions
14
- last 2 Safari major versions
15
- last 2 iOS major versions
16
- last 2 Android major versions
17
- Firefox ESR
11
+ <%= config %>
package/config/index.js CHANGED
@@ -9,6 +9,7 @@
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.default = default_1;
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
+ const promises_1 = require("node:fs/promises");
12
13
  const node_path_1 = require("node:path");
13
14
  const paths_1 = require("../utility/paths");
14
15
  const workspace_1 = require("../utility/workspace");
@@ -31,9 +32,11 @@ function addBrowserslistConfig(options) {
31
32
  if (!project) {
32
33
  throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
33
34
  }
35
+ // Read Angular's default vendored `.browserslistrc` file.
36
+ const config = await (0, promises_1.readFile)(node_path_1.posix.join(__dirname, '.browserslistrc'), 'utf8');
34
37
  return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
35
38
  (0, schematics_1.filter)((p) => p.endsWith('.browserslistrc.template')),
36
- (0, schematics_1.applyTemplates)({}),
39
+ (0, schematics_1.applyTemplates)({ config }),
37
40
  (0, schematics_1.move)(project.root),
38
41
  ]));
39
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "20.0.0-next.6",
3
+ "version": "20.0.0-next.7",
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.6",
26
- "@angular-devkit/schematics": "20.0.0-next.6",
25
+ "@angular-devkit/core": "20.0.0-next.7",
26
+ "@angular-devkit/schematics": "20.0.0-next.7",
27
27
  "jsonc-parser": "3.3.1"
28
28
  },
29
29
  "repository": {
@@ -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.6',
20
- AngularBuild: '^20.0.0-next.6',
21
- AngularSSR: '^20.0.0-next.6',
19
+ DevkitBuildAngular: '^20.0.0-next.7',
20
+ AngularBuild: '^20.0.0-next.7',
21
+ AngularSSR: '^20.0.0-next.7',
22
22
  };