Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/cdk/schematics/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"description": "Updates the Angular CDK to v21",
"factory": "./ng-update/index#updateToV21"
},
"migration-v22": {
"version": "22.0.0-0",
"description": "Updates the Angular CDK to v22",
"factory": "./ng-update/index#updateToV22"
},
"ng-post-update": {
"description": "Prints out results after ng-update.",
"factory": "./ng-update/index#postUpdate",
Expand Down
12 changes: 11 additions & 1 deletion src/cdk/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {createMigrationSchematicRule, NullableDevkitMigration} from './devkit-mi

const cdkMigrations: NullableDevkitMigration[] = [];

/** Entry point for the migration schematics with target of Angular CDK 20.0.0 */
/** Entry point for the migration schematics with target of Angular CDK 21.0.0 */
export function updateToV21(): Rule {
return createMigrationSchematicRule(
TargetVersion.V21,
Expand All @@ -23,6 +23,16 @@ export function updateToV21(): Rule {
);
}

/** Entry point for the migration schematics with target of Angular CDK 22.0.0 */
export function updateToV22(): Rule {
return createMigrationSchematicRule(
TargetVersion.V22,
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 @@ -11,6 +11,7 @@
// tslint:disable-next-line:prefer-const-enum
export enum TargetVersion {
V21 = 'version 21',
V22 = 'version 22',
}

/**
Expand Down
5 changes: 5 additions & 0 deletions src/google-maps/schematics/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
"version": "21.0.0-0",
"description": "Updates the Angular Google Maps package to v21",
"factory": "./ng-update/index#updateToV21"
},
"migration-v22": {
"version": "22.0.0-0",
"description": "Updates the Angular Google Maps package to v22",
"factory": "./ng-update/index#updateToV22"
}
}
}
7 changes: 6 additions & 1 deletion src/google-maps/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

import {Rule} from '@angular-devkit/schematics';

/** Entry point for the migration schematics with target of Angular Material v21 */
/** Entry point for the migration schematics with target of Google Maps v21 */
export function updateToV21(): Rule {
return () => {};
}

/** Entry point for the migration schematics with target of Google Maps v22 */
export function updateToV22(): Rule {
return () => {};
}
5 changes: 5 additions & 0 deletions src/material/schematics/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"version": "21.0.0-0",
"description": "Updates Angular Material to v21",
"factory": "./ng-update/index_bundled#updateToV21"
},
"migration-v22": {
"version": "22.0.0-0",
"description": "Updates Angular Material to v22",
"factory": "./ng-update/index_bundled#updateToV22"
}
}
}
7 changes: 7 additions & 0 deletions src/material/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ export function updateToV21(): Rule {
createMigrationSchematicRule(TargetVersion.V21, materialMigrations, materialUpgradeData),
]);
}

/** Entry point for the migration schematics with target of Angular Material v22 */
export function updateToV22(): Rule {
return chain([
createMigrationSchematicRule(TargetVersion.V22, materialMigrations, materialUpgradeData),
]);
}
Loading