Skip to content

Commit

Permalink
chore(schematics): valid migration for TuiStepState (#10130)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Jan 13, 2025
1 parent c2f40e9 commit 0b2f001
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions projects/cdk/schematics/ng-update/v4/steps/constants/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down

0 comments on commit 0b2f001

Please sign in to comment.