From bcb8f618461d2947d7e967adb2e2018d08e3d7b2 Mon Sep 17 00:00:00 2001 From: splincode Date: Thu, 26 Sep 2024 13:00:58 +0300 Subject: [PATCH] chore: upgrade editor --- .../schematics/ng-update/v4/steps/migrate-editor.ts | 2 +- .../v4/tests/schematic-migrate-addon-editor.spec.ts | 12 +++++++++--- .../v4/tests/schematic-migrate-proprietary.spec.ts | 3 ++- .../tests/schematic-migrate-tinkoff-editor.spec.ts | 12 +++++++++--- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/projects/cdk/schematics/ng-update/v4/steps/migrate-editor.ts b/projects/cdk/schematics/ng-update/v4/steps/migrate-editor.ts index 9a568f7ebf83e..e6f3aecbc0f82 100644 --- a/projects/cdk/schematics/ng-update/v4/steps/migrate-editor.ts +++ b/projects/cdk/schematics/ng-update/v4/steps/migrate-editor.ts @@ -14,7 +14,7 @@ import { import {replaceIdentifiers} from '../../steps/replace-identifier'; import {replacePackageName} from '../../steps/replace-package-name'; -export const TUI_EDITOR_VERSION = '^4.10.0'; +export const TUI_EDITOR_VERSION = '^4.11.0'; export function migrateEditor(fileSystem: DevkitFileSystem, options: TuiSchema): void { const moduleSpecifier = ['@tinkoff/tui-editor', '@taiga-ui/addon-editor']; diff --git a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-addon-editor.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-addon-editor.spec.ts index d531313246317..d05a5c83925b4 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-addon-editor.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-addon-editor.spec.ts @@ -12,6 +12,12 @@ import { setActiveProject, } from 'ng-morph'; +import {TUI_EDITOR_VERSION} from '../steps/migrate-editor'; +import { + TUI_EVENT_PLUGINS_VERSION, + TUI_POLYMORPHEUS_VERSION, +} from '../steps/update-packages'; + const collectionPath = join(__dirname, '../../../migration.json'); const COMPONENT_BEFORE = ` @@ -104,10 +110,10 @@ const PACKAGE_JSON_AFTER = `{ "@angular/core": "~13.0.0", "@taiga-ui/core": "~3.35.0", "@taiga-ui/cdk": "~3.35.0", - "@taiga-ui/editor": "^4.10.0", - "@taiga-ui/event-plugins": "^4.2.3", + "@taiga-ui/editor": "${TUI_EDITOR_VERSION}", + "@taiga-ui/event-plugins": "${TUI_EVENT_PLUGINS_VERSION}", "@taiga-ui/legacy": "${TUI_VERSION}", - "@taiga-ui/polymorpheus": "^4.7.3" + "@taiga-ui/polymorpheus": "${TUI_POLYMORPHEUS_VERSION}" } }`.trim(); 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 f45a0e167b233..6d591c0753bec 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 @@ -14,6 +14,7 @@ import { } from 'ng-morph'; import {makeAngularJsonWithAssets} from '../../../utils/make-angular-json-with-assets'; +import {TUI_EVENT_PLUGINS_VERSION} from '../steps/update-packages'; const collectionPath = join(__dirname, '../../../migration.json'); @@ -125,7 +126,7 @@ const PACKAGE_JSON_AFTER = ` { "dependencies": { "@angular/core": "~13.0.0", - "@taiga-ui/event-plugins": "^4.2.3", + "@taiga-ui/event-plugins": "${TUI_EVENT_PLUGINS_VERSION}", "@taiga-ui/legacy": "${TUI_VERSION}", "@taiga-ui/proprietary": "${TUI_VERSION}" } diff --git a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-tinkoff-editor.spec.ts b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-tinkoff-editor.spec.ts index c0ef0f1502f76..aec4994dd09af 100644 --- a/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-tinkoff-editor.spec.ts +++ b/projects/cdk/schematics/ng-update/v4/tests/schematic-migrate-tinkoff-editor.spec.ts @@ -12,6 +12,12 @@ import { setActiveProject, } from 'ng-morph'; +import {TUI_EDITOR_VERSION} from '../steps/migrate-editor'; +import { + TUI_EVENT_PLUGINS_VERSION, + TUI_POLYMORPHEUS_VERSION, +} from '../steps/update-packages'; + const collectionPath = join(__dirname, '../../../migration.json'); const COMPONENT_BEFORE = ` @@ -102,10 +108,10 @@ const PACKAGE_JSON_AFTER = `{ "@angular/core": "~13.0.0", "@taiga-ui/core": "~3.42.0", "@taiga-ui/cdk": "~3.42.0", - "@taiga-ui/editor": "^4.10.0", - "@taiga-ui/event-plugins": "^4.2.3", + "@taiga-ui/editor": "${TUI_EDITOR_VERSION}", + "@taiga-ui/event-plugins": "${TUI_EVENT_PLUGINS_VERSION}", "@taiga-ui/legacy": "${TUI_VERSION}", - "@taiga-ui/polymorpheus": "^4.7.3" + "@taiga-ui/polymorpheus": "${TUI_POLYMORPHEUS_VERSION}" } }`.trim();