@ckeditor/ckeditor5-dev-utils
Advanced tools
Comparing version 4.0.2 to 5.0.0
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 @@ |
@@ -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 @@ |
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
8
104118
2655
- Removedgulp-util@^3.0.8
- Removedansi-gray@0.1.1(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedansi-wrap@0.1.0(transitive)
- Removedarray-differ@1.0.0(transitive)
- Removedbeeper@1.1.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-stats@0.0.1(transitive)
- Removedcolor-support@1.1.3(transitive)
- Removeddateformat@2.2.0(transitive)
- Removedduplexer2@0.0.2(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedfancy-log@1.3.3(transitive)
- Removedglogg@1.0.2(transitive)
- Removedgulp-util@3.0.8(transitive)
- Removedgulplog@1.0.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-gulplog@0.1.0(transitive)
- Removedisarray@0.0.1(transitive)
- Removedlodash._basecopy@3.0.1(transitive)
- Removedlodash._basetostring@3.0.1(transitive)
- Removedlodash._basevalues@3.0.0(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._isiterateecall@3.0.9(transitive)
- Removedlodash._reescape@3.0.0(transitive)
- Removedlodash._reevaluate@3.0.0(transitive)
- Removedlodash._reinterpolate@3.0.0(transitive)
- Removedlodash._root@3.0.1(transitive)
- Removedlodash.escape@3.2.0(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.restparam@3.6.1(transitive)
- Removedlodash.template@3.6.2(transitive)
- Removedlodash.templatesettings@3.1.1(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmultipipe@0.1.2(transitive)
- Removedobject-assign@3.0.0(transitive)
- Removedparse-node-version@1.0.1(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedsparkles@1.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtime-stamp@1.1.0(transitive)
- Removedvinyl@0.5.3(transitive)