aboutsummaryrefslogtreecommitdiff
path: root/node_modules/istanbul-lib-source-maps
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/istanbul-lib-source-maps
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/istanbul-lib-source-maps')
-rw-r--r--node_modules/istanbul-lib-source-maps/CHANGELOG.md33
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/.coveralls.yml1
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/.eslintrc14
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/.npmignore9
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/.travis.yml20
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/Makefile58
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/README.md73
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/karma.conf.js70
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/package.json28
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js165
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/src/debug.js225
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js8
-rw-r--r--node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js134
-rw-r--r--node_modules/istanbul-lib-source-maps/package.json4
14 files changed, 265 insertions, 577 deletions
diff --git a/node_modules/istanbul-lib-source-maps/CHANGELOG.md b/node_modules/istanbul-lib-source-maps/CHANGELOG.md
index 00f7660da..6a3c41255 100644
--- a/node_modules/istanbul-lib-source-maps/CHANGELOG.md
+++ b/node_modules/istanbul-lib-source-maps/CHANGELOG.md
@@ -3,6 +3,39 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+<a name="1.2.6"></a>
+## [1.2.6](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps@1.2.3...istanbul-lib-source-maps@1.2.6) (2018-09-05)
+
+
+### Bug Fixes
+
+* Tweak package.json files for republish as latest 1.x. ([#217](https://github.com/istanbuljs/istanbuljs/issues/217)) ([420481d](https://github.com/istanbuljs/istanbuljs/commit/420481d)), closes [#216](https://github.com/istanbuljs/istanbuljs/issues/216)
+
+
+### BREAKING CHANGES
+
+* leaked into 1.x modules but it was thought they were
+never released to latest. Apparently releasing 2.x to latest makes
+those unwanted versions of 1.x available.
+
+This patch sets all modules to the latest 1.x version (4.x for
+test-exclude). This will allow a new release to be made to revert
+release of the breaking changes.
+
+Stop upgrading npm to latest for testing as it's not compatible with
+node 4.x.
+
+
+
+
+<a name="1.2.3"></a>
+## [1.2.3](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps@1.2.2...istanbul-lib-source-maps@1.2.3) (2018-02-13)
+
+
+
+
+**Note:** Version bump only for package istanbul-lib-source-maps
+
<a name="1.2.2"></a>
## [1.2.2](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-source-maps@1.2.1...istanbul-lib-source-maps@1.2.2) (2017-10-21)
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/.coveralls.yml b/node_modules/istanbul-lib-source-maps/node_modules/debug/.coveralls.yml
deleted file mode 100644
index 20a706858..000000000
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/.coveralls.yml
+++ /dev/null
@@ -1 +0,0 @@
-repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/.eslintrc b/node_modules/istanbul-lib-source-maps/node_modules/debug/.eslintrc
deleted file mode 100644
index 146371edb..000000000
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/.eslintrc
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "env": {
- "browser": true,
- "node": true
- },
- "globals": {
- "chrome": true
- },
- "rules": {
- "no-console": 0,
- "no-empty": [1, { "allowEmptyCatch": true }]
- },
- "extends": "eslint:recommended"
-}
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/.npmignore b/node_modules/istanbul-lib-source-maps/node_modules/debug/.npmignore
deleted file mode 100644
index 5f60eecc8..000000000
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/.npmignore
+++ /dev/null
@@ -1,9 +0,0 @@
-support
-test
-examples
-example
-*.sock
-dist
-yarn.lock
-coverage
-bower.json
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/.travis.yml b/node_modules/istanbul-lib-source-maps/node_modules/debug/.travis.yml
deleted file mode 100644
index a76430037..000000000
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-sudo: false
-
-language: node_js
-
-node_js:
- - "4"
- - "6"
- - "8"
-
-install:
- - make install
-
-script:
- - make lint
- - make test
-
-matrix:
- include:
- - node_js: '8'
- env: BROWSER=1
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/Makefile b/node_modules/istanbul-lib-source-maps/node_modules/debug/Makefile
deleted file mode 100644
index 3ddd1360e..000000000
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/Makefile
+++ /dev/null
@@ -1,58 +0,0 @@
-# get Makefile directory name: http://stackoverflow.com/a/5982798/376773
-THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd)
-
-# BIN directory
-BIN := $(THIS_DIR)/node_modules/.bin
-
-# Path
-PATH := node_modules/.bin:$(PATH)
-SHELL := /bin/bash
-
-# applications
-NODE ?= $(shell which node)
-YARN ?= $(shell which yarn)
-PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
-BROWSERIFY ?= $(NODE) $(BIN)/browserify
-
-install: node_modules
-
-browser: dist/debug.js
-
-node_modules: package.json
- @NODE_ENV= $(PKG) install
- @touch node_modules
-
-dist/debug.js: src/*.js node_modules
- @mkdir -p dist
- @$(BROWSERIFY) \
- --standalone debug \
- . > dist/debug.js
-
-lint:
- @eslint *.js src/*.js
-
-test-node:
- @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js
- @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
-
-test-browser:
- @$(MAKE) browser
- @karma start --single-run
-
-test-all:
- @concurrently \
- "make test-node" \
- "make test-browser"
-
-test:
- @if [ "x$(BROWSER)" = "x" ]; then \
- $(MAKE) test-node; \
- else \
- $(MAKE) test-browser; \
- fi
-
-clean:
- rimraf dist coverage
-
-.PHONY: browser install clean lint test test-all test-node test-browser
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/README.md b/node_modules/istanbul-lib-source-maps/node_modules/debug/README.md
index 8e754d17b..0ee7634dd 100644
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/README.md
+++ b/node_modules/istanbul-lib-source-maps/node_modules/debug/README.md
@@ -70,7 +70,9 @@ Here are some examples:
<img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
<img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
-#### Windows note
+#### Windows command prompt notes
+
+##### CMD
On Windows the environment variable is set using the `set` command.
@@ -78,14 +80,32 @@ On Windows the environment variable is set using the `set` command.
set DEBUG=*,-not_this
```
-Note that PowerShell uses different syntax to set environment variables.
+Example:
+
+```cmd
+set DEBUG=* & node app.js
+```
+
+##### PowerShell (VS Code default)
+
+PowerShell uses different syntax to set environment variables.
```cmd
$env:DEBUG = "*,-not_this"
```
+Example:
+
+```cmd
+$env:DEBUG='app';node app.js
+```
+
Then, run the program to be debugged as usual.
+npm script example:
+```js
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
+```
## Namespace Colors
@@ -248,6 +268,55 @@ error('now goes to stdout via console.info');
log('still goes to stdout, but via console.info now');
```
+## Extend
+You can simply extend debugger
+```js
+const log = require('debug')('auth');
+
+//creates new debug instance with extended namespace
+const logSign = log.extend('sign');
+const logLogin = log.extend('login');
+
+log('hello'); // auth hello
+logSign('hello'); //auth:sign hello
+logLogin('hello'); //auth:login hello
+```
+
+## Set dynamically
+
+You can also enable debug dynamically by calling the `enable()` method :
+
+```js
+let debug = require('debug');
+
+console.log(1, debug.enabled('test'));
+
+debug.enable('test');
+console.log(2, debug.enabled('test'));
+
+debug.disable();
+console.log(3, debug.enabled('test'));
+
+```
+
+print :
+```
+1 false
+2 true
+3 false
+```
+
+Usage :
+`enable(namespaces)`
+`namespaces` can include modes separated by a colon and wildcards.
+
+Note that calling `enable()` completely overrides previously set DEBUG variable :
+
+```
+$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
+=> false
+```
+
## Checking whether a debug target is enabled
After you've created a debug instance, you can determine whether or not it is
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/karma.conf.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/karma.conf.js
deleted file mode 100644
index 103a82d15..000000000
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/karma.conf.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// Karma configuration
-// Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC)
-
-module.exports = function(config) {
- config.set({
-
- // base path that will be used to resolve all patterns (eg. files, exclude)
- basePath: '',
-
-
- // frameworks to use
- // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
- frameworks: ['mocha', 'chai', 'sinon'],
-
-
- // list of files / patterns to load in the browser
- files: [
- 'dist/debug.js',
- 'test/*spec.js'
- ],
-
-
- // list of files to exclude
- exclude: [
- 'src/node.js'
- ],
-
-
- // preprocess matching files before serving them to the browser
- // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
- preprocessors: {
- },
-
- // test results reporter to use
- // possible values: 'dots', 'progress'
- // available reporters: https://npmjs.org/browse/keyword/karma-reporter
- reporters: ['progress'],
-
-
- // web server port
- port: 9876,
-
-
- // enable / disable colors in the output (reporters and logs)
- colors: true,
-
-
- // level of logging
- // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
- logLevel: config.LOG_INFO,
-
-
- // enable / disable watching file and executing tests whenever any file changes
- autoWatch: true,
-
-
- // start these browsers
- // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
- browsers: ['PhantomJS'],
-
-
- // Continuous Integration mode
- // if true, Karma captures browsers, runs the tests and exits
- singleRun: false,
-
- // Concurrency level
- // how many browser should be started simultaneous
- concurrency: Infinity
- })
-}
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/package.json b/node_modules/istanbul-lib-source-maps/node_modules/debug/package.json
index ada43cfe9..5bc197ca0 100644
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/package.json
+++ b/node_modules/istanbul-lib-source-maps/node_modules/debug/package.json
@@ -1,6 +1,6 @@
{
"name": "debug",
- "version": "3.1.0",
+ "version": "3.2.5",
"repository": {
"type": "git",
"url": "git://github.com/visionmedia/debug.git"
@@ -11,6 +11,13 @@
"log",
"debugger"
],
+ "files": [
+ "src",
+ "node.js",
+ "dist/debug.js",
+ "LICENSE",
+ "README.md"
+ ],
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
@@ -18,26 +25,27 @@
],
"license": "MIT",
"dependencies": {
- "ms": "2.0.0"
+ "ms": "^2.1.1"
},
"devDependencies": {
+ "@babel/cli": "^7.0.0",
+ "@babel/core": "^7.0.0",
+ "@babel/preset-env": "^7.0.0",
"browserify": "14.4.0",
"chai": "^3.5.0",
"concurrently": "^3.1.0",
- "coveralls": "^2.11.15",
- "eslint": "^3.12.1",
+ "coveralls": "^3.0.2",
"istanbul": "^0.4.5",
- "karma": "^1.3.0",
+ "karma": "^3.0.0",
"karma-chai": "^0.1.0",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.2",
- "karma-sinon": "^1.0.5",
- "mocha": "^3.2.0",
+ "mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"rimraf": "^2.5.4",
- "sinon": "^1.17.6",
- "sinon-chai": "^2.8.0"
+ "xo": "^0.23.0"
},
"main": "./src/index.js",
- "browser": "./src/browser.js"
+ "browser": "./src/browser.js",
+ "unpkg": "./dist/debug.js"
}
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js
index f5149ff52..c924b0ac4 100644
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js
+++ b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/browser.js
@@ -1,38 +1,23 @@
+"use strict";
+
+function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
+
+/* eslint-env browser */
+
/**
* This is the web browser implementation of `debug()`.
- *
- * Expose `debug()` as the module.
*/
-
-exports = module.exports = require('./debug');
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
-exports.storage = 'undefined' != typeof chrome
- && 'undefined' != typeof chrome.storage
- ? chrome.storage.local
- : localstorage();
-
+exports.storage = localstorage();
/**
* Colors.
*/
-exports.colors = [
- '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
- '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
- '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
- '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
- '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
- '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
- '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
- '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
- '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
- '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
- '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
-];
-
+exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
/**
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
* and the Firebug extension (any Firefox version) are known
@@ -40,84 +25,65 @@ exports.colors = [
*
* TODO: add a `localStorage` variable to explicitly enable/disable colors
*/
+// eslint-disable-next-line complexity
function useColors() {
// NB: In an Electron preload script, document will be defined but not fully
// initialized. Since we know we're in Chrome, we'll just detect this case
// explicitly
- if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
return true;
- }
+ } // Internet Explorer and Edge do not support colors.
+
- // Internet Explorer and Edge do not support colors.
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
return false;
- }
-
- // is webkit? http://stackoverflow.com/a/16459606/376773
+ } // Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
- // is firebug? http://stackoverflow.com/a/398120/376773
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
- // is firefox >= v31?
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
- // double check webkit in userAgent just in case we are in a worker
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
-}
-
-/**
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
- */
-
-exports.formatters.j = function(v) {
- try {
- return JSON.stringify(v);
- } catch (err) {
- return '[UnexpectedJSONParseError]: ' + err.message;
- }
-};
+ return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
+ typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
+ typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
+}
/**
* Colorize log arguments if enabled.
*
* @api public
*/
-function formatArgs(args) {
- var useColors = this.useColors;
- args[0] = (useColors ? '%c' : '')
- + this.namespace
- + (useColors ? ' %c' : ' ')
- + args[0]
- + (useColors ? '%c ' : ' ')
- + '+' + exports.humanize(this.diff);
+function formatArgs(args) {
+ args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
- if (!useColors) return;
+ if (!this.useColors) {
+ return;
+ }
var c = 'color: ' + this.color;
- args.splice(1, 0, c, 'color: inherit')
-
- // the final "%c" is somewhat tricky, because there could be other
+ args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
// arguments passed either before or after the %c, so we need to
// figure out the correct index to insert the CSS into
+
var index = 0;
var lastC = 0;
- args[0].replace(/%[a-zA-Z%]/g, function(match) {
- if ('%%' === match) return;
+ args[0].replace(/%[a-zA-Z%]/g, function (match) {
+ if (match === '%%') {
+ return;
+ }
+
index++;
- if ('%c' === match) {
- // we only are interested in the *last* %c
+
+ if (match === '%c') {
+ // We only are interested in the *last* %c
// (the user may have provided their own)
lastC = index;
}
});
-
args.splice(lastC, 0, c);
}
-
/**
* Invokes `console.log()` when available.
* No-op when `console.log` is not a "function".
@@ -125,14 +91,14 @@ function formatArgs(args) {
* @api public
*/
+
function log() {
- // this hackery is required for IE8/9, where
+ var _console;
+
+ // This hackery is required for IE8/9, where
// the `console.log` function doesn't have 'apply'
- return 'object' === typeof console
- && console.log
- && Function.prototype.apply.call(console.log, console, arguments);
+ return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
}
-
/**
* Save `namespaces`.
*
@@ -140,16 +106,18 @@ function log() {
* @api private
*/
+
function save(namespaces) {
try {
- if (null == namespaces) {
- exports.storage.removeItem('debug');
+ if (namespaces) {
+ exports.storage.setItem('debug', namespaces);
} else {
- exports.storage.debug = namespaces;
+ exports.storage.removeItem('debug');
}
- } catch(e) {}
+ } catch (error) {// Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
}
-
/**
* Load `namespaces`.
*
@@ -157,26 +125,23 @@ function save(namespaces) {
* @api private
*/
+
function load() {
var r;
- try {
- r = exports.storage.debug;
- } catch(e) {}
+ try {
+ r = exports.storage.getItem('debug');
+ } catch (error) {} // Swallow
+ // XXX (@Qix-) should we be logging these?
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
+
+
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}
return r;
}
-
-/**
- * Enable namespaces listed in `localStorage.debug` initially.
- */
-
-exports.enable(load());
-
/**
* Localstorage attempts to return the localstorage.
*
@@ -188,8 +153,28 @@ exports.enable(load());
* @api private
*/
+
function localstorage() {
try {
- return window.localStorage;
- } catch (e) {}
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
+ // The Browser also has localStorage in the global context.
+ return localStorage;
+ } catch (error) {// Swallow
+ // XXX (@Qix-) should we be logging these?
+ }
}
+
+module.exports = require('./common')(exports);
+var formatters = module.exports.formatters;
+/**
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
+ */
+
+formatters.j = function (v) {
+ try {
+ return JSON.stringify(v);
+ } catch (error) {
+ return '[UnexpectedJSONParseError]: ' + error.message;
+ }
+};
+
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/debug.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/debug.js
deleted file mode 100644
index 77e6384a3..000000000
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/debug.js
+++ /dev/null
@@ -1,225 +0,0 @@
-
-/**
- * This is the common logic for both the Node.js and web browser
- * implementations of `debug()`.
- *
- * Expose `debug()` as the module.
- */
-
-exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
-exports.coerce = coerce;
-exports.disable = disable;
-exports.enable = enable;
-exports.enabled = enabled;
-exports.humanize = require('ms');
-
-/**
- * Active `debug` instances.
- */
-exports.instances = [];
-
-/**
- * The currently active debug mode names, and names to skip.
- */
-
-exports.names = [];
-exports.skips = [];
-
-/**
- * Map of special "%n" handling functions, for the debug "format" argument.
- *
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
- */
-
-exports.formatters = {};
-
-/**
- * Select a color.
- * @param {String} namespace
- * @return {Number}
- * @api private
- */
-
-function selectColor(namespace) {
- var hash = 0, i;
-
- for (i in namespace) {
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
- hash |= 0; // Convert to 32bit integer
- }
-
- return exports.colors[Math.abs(hash) % exports.colors.length];
-}
-
-/**
- * Create a debugger with the given `namespace`.
- *
- * @param {String} namespace
- * @return {Function}
- * @api public
- */
-
-function createDebug(namespace) {
-
- var prevTime;
-
- function debug() {
- // disabled?
- if (!debug.enabled) return;
-
- var self = debug;
-
- // set `diff` timestamp
- var curr = +new Date();
- var ms = curr - (prevTime || curr);
- self.diff = ms;
- self.prev = prevTime;
- self.curr = curr;
- prevTime = curr;
-
- // turn the `arguments` into a proper Array
- var args = new Array(arguments.length);
- for (var i = 0; i < args.length; i++) {
- args[i] = arguments[i];
- }
-
- args[0] = exports.coerce(args[0]);
-
- if ('string' !== typeof args[0]) {
- // anything else let's inspect with %O
- args.unshift('%O');
- }
-
- // apply any `formatters` transformations
- var index = 0;
- args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
- // if we encounter an escaped % then don't increase the array index
- if (match === '%%') return match;
- index++;
- var formatter = exports.formatters[format];
- if ('function' === typeof formatter) {
- var val = args[index];
- match = formatter.call(self, val);
-
- // now we need to remove `args[index]` since it's inlined in the `format`
- args.splice(index, 1);
- index--;
- }
- return match;
- });
-
- // apply env-specific formatting (colors, etc.)
- exports.formatArgs.call(self, args);
-
- var logFn = debug.log || exports.log || console.log.bind(console);
- logFn.apply(self, args);
- }
-
- debug.namespace = namespace;
- debug.enabled = exports.enabled(namespace);
- debug.useColors = exports.useColors();
- debug.color = selectColor(namespace);
- debug.destroy = destroy;
-
- // env-specific initialization logic for debug instances
- if ('function' === typeof exports.init) {
- exports.init(debug);
- }
-
- exports.instances.push(debug);
-
- return debug;
-}
-
-function destroy () {
- var index = exports.instances.indexOf(this);
- if (index !== -1) {
- exports.instances.splice(index, 1);
- return true;
- } else {
- return false;
- }
-}
-
-/**
- * Enables a debug mode by namespaces. This can include modes
- * separated by a colon and wildcards.
- *
- * @param {String} namespaces
- * @api public
- */
-
-function enable(namespaces) {
- exports.save(namespaces);
-
- exports.names = [];
- exports.skips = [];
-
- var i;
- var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
- var len = split.length;
-
- for (i = 0; i < len; i++) {
- if (!split[i]) continue; // ignore empty strings
- namespaces = split[i].replace(/\*/g, '.*?');
- if (namespaces[0] === '-') {
- exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
- } else {
- exports.names.push(new RegExp('^' + namespaces + '$'));
- }
- }
-
- for (i = 0; i < exports.instances.length; i++) {
- var instance = exports.instances[i];
- instance.enabled = exports.enabled(instance.namespace);
- }
-}
-
-/**
- * Disable debug output.
- *
- * @api public
- */
-
-function disable() {
- exports.enable('');
-}
-
-/**
- * Returns true if the given mode name is enabled, false otherwise.
- *
- * @param {String} name
- * @return {Boolean}
- * @api public
- */
-
-function enabled(name) {
- if (name[name.length - 1] === '*') {
- return true;
- }
- var i, len;
- for (i = 0, len = exports.skips.length; i < len; i++) {
- if (exports.skips[i].test(name)) {
- return false;
- }
- }
- for (i = 0, len = exports.names.length; i < len; i++) {
- if (exports.names[i].test(name)) {
- return true;
- }
- }
- return false;
-}
-
-/**
- * Coerce `val`.
- *
- * @param {Mixed} val
- * @return {Mixed}
- * @api private
- */
-
-function coerce(val) {
- if (val instanceof Error) return val.stack || val.message;
- return val;
-}
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js
index cabcbcda1..021731593 100644
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js
+++ b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/index.js
@@ -1,10 +1,12 @@
+"use strict";
+
/**
- * Detect Electron renderer process, which is node, but we should
+ * Detect Electron renderer / nwjs process, which is node, but we should
* treat as a browser.
*/
-
-if (typeof process === 'undefined' || process.type === 'renderer') {
+if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
module.exports = require('./browser.js');
} else {
module.exports = require('./node.js');
}
+
diff --git a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js
index d666fb9c0..dbbb5f108 100644
--- a/node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js
+++ b/node_modules/istanbul-lib-source-maps/node_modules/debug/src/node.js
@@ -1,44 +1,37 @@
+"use strict";
+
/**
* Module dependencies.
*/
-
var tty = require('tty');
-var util = require('util');
+var util = require('util');
/**
* This is the Node.js implementation of `debug()`.
- *
- * Expose `debug()` as the module.
*/
-exports = module.exports = require('./debug');
+
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
-
/**
* Colors.
*/
-exports.colors = [ 6, 2, 3, 4, 5, 1 ];
+exports.colors = [6, 2, 3, 4, 5, 1];
try {
+ // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
+ // eslint-disable-next-line import/no-extraneous-dependencies
var supportsColor = require('supports-color');
- if (supportsColor && supportsColor.level >= 2) {
- exports.colors = [
- 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
- 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
- 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
- 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
- 205, 206, 207, 208, 209, 214, 215, 220, 221
- ];
+
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
+ exports.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
}
-} catch (err) {
- // swallow - we only care if `supports-color` is available; it doesn't have to be.
-}
+} catch (error) {} // Swallow - we only care if `supports-color` is available; it doesn't have to be.
/**
* Build up the default `inspectOpts` object from the environment variables.
@@ -46,74 +39,54 @@ try {
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
+
exports.inspectOpts = Object.keys(process.env).filter(function (key) {
return /^debug_/i.test(key);
}).reduce(function (obj, key) {
- // camel-case
- var prop = key
- .substring(6)
- .toLowerCase()
- .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
+ // Camel-case
+ var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function (_, k) {
+ return k.toUpperCase();
+ }); // Coerce string value into JS value
- // coerce string value into JS value
var val = process.env[key];
- if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
- else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
- else if (val === 'null') val = null;
- else val = Number(val);
+
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
+ val = true;
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
+ val = false;
+ } else if (val === 'null') {
+ val = null;
+ } else {
+ val = Number(val);
+ }
obj[prop] = val;
return obj;
}, {});
-
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
- return 'colors' in exports.inspectOpts
- ? Boolean(exports.inspectOpts.colors)
- : tty.isatty(process.stderr.fd);
+ return 'colors' in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
}
-
-/**
- * Map %o to `util.inspect()`, all on a single line.
- */
-
-exports.formatters.o = function(v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts)
- .split('\n').map(function(str) {
- return str.trim()
- }).join(' ');
-};
-
-/**
- * Map %o to `util.inspect()`, allowing multiple lines if needed.
- */
-
-exports.formatters.O = function(v) {
- this.inspectOpts.colors = this.useColors;
- return util.inspect(v, this.inspectOpts);
-};
-
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
+
function formatArgs(args) {
- var name = this.namespace;
- var useColors = this.useColors;
+ var name = this.namespace,
+ useColors = this.useColors;
if (useColors) {
var c = this.color;
- var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
- var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
-
+ var colorCode = "\x1B[3" + (c < 8 ? c : '8;5;' + c);
+ var prefix = " ".concat(colorCode, ";1m").concat(name, " \x1B[0m");
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
- args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + "\x1B[0m");
} else {
args[0] = getDate() + name + ' ' + args[0];
}
@@ -122,19 +95,18 @@ function formatArgs(args) {
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
- } else {
- return new Date().toISOString() + ' ';
}
-}
+ return new Date().toISOString() + ' ';
+}
/**
* Invokes `util.format()` with the specified arguments and writes to stderr.
*/
+
function log() {
return process.stderr.write(util.format.apply(util, arguments) + '\n');
}
-
/**
* Save `namespaces`.
*
@@ -142,16 +114,16 @@ function log() {
* @api private
*/
+
function save(namespaces) {
- if (null == namespaces) {
+ if (namespaces) {
+ process.env.DEBUG = namespaces;
+ } else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
- } else {
- process.env.DEBUG = namespaces;
}
}
-
/**
* Load `namespaces`.
*
@@ -159,10 +131,10 @@ function save(namespaces) {
* @api private
*/
+
function load() {
return process.env.DEBUG;
}
-
/**
* Init logic for `debug` instances.
*
@@ -170,17 +142,33 @@ function load() {
* differently for a particular `debug` instance.
*/
-function init (debug) {
- debug.inspectOpts = {};
+function init(debug) {
+ debug.inspectOpts = {};
var keys = Object.keys(exports.inspectOpts);
+
for (var i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
+module.exports = require('./common')(exports);
+var formatters = module.exports.formatters;
+/**
+ * Map %o to `util.inspect()`, all on a single line.
+ */
+
+formatters.o = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
+};
/**
- * Enable namespaces listed in `process.env.DEBUG` initially.
+ * Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
-exports.enable(load());
+
+formatters.O = function (v) {
+ this.inspectOpts.colors = this.useColors;
+ return util.inspect(v, this.inspectOpts);
+};
+
diff --git a/node_modules/istanbul-lib-source-maps/package.json b/node_modules/istanbul-lib-source-maps/package.json
index ef812c51c..2e595383a 100644
--- a/node_modules/istanbul-lib-source-maps/package.json
+++ b/node_modules/istanbul-lib-source-maps/package.json
@@ -1,6 +1,6 @@
{
"name": "istanbul-lib-source-maps",
- "version": "1.2.2",
+ "version": "1.2.6",
"description": "Source maps support for istanbul",
"author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>",
"main": "index.js",
@@ -14,7 +14,7 @@
},
"dependencies": {
"debug": "^3.1.0",
- "istanbul-lib-coverage": "^1.1.1",
+ "istanbul-lib-coverage": "^1.2.1",
"mkdirp": "^0.5.1",
"rimraf": "^2.6.1",
"source-map": "^0.5.3"