Skip to content

Commit 69bee50

Browse files
committed
build: set up schematics for v9
Adds the setup so we can add migration schematics for v9.
1 parent 1dce54e commit 69bee50

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

src/cdk/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"description": "Updates the Angular CDK to v8",
1717
"factory": "./ng-update/index#updateToV8"
1818
},
19+
"migration-v9": {
20+
"version": "9",
21+
"description": "Updates the Angular CDK to v9",
22+
"factory": "./ng-update/index#updateToV9"
23+
},
1924
"ng-post-update": {
2025
"description": "Prints out results after ng-update.",
2126
"factory": "./ng-update/index#postUpdate",

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,26 @@ import {TargetVersion} from '../update-tool/target-version';
1212
import {cdkUpgradeData} from './upgrade-data';
1313
import {createUpgradeRule} from './upgrade-rules';
1414

15-
/** Entry point for the migration schematics with target of Angular Material 6.0.0 */
15+
/** Entry point for the migration schematics with target of Angular CDK 6.0.0 */
1616
export function updateToV6(): Rule {
1717
return createUpgradeRule(TargetVersion.V6, [], cdkUpgradeData, onMigrationComplete);
1818
}
1919

20-
/** Entry point for the migration schematics with target of Angular Material 7.0.0 */
20+
/** Entry point for the migration schematics with target of Angular CDK 7.0.0 */
2121
export function updateToV7(): Rule {
2222
return createUpgradeRule(TargetVersion.V7, [], cdkUpgradeData, onMigrationComplete);
2323
}
2424

25-
/** Entry point for the migration schematics with target of Angular Material 8.0.0 */
25+
/** Entry point for the migration schematics with target of Angular CDK 8.0.0 */
2626
export function updateToV8(): Rule {
2727
return createUpgradeRule(TargetVersion.V8, [], cdkUpgradeData, onMigrationComplete);
2828
}
2929

30+
/** Entry point for the migration schematics with target of Angular CDK 9.0.0 */
31+
export function updateToV9(): Rule {
32+
return createUpgradeRule(TargetVersion.V9, [], cdkUpgradeData, onMigrationComplete);
33+
}
34+
3035
/** Function that will be called when the migration completed. */
3136
function onMigrationComplete(targetVersion: TargetVersion, hasFailures: boolean) {
3237
console.log();

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export enum TargetVersion {
1111
V6 = 'version 6',
1212
V7 = 'version 7',
1313
V8 = 'version 8',
14+
V9 = 'version 9',
1415
}
1516

1617
/**

src/material/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"description": "Updates Angular Material to v8",
1717
"factory": "./ng-update/index#updateToV8"
1818
},
19+
"migration-v9": {
20+
"version": "9",
21+
"description": "Updates Angular Material to v9",
22+
"factory": "./ng-update/index#updateToV9"
23+
},
1924
"ng-post-update": {
2025
"description": "Prints out results after ng-update.",
2126
"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
@@ -49,6 +49,12 @@ export function updateToV8(): Rule {
4949
TargetVersion.V8, materialMigrationRules, materialUpgradeData, onMigrationComplete);
5050
}
5151

52+
/** Entry point for the migration schematics with target of Angular Material v9 */
53+
export function updateToV9(): Rule {
54+
return createUpgradeRule(
55+
TargetVersion.V9, materialMigrationRules, materialUpgradeData, onMigrationComplete);
56+
}
57+
5258
/** Function that will be called when the migration completed. */
5359
function onMigrationComplete(targetVersion: TargetVersion, hasFailures: boolean) {
5460
console.log();

0 commit comments

Comments
 (0)