Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lodash-es with es-toolkit #17496

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The following libraries are included in CKEditor under the [MIT license](https:/
* BlurHash - Copyright (c) 2018 Wolt Enterprises (MIT license).
* color-convert - Copyright (c) 2011–2016 Heather Arthur <[email protected]>, copyright (c) 2016–2021 Josh Junon <[email protected]>.
* color-parse - Copyright (c) 2015 Dmitry Ivanov.
* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
* Marked - Copyright (c) 2018+, MarkedJS (https://github.com/markedjs/), copyright (c) 2011–2018, Christopher Jeffrey (https://github.com/chjj/).
* Turndown - Copyright (c) 2017+ Dom Christie.
* turndown-plugin-gfm - Copyright (c) 2017+ Dom Christie.
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-autosave/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-autosave/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@ckeditor/ckeditor5-core": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"ckeditor5": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-dev-utils": "^45.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-autosave/src/autosave.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { DomEmitterMixin, type DomEmitter } from 'ckeditor5/src/utils.js';

import type { DocumentChangeEvent } from 'ckeditor5/src/engine.js';

import { debounce, type DebouncedFunc } from 'lodash-es';
import { debounce, type DebouncedFunction } from 'es-toolkit/compat';

/* globals window */

Expand Down Expand Up @@ -81,7 +81,7 @@ export default class Autosave extends Plugin {
* Debounced save method. The `save()` method is called the specified `waitingTime` after `debouncedSave()` is called,
* unless a new action happens in the meantime.
*/
private _debouncedSave: DebouncedFunc<( () => void )>;
private _debouncedSave: DebouncedFunction<( () => Promise<void> )>;

/**
* The last saved document version.
Expand Down
1 change: 1 addition & 0 deletions packages/ckeditor5-ckbox/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi
The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* blurhash - Copyright (c) 2018 Wolt Enterprises (MIT license).
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-ckbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@ckeditor/ckeditor5-utils": "44.1.0",
"ckeditor5": "44.1.0",
"blurhash": "2.0.5",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-autosave": "44.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
} from 'ckeditor5/src/utils.js';
import type { Element as ModelElement } from 'ckeditor5/src/engine.js';
import { Notification } from 'ckeditor5/src/ui.js';
import { isEqual } from 'lodash-es';
import { isEqual } from 'es-toolkit/compat';

import { sendHttpRequest } from '../utils.js';
import { prepareImageAssetAttributes } from '../ckboxcommand.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { setData as setModelData, getData as getModelData } from '@ckeditor/cked
import { getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils/view.js';
import { Notification } from 'ckeditor5/src/ui.js';
import TokenMock from '@ckeditor/ckeditor5-cloud-services/tests/_utils/tokenmock.js';
import _ from 'lodash-es';
import * as _ from 'es-toolkit/compat';
import CloudServicesCoreMock from '../_utils/cloudservicescoremock.js';
import CKBoxEditing from '../../src/ckboxediting.js';
import CKBoxImageEditEditing from '../../src/ckboximageedit/ckboximageeditediting.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-clipboard/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@ckeditor/ckeditor5-ui": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"@ckeditor/ckeditor5-widget": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-alignment": "44.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-clipboard/src/clipboardmarkersutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* @module clipboard/clipboardmarkersutils
*/
import { mapValues } from 'lodash-es';
import { mapValues } from 'es-toolkit/compat';

import { uid } from '@ckeditor/ckeditor5-utils';
import { Plugin, type NonEmptyArray } from '@ckeditor/ckeditor5-core';
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-clipboard/src/dragdroptarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {

import LineView from './lineview.js';

import { throttle } from 'lodash-es';
import { throttle } from 'es-toolkit/compat';

/**
* Part of the Drag and Drop handling. Responsible for finding and displaying the drop target.
Expand Down
4 changes: 0 additions & 4 deletions packages/ckeditor5-code-block/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ Sources of Intellectual Property Included in CKEditor

Where not otherwise indicated, all CKEditor content is authored by CKSource engineers and consists of CKSource-owned intellectual property. In some specific instances, CKEditor will incorporate work done by developers outside of CKSource with their express permission.

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.

Trademarks
----------

Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-core/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@ckeditor/ckeditor5-engine": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"@ckeditor/ckeditor5-watchdog": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-autoformat": "44.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-core/src/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @module core/editor/editor
*/

import { set, get } from 'lodash-es';
import { set, get } from 'es-toolkit/compat';

import {
Config,
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-core/src/editor/utils/attachtoform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @module core/editor/utils/attachtoform
*/

import { isFunction } from 'lodash-es';
import { isFunction } from 'es-toolkit/compat';

import { CKEditorError } from '@ckeditor/ckeditor5-utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-core/tests/_utils/classictesteditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import BoxedEditorUIView from '@ckeditor/ckeditor5-ui/src/editorui/boxed/boxeded
import ElementReplacer from '@ckeditor/ckeditor5-utils/src/elementreplacer.js';
import InlineEditableUIView from '@ckeditor/ckeditor5-ui/src/editableui/inline/inlineeditableuiview.js';
import getDataFromElement from '@ckeditor/ckeditor5-utils/src/dom/getdatafromelement.js';
import { isElement } from 'lodash-es';
import { isElement } from 'es-toolkit/compat';
import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-core/tests/accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { Editor } from '@ckeditor/ckeditor5-core';
import { expectToThrowCKEditorError } from '@ckeditor/ckeditor5-utils/tests/_utils/utils.js';
import { cloneDeep } from 'lodash-es';
import { cloneDeep } from 'es-toolkit/compat';

describe( 'Accessibility', () => {
let editor, accessibility;
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-balloon/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-balloon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ckeditor/ckeditor5-ui": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"ckeditor5": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "44.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-balloon/src/ballooneditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { CKEditorError, getDataFromElement } from 'ckeditor5/src/utils.js';
import BalloonEditorUI from './ballooneditorui.js';
import BalloonEditorUIView from './ballooneditoruiview.js';

import { isElement as _isElement } from 'lodash-es';
import { isElement as _isElement } from 'es-toolkit/compat';

/**
* The balloon editor implementation (Medium-like editor).
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-balloon/tests/ballooneditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph.js';
import Heading from '@ckeditor/ckeditor5-heading/src/heading.js';

import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard.js';
import { isElement } from 'lodash-es';
import { isElement } from 'es-toolkit/compat';
import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor.js';
import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model.js';
import { assertBinding } from '@ckeditor/ckeditor5-utils/tests/_utils/utils.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-classic/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ckeditor/ckeditor5-ui": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"ckeditor5": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "44.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-classic/src/classiceditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
} from 'ckeditor5/src/core.js';
import { getDataFromElement, CKEditorError } from 'ckeditor5/src/utils.js';

import { isElement as _isElement } from 'lodash-es';
import { isElement as _isElement } from 'es-toolkit/compat';

/**
* The classic editor implementation. It uses an inline editable and a sticky toolbar, all enclosed in a boxed UI.
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-classic/tests/classiceditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-util
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard.js';
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils.js';
import { assertBinding } from '@ckeditor/ckeditor5-utils/tests/_utils/utils.js';
import { isElement } from 'lodash-es';
import { isElement } from 'es-toolkit/compat';
import { ContextualBalloon, Dialog, DialogViewPosition } from '@ckeditor/ckeditor5-ui';

describe( 'ClassicEditorUI', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-decoupled/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-decoupled/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ckeditor/ckeditor5-ui": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"ckeditor5": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "44.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-decoupled/src/decouplededitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import DecoupledEditorUI from './decouplededitorui.js';
import DecoupledEditorUIView from './decouplededitoruiview.js';

import { isElement as _isElement } from 'lodash-es';
import { isElement as _isElement } from 'es-toolkit/compat';

/**
* The decoupled editor implementation. It provides an inline editable and a toolbar. However, unlike other editors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtest
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard.js';
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils.js';
import { assertBinding } from '@ckeditor/ckeditor5-utils/tests/_utils/utils.js';
import { isElement } from 'lodash-es';
import { isElement } from 'es-toolkit/compat';
import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model.js';

describe( 'DecoupledEditorUI', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-inline/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-inline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ckeditor/ckeditor5-ui": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"ckeditor5": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "44.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-editor-inline/src/inlineeditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { getDataFromElement, CKEditorError } from 'ckeditor5/src/utils.js';
import InlineEditorUI from './inlineeditorui.js';
import InlineEditorUIView from './inlineeditoruiview.js';

import { isElement as _isElement } from 'lodash-es';
import { isElement as _isElement } from 'es-toolkit/compat';

/**
* The inline editor implementation. It uses an inline editable and a floating toolbar.
Expand Down Expand Up @@ -222,6 +222,6 @@ function getInitialData( sourceElementOrData: HTMLElement | string ): string {
return isElement( sourceElementOrData ) ? getDataFromElement( sourceElementOrData ) : sourceElementOrData;
}

function isElement( value: any ): value is Element {
function isElement( value: any ): value is HTMLElement {
return _isElement( value );
}
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-inline/tests/inlineeditorui.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtest
import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard.js';
import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils.js';
import { assertBinding } from '@ckeditor/ckeditor5-utils/tests/_utils/utils.js';
import { isElement } from 'lodash-es';
import { isElement } from 'es-toolkit/compat';
import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model.js';

describe( 'InlineEditorUI', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-multi-root/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-editor-multi-root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@ckeditor/ckeditor5-ui": "44.1.0",
"@ckeditor/ckeditor5-utils": "44.1.0",
"ckeditor5": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "44.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-editor-multi-root/src/multirooteditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
import MultiRootEditorUI from './multirooteditorui.js';
import MultiRootEditorUIView from './multirooteditoruiview.js';

import { isElement as _isElement } from 'lodash-es';
import { isElement as _isElement } from 'es-toolkit/compat';
import {
type RootElement,
type ViewRootEditableElement,
Expand Down Expand Up @@ -935,7 +935,7 @@ function getInitialData( sourceElementOrData: HTMLElement | string ): string {
return isElement( sourceElementOrData ) ? getDataFromElement( sourceElementOrData ) : sourceElementOrData;
}

function isElement( value: any ): value is Element {
function isElement( value: any ): value is HTMLElement {
return _isElement( value );
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-engine/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi

The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):

* Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
* es-toolkit - Copyright (c) 2024 Viva Republica, Inc.

Trademarks
----------
Expand Down
2 changes: 1 addition & 1 deletion packages/ckeditor5-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"main": "src/index.ts",
"dependencies": {
"@ckeditor/ckeditor5-utils": "44.1.0",
"lodash-es": "4.17.21"
"es-toolkit": "1.30.1"
},
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "44.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ import {
type PriorityString
} from '@ckeditor/ckeditor5-utils';

import { cloneDeep } from 'lodash-es';
import { cloneDeep } from 'es-toolkit/compat';

/**
* Downcast conversion helper functions.
Expand Down
Loading
Loading