diff --git a/projects/cdk/schematics/ng-update/interfaces/replacement-identifier.ts b/projects/cdk/schematics/ng-update/interfaces/replacement-identifier.ts index be14576cb0ba..7ff6b224a78b 100644 --- a/projects/cdk/schematics/ng-update/interfaces/replacement-identifier.ts +++ b/projects/cdk/schematics/ng-update/interfaces/replacement-identifier.ts @@ -16,10 +16,11 @@ export interface ReplacementIdentifierMulti extends Pick | { readonly moduleSpecifier: string; readonly name: string; - readonly namedImport?: string; + readonly spreadInModule?: boolean; }; } diff --git a/projects/cdk/schematics/ng-update/steps/replace-identifier.ts b/projects/cdk/schematics/ng-update/steps/replace-identifier.ts index 10b0735323d3..4e558e91cbcc 100644 --- a/projects/cdk/schematics/ng-update/steps/replace-identifier.ts +++ b/projects/cdk/schematics/ng-update/steps/replace-identifier.ts @@ -1,4 +1,4 @@ -import {Node} from 'ng-morph'; +import {Node, ts} from 'ng-morph'; import type {TuiSchema} from '../../ng-add/schema'; import {addUniqueImport} from '../../utils/add-unique-import'; @@ -40,9 +40,15 @@ export function replaceIdentifier({from, to}: ReplacementIdentifierMulti): void removeImport(parent); addImports(to, parent.getSourceFile().getFilePath()); } else { - ref?.replaceWithText( - Array.isArray(to) ? to.map(({name}) => name).join(', ') : to.name, + const decorator = ref.getParentWhile( + (node) => node.getKindName() !== 'Decorator', ); + + const inModule = + decorator?.getFirstChildIfKind(ts.SyntaxKind.Identifier)?.getText() === + 'NgModule'; + + ref.replaceWithText(getReplacementText(to, !!inModule)); } }); } @@ -55,9 +61,18 @@ function addImports( ? identifier.forEach(({name, namedImport, moduleSpecifier}) => { addUniqueImport(filePath, namedImport || name, moduleSpecifier); }) - : addUniqueImport( - filePath, - identifier.namedImport || identifier.name, - identifier.moduleSpecifier, - ); + : addUniqueImport(filePath, identifier.name, identifier.moduleSpecifier); +} + +function getReplacementText( + to: ReplacementIdentifierMulti['to'], + inModule: boolean, +): string { + const res = Array.isArray(to) ? to : [to]; + + return res + .map(({name, spreadInModule}) => + spreadInModule && inModule ? `...${name}` : name, + ) + .join(', '); } diff --git a/projects/cdk/schematics/ng-update/v4/index.ts b/projects/cdk/schematics/ng-update/v4/index.ts index 5e89ee2413d4..f4daff1950da 100644 --- a/projects/cdk/schematics/ng-update/v4/index.ts +++ b/projects/cdk/schematics/ng-update/v4/index.ts @@ -37,12 +37,15 @@ import { } from './steps/constants'; import {MODULES_TO_REPLACE_WITH_PROVIDERS} from './steps/constants/modules-to-replace'; import {TYPES_TO_RENAME} from './steps/constants/types'; +import {migrateRoot} from './steps/migrate-root'; import {replaceModulesWithProviders} from './steps/utils/replace-modules-with-providers'; function main(options: TuiSchema): Rule { return (tree: Tree, context: SchematicContext) => { const fileSystem = getFileSystem(tree); + replaceEnums(options, ENUMS_TO_REPLACE); + migrateRoot(fileSystem, options); replaceIdentifiers(options, IDENTIFIERS_TO_REPLACE); removeModules(options, MODULES_TO_REMOVE); replaceModulesWithProviders(options, MODULES_TO_REPLACE_WITH_PROVIDERS); @@ -54,7 +57,6 @@ function main(options: TuiSchema): Rule { migrateOptionProviders(options); migrateAllCountryIsoCodes(options); - replaceEnums(options, ENUMS_TO_REPLACE); migrateTemplates(fileSystem, options); showWarnings(context, MIGRATION_WARNINGS); diff --git a/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts b/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts index 5b81a0aa19b5..c5e0519a7e34 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/constants/identifiers-to-replace.ts @@ -358,6 +358,10 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ from: {name: 'TuiCheckboxModule', moduleSpecifier: '@taiga-ui/experimental'}, to: {name: 'TuiCheckbox', moduleSpecifier: '@taiga-ui/kit'}, }, + { + from: {name: 'TuiCheckboxModule', moduleSpecifier: '@taiga-ui/kit'}, + to: {name: 'TuiCheckbox', moduleSpecifier: '@taiga-ui/kit'}, + }, { from: {name: 'TuiSwipeActionsModule', moduleSpecifier: '@taiga-ui/experimental'}, to: [ @@ -455,7 +459,7 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ to: {name: 'TUI_SCROLL_REF', moduleSpecifier: '@taiga-ui/core'}, }, { - from: {name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/cdk'}, + from: {name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/core'}, to: {name: 'TUI_SANITIZER', moduleSpecifier: '@taiga-ui/legacy'}, }, { @@ -656,10 +660,6 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ from: {name: 'TuiSvgModule', moduleSpecifier: '@taiga-ui/core'}, to: {name: 'TuiSvgComponent', moduleSpecifier: '@taiga-ui/legacy'}, }, - { - from: {name: 'TuiRootModule', moduleSpecifier: '@taiga-ui/core'}, - to: {name: 'TuiRoot', moduleSpecifier: '@taiga-ui/core'}, - }, { from: {name: 'TuiCellModule', moduleSpecifier: '@taiga-ui/experimental'}, to: {name: 'TuiCell', moduleSpecifier: '@taiga-ui/layout'}, @@ -874,16 +874,6 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ moduleSpecifier: '@taiga-ui/proprietary', }, }, - { - from: { - name: 'TuiProprietaryRoot2023Module', - moduleSpecifier: '@taiga-ui/proprietary-core', - }, - to: { - name: 'TuiProprietaryRoot2023Component', - moduleSpecifier: '@taiga-ui/proprietary', - }, - }, { from: { name: 'TuiSignalModule', @@ -1103,7 +1093,7 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ }, to: { name: 'TuiArrowComponent', - moduleSpecifier: '@taiga-ui/kit', + moduleSpecifier: '@taiga-ui/legacy', }, }, { @@ -1256,6 +1246,26 @@ export const IDENTIFIERS_TO_REPLACE: ReplacementIdentifierMulti[] = [ moduleSpecifier: '@taiga-ui/kit', }, }, + { + from: { + name: 'TuiPreviewDialogService', + moduleSpecifier: '@taiga-ui/addon-preview', + }, + to: { + name: 'TuiPreviewDialogService', + moduleSpecifier: '@taiga-ui/kit', + }, + }, + { + from: { + name: 'PolymorpheusModule', + moduleSpecifier: '@tinkoff/ng-polymorpheus', + }, + to: [ + {name: 'PolymorpheusTemplate', moduleSpecifier: '@taiga-ui/polymorpheus'}, + {name: 'PolymorpheusOutlet', moduleSpecifier: '@taiga-ui/polymorpheus'}, + ], + }, { from: { name: 'tuiDefaultSort', diff --git a/projects/cdk/schematics/ng-update/v4/steps/constants/modules-to-replace.ts b/projects/cdk/schematics/ng-update/v4/steps/constants/modules-to-replace.ts index 348879efa08c..76fdf17d5ec3 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/constants/modules-to-replace.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/constants/modules-to-replace.ts @@ -1,6 +1,12 @@ -interface ModuleToReplace { +export interface ProviderToReplace { + name: string; + providerSpecifier: string; + isFunction?: boolean; +} + +export interface ModuleToReplace { from: {name: string; moduleSpecifier: string}; - to: {name: string; providerSpecifier: string}; + to: ProviderToReplace | ProviderToReplace[]; } export const MODULES_TO_REPLACE_WITH_PROVIDERS: ModuleToReplace[] = [ @@ -12,6 +18,7 @@ export const MODULES_TO_REPLACE_WITH_PROVIDERS: ModuleToReplace[] = [ to: { name: 'tuiProvideMobileCalendar', providerSpecifier: '@taiga-ui/addon-mobile', + isFunction: true, }, }, ]; diff --git a/projects/cdk/schematics/ng-update/v4/steps/migrate-root.ts b/projects/cdk/schematics/ng-update/v4/steps/migrate-root.ts new file mode 100644 index 000000000000..456ad1585da0 --- /dev/null +++ b/projects/cdk/schematics/ng-update/v4/steps/migrate-root.ts @@ -0,0 +1,93 @@ +import { + type DevkitFileSystem, + getActiveProject, + getPackageJsonDependency, + Node, +} from 'ng-morph'; + +import type {TuiSchema} from '../../../ng-add/schema'; +import {addUniqueImport} from '../../../utils/add-unique-import'; +import {infoLog, REPLACE_SYMBOL, SMALL_TAB_SYMBOL} from '../../../utils/colored-log'; +import {getNamedImportReferences} from '../../../utils/get-named-import-references'; +import {removeImport} from '../../../utils/import-manipulations'; + +export function migrateRoot(fileSystem: DevkitFileSystem, options: TuiSchema): void { + !options['skip-logs'] && + infoLog(`${SMALL_TAB_SYMBOL}${REPLACE_SYMBOL} updating TuiRoot`); + + const refs = [ + ...getNamedImportReferences('TuiRootModule', '@taiga-ui/core'), + ...getNamedImportReferences( + 'TuiProprietaryRootModule', + '@taiga-ui/proprietary-core', + ), + ...getNamedImportReferences( + 'TuiProprietaryRoot2023Module', + '@taiga-ui/proprietary-core', + ), + ]; + + for (const ref of refs) { + if (ref.wasForgotten()) { + return; + } + + const parent = ref.getParent(); + + if (Node.isImportSpecifier(parent)) { + removeImport(parent); + addUniqueImport( + parent.getSourceFile().getFilePath(), + 'TuiRoot', + '@taiga-ui/core', + ); + } else { + replaceRootIdentifier(ref, fileSystem); + } + } +} + +function replaceRootIdentifier(ref: Node, fileSystem: DevkitFileSystem): void { + const callExpression = ref.getParentWhile(Node.isCallExpression); + + if ( + callExpression && + callExpression.getExpression().getText() === 'importProvidersFrom' + ) { + ref.replaceWithText(''); + addProviders(callExpression, fileSystem); + } else { + ref.replaceWithText('TuiRoot'); + } +} + +function addProviders(callExpression: Node, fileSystem: DevkitFileSystem): void { + const array = callExpression.getParentWhile(Node.isArrayLiteralExpression); + + if (!array) { + return; + } + + array.addElement('NG_EVENT_PLUGINS'); + addUniqueImport( + array.getSourceFile().getFilePath(), + 'NG_EVENT_PLUGINS', + '@taiga-ui/event-plugins', + ); + + getActiveProject(); + const proprietary = getPackageJsonDependency( + fileSystem.tree, + '@taiga-ui/proprietary-core', + ); + + if (proprietary) { + array.addElement('TBANK_PROVIDERS'); + + addUniqueImport( + array.getSourceFile().getFilePath(), + 'TBANK_PROVIDERS', + '@taiga-ui/proprietary', + ); + } +} diff --git a/projects/cdk/schematics/ng-update/v4/steps/update-packages.ts b/projects/cdk/schematics/ng-update/v4/steps/update-packages.ts index bfb82f7e31e5..2f3dc36283c8 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/update-packages.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/update-packages.ts @@ -1,6 +1,10 @@ /// import type {DevkitFileSystem} from 'ng-morph'; -import {addPackageJsonDependency, removePackageJsonDependency} from 'ng-morph'; +import { + addPackageJsonDependency, + getPackageJsonDependency, + removePackageJsonDependency, +} from 'ng-morph'; import {TUI_VERSION} from '../../../../constants/version'; import type {TuiSchema} from '../../../ng-add/schema'; @@ -42,4 +46,11 @@ export function updatePackages({tree}: DevkitFileSystem, _: TuiSchema): void { }, tree, ); + + if (!getPackageJsonDependency(tree, '@taiga-ui/event-plugins')) { + addPackageJsonDependency(tree, { + name: '@taiga-ui/event-plugins', + version: '^4.0.1', + }); + } } diff --git a/projects/cdk/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.ts b/projects/cdk/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.ts index 8f898ccc9792..44fb83a08967 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/utils/replace-modules-with-providers.ts @@ -17,11 +17,7 @@ import { } from '../../../../utils/colored-log'; import {getNamedImportReferences} from '../../../../utils/get-named-import-references'; import {removeImport} from '../../../../utils/import-manipulations'; - -interface ModuleToReplace { - from: {name: string; moduleSpecifier: string}; - to: {name: string; providerSpecifier: string}; -} +import type {ModuleToReplace, ProviderToReplace} from '../constants/modules-to-replace'; export const replaceModulesWithProviders = ( options: TuiSchema, @@ -40,6 +36,7 @@ export const replaceModulesWithProviders = ( function replaceModule({from, to}: ModuleToReplace): void { const references = getNamedImportReferences(from.name, from.moduleSpecifier); + const toReplace = Array.isArray(to) ? to : [to]; references.forEach((ref) => { if (ref.wasForgotten()) { @@ -50,21 +47,28 @@ function replaceModule({from, to}: ModuleToReplace): void { if (Node.isImportSpecifier(parent)) { removeImport(parent); - addImport(to, parent.getSourceFile().getFilePath()); + toReplace.forEach((provider) => + addImport(provider, parent.getSourceFile().getFilePath()), + ); } else if (Node.isArrayLiteralExpression(parent)) { - parent.removeElement(ref.getChildIndex()); - - addProvider(to, parent.getSourceFile().getFilePath()); + const index = parent + .getElements() + .findIndex((el) => el.getText() === from.name); + + parent.removeElement(index); + toReplace.forEach((provider) => + addProvider(provider, parent.getSourceFile().getFilePath()), + ); } }); } -function addImport(identifier: ModuleToReplace['to'], filePath: string): void { +function addImport(identifier: ProviderToReplace, filePath: string): void { addUniqueImport(filePath, identifier.name, identifier.providerSpecifier); } -function addProvider(identifier: ModuleToReplace['to'], filePath: string): void { - const provider = `${identifier.name}()`; +function addProvider(identifier: ProviderToReplace, filePath: string): void { + const provider = `${identifier.name}${identifier.isFunction ? '()' : ''}`; const componentClass = getNgComponents(filePath)[0]; diff --git a/projects/cdk/schematics/ng-update/v4/tests/replace-modules-with-providers.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/replace-modules-with-providers.spec.ts index 5c344c95a9a2..1d038852862c 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/replace-modules-with-providers.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/replace-modules-with-providers.spec.ts @@ -18,31 +18,38 @@ const collectionPath = join(__dirname, '../../../migration.json'); const MODULE_BEFORE = `import { TuiMobileCalendarDialogModule } from "@taiga-ui/addon-mobile"; import { OldModule } from "@namespace/cdk"; +import { TuiProprietaryRootModule } from "@taiga-ui/proprietary-core"; @NgModule({ - imports: [ TuiMobileCalendarDialogModule, OldModule ] + imports: [ TuiMobileCalendarDialogModule, OldModule], + providers: [importProvidersFrom(TuiProprietaryRootModule)] }) export class Test { }`; const MODULE_AFTER = `import { newProvider } from "@namespace/new"; import { tuiProvideMobileCalendar } from "@taiga-ui/addon-mobile"; +import { TBANK_PROVIDERS } from "@taiga-ui/proprietary"; +import { NG_EVENT_PLUGINS } from "@taiga-ui/event-plugins"; +import { TuiRoot } from "@taiga-ui/core"; @NgModule({ imports: [ ], - providers: [tuiProvideMobileCalendar(), newProvider()] + providers: [importProvidersFrom(), NG_EVENT_PLUGINS, TBANK_PROVIDERS, tuiProvideMobileCalendar(), newProvider] }) export class Test { }`; const COMPONENT_BEFORE = `import { TuiMobileCalendarDialogModule } from "@taiga-ui/addon-mobile"; import { OldModule } from "@namespace/cdk"; +import { TuiRootModule } from "@taiga-ui/core"; @Component({ selector: 'app-my-component', standalone: true, template: '', imports: [ + TuiRootModule, TuiMobileCalendarDialogModule, OldModule ] @@ -52,14 +59,16 @@ export class Test { const COMPONENT_AFTER = `import { newProvider } from "@namespace/new"; import { tuiProvideMobileCalendar } from "@taiga-ui/addon-mobile"; +import { TuiRoot } from "@taiga-ui/core"; @Component({ selector: 'app-my-component', standalone: true, template: '', imports: [ -], - providers: [tuiProvideMobileCalendar(), newProvider()] + TuiRoot + ], + providers: [tuiProvideMobileCalendar(), newProvider] }) export class Test { }`; @@ -116,6 +125,6 @@ function createMainFiles(): void { createAngularJson(); createSourceFile( 'package.json', - '{"dependencies": {"@angular/core": "~13.0.0", "@taiga-ui/addon-commerce": "~3.42.0"}}', + '{"dependencies": {"@angular/core": "~13.0.0", "@taiga-ui/addon-commerce": "~3.42.0", "@taiga-ui/proprietary-core": "~3.42.0"}}', ); } diff --git a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-enums.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-enums.spec.ts index e7b0f3268eb8..4dd5718d3e4e 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-enums.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-enums.spec.ts @@ -13,8 +13,8 @@ import { const collectionPath = join(__dirname, '../../../migration.json'); -const COMPONENT_BEFORE = ` -import { TuiInteractiveState, TuiInteractiveStateT } from '@taiga-ui/core'; +const COMPONENT_BEFORE = + `import { TuiInteractiveState, TuiInteractiveStateT } from '@taiga-ui/core'; export class Example { public getItemState(item: TuiDay): TuiInteractiveStateT | null { @@ -37,9 +37,7 @@ export class Example { } `.trim(); -const COMPONENT_AFTER = ` -import { TuiInteractiveState } from '@taiga-ui/core'; - +const COMPONENT_AFTER = `import { TuiInteractiveState } from "@taiga-ui/core"; export class Example { public getItemState(item: TuiDay): TuiInteractiveState | null { const {disabledItemHandler, pressedItem, hoveredItem} = this; 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 new file mode 100644 index 000000000000..2204477a98b6 --- /dev/null +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-identifiers.spec.ts @@ -0,0 +1,102 @@ +import {join} from 'node:path'; + +import {HostTree} from '@angular-devkit/schematics'; +import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing'; +import type {TuiSchema} from '@taiga-ui/cdk/schematics/ng-add/schema'; +import { + createProject, + createSourceFile, + resetActiveProject, + saveActiveProject, + setActiveProject, +} from 'ng-morph'; + +import {createAngularJson} from '../../../utils/create-angular-json'; + +const collectionPath = join(__dirname, '../../../migration.json'); + +const COMPONENT_BEFORE = ` +import { TuiDialogModule } from "@taiga-ui/core"; + +@Component({ + standalone: true, + imports: [TuiDialogModule] +}) +export class Test { +}`; + +const COMPONENT_AFTER = `import { TuiDialog } from "@taiga-ui/core"; + +@Component({ + standalone: true, + imports: [TuiDialog] +}) +export class Test { +}`; + +const MODULE_BEFORE = `import { TuiDialogModule } from "@taiga-ui/core"; + +@NgModule({ + imports: [TuiDialogModule], +}) +export class Test { +}`; + +const MODULE_AFTER = `import { TuiDialog } from "@taiga-ui/core"; +@NgModule({ + imports: [TuiDialog], +}) +export class Test { +}`; + +describe('ng-update', () => { + let host: UnitTestTree; + let runner: SchematicTestRunner; + + beforeEach(() => { + host = new UnitTestTree(new HostTree()); + runner = new SchematicTestRunner('schematics', collectionPath); + + setActiveProject(createProject(host)); + + createMainFiles(); + + saveActiveProject(); + }); + + it('should migrate dialog in module', async () => { + const tree = await runner.runSchematic( + 'updateToV4', + {'skip-logs': process.env['TUI_CI'] === 'true'} as Partial, + host, + ); + + expect(tree.readContent('test/app/test.module.ts')).toEqual(MODULE_AFTER); + }); + + it('should migrate dialog references in ts files', async () => { + const tree = await runner.runSchematic( + 'updateToV4', + {'skip-logs': process.env['TUI_CI'] === 'true'} as Partial, + host, + ); + + expect(tree.readContent('test/app/test.component.ts')).toEqual(COMPONENT_AFTER); + }); + + afterEach(() => { + resetActiveProject(); + }); +}); + +function createMainFiles(): void { + createSourceFile('test/app/test.component.ts', COMPONENT_BEFORE); + + createSourceFile('test/app/test.module.ts', MODULE_BEFORE); + + createAngularJson(); + createSourceFile( + 'package.json', + '{"dependencies": {"@angular/core": "~13.0.0", "@taiga-ui/addon-commerce": "~3.42.0"}}', + ); +} diff --git a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-links.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-links.spec.ts index 7e2ac594b868..705dddd4f34f 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-links.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-links.spec.ts @@ -16,23 +16,24 @@ import {createAngularJson} from '../../../utils/create-angular-json'; const collectionPath = join(__dirname, '../../../migration.json'); const COMPONENT_BEFORE = ` -import { TuiLinkModule } from "@taiga-ui/core"; +import { TuiLinkModule, TuiNotificationModule } from "@taiga-ui/core"; @Component({ standalone: true, templateUrl: './test.template.html', - imports: [TuiLinkModule] + imports: [TuiLinkModule, TuiNotificationModule] }) export class Test { }`; const COMPONENT_AFTER = `import { TuiChevron } from "@taiga-ui/kit"; -import { TuiLink } from "@taiga-ui/core"; + +import { TuiNotification, TuiLink } from "@taiga-ui/core"; @Component({ standalone: true, templateUrl: './test.template.html', - imports: [TuiLink, TuiChevron] + imports: [TuiLink, TuiNotification, TuiChevron] }) export class Test { }`; diff --git a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-proprietary.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-proprietary.spec.ts index 5a455cff95b2..433345c6ca1d 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-proprietary.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-proprietary.spec.ts @@ -103,6 +103,7 @@ const PACKAGE_JSON_AFTER = ` { "dependencies": { "@angular/core": "~13.0.0", + "@taiga-ui/event-plugins": "^4.0.1", "@taiga-ui/legacy": "${TUI_VERSION}", "@taiga-ui/proprietary": "${TUI_VERSION}" }