Comparing version
{ | ||
"name": "js-logger", | ||
"version": "0.9.9", | ||
"version": "0.9.10", | ||
"main": "src/logger.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
@@ -11,3 +11,4 @@ var packageJSON = require('./package.json'); | ||
var git = require('gulp-git'); | ||
var spawn = require('child_process').spawn; | ||
var version = packageJSON.version; | ||
@@ -51,3 +52,3 @@ var srcFile = 'src/logger.js'; | ||
gulp.task('release', function () { | ||
gulp.task('release', function (done) { | ||
var tagMsg = 'v' + version; | ||
@@ -57,4 +58,7 @@ | ||
console.log('creating git tag', tagMsg); | ||
spawn('npm', [ 'publish' ], { stdio: 'inherit' }) | ||
.on('close', done); | ||
}); | ||
gulp.task('default', [ 'version', 'lint', 'test', 'minify' ]); | ||
gulp.task('default', [ 'version', 'lint', 'test', 'minify' ]); |
{ | ||
"name": "js-logger", | ||
"version": "0.9.9", | ||
"version": "0.9.10", | ||
"description": "Lightweight, unobtrusive, configurable JavaScript logger", | ||
@@ -20,3 +20,3 @@ "author": "Jonny Reeves (http://jonnyreeves.co.uk)", | ||
], | ||
"main": "build/logger.js", | ||
"main": "src/logger.js", | ||
"devDependencies": { | ||
@@ -23,0 +23,0 @@ "gulp": "~3.5.2", |
@@ -16,3 +16,3 @@ /*! | ||
// For those that are at home that are keeping score. | ||
Logger.VERSION = "0.9.9"; | ||
Logger.VERSION = "0.9.10"; | ||
@@ -19,0 +19,0 @@ // Function which handles all incoming log messages. |
@@ -1,1 +0,1 @@ | ||
!function(e){"use strict";var n={};n.VERSION="0.9.9";var o,t={},r=function(e,n){return function(){return n.apply(e,arguments)}},i=function(){var e,n,o=arguments,t=o[0];for(n=1;n<o.length;n++)for(e in o[n])e in t||!o[n].hasOwnProperty(e)||(t[e]=o[n][e]);return t},l=function(e,n){return{value:e,name:n}};n.DEBUG=l(1,"DEBUG"),n.INFO=l(2,"INFO"),n.WARN=l(4,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var u=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};u.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},enabledFor:function(e){var n=this.context.filterLevel;return e.value>=n.value},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},invoke:function(e,n){o&&this.enabledFor(e)&&o(n,i({level:e},this.context))}};var s=new u({filterLevel:n.OFF});!function(){var e=n;e.enabledFor=r(s,s.enabledFor),e.debug=r(s,s.debug),e.info=r(s,s.info),e.warn=r(s,s.warn),e.error=r(s,s.error),e.log=e.info}(),n.setHandler=function(e){o=e},n.setLevel=function(e){s.setLevel(e);for(var n in t)t.hasOwnProperty(n)&&t[n].setLevel(e)},n.get=function(e){return t[e]||(t[e]=new u(i({name:e},s.context)))},n.useDefaults=function(e){console&&(n.setLevel(e||n.DEBUG),n.setHandler(function(e,o){var t=console.log;o.name&&(e[0]="["+o.name+"] "+e[0]),o.level===n.WARN&&console.warn?t=console.warn:o.level===n.ERROR&&console.error?t=console.error:o.level===n.INFO&&console.info&&(t=console.info),Function.prototype.apply.call(t,console,e)}))},"function"==typeof define&&define.amd?define(n):"undefined"!=typeof module&&module.exports?module.exports=n:(n._prevLogger=e.Logger,n.noConflict=function(){return e.Logger=n._prevLogger,n},e.Logger=n)}(this); | ||
!function(e){"use strict";var n={};n.VERSION="0.9.10";var o,t={},r=function(e,n){return function(){return n.apply(e,arguments)}},i=function(){var e,n,o=arguments,t=o[0];for(n=1;n<o.length;n++)for(e in o[n])e in t||!o[n].hasOwnProperty(e)||(t[e]=o[n][e]);return t},l=function(e,n){return{value:e,name:n}};n.DEBUG=l(1,"DEBUG"),n.INFO=l(2,"INFO"),n.WARN=l(4,"WARN"),n.ERROR=l(8,"ERROR"),n.OFF=l(99,"OFF");var u=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};u.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},enabledFor:function(e){var n=this.context.filterLevel;return e.value>=n.value},debug:function(){this.invoke(n.DEBUG,arguments)},info:function(){this.invoke(n.INFO,arguments)},warn:function(){this.invoke(n.WARN,arguments)},error:function(){this.invoke(n.ERROR,arguments)},invoke:function(e,n){o&&this.enabledFor(e)&&o(n,i({level:e},this.context))}};var s=new u({filterLevel:n.OFF});!function(){var e=n;e.enabledFor=r(s,s.enabledFor),e.debug=r(s,s.debug),e.info=r(s,s.info),e.warn=r(s,s.warn),e.error=r(s,s.error),e.log=e.info}(),n.setHandler=function(e){o=e},n.setLevel=function(e){s.setLevel(e);for(var n in t)t.hasOwnProperty(n)&&t[n].setLevel(e)},n.get=function(e){return t[e]||(t[e]=new u(i({name:e},s.context)))},n.useDefaults=function(e){console&&(n.setLevel(e||n.DEBUG),n.setHandler(function(e,o){var t=console.log;o.name&&(e[0]="["+o.name+"] "+e[0]),o.level===n.WARN&&console.warn?t=console.warn:o.level===n.ERROR&&console.error?t=console.error:o.level===n.INFO&&console.info&&(t=console.info),Function.prototype.apply.call(t,console,e)}))},"function"==typeof define&&define.amd?define(n):"undefined"!=typeof module&&module.exports?module.exports=n:(n._prevLogger=e.Logger,n.noConflict=function(){return e.Logger=n._prevLogger,n},e.Logger=n)}(this); |
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
82030
0.17%2323
0.17%1
Infinity%