Skip to content

Commit 14a51ef

Browse files
authored
chore: add no-op v10 migration entrypoints (#19296)
1 parent bd58412 commit 14a51ef

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

src/cdk/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"description": "Updates the Angular CDK to v9",
2222
"factory": "./ng-update/index#updateToV9"
2323
},
24+
"migration-v10": {
25+
"version": "10.0.0-0",
26+
"description": "Updates the Angular CDK to v10",
27+
"factory": "./ng-update/index#updateToV10"
28+
},
2429
"ng-post-update": {
2530
"description": "Prints out results after ng-update.",
2631
"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
@@ -31,6 +31,11 @@ export function updateToV9(): Rule {
3131
return createMigrationSchematicRule(TargetVersion.V9, [], cdkUpgradeData, onMigrationComplete);
3232
}
3333

34+
/** Entry point for the migration schematics with target of Angular CDK 10.0.0 */
35+
export function updateToV10(): Rule {
36+
return createMigrationSchematicRule(TargetVersion.V10, [], cdkUpgradeData, onMigrationComplete);
37+
}
38+
3439
/** Function that will be called when the migration completed. */
3540
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
3641
hasFailures: boolean) {

src/material/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"description": "Updates Angular Material to v9",
2222
"factory": "./ng-update/index#updateToV9"
2323
},
24+
"migration-v10": {
25+
"version": "10.0.0-0",
26+
"description": "Updates Angular Material to v10",
27+
"factory": "./ng-update/index#updateToV10"
28+
},
2429
"ng-post-update": {
2530
"description": "Prints out results after ng-update.",
2631
"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
@@ -62,6 +62,12 @@ export function updateToV9(): Rule {
6262
TargetVersion.V9, materialMigrations, materialUpgradeData, onMigrationComplete);
6363
}
6464

65+
/** Entry point for the migration schematics with target of Angular Material v10 */
66+
export function updateToV10(): Rule {
67+
return createMigrationSchematicRule(
68+
TargetVersion.V10, materialMigrations, materialUpgradeData, onMigrationComplete);
69+
}
70+
6571
/** Function that will be called when the migration completed. */
6672
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
6773
hasFailures: boolean) {

0 commit comments

Comments
 (0)