Skip to content

Commit

Permalink
build: set up schematics for version 15 (#25028)
Browse files Browse the repository at this point in the history
Prepares the schematics infrastructure for the next major version.

(cherry picked from commit 6edb42f)
  • Loading branch information
crisbeto committed Jun 6, 2022
1 parent 8545b45 commit 9c6b08e
Show file tree
Hide file tree
Showing 5 changed files with 31 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 @@ -46,6 +46,11 @@
"description": "Updates the Angular CDK to v14",
"factory": "./ng-update/index#updateToV14"
},
"migration-v15": {
"version": "15.0.0-0",
"description": "Updates the Angular CDK to v15",
"factory": "./ng-update/index#updateToV15"
},
"ng-post-update": {
"description": "Prints out results after ng-update.",
"factory": "./ng-update/index#postUpdate",
Expand Down
10 changes: 10 additions & 0 deletions src/cdk/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ export function updateToV14(): Rule {
);
}

/** Entry point for the migration schematics with target of Angular CDK 15.0.0 */
export function updateToV15(): Rule {
return createMigrationSchematicRule(
TargetVersion.V15,
cdkMigrations,
cdkUpgradeData,
onMigrationComplete,
);
}

/** Function that will be called when the migration completed. */
function onMigrationComplete(
context: SchematicContext,
Expand Down
1 change: 1 addition & 0 deletions src/cdk/schematics/update-tool/target-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export enum TargetVersion {
V12 = 'version 12',
V13 = 'version 13',
V14 = 'version 14',
V15 = 'version 15',
}

/**
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 @@ -46,6 +46,11 @@
"description": "Updates the Angular Material to v14",
"factory": "./ng-update/index#updateToV14"
},
"migration-v15": {
"version": "15.0.0-0",
"description": "Updates the Angular Material to v15",
"factory": "./ng-update/index#updateToV15"
},
"ng-post-update": {
"description": "Prints out results after ng-update.",
"factory": "./ng-update/index#postUpdate",
Expand Down
10 changes: 10 additions & 0 deletions src/material/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ export function updateToV14(): Rule {
);
}

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

/** Function that will be called when the migration completed. */
function onMigrationComplete(
context: SchematicContext,
Expand Down

0 comments on commit 9c6b08e

Please sign in to comment.