slate-dev-logger
Advanced tools
Comparing version 0.1.37 to 0.1.38
@@ -1,12 +0,13 @@ | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SlateDevLogger = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
// shim for using process in browser | ||
var process = module.exports = {}; | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(factory((global.SlateDevLogger = {}))); | ||
}(this, (function (exports) { 'use strict'; | ||
// cached from whatever global is present so that test runners that stub it | ||
// don't break things. But we need to wrap it in a try catch in case it is | ||
// wrapped in strict mode code which doesn't define any globals. It's inside a | ||
// function because try/catches deoptimize in certain engines. | ||
var global$1 = typeof global !== "undefined" ? global : | ||
typeof self !== "undefined" ? self : | ||
typeof window !== "undefined" ? window : {} | ||
var cachedSetTimeout; | ||
var cachedClearTimeout; | ||
// shim for using process in browser | ||
// based off https://github.com/defunctzombie/node-process/blob/master/browser.js | ||
@@ -19,22 +20,11 @@ function defaultSetTimout() { | ||
} | ||
(function () { | ||
try { | ||
if (typeof setTimeout === 'function') { | ||
cachedSetTimeout = setTimeout; | ||
} else { | ||
cachedSetTimeout = defaultSetTimout; | ||
} | ||
} catch (e) { | ||
cachedSetTimeout = defaultSetTimout; | ||
} | ||
try { | ||
if (typeof clearTimeout === 'function') { | ||
cachedClearTimeout = clearTimeout; | ||
} else { | ||
cachedClearTimeout = defaultClearTimeout; | ||
} | ||
} catch (e) { | ||
cachedClearTimeout = defaultClearTimeout; | ||
} | ||
} ()) | ||
var cachedSetTimeout = defaultSetTimout; | ||
var cachedClearTimeout = defaultClearTimeout; | ||
if (typeof global$1.setTimeout === 'function') { | ||
cachedSetTimeout = setTimeout; | ||
} | ||
if (typeof global$1.clearTimeout === 'function') { | ||
cachedClearTimeout = clearTimeout; | ||
} | ||
function runTimeout(fun) { | ||
@@ -135,4 +125,3 @@ if (cachedSetTimeout === setTimeout) { | ||
} | ||
process.nextTick = function (fun) { | ||
function nextTick(fun) { | ||
var args = new Array(arguments.length - 1); | ||
@@ -148,4 +137,3 @@ if (arguments.length > 1) { | ||
} | ||
}; | ||
} | ||
// v8 likes predictible objects | ||
@@ -159,36 +147,92 @@ function Item(fun, array) { | ||
}; | ||
process.title = 'browser'; | ||
process.browser = true; | ||
process.env = {}; | ||
process.argv = []; | ||
process.version = ''; // empty string to avoid regexp issues | ||
process.versions = {}; | ||
var title = 'browser'; | ||
var platform = 'browser'; | ||
var browser = true; | ||
var env = {}; | ||
var argv = []; | ||
var version = ''; // empty string to avoid regexp issues | ||
var versions = {}; | ||
var release = {}; | ||
var config = {}; | ||
function noop() {} | ||
process.on = noop; | ||
process.addListener = noop; | ||
process.once = noop; | ||
process.off = noop; | ||
process.removeListener = noop; | ||
process.removeAllListeners = noop; | ||
process.emit = noop; | ||
var on = noop; | ||
var addListener = noop; | ||
var once = noop; | ||
var off = noop; | ||
var removeListener = noop; | ||
var removeAllListeners = noop; | ||
var emit = noop; | ||
process.binding = function (name) { | ||
function binding(name) { | ||
throw new Error('process.binding is not supported'); | ||
}; | ||
} | ||
process.cwd = function () { return '/' }; | ||
process.chdir = function (dir) { | ||
function cwd () { return '/' } | ||
function chdir (dir) { | ||
throw new Error('process.chdir is not supported'); | ||
} | ||
function umask() { return 0; } | ||
// from https://github.com/kumavis/browser-process-hrtime/blob/master/index.js | ||
var performance = global$1.performance || {}; | ||
var performanceNow = | ||
performance.now || | ||
performance.mozNow || | ||
performance.msNow || | ||
performance.oNow || | ||
performance.webkitNow || | ||
function(){ return (new Date()).getTime() }; | ||
// generate timestamp or delta | ||
// see http://nodejs.org/api/process.html#process_process_hrtime | ||
function hrtime(previousTimestamp){ | ||
var clocktime = performanceNow.call(performance)*1e-3; | ||
var seconds = Math.floor(clocktime); | ||
var nanoseconds = Math.floor((clocktime%1)*1e9); | ||
if (previousTimestamp) { | ||
seconds = seconds - previousTimestamp[0]; | ||
nanoseconds = nanoseconds - previousTimestamp[1]; | ||
if (nanoseconds<0) { | ||
seconds--; | ||
nanoseconds += 1e9; | ||
} | ||
} | ||
return [seconds,nanoseconds] | ||
} | ||
var startTime = new Date(); | ||
function uptime() { | ||
var currentTime = new Date(); | ||
var dif = currentTime - startTime; | ||
return dif / 1000; | ||
} | ||
var process = { | ||
nextTick: nextTick, | ||
title: title, | ||
browser: browser, | ||
env: env, | ||
argv: argv, | ||
version: version, | ||
versions: versions, | ||
on: on, | ||
addListener: addListener, | ||
once: once, | ||
off: off, | ||
removeListener: removeListener, | ||
removeAllListeners: removeAllListeners, | ||
emit: emit, | ||
binding: binding, | ||
cwd: cwd, | ||
chdir: chdir, | ||
umask: umask, | ||
hrtime: hrtime, | ||
platform: platform, | ||
release: release, | ||
config: config, | ||
uptime: uptime | ||
}; | ||
process.umask = function() { return 0; }; | ||
},{}],2:[function(require,module,exports){ | ||
(function (process){ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
/* eslint-disable no-console */ | ||
@@ -202,3 +246,3 @@ | ||
var IS_DEV = typeof process !== 'undefined' && process.env && "production" !== 'production'; | ||
var IS_DEV = typeof process !== 'undefined' && process.env && "development" !== 'production'; | ||
@@ -280,3 +324,3 @@ /** | ||
function deprecate(version, message) { | ||
function deprecate(version$$1, message) { | ||
for (var _len4 = arguments.length, args = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) { | ||
@@ -286,3 +330,3 @@ args[_key4 - 2] = arguments[_key4]; | ||
log.apply(undefined, ['warn', 'Deprecation (' + version + '): ' + message].concat(args)); | ||
log.apply(undefined, ['warn', 'Deprecation (' + version$$1 + '): ' + message].concat(args)); | ||
} | ||
@@ -296,3 +340,3 @@ | ||
exports.default = { | ||
var index = { | ||
deprecate: deprecate, | ||
@@ -303,4 +347,6 @@ error: error, | ||
}).call(this,require('_process')) | ||
},{"_process":1}]},{},[2])(2) | ||
}); | ||
exports.default = index; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); |
@@ -1,1 +0,1 @@ | ||
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SlateDevLogger=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var process=module.exports={};var cachedSetTimeout;var cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){cachedSetTimeout=setTimeout}else{cachedSetTimeout=defaultSetTimout}}catch(e){cachedSetTimeout=defaultSetTimout}try{if(typeof clearTimeout==="function"){cachedClearTimeout=clearTimeout}else{cachedClearTimeout=defaultClearTimeout}}catch(e){cachedClearTimeout=defaultClearTimeout}})();function runTimeout(fun){if(cachedSetTimeout===setTimeout){return setTimeout(fun,0)}if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout){cachedSetTimeout=setTimeout;return setTimeout(fun,0)}try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout){return clearTimeout(marker)}if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout){cachedClearTimeout=clearTimeout;return clearTimeout(marker)}try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}var queue=[];var draining=false;var currentQueue;var queueIndex=-1;function cleanUpNextTick(){if(!draining||!currentQueue){return}draining=false;if(currentQueue.length){queue=currentQueue.concat(queue)}else{queueIndex=-1}if(queue.length){drainQueue()}}function drainQueue(){if(draining){return}var timeout=runTimeout(cleanUpNextTick);draining=true;var len=queue.length;while(len){currentQueue=queue;queue=[];while(++queueIndex<len){if(currentQueue){currentQueue[queueIndex].run()}}queueIndex=-1;len=queue.length}currentQueue=null;draining=false;runClearTimeout(timeout)}process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1){for(var i=1;i<arguments.length;i++){args[i-1]=arguments[i]}}queue.push(new Item(fun,args));if(queue.length===1&&!draining){runTimeout(drainQueue)}};function Item(fun,array){this.fun=fun;this.array=array}Item.prototype.run=function(){this.fun.apply(null,this.array)};process.title="browser";process.browser=true;process.env={};process.argv=[];process.version="";process.versions={};function noop(){}process.on=noop;process.addListener=noop;process.once=noop;process.off=noop;process.removeListener=noop;process.removeAllListeners=noop;process.emit=noop;process.binding=function(name){throw new Error("process.binding is not supported")};process.cwd=function(){return"/"};process.chdir=function(dir){throw new Error("process.chdir is not supported")};process.umask=function(){return 0}},{}],2:[function(require,module,exports){(function(process){"use strict";function log(o,r){if(IS_DEV&&HAS_CONSOLE){for(var e,n=arguments.length,t=Array(n>2?n-2:0),a=2;a<n;a++)t[a-2]=arguments[a];(e=console)[o].apply(e,[r].concat(t))}}function error(o){if(HAS_CONSOLE){for(var r,e=arguments.length,n=Array(e>1?e-1:0),t=1;t<e;t++)n[t-1]=arguments[t];(r=console).error.apply(r,[o].concat(n))}}function warn(o){for(var r=arguments.length,e=Array(r>1?r-1:0),n=1;n<r;n++)e[n-1]=arguments[n];log.apply(void 0,["warn","Warning: "+o].concat(e))}function deprecate(o,r){for(var e=arguments.length,n=Array(e>2?e-2:0),t=2;t<e;t++)n[t-2]=arguments[t];log.apply(void 0,["warn","Deprecation ("+o+"): "+r].concat(n))}Object.defineProperty(exports,"__esModule",{value:!0});var IS_DEV="undefined"!=typeof process&&process.env&&!1,HAS_CONSOLE="undefined"!=typeof console&&"function"==typeof console.log&&"function"==typeof console.warn&&"function"==typeof console.error;exports.default={deprecate:deprecate,error:error,warn:warn}}).call(this,require("_process"))},{_process:1}]},{},[2])(2)}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.SlateDevLogger={})}(this,function(e){"use strict";var n="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function t(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}var o=t,i=r;function u(e){if(o===setTimeout)return setTimeout(e,0);if((o===t||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(n){try{return o.call(null,e,0)}catch(n){return o.call(this,e,0)}}}"function"==typeof n.setTimeout&&(o=setTimeout),"function"==typeof n.clearTimeout&&(i=clearTimeout);var c,a=[],f=!1,l=-1;function s(){f&&c&&(f=!1,c.length?a=c.concat(a):l=-1,a.length&&p())}function p(){if(!f){var e=u(s);f=!0;for(var n=a.length;n;){for(c=a,a=[];++l<n;)c&&c[l].run();l=-1,n=a.length}c=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===r||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(n){try{return i.call(null,e)}catch(n){return i.call(this,e)}}}(e)}}function d(e,n){this.fun=e,this.array=n}d.prototype.run=function(){this.fun.apply(null,this.array)};function h(){}var w=h,y=h,m=h,v=h,g=h,T=h,b=h;var A=n.performance||{},D=A.now||A.mozNow||A.msNow||A.oNow||A.webkitNow||function(){return(new Date).getTime()};var x=new Date;var E={nextTick:function(e){var n=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)n[t-1]=arguments[t];a.push(new d(e,n)),1!==a.length||f||u(p)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:w,addListener:y,once:m,off:v,removeListener:g,removeAllListeners:T,emit:b,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var n=.001*D.call(A),t=Math.floor(n),r=Math.floor(n%1*1e9);return e&&(t-=e[0],(r-=e[1])<0&&(t--,r+=1e9)),[t,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-x)/1e3}},L=void 0!==E&&E.env&&!1,N="undefined"!=typeof console&&"function"==typeof console.log&&"function"==typeof console.warn&&"function"==typeof console.error;function k(e,n){if(L&&N){for(var t,r=arguments.length,o=Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];(t=console)[e].apply(t,[n].concat(o))}}var M={deprecate:function(e,n){for(var t=arguments.length,r=Array(t>2?t-2:0),o=2;o<t;o++)r[o-2]=arguments[o];k.apply(void 0,["warn","Deprecation ("+e+"): "+n].concat(r))},error:function(e){if(N){for(var n,t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];(n=console).error.apply(n,[e].concat(r))}},warn:function(e){for(var n=arguments.length,t=Array(n>1?n-1:0),r=1;r<n;r++)t[r-1]=arguments[r];k.apply(void 0,["warn","Warning: "+e].concat(t))}};e.default=M,Object.defineProperty(e,"__esModule",{value:!0})}); |
{ | ||
"name": "slate-dev-logger", | ||
"description": "A simple, development-only logger for Slate.", | ||
"version": "0.1.37", | ||
"version": "0.1.38", | ||
"license": "MIT", | ||
"repository": "git://github.com/ianstormtaylor/slate.git", | ||
"main": "./lib/index.js", | ||
"main": "lib/slate-dev-logger.js", | ||
"module": "lib/slate-dev-logger.es.js", | ||
"umd": "dist/slate-dev-logger.js", | ||
"umdMin": "dist/slate-dev-logger.min.js", | ||
"files": [ | ||
@@ -13,14 +16,6 @@ "dist/", | ||
"devDependencies": { | ||
"babel-cli": "^6.10.1", | ||
"browserify": "^13.0.1", | ||
"mocha": "^2.5.3", | ||
"uglify-js": "^2.7.0" | ||
"mocha": "^2.5.3" | ||
}, | ||
"scripts": { | ||
"build": "babel --out-dir ./lib ./src", | ||
"build:max": "mkdir -p ./dist && NODE_ENV=production browserify ./src/index.js --transform babelify --transform envify --transform [ browserify-global-shim --global ] --standalone SlateDevLogger > ./dist/slate-dev-logger.js", | ||
"build:min": "mkdir -p ./dist && NODE_ENV=production browserify ./src/index.js --transform babelify --transform envify --transform [ browserify-global-shim --global ] --transform uglifyify --standalone SlateDevLogger | uglifyjs > ./dist/slate-dev-logger.min.js", | ||
"clean": "rm -rf ./dist ./lib ./node_modules", | ||
"prepublish": "yarn run build && yarn run build:max && yarn run build:min", | ||
"watch": "babel --watch --out-dir ./lib ./src --source-maps inline" | ||
"clean": "rm -rf ./dist ./lib ./node_modules" | ||
}, | ||
@@ -27,0 +22,0 @@ "keywords": [ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
44910
1
8
895
2
1
1