Skip to content

Commit 9ebc6c1

Browse files
crisbetommalerba
authored andcommitted
build: set up schematics for v12 (#21156)
Sets up the schematics for the next major version so everything is in place once we need to add migrations. (cherry picked from commit 1e80e1a)
1 parent a60a055 commit 9ebc6c1

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

src/cdk/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
"description": "Updates the Angular CDK to v11",
3232
"factory": "./ng-update/index#updateToV11"
3333
},
34+
"migration-v12": {
35+
"version": "12.0.0-0",
36+
"description": "Updates the Angular CDK to v12",
37+
"factory": "./ng-update/index#updateToV12"
38+
},
3439
"ng-post-update": {
3540
"description": "Prints out results after ng-update.",
3641
"factory": "./ng-update/index#postUpdate",

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ export function updateToV11(): Rule {
4141
return createMigrationSchematicRule(TargetVersion.V11, [], cdkUpgradeData, onMigrationComplete);
4242
}
4343

44+
/** Entry point for the migration schematics with target of Angular CDK 12.0.0 */
45+
export function updateToV12(): Rule {
46+
return createMigrationSchematicRule(TargetVersion.V12, [], cdkUpgradeData, onMigrationComplete);
47+
}
48+
4449
/** Function that will be called when the migration completed. */
4550
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
4651
hasFailures: boolean) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export enum TargetVersion {
1616
V9 = 'version 9',
1717
V10 = 'version 10',
1818
V11 = 'version 11',
19+
V12 = 'version 12',
1920
}
2021

2122
/**

src/material/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
"description": "Updates Angular Material to v11",
3232
"factory": "./ng-update/index#updateToV11"
3333
},
34+
"migration-v12": {
35+
"version": "12.0.0-0",
36+
"description": "Updates Angular Material to v12",
37+
"factory": "./ng-update/index#updateToV12"
38+
},
3439
"ng-post-update": {
3540
"description": "Prints out results after ng-update.",
3641
"factory": "./ng-update/index#postUpdate",

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export function updateToV11(): Rule {
7474
TargetVersion.V11, materialMigrations, materialUpgradeData, onMigrationComplete);
7575
}
7676

77+
/** Entry point for the migration schematics with target of Angular Material v12 */
78+
export function updateToV12(): Rule {
79+
return createMigrationSchematicRule(
80+
TargetVersion.V12, materialMigrations, materialUpgradeData, onMigrationComplete);
81+
}
82+
7783
/** Function that will be called when the migration completed. */
7884
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
7985
hasFailures: boolean) {

0 commit comments

Comments
 (0)