Socket
Socket
Sign inDemoInstall

@ckeditor/ckeditor5-utils

Package Overview
Dependencies
Maintainers
1
Versions
613
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-utils - npm Package Compare versions

Comparing version 30.0.0 to 31.0.0

10

package.json
{
"name": "@ckeditor/ckeditor5-utils",
"version": "30.0.0",
"version": "31.0.0",
"description": "Miscellaneous utilities used by CKEditor 5.",

@@ -17,6 +17,6 @@ "keywords": [

"devDependencies": {
"@ckeditor/ckeditor5-build-classic": "^30.0.0",
"@ckeditor/ckeditor5-editor-classic": "^30.0.0",
"@ckeditor/ckeditor5-core": "^30.0.0",
"@ckeditor/ckeditor5-engine": "^30.0.0",
"@ckeditor/ckeditor5-build-classic": "^31.0.0",
"@ckeditor/ckeditor5-editor-classic": "^31.0.0",
"@ckeditor/ckeditor5-core": "^31.0.0",
"@ckeditor/ckeditor5-engine": "^31.0.0",
"assertion-error": "^1.1.0",

@@ -23,0 +23,0 @@ "js-beautify": "^1.11.0"

@@ -62,6 +62,4 @@ /**

constructor( errorName, context, data ) {
const message = `${ errorName }${ ( data ? ` ${ JSON.stringify( data ) }` : '' ) }${ getLinkToDocumentationMessage( errorName ) }`;
super( getErrorMessage( errorName, data ) );
super( message );
/**

@@ -176,2 +174,7 @@ * @type {String}

// Returns formatted link to documentation message.
//
// @private
// @param {String} errorName
// @returns {string}
function getLinkToDocumentationMessage( errorName ) {

@@ -181,2 +184,34 @@ return `\nRead more: ${ DOCUMENTATION_URL }#error-${ errorName }`;

// Returns formatted error message.
//
// @private
// @param {String} errorName
// @param {Object} [data]
// @returns {string}
function getErrorMessage( errorName, data ) {
const processedObjects = new WeakSet();
const circularReferencesReplacer = ( key, value ) => {
if ( typeof value === 'object' && value !== null ) {
if ( processedObjects.has( value ) ) {
return `[object ${ value.constructor.name }]`;
}
processedObjects.add( value );
}
return value;
};
const stringifiedData = data ? ` ${ JSON.stringify( data, circularReferencesReplacer ) }` : '';
const documentationLink = getLinkToDocumentationMessage( errorName );
return errorName + stringifiedData + documentationLink;
}
// Returns formatted console error arguments.
//
// @private
// @param {String} errorName
// @param {Object} [data]
// @returns {Array}
function formatConsoleArguments( errorName, data ) {

@@ -183,0 +218,0 @@ const documentationMessage = getLinkToDocumentationMessage( errorName );

@@ -14,3 +14,3 @@ /**

const version = '30.0.0';
const version = '31.0.0';

@@ -17,0 +17,0 @@ export default version;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc