From ae541dbddd88a69b22151e9576dd7f8bde72f73a Mon Sep 17 00:00:00 2001 From: Kamil Piechaczek Date: Mon, 22 Mar 2021 19:59:09 +0100 Subject: [PATCH] Removed the ckeditor5 from package dependency. --- packages/ckeditor5-watchdog/package.json | 2 +- packages/ckeditor5-watchdog/src/contextwatchdog.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/ckeditor5-watchdog/package.json b/packages/ckeditor5-watchdog/package.json index 8d4970efc36..03150510c9c 100644 --- a/packages/ckeditor5-watchdog/package.json +++ b/packages/ckeditor5-watchdog/package.json @@ -10,7 +10,6 @@ ], "main": "src/index.js", "dependencies": { - "ckeditor5": "^26.0.0", "lodash-es": "^4.17.15" }, "devDependencies": { @@ -20,6 +19,7 @@ "@ckeditor/ckeditor5-paragraph": "^26.0.0", "@ckeditor/ckeditor5-theme-lark": "^26.0.0", "@ckeditor/ckeditor5-utils": "^26.0.0", + "ckeditor5": "^26.0.0", "webpack": "^4.43.0", "webpack-cli": "^3.3.11" }, diff --git a/packages/ckeditor5-watchdog/src/contextwatchdog.js b/packages/ckeditor5-watchdog/src/contextwatchdog.js index 2a246bda3e1..e0a55b20926 100644 --- a/packages/ckeditor5-watchdog/src/contextwatchdog.js +++ b/packages/ckeditor5-watchdog/src/contextwatchdog.js @@ -9,7 +9,6 @@ /* globals console */ -import { toArray } from 'ckeditor5/src/utils'; import Watchdog from './watchdog'; import EditorWatchdog from './editorwatchdog'; import areConnectedThroughProperties from './utils/areconnectedthroughproperties'; @@ -516,6 +515,14 @@ class ActionQueue { } } +// Transforms any value to an array. If the provided value is already an array, it is returned unchanged. +// +// @param {*} data The value to transform to an array. +// @returns {Array} An array created from data. +function toArray( data ) { + return Array.isArray( data ) ? data : [ data ]; +} + /** * The watchdog item configuration interface. *