@barchart/events-api-common
Advanced tools
Comparing version 1.3.11 to 1.3.12
@@ -8,5 +8,3 @@ const gulp = require('gulp'); | ||
jasmine = require('gulp-jasmine'), | ||
jshint = require('gulp-jshint'), | ||
runSequence = require('run-sequence'), | ||
util = require('gulp-util'); | ||
jshint = require('gulp-jshint'); | ||
@@ -19,7 +17,9 @@ const fs = require('fs'); | ||
gulp.task('ensure-clean-working-directory', () => { | ||
gitStatus(function(err, status) { | ||
gulp.task('ensure-clean-working-directory', (cb) => { | ||
gitStatus((err, status) => { | ||
if (err, !status.clean) { | ||
throw new Error('Unable to proceed, your working directory is not clean.'); | ||
} | ||
cb(); | ||
}); | ||
@@ -30,7 +30,7 @@ }); | ||
return gulp.src([ './package.json' ]) | ||
.pipe(bump({ type: 'patch' }).on('error', util.log)) | ||
.pipe(bump({ type: 'patch' })) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
gulp.task('document', function (cb) { | ||
gulp.task('document', (cb) => { | ||
exec('jsdoc . -c jsdoc.json -r -d docs', (error, stdout, stderr) => { | ||
@@ -57,3 +57,3 @@ console.log(stdout); | ||
git.tag(version, 'Release ' + version, function (error) { | ||
git.tag(version, 'Release ' + version, (error) => { | ||
if (error) { | ||
@@ -72,35 +72,13 @@ return cb(error); | ||
gulp.task('execute-tests', (callback) => { | ||
runSequence( | ||
'execute-node-tests', | ||
gulp.task('execute-tests', gulp.series('execute-node-tests')); | ||
function (error) { | ||
if (error) { | ||
console.log(error.message); | ||
} | ||
gulp.task('release', gulp.series( | ||
'ensure-clean-working-directory', | ||
'document', | ||
'bump-version', | ||
'commit-changes', | ||
'push-changes', | ||
'create-tag' | ||
)); | ||
callback(error); | ||
}); | ||
}); | ||
gulp.task('release', (callback) => { | ||
runSequence( | ||
'ensure-clean-working-directory', | ||
'document', | ||
'bump-version', | ||
'commit-changes', | ||
'push-changes', | ||
'create-tag', | ||
function (error) { | ||
if (error) { | ||
console.log(error.message); | ||
} else { | ||
console.log('Release complete'); | ||
} | ||
callback(error); | ||
}); | ||
}); | ||
gulp.task('lint', () => { | ||
@@ -112,4 +90,4 @@ return gulp.src([ './**/*.js', './test/specs/**/*.js', '!./node_modules/**', '!./test/dist/**', '!./docs/**' ]) | ||
gulp.task('test', [ 'execute-tests' ]); | ||
gulp.task('test', gulp.series('execute-tests')); | ||
gulp.task('default', [ 'lint' ]); | ||
gulp.task('default', gulp.series('lint')); |
@@ -20,2 +20,14 @@ const Enum = require('@barchart/common-js/lang/Enum'); | ||
/** | ||
* Returns the {@link CustomerType} which corresponds to the code supplied. | ||
* If matching {@link CustomerType} exists, a null value is returned. | ||
* | ||
* @public | ||
* @param {String} code | ||
* @return {CustomerType/|null} | ||
*/ | ||
static parse(code) { | ||
return Enum.fromCode(CustomerType, code); | ||
} | ||
/** | ||
* Customer type for TGAM. | ||
@@ -22,0 +34,0 @@ * |
{ | ||
"name": "@barchart/events-api-common", | ||
"version": "1.3.11", | ||
"version": "1.3.12", | ||
"description": "Common classes used by the Event system", | ||
@@ -17,3 +17,3 @@ "author": { | ||
"git-get-status": "^1.0.5", | ||
"gulp": "^3.9.1", | ||
"gulp": "^4.0.2", | ||
"gulp-bump": "~1.0.0", | ||
@@ -23,8 +23,6 @@ "gulp-git": "^2.9.0", | ||
"gulp-jshint": "~2.1.0", | ||
"gulp-util": "^3.0.7", | ||
"jsdoc": "^3.5.5", | ||
"jshint": "2.9.5", | ||
"run-sequence": "~1.1.4" | ||
"jshint": "2.9.5" | ||
}, | ||
"license": "GPL-3.0" | ||
"license": "MIT" | ||
} |
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
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
8
0
100
24750
680