From 0b2f001aaa40b2ec1e8192dac6078348fcb8c4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=98=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2?= Date: Mon, 13 Jan 2025 17:39:18 +0300 Subject: [PATCH] chore(schematics): valid migration for `TuiStepState` (#10130) --- .../cdk/schematics/ng-update/v4/steps/constants/types.ts | 6 ++++++ .../v4/tests/schematic-migrate-identifiers.spec.ts | 3 +++ 2 files changed, 9 insertions(+) diff --git a/projects/cdk/schematics/ng-update/v4/steps/constants/types.ts b/projects/cdk/schematics/ng-update/v4/steps/constants/types.ts index ca2d03d57813..c88f52482cf9 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/constants/types.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/constants/types.ts @@ -7,6 +7,12 @@ export const TYPES_TO_RENAME: readonly ReplacementType[] = [ moduleSpecifier: ['@taiga-ui/core'], removeImport: true, }, + { + from: 'TuiStepState', + to: "'error' | 'normal' | 'pass'", + moduleSpecifier: ['@taiga-ui/kit'], + removeImport: true, + }, { from: 'TuiIllustrationName', moduleSpecifier: ['@taiga-ui/proprietary-icons'], diff --git a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-identifiers.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-identifiers.spec.ts index 6dd8805a554f..28f9ffd78627 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-identifiers.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-identifiers.spec.ts @@ -17,12 +17,14 @@ const collectionPath = join(__dirname, '../../../migration.json'); const COMPONENT_BEFORE = ` import { TuiDialogModule } from "@taiga-ui/core/components"; +import { TuiStepState } from "@taiga-ui/kit"; @Component({ standalone: true, imports: [TuiDialogModule] }) export class Test { + protected readonly step: TuiStepState = 'error'; }`; const COMPONENT_AFTER = `import { TuiDialog } from "@taiga-ui/core"; @@ -32,6 +34,7 @@ const COMPONENT_AFTER = `import { TuiDialog } from "@taiga-ui/core"; imports: [TuiDialog] }) export class Test { + protected readonly step: 'error' | 'normal' | 'pass' = 'error'; }`; const MODULE_BEFORE = `import { TuiTabBarModule } from "@taiga-ui/addon-mobile";