@schematics/angular 20.0.0-rc.2 → 20.0.0-rc.4

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.
@@ -22,12 +22,6 @@ describe('App', () => {
22
22
  expect(app).toBeTruthy();
23
23
  });
24
24
 
25
- it(`should have as title '<%= name %>'`, () => {
26
- const fixture = TestBed.createComponent(App);
27
- const app = fixture.componentInstance;
28
- expect(app.title).toEqual('<%= name %>');
29
- });
30
-
31
25
  it('should render title', () => {
32
26
  const fixture = TestBed.createComponent(App);
33
27
  fixture.detectChanges();
@@ -15,5 +15,5 @@ import { Component } from '@angular/core';
15
15
  styleUrl: './app.<%= style %>'<% } %>
16
16
  })
17
17
  export class App {
18
- title = '<%= name %>';
18
+ protected title = '<%= name %>';
19
19
  }
@@ -16,12 +16,6 @@ describe('App', () => {
16
16
  expect(app).toBeTruthy();
17
17
  });
18
18
 
19
- it(`should have the '<%= name %>' title`, () => {
20
- const fixture = TestBed.createComponent(App);
21
- const app = fixture.componentInstance;
22
- expect(app.title).toEqual('<%= name %>');
23
- });
24
-
25
19
  it('should render title', () => {
26
20
  const fixture = TestBed.createComponent(App);
27
21
  fixture.detectChanges();
@@ -16,5 +16,5 @@ import { RouterOutlet } from '@angular/router';<% } %>
16
16
  styleUrl: './app.<%= style %>'<% } %>
17
17
  })
18
18
  export class App {
19
- title = '<%= name %>';
19
+ protected title = '<%= name %>';
20
20
  }
@@ -8,7 +8,7 @@
8
8
  "replace-provide-server-routing": {
9
9
  "version": "20.0.0",
10
10
  "factory": "./replace-provide-server-routing/migration",
11
- "description": "Migrate 'provideServerRendering' to use 'withRoutes' and remove 'provideServerRouting' from '@angular/ssr'."
11
+ "description": "Migrate 'provideServerRendering' to use 'withRoutes', and remove 'provideServerRouting' and 'provideServerRoutesConfig' from '@angular/ssr'."
12
12
  },
13
13
  "update-module-resolution": {
14
14
  "version": "20.0.0",
@@ -49,7 +49,9 @@ function* visit(directory) {
49
49
  const entry = directory.file(path);
50
50
  if (entry) {
51
51
  const content = entry.content;
52
- if (content.includes('provideServerRouting') && content.includes('@angular/ssr')) {
52
+ if ((content.includes('provideServerRouting') ||
53
+ content.includes('provideServerRoutesConfig')) &&
54
+ content.includes('@angular/ssr')) {
53
55
  // Only need to rename the import so we can just string replacements.
54
56
  yield [entry.path, content.toString()];
55
57
  }
@@ -86,7 +88,8 @@ function default_1() {
86
88
  .map((el) => {
87
89
  if (ts.isCallExpression(el) &&
88
90
  ts.isIdentifier(el.expression) &&
89
- el.expression.text === 'provideServerRouting') {
91
+ (el.expression.text === 'provideServerRouting' ||
92
+ el.expression.text === 'provideServerRoutesConfig')) {
90
93
  const [withRouteVal, ...others] = el.arguments.map((arg) => arg.getText());
91
94
  return `provideServerRendering(withRoutes(${withRouteVal})${others.length ? ', ' + others.join(', ') : ''})`;
92
95
  }
@@ -110,7 +113,7 @@ function default_1() {
110
113
  const elements = namedBindings.elements;
111
114
  const updatedElements = elements
112
115
  .map((el) => el.getText())
113
- .filter((x) => x !== 'provideServerRouting');
116
+ .filter((x) => x !== 'provideServerRouting' && x !== 'provideServerRoutesConfig');
114
117
  updatedElements.push('withRoutes');
115
118
  recorder.remove(namedBindings.getStart(), namedBindings.getWidth());
116
119
  recorder.insertLeft(namedBindings.getStart(), `{ ${updatedElements.sort().join(', ')} }`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "20.0.0-rc.2",
3
+ "version": "20.0.0-rc.4",
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-rc.2",
26
- "@angular-devkit/schematics": "20.0.0-rc.2",
25
+ "@angular-devkit/core": "20.0.0-rc.4",
26
+ "@angular-devkit/schematics": "20.0.0-rc.4",
27
27
  "jsonc-parser": "3.3.1"
28
28
  },
29
29
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "packageManager": "pnpm@9.15.9",
34
34
  "engines": {
35
- "node": "^20.11.1 || ^22.11.0 || >=24.0.0",
35
+ "node": "^20.19.0 || ^22.12.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-rc.2',
20
- AngularBuild: '^20.0.0-rc.2',
21
- AngularSSR: '^20.0.0-rc.2',
19
+ DevkitBuildAngular: '^20.0.0-rc.4',
20
+ AngularBuild: '^20.0.0-rc.4',
21
+ AngularSSR: '^20.0.0-rc.4',
22
22
  };