Skip to content

Commit

Permalink
chore: add no-op v10 migration entrypoints (#19296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn authored May 8, 2020
1 parent bd58412 commit 14a51ef
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cdk/schematics/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"description": "Updates the Angular CDK to v9",
"factory": "./ng-update/index#updateToV9"
},
"migration-v10": {
"version": "10.0.0-0",
"description": "Updates the Angular CDK to v10",
"factory": "./ng-update/index#updateToV10"
},
"ng-post-update": {
"description": "Prints out results after ng-update.",
"factory": "./ng-update/index#postUpdate",
Expand Down
5 changes: 5 additions & 0 deletions src/cdk/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export function updateToV9(): Rule {
return createMigrationSchematicRule(TargetVersion.V9, [], cdkUpgradeData, onMigrationComplete);
}

/** Entry point for the migration schematics with target of Angular CDK 10.0.0 */
export function updateToV10(): Rule {
return createMigrationSchematicRule(TargetVersion.V10, [], cdkUpgradeData, onMigrationComplete);
}

/** Function that will be called when the migration completed. */
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
hasFailures: boolean) {
Expand Down
5 changes: 5 additions & 0 deletions src/material/schematics/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"description": "Updates Angular Material to v9",
"factory": "./ng-update/index#updateToV9"
},
"migration-v10": {
"version": "10.0.0-0",
"description": "Updates Angular Material to v10",
"factory": "./ng-update/index#updateToV10"
},
"ng-post-update": {
"description": "Prints out results after ng-update.",
"factory": "./ng-update/index#postUpdate",
Expand Down
6 changes: 6 additions & 0 deletions src/material/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export function updateToV9(): Rule {
TargetVersion.V9, materialMigrations, materialUpgradeData, onMigrationComplete);
}

/** Entry point for the migration schematics with target of Angular Material v10 */
export function updateToV10(): Rule {
return createMigrationSchematicRule(
TargetVersion.V10, materialMigrations, materialUpgradeData, onMigrationComplete);
}

/** Function that will be called when the migration completed. */
function onMigrationComplete(context: SchematicContext, targetVersion: TargetVersion,
hasFailures: boolean) {
Expand Down

0 comments on commit 14a51ef

Please sign in to comment.