Skip to content

Commit dce147f

Browse files
authored
build: set up schematics for v22 (#32806)
One of the pre-requisites to release the next version of v22 is to have schematics set up. These changes add them ahead of time so we don't run into any issues when we go to release.
1 parent 2aff3c8 commit dce147f

File tree

7 files changed

+40
-2
lines changed

7 files changed

+40
-2
lines changed

src/cdk/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
"description": "Updates the Angular CDK to v21",
77
"factory": "./ng-update/index#updateToV21"
88
},
9+
"migration-v22": {
10+
"version": "22.0.0-0",
11+
"description": "Updates the Angular CDK to v22",
12+
"factory": "./ng-update/index#updateToV22"
13+
},
914
"ng-post-update": {
1015
"description": "Prints out results after ng-update.",
1116
"factory": "./ng-update/index#postUpdate",

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {createMigrationSchematicRule, NullableDevkitMigration} from './devkit-mi
1313

1414
const cdkMigrations: NullableDevkitMigration[] = [];
1515

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

26+
/** Entry point for the migration schematics with target of Angular CDK 22.0.0 */
27+
export function updateToV22(): Rule {
28+
return createMigrationSchematicRule(
29+
TargetVersion.V22,
30+
cdkMigrations,
31+
cdkUpgradeData,
32+
onMigrationComplete,
33+
);
34+
}
35+
2636
/** Function that will be called when the migration completed. */
2737
function onMigrationComplete(
2838
context: SchematicContext,

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 @@
1111
// tslint:disable-next-line:prefer-const-enum
1212
export enum TargetVersion {
1313
V21 = 'version 21',
14+
V22 = 'version 22',
1415
}
1516

1617
/**

src/google-maps/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"version": "21.0.0-0",
55
"description": "Updates the Angular Google Maps package to v21",
66
"factory": "./ng-update/index#updateToV21"
7+
},
8+
"migration-v22": {
9+
"version": "22.0.0-0",
10+
"description": "Updates the Angular Google Maps package to v22",
11+
"factory": "./ng-update/index#updateToV22"
712
}
813
}
914
}

src/google-maps/schematics/ng-update/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88

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

11-
/** Entry point for the migration schematics with target of Angular Material v21 */
11+
/** Entry point for the migration schematics with target of Google Maps v21 */
1212
export function updateToV21(): Rule {
1313
return () => {};
1414
}
15+
16+
/** Entry point for the migration schematics with target of Google Maps v22 */
17+
export function updateToV22(): Rule {
18+
return () => {};
19+
}

src/material/schematics/migration.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"version": "21.0.0-0",
66
"description": "Updates Angular Material to v21",
77
"factory": "./ng-update/index_bundled#updateToV21"
8+
},
9+
"migration-v22": {
10+
"version": "22.0.0-0",
11+
"description": "Updates Angular Material to v22",
12+
"factory": "./ng-update/index_bundled#updateToV22"
813
}
914
}
1015
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@ export function updateToV21(): Rule {
2323
createMigrationSchematicRule(TargetVersion.V21, materialMigrations, materialUpgradeData),
2424
]);
2525
}
26+
27+
/** Entry point for the migration schematics with target of Angular Material v22 */
28+
export function updateToV22(): Rule {
29+
return chain([
30+
createMigrationSchematicRule(TargetVersion.V22, materialMigrations, materialUpgradeData),
31+
]);
32+
}

0 commit comments

Comments
 (0)