Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ckeditor/ckeditor5-dev-utils

Package Overview
Dependencies
Maintainers
1
Versions
261
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckeditor/ckeditor5-dev-utils - npm Package Compare versions

Comparing version 4.0.2 to 5.0.0

18

CHANGELOG.md
Changelog
=========
## [5.0.0](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-utils@4.0.2...@ckeditor/ckeditor5-dev-utils@5.0.0) (2017-11-13)
### Other changes
* Removed gulp dependency across the whole project. Closes [#296](https://github.com/ckeditor/ckeditor5-dev/issues/296). ([723bee5](https://github.com/ckeditor/ckeditor5-dev/commit/723bee5))
Now all packages use only npm scripts. Depending on usage you might either create a `"script"` entry in `pacakge.json` to invoke bin executables or require the library into a script.
* Package `ckeditor5-dev-env` exposes new `translations` binary.
* Package `ckeditor5-dev-tests` exposes new `test:manual` binary.
* Removed `gulp-jsdoc3` from `ckeditor5-dev-docs`. Now `jsdoc` is invoked directly.
* Removed `options` param from logger methods. Logger no longer uses `gutil.log` method.
### BREAKING CHANGES
* Gulp tasks were removed. New npm scripts were introduced.
## [4.0.2](https://github.com/ckeditor/ckeditor5-dev/compare/@ckeditor/ckeditor5-dev-utils@4.0.0...@ckeditor/ckeditor5-dev-utils@4.0.2) (2017-10-01)

@@ -5,0 +23,0 @@

30

lib/logger.js

@@ -8,3 +8,3 @@ /**

const gutil = require( 'gulp-util' );
const chalk = require( 'chalk' );
const levels = new Map();

@@ -60,7 +60,5 @@

* @param {String} message Message to log.
* @param {Object} options
* @param {Boolean} options.raw Whether to display non-modified message.
*/
info( message, options = { raw: false } ) {
this._log( 'info', message, options );
info( message ) {
this._log( 'info', message );
},

@@ -72,7 +70,5 @@

* @param {String} message Message to log.
* @param {Object} options
* @param {Boolean} [options.raw=false] Whether to display non-modified message.
*/
warning( message, options = { raw: false } ) {
this._log( 'warning', gutil.colors.yellow( message ), options );
warning( message ) {
this._log( 'warning', chalk.yellow( message ) );
},

@@ -84,7 +80,5 @@

* @param {String} message Message to log.
* @param {Object} options
* @param {Boolean} [options.raw=false] Whether to display non-modified message.
*/
error( message, options = { raw: false } ) {
this._log( 'error', gutil.colors.red( message ), options );
error( message ) {
this._log( 'error', chalk.red( message ) );
},

@@ -96,6 +90,4 @@

* @param {String} message Message to log.
* @param {Object} options
* @param {Boolean} [options.raw=false] Whether to display non-modified message.
*/
_log( messageVerbosity, message, options ) {
_log( messageVerbosity, message ) {
if ( !levels.get( messageVerbosity ).has( moduleVerbosity ) ) {

@@ -105,9 +97,5 @@ return;

if ( options.raw ) {
console.log( message );
} else {
gutil.log( message );
}
console.log( message );
}
};
};

@@ -8,3 +8,3 @@ /**

const gutil = require( 'gulp-util' );
const chalk = require( 'chalk' );
const path = require( 'path' );

@@ -31,12 +31,12 @@ const fs = require( 'fs-extra' );

const ret = sh.exec( command );
const logOptions = { raw: true };
const grey = gutil.colors.grey;
const grey = chalk.grey;
if ( ret.code ) {
if ( ret.stdout ) {
log.error( grey( ret.stdout ), logOptions );
log.error( grey( ret.stdout ) );
}
if ( ret.stderr ) {
log.error( grey( ret.stderr ), logOptions );
log.error( grey( ret.stderr ) );
}

@@ -48,7 +48,7 @@

if ( ret.stdout ) {
log.info( grey( ret.stdout ), logOptions );
log.info( grey( ret.stdout ) );
}
if ( ret.stderr ) {
log.info( grey( ret.stderr ), logOptions );
log.info( grey( ret.stderr ) );
}

@@ -341,3 +341,3 @@

paths.forEach( p => {
log.info( `Deleted file '${ gutil.colors.cyan( p ) }'.` );
log.info( `Deleted file '${ chalk.cyan( p ) }'.` );
} );

@@ -344,0 +344,0 @@ } );

{
"name": "@ckeditor/ckeditor5-dev-utils",
"version": "4.0.2",
"version": "5.0.0",
"description": "Utils for CKEditor 5 development tools packages.",

@@ -12,3 +12,2 @@ "keywords": [],

"fs-extra": "^4.0.2",
"gulp-util": "^3.0.8",
"javascript-stringify": "^1.6.0",

@@ -15,0 +14,0 @@ "pofile": "^1.0.9",

@@ -11,3 +11,2 @@ /**

const expect = chai.expect;
const gutil = require( 'gulp-util' );
const logger = require( '../lib/logger' );

@@ -36,19 +35,11 @@

describe( 'loggger.info()', () => {
describe( 'logger.info()', () => {
it( 'should log a message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.info( logMessage );
expect( gutilLog.calledOnce ).to.equal( true );
expect( gutilLog.firstCall.args[ 0 ] ).to.equal( logMessage );
} );
it( 'should log a non-modified message', () => {
const consoleLog = sandbox.stub( console, 'log' );
log.info( logMessage, { raw: true } );
expect( consoleLog.calledOnce ).to.equal( true );
expect( consoleLog.firstCall.args[ 0 ] ).to.equal( logMessage );
consoleLog.restore();

@@ -58,19 +49,11 @@ } );

describe( 'loggger.warning()', () => {
describe( 'logger.warning()', () => {
it( 'should log a message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.warning( logMessage );
expect( gutilLog.calledOnce ).to.equal( true );
expect( gutilLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
} );
it( 'should log a non-modified message', () => {
const consoleLog = sandbox.stub( console, 'log' );
log.warning( logMessage, { raw: true } );
expect( consoleLog.calledOnce ).to.equal( true );
expect( consoleLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
consoleLog.restore();

@@ -80,19 +63,11 @@ } );

describe( 'loggger.error()', () => {
describe( 'logger.error()', () => {
it( 'should log a message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.error( logMessage );
expect( gutilLog.calledOnce ).to.equal( true );
expect( gutilLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
} );
it( 'should log a non-modified message', () => {
const consoleLog = sandbox.stub( console, 'log' );
log.error( logMessage, { raw: true } );
expect( consoleLog.calledOnce ).to.equal( true );
expect( consoleLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
consoleLog.restore();

@@ -108,11 +83,8 @@ } );

describe( 'loggger.info()', () => {
describe( 'logger.info()', () => {
it( 'should not log any message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.info( logMessage );
log.info( logMessage, { raw: true } );
expect( gutilLog.called ).to.equal( false );
expect( consoleLog.called ).to.equal( false );

@@ -124,19 +96,11 @@

describe( 'loggger.warning()', () => {
describe( 'logger.warning()', () => {
it( 'should log a message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.warning( logMessage );
expect( gutilLog.calledOnce ).to.equal( true );
expect( gutilLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
} );
it( 'should log a non-modified message', () => {
const consoleLog = sandbox.stub( console, 'log' );
log.warning( logMessage, { raw: true } );
expect( consoleLog.calledOnce ).to.equal( true );
expect( consoleLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
consoleLog.restore();

@@ -146,19 +110,11 @@ } );

describe( 'loggger.error()', () => {
describe( 'logger.error()', () => {
it( 'should log a message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.error( logMessage );
expect( gutilLog.calledOnce ).to.equal( true );
expect( gutilLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
} );
it( 'should log a non-modified message', () => {
const consoleLog = sandbox.stub( console, 'log' );
log.error( logMessage, { raw: true } );
expect( consoleLog.calledOnce ).to.equal( true );
expect( consoleLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
consoleLog.restore();

@@ -174,11 +130,8 @@ } );

describe( 'loggger.info()', () => {
describe( 'logger.info()', () => {
it( 'should not log any message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.info( logMessage );
log.info( logMessage, { raw: true } );
expect( gutilLog.called ).to.equal( false );
expect( consoleLog.called ).to.equal( false );

@@ -190,11 +143,8 @@

describe( 'loggger.warning()', () => {
describe( 'logger.warning()', () => {
it( 'should not log any message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.warning( logMessage );
log.warning( logMessage, { raw: true } );
expect( gutilLog.called ).to.equal( false );
expect( consoleLog.called ).to.equal( false );

@@ -206,19 +156,11 @@

describe( 'loggger.error()', () => {
describe( 'logger.error()', () => {
it( 'should log a message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.error( logMessage );
expect( gutilLog.calledOnce ).to.equal( true );
expect( gutilLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
} );
it( 'should log a non-modified message', () => {
const consoleLog = sandbox.stub( console, 'log' );
log.error( logMessage, { raw: true } );
expect( consoleLog.calledOnce ).to.equal( true );
expect( consoleLog.firstCall.args[ 0 ] ).to.match( new RegExp( logMessage ) );
consoleLog.restore();

@@ -234,10 +176,12 @@ } );

describe( 'loggger.info()', () => {
describe( 'logger.info()', () => {
it( 'should log a message', () => {
const gutilLog = sandbox.stub( gutil, 'log' );
const consoleLog = sandbox.stub( console, 'log' );
log.info( logMessage );
expect( gutilLog.calledOnce ).to.equal( true );
expect( gutilLog.firstCall.args[ 0 ] ).to.equal( logMessage );
expect( consoleLog.calledOnce ).to.equal( true );
expect( consoleLog.firstCall.args[ 0 ] ).to.equal( logMessage );
consoleLog.restore();
} );

@@ -244,0 +188,0 @@ } );

@@ -78,5 +78,3 @@ /**

expect( infoSpy.firstCall.args[ 0 ] ).to.match( /out/ );
expect( infoSpy.firstCall.args[ 1 ] ).to.deep.equal( { raw: true } );
expect( infoSpy.secondCall.args[ 0 ] ).to.match( /err/ );
expect( infoSpy.secondCall.args[ 1 ] ).to.deep.equal( { raw: true } );
} );

@@ -97,5 +95,3 @@

expect( errorSpy.firstCall.args[ 0 ] ).to.match( /out/ );
expect( errorSpy.firstCall.args[ 1 ] ).to.deep.equal( { raw: true } );
expect( errorSpy.secondCall.args[ 0 ] ).to.match( /err/ );
expect( errorSpy.secondCall.args[ 1 ] ).to.deep.equal( { raw: true } );
} );

@@ -102,0 +98,0 @@

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