@ckeditor/ckeditor5-utils
Advanced tools
Comparing version 23.1.0 to 24.0.0
{ | ||
"name": "@ckeditor/ckeditor5-utils", | ||
"version": "23.1.0", | ||
"version": "24.0.0", | ||
"description": "Miscellaneous utils used by CKEditor 5.", | ||
@@ -15,6 +15,6 @@ "keywords": [ | ||
"devDependencies": { | ||
"@ckeditor/ckeditor5-build-classic": "^23.1.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^23.1.0", | ||
"@ckeditor/ckeditor5-core": "^23.1.0", | ||
"@ckeditor/ckeditor5-engine": "^23.1.0", | ||
"@ckeditor/ckeditor5-build-classic": "^24.0.0", | ||
"@ckeditor/ckeditor5-editor-classic": "^24.0.0", | ||
"@ckeditor/ckeditor5-core": "^24.0.0", | ||
"@ckeditor/ckeditor5-engine": "^24.0.0", | ||
"assertion-error": "^1.1.0", | ||
@@ -21,0 +21,0 @@ "js-beautify": "^1.11.0" |
@@ -143,3 +143,3 @@ /** | ||
* | ||
* @param {String} errorName Error name to be logged. | ||
* @param {String} errorName The error name to be logged. | ||
* @param {Object} [data] Additional data to be logged. | ||
@@ -153,4 +153,4 @@ * @returns {String} | ||
/** | ||
* Logs an error to the console with properly formatted message and adds a link to the documentation. | ||
* Use whenever you want to log a error to the console. | ||
* Logs an error to the console with a properly formatted message and adds a link to the documentation. | ||
* Use whenever you want to log an error to the console. | ||
* | ||
@@ -170,3 +170,3 @@ * /** | ||
* | ||
* @param {String} errorName Error name to be logged. | ||
* @param {String} errorName The error name to be logged. | ||
* @param {Object} [data] Additional data to be logged. | ||
@@ -173,0 +173,0 @@ * @returns {String} |
@@ -159,2 +159,14 @@ /** | ||
removeCallback( emitter, event, callback ); | ||
// We must remove callbacks as well in order to prevent memory leaks. | ||
// See https://github.com/ckeditor/ckeditor5/pull/8480 | ||
const index = eventCallbacks.indexOf( callback ); | ||
if ( index !== -1 ) { | ||
if ( eventCallbacks.length === 1 ) { | ||
delete emitterInfo.callbacks[ event ]; | ||
} else { | ||
removeCallback( emitter, event, callback ); | ||
} | ||
} | ||
} | ||
@@ -161,0 +173,0 @@ // Only `emitter` and `event` provided. off() all callbacks for that event. |
@@ -12,2 +12,3 @@ /** | ||
import toArray from './toarray'; | ||
import { _translate } from './translation-service'; | ||
@@ -157,5 +158,3 @@ | ||
_t( message, values = [] ) { | ||
if ( !Array.isArray( values ) ) { | ||
values = [ values ]; | ||
} | ||
values = toArray( values ); | ||
@@ -162,0 +161,0 @@ if ( typeof message === 'string' ) { |
@@ -14,3 +14,3 @@ /** | ||
const version = '23.1.0'; | ||
const version = '24.0.0'; | ||
@@ -17,0 +17,0 @@ /* istanbul ignore next */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
270201
57
6595