Skip to content

build: set up schematics for v19 #29584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2024
Merged
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
8 changes: 4 additions & 4 deletions src/cdk/schematics/migration.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {
"migration-v18": {
"version": "18.0.0-0",
"description": "Updates the Angular CDK to v18",
"factory": "./ng-update/index#updateToV18"
"migration-v19": {
"version": "19.0.0-0",
"description": "Updates the Angular CDK to v19",
"factory": "./ng-update/index#updateToV19"
},
"ng-post-update": {
"description": "Prints out results after ng-update.",
Expand Down
4 changes: 2 additions & 2 deletions src/cdk/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {createMigrationSchematicRule, NullableDevkitMigration} from './devkit-mi
const cdkMigrations: NullableDevkitMigration[] = [];

/** Entry point for the migration schematics with target of Angular CDK 18.0.0 */
export function updateToV18(): Rule {
export function updateToV19(): Rule {
return createMigrationSchematicRule(
TargetVersion.V18,
TargetVersion.V19,
cdkMigrations,
cdkUpgradeData,
onMigrationComplete,
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/schematics/ng-update/migrations/misc-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {UpgradeData} from '../upgrade-data';
* instances of outdated Angular CDK API that can't be migrated automatically.
*/
export class MiscTemplateMigration extends Migration<UpgradeData> {
// There are currently no migrations for V18 deprecations.
// There are currently no migrations for V19 deprecations.
enabled = false;

override visitTemplate(template: ResolvedResource): void {}
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/schematics/update-tool/target-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

// tslint:disable-next-line:prefer-const-enum
export enum TargetVersion {
V18 = 'version 18',
V19 = 'version 19',
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/material/schematics/migration.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "./node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {
"migration-v18": {
"version": "18.0.0-0",
"description": "Updates Angular Material to v18",
"factory": "./ng-update/index_bundled#updateToV18"
"migration-v19": {
"version": "19.0.0-0",
"description": "Updates Angular Material to v19",
"factory": "./ng-update/index_bundled#updateToV19"
}
}
}
36 changes: 2 additions & 34 deletions src/material/schematics/ng-update/data/css-tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {TargetVersion, VersionChanges} from '@angular/cdk/schematics';
import {VersionChanges} from '@angular/cdk/schematics';

export interface MaterialCssTokenData {
/** The CSS selector to replace. */
Expand All @@ -27,36 +27,4 @@ export interface MaterialCssTokenData {
};
}

export const cssTokens: VersionChanges<MaterialCssTokenData> = {
[TargetVersion.V18]: [
{
pr: 'https://github.com/angular/components/pull/29026',
changes: [
{
replace: '--mdc-form-field-label-text-color',
replaceWith: '--mat-checkbox-label-text-color',
},
{
replace: '--mdc-form-field-label-text-font',
replaceWith: '--mat-checkbox-label-text-font',
},
{
replace: '--mdc-form-field-label-text-line-height',
replaceWith: '--mat-checkbox-label-text-line-height',
},
{
replace: '--mdc-form-field-label-text-size',
replaceWith: '--mat-checkbox-label-text-size',
},
{
replace: '--mdc-form-field-label-text-tracking',
replaceWith: '--mat-checkbox-label-text-tracking',
},
{
replace: '--mdc-form-field-label-text-weight',
replaceWith: '--mat-checkbox-label-text-weight',
},
],
},
],
};
export const cssTokens: VersionChanges<MaterialCssTokenData> = {};
9 changes: 4 additions & 5 deletions src/material/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ import {
} from '@angular/cdk/schematics';

import {materialUpgradeData} from './upgrade-data';
import {M2ThemingMigration} from './migrations/m2-theming-v18';

const materialMigrations: NullableDevkitMigration[] = [M2ThemingMigration];
const materialMigrations: NullableDevkitMigration[] = [];

/** Entry point for the migration schematics with target of Angular Material v18 */
export function updateToV18(): Rule {
/** Entry point for the migration schematics with target of Angular Material v19 */
export function updateToV19(): Rule {
return createMigrationSchematicRule(
TargetVersion.V18,
TargetVersion.V19,
materialMigrations,
materialUpgradeData,
onMigrationComplete,
Expand Down

This file was deleted.

Loading
Loading