Skip to content

Commit 21224f3

Browse files
authored
build: update schematics for v18 (#28724)
1 parent 0853cd9 commit 21224f3

File tree

11 files changed

+22
-1011
lines changed

11 files changed

+22
-1011
lines changed

src/cdk/schematics/migration.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
33
"schematics": {
4-
"migration-v17": {
5-
"version": "17.0.0-0",
6-
"description": "Updates the Angular CDK to v17",
7-
"factory": "./ng-update/index#updateToV17"
4+
"migration-v18": {
5+
"version": "18.0.0-0",
6+
"description": "Updates the Angular CDK to v18",
7+
"factory": "./ng-update/index#updateToV18"
88
},
99
"ng-post-update": {
1010
"description": "Prints out results after ng-update.",

src/cdk/schematics/ng-update/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import {createMigrationSchematicRule, NullableDevkitMigration} from './devkit-mi
1313

1414
const cdkMigrations: NullableDevkitMigration[] = [];
1515

16-
/** Entry point for the migration schematics with target of Angular CDK 17.0.0 */
17-
export function updateToV17(): Rule {
16+
/** Entry point for the migration schematics with target of Angular CDK 18.0.0 */
17+
export function updateToV18(): Rule {
1818
return createMigrationSchematicRule(
19-
TargetVersion.V17,
19+
TargetVersion.V18,
2020
cdkMigrations,
2121
cdkUpgradeData,
2222
onMigrationComplete,

src/cdk/schematics/ng-update/migrations/misc-template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {UpgradeData} from '../upgrade-data';
1515
* instances of outdated Angular CDK API that can't be migrated automatically.
1616
*/
1717
export class MiscTemplateMigration extends Migration<UpgradeData> {
18-
// There are currently no migrations for V17 deprecations.
18+
// There are currently no migrations for V18 deprecations.
1919
enabled = false;
2020

2121
override visitTemplate(template: ResolvedResource): void {}

src/cdk/schematics/update-tool/target-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// tslint:disable-next-line:prefer-const-enum
1212
export enum TargetVersion {
13-
V17 = 'version 17',
13+
V18 = 'version 18',
1414
}
1515

1616
/**
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
33
"schematics": {
4-
"migration-v17": {
5-
"version": "17.0.0-0",
6-
"description": "Updates Angular Material to v17",
7-
"factory": "./ng-update/index_bundled#updateToV17"
4+
"migration-v18": {
5+
"version": "18.0.0-0",
6+
"description": "Updates Angular Material to v18",
7+
"factory": "./ng-update/index_bundled#updateToV18"
88
}
99
}
1010
}

src/material/schematics/ng-update/index.ts

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,20 @@ import {
1313
TargetVersion,
1414
} from '@angular/cdk/schematics';
1515

16-
import {legacyImportsError} from './migrations/legacy-imports-error';
1716
import {materialUpgradeData} from './upgrade-data';
18-
import {ThemeBaseMigration} from './migrations/theme-base-v17';
1917

20-
const materialMigrations: NullableDevkitMigration[] = [ThemeBaseMigration];
18+
const materialMigrations: NullableDevkitMigration[] = [];
2119

22-
/** Entry point for the migration schematics with target of Angular Material v17 */
23-
export function updateToV17(): Rule {
24-
// We pass the v17 migration rule as a callback, instead of using `chain()`, because the
20+
/** Entry point for the migration schematics with target of Angular Material v18 */
21+
export function updateToV18(): Rule {
22+
// We pass the v18 migration rule as a callback, instead of using `chain()`, because the
2523
// legacy imports error only logs an error message, it doesn't actually interrupt the migration
2624
// process and we don't want to execute migrations if there are leftover legacy imports.
27-
return legacyImportsError(
28-
createMigrationSchematicRule(
29-
TargetVersion.V17,
30-
materialMigrations,
31-
materialUpgradeData,
32-
onMigrationComplete,
33-
),
25+
return createMigrationSchematicRule(
26+
TargetVersion.V18,
27+
materialMigrations,
28+
materialUpgradeData,
29+
onMigrationComplete,
3430
);
3531
}
3632

src/material/schematics/ng-update/migrations/legacy-imports-error.ts

Lines changed: 0 additions & 104 deletions
This file was deleted.

src/material/schematics/ng-update/migrations/theme-base-v17/index.ts

Lines changed: 0 additions & 133 deletions
This file was deleted.

0 commit comments

Comments
 (0)