Skip to content

Commit 4488455

Browse files
crisbetowagnermaciel
authored andcommitted
build: set up schematics for v13 (#22955)
Sets up the boilerplate for v13 schematics so that it's in place once we start making breaking changes. (cherry picked from commit aea46e7)
1 parent 395cbf8 commit 4488455

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
@@ -36,6 +36,11 @@
3636
"description": "Updates the Angular CDK to v12",
3737
"factory": "./ng-update/index#updateToV12"
3838
},
39+
"migration-v13": {
40+
"version": "13.0.0-0",
41+
"description": "Updates the Angular CDK to v13",
42+
"factory": "./ng-update/index#updateToV13"
43+
},
3944
"ng-post-update": {
4045
"description": "Prints out results after ng-update.",
4146
"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
@@ -46,6 +46,11 @@ export function updateToV12(): Rule {
4646
return createMigrationSchematicRule(TargetVersion.V12, [], cdkUpgradeData, onMigrationComplete);
4747
}
4848

49+
/** Entry point for the migration schematics with target of Angular CDK 13.0.0 */
50+
export function updateToV13(): Rule {
51+
return createMigrationSchematicRule(TargetVersion.V13, [], cdkUpgradeData, onMigrationComplete);
52+
}
53+
4954
/** Function that will be called when the migration completed. */
5055
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
5156
hasFailures: boolean) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export enum TargetVersion {
1717
V10 = 'version 10',
1818
V11 = 'version 11',
1919
V12 = 'version 12',
20+
V13 = 'version 13',
2021
}
2122

2223
/**

src/material/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
"description": "Updates Angular Material to v12",
3737
"factory": "./ng-update/index#updateToV12"
3838
},
39+
"migration-v13": {
40+
"version": "13.0.0-0",
41+
"description": "Updates Angular Material to v13",
42+
"factory": "./ng-update/index#updateToV13"
43+
},
3944
"ng-post-update": {
4045
"description": "Prints out results after ng-update.",
4146
"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
@@ -82,6 +82,12 @@ export function updateToV12(): Rule {
8282
TargetVersion.V12, materialMigrations, materialUpgradeData, onMigrationComplete);
8383
}
8484

85+
/** Entry point for the migration schematics with target of Angular Material v13 */
86+
export function updateToV13(): Rule {
87+
return createMigrationSchematicRule(
88+
TargetVersion.V13, materialMigrations, materialUpgradeData, onMigrationComplete);
89+
}
90+
8591
/** Function that will be called when the migration completed. */
8692
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
8793
hasFailures: boolean) {

0 commit comments

Comments
 (0)