Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

547
node_modules/stack-utils/index.js generated vendored
View File

@@ -1,215 +1,309 @@
'use strict';
module.exports = StackUtils;
function StackUtils(opts) {
if (!(this instanceof StackUtils)) {
throw new Error('StackUtils constructor must be called with new');
}
opts = opts || {};
this._cwd = (opts.cwd || process.cwd()).replace(/\\/g, '/');
this._internals = opts.internals || [];
this._wrapCallSite = opts.wrapCallSite || false;
}
const escapeStringRegexp = require('escape-string-regexp');
module.exports.nodeInternals = nodeInternals;
const natives = [].concat(
require('module').builtinModules,
'bootstrap_node',
'node',
).map(n => new RegExp(`(?:\\(${n}\\.js:\\d+:\\d+\\)$|^\\s*at ${n}\\.js:\\d+:\\d+$)`));
function nodeInternals() {
if (!module.exports.natives) {
module.exports.natives = Object.keys(process.binding('natives'));
module.exports.natives.push('bootstrap_node', 'node',
'internal/bootstrap/node');
natives.push(
/\(internal\/[^:]+:\d+:\d+\)$/,
/\s*at internal\/[^:]+:\d+:\d+$/,
/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/
);
class StackUtils {
constructor (opts) {
opts = {
ignoredPackages: [],
...opts
};
if ('internals' in opts === false) {
opts.internals = StackUtils.nodeInternals();
}
if ('cwd' in opts === false) {
opts.cwd = process.cwd()
}
this._cwd = opts.cwd.replace(/\\/g, '/');
this._internals = [].concat(
opts.internals,
ignoredPackagesRegExp(opts.ignoredPackages)
);
this._wrapCallSite = opts.wrapCallSite || false;
}
return module.exports.natives.map(function (n) {
return new RegExp('\\(' + n + '\\.js:\\d+:\\d+\\)$');
}).concat([
/\s*at (bootstrap_)?node\.js:\d+:\d+?$/,
/\(internal\/[^:]+:\d+:\d+\)$/,
/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/
]);
}
StackUtils.prototype.clean = function (stack) {
if (!Array.isArray(stack)) {
stack = stack.split('\n');
static nodeInternals () {
return [...natives];
}
if (!(/^\s*at /.test(stack[0])) &&
(/^\s*at /.test(stack[1]))) {
stack = stack.slice(1);
}
clean (stack, indent = 0) {
indent = ' '.repeat(indent);
var outdent = false;
var lastNonAtLine = null;
var result = [];
if (!Array.isArray(stack)) {
stack = stack.split('\n');
}
stack.forEach(function (st) {
st = st.replace(/\\/g, '/');
var isInternal = this._internals.some(function (internal) {
return internal.test(st);
if (!(/^\s*at /.test(stack[0])) && (/^\s*at /.test(stack[1]))) {
stack = stack.slice(1);
}
let outdent = false;
let lastNonAtLine = null;
const result = [];
stack.forEach(st => {
st = st.replace(/\\/g, '/');
if (this._internals.some(internal => internal.test(st))) {
return;
}
const isAtLine = /^\s*at /.test(st);
if (outdent) {
st = st.trimEnd().replace(/^(\s+)at /, '$1');
} else {
st = st.trim();
if (isAtLine) {
st = st.slice(3);
}
}
st = st.replace(`${this._cwd}/`, '');
if (st) {
if (isAtLine) {
if (lastNonAtLine) {
result.push(lastNonAtLine);
lastNonAtLine = null;
}
result.push(st);
} else {
outdent = true;
lastNonAtLine = st;
}
}
});
if (isInternal) {
return result.map(line => `${indent}${line}\n`).join('');
}
captureString (limit, fn = this.captureString) {
if (typeof limit === 'function') {
fn = limit;
limit = Infinity;
}
const {stackTraceLimit} = Error;
if (limit) {
Error.stackTraceLimit = limit;
}
const obj = {};
Error.captureStackTrace(obj, fn);
const {stack} = obj;
Error.stackTraceLimit = stackTraceLimit;
return this.clean(stack);
}
capture (limit, fn = this.capture) {
if (typeof limit === 'function') {
fn = limit;
limit = Infinity;
}
const {prepareStackTrace, stackTraceLimit} = Error;
Error.prepareStackTrace = (obj, site) => {
if (this._wrapCallSite) {
return site.map(this._wrapCallSite);
}
return site;
};
if (limit) {
Error.stackTraceLimit = limit;
}
const obj = {};
Error.captureStackTrace(obj, fn);
const { stack } = obj;
Object.assign(Error, {prepareStackTrace, stackTraceLimit});
return stack;
}
at (fn = this.at) {
const [site] = this.capture(1, fn);
if (!site) {
return {};
}
const res = {
line: site.getLineNumber(),
column: site.getColumnNumber()
};
setFile(res, site.getFileName(), this._cwd);
if (site.isConstructor()) {
res.constructor = true;
}
if (site.isEval()) {
res.evalOrigin = site.getEvalOrigin();
}
// Node v10 stopped with the isNative() on callsites, apparently
/* istanbul ignore next */
if (site.isNative()) {
res.native = true;
}
let typename;
try {
typename = site.getTypeName();
} catch (_) {
}
if (typename && typename !== 'Object' && typename !== '[object Object]') {
res.type = typename;
}
const fname = site.getFunctionName();
if (fname) {
res.function = fname;
}
const meth = site.getMethodName();
if (meth && fname !== meth) {
res.method = meth;
}
return res;
}
parseLine (line) {
const match = line && line.match(re);
if (!match) {
return null;
}
var isAtLine = /^\s*at /.test(st);
const ctor = match[1] === 'new';
let fname = match[2];
const evalOrigin = match[3];
const evalFile = match[4];
const evalLine = Number(match[5]);
const evalCol = Number(match[6]);
let file = match[7];
const lnum = match[8];
const col = match[9];
const native = match[10] === 'native';
const closeParen = match[11] === ')';
let method;
if (outdent) {
st = st.replace(/\s+$/, '').replace(/^(\s+)at /, '$1');
} else {
st = st.trim();
if (isAtLine) {
st = st.substring(3);
}
const res = {};
if (lnum) {
res.line = Number(lnum);
}
st = st.replace(this._cwd + '/', '');
if (col) {
res.column = Number(col);
}
if (st) {
if (isAtLine) {
if (lastNonAtLine) {
result.push(lastNonAtLine);
lastNonAtLine = null;
if (closeParen && file) {
// make sure parens are balanced
// if we have a file like "asdf) [as foo] (xyz.js", then odds are
// that the fname should be += " (asdf) [as foo]" and the file
// should be just "xyz.js"
// walk backwards from the end to find the last unbalanced (
let closes = 0;
for (let i = file.length - 1; i > 0; i--) {
if (file.charAt(i) === ')') {
closes++;
} else if (file.charAt(i) === '(' && file.charAt(i - 1) === ' ') {
closes--;
if (closes === -1 && file.charAt(i - 1) === ' ') {
const before = file.slice(0, i - 1);
const after = file.slice(i + 1);
file = after;
fname += ` (${before}`;
break;
}
}
result.push(st);
} else {
outdent = true;
lastNonAtLine = st;
}
}
}, this);
stack = result.join('\n').trim();
if (stack) {
return stack + '\n';
}
return '';
};
StackUtils.prototype.captureString = function (limit, fn) {
if (typeof limit === 'function') {
fn = limit;
limit = Infinity;
}
if (!fn) {
fn = this.captureString;
}
var limitBefore = Error.stackTraceLimit;
if (limit) {
Error.stackTraceLimit = limit;
}
var obj = {};
Error.captureStackTrace(obj, fn);
var stack = obj.stack;
Error.stackTraceLimit = limitBefore;
return this.clean(stack);
};
StackUtils.prototype.capture = function (limit, fn) {
if (typeof limit === 'function') {
fn = limit;
limit = Infinity;
}
if (!fn) {
fn = this.capture;
}
var prepBefore = Error.prepareStackTrace;
var limitBefore = Error.stackTraceLimit;
var wrapCallSite = this._wrapCallSite;
Error.prepareStackTrace = function (obj, site) {
if (wrapCallSite) {
return site.map(wrapCallSite);
if (fname) {
const methodMatch = fname.match(methodRe);
if (methodMatch) {
fname = methodMatch[1];
method = methodMatch[2];
}
}
return site;
};
if (limit) {
Error.stackTraceLimit = limit;
setFile(res, file, this._cwd);
if (ctor) {
res.constructor = true;
}
if (evalOrigin) {
res.evalOrigin = evalOrigin;
res.evalLine = evalLine;
res.evalColumn = evalCol;
res.evalFile = evalFile && evalFile.replace(/\\/g, '/');
}
if (native) {
res.native = true;
}
if (fname) {
res.function = fname;
}
if (method && fname !== method) {
res.method = method;
}
return res;
}
}
var obj = {};
Error.captureStackTrace(obj, fn);
var stack = obj.stack;
Error.prepareStackTrace = prepBefore;
Error.stackTraceLimit = limitBefore;
return stack;
};
StackUtils.prototype.at = function at(fn) {
if (!fn) {
fn = at;
}
var site = this.capture(1, fn)[0];
if (!site) {
return {};
}
var res = {
line: site.getLineNumber(),
column: site.getColumnNumber()
};
this._setFile(res, site.getFileName());
if (site.isConstructor()) {
res.constructor = true;
}
if (site.isEval()) {
res.evalOrigin = site.getEvalOrigin();
}
// Node v10 stopped with the isNative() on callsites, apparently
/* istanbul ignore next */
if (site.isNative()) {
res.native = true;
}
var typename = null;
try {
typename = site.getTypeName();
} catch (er) {}
if (typename &&
typename !== 'Object' &&
typename !== '[object Object]') {
res.type = typename;
}
var fname = site.getFunctionName();
if (fname) {
res.function = fname;
}
var meth = site.getMethodName();
if (meth && fname !== meth) {
res.method = meth;
}
return res;
};
StackUtils.prototype._setFile = function (result, filename) {
function setFile (result, filename, cwd) {
if (filename) {
filename = filename.replace(/\\/g, '/');
if ((filename.indexOf(this._cwd + '/') === 0)) {
filename = filename.substr(this._cwd.length + 1);
if (filename.startsWith(`${cwd}/`)) {
filename = filename.slice(cwd.length + 1);
}
result.file = filename;
}
};
}
var re = new RegExp(
function ignoredPackagesRegExp(ignoredPackages) {
if (ignoredPackages.length === 0) {
return [];
}
const packages = ignoredPackages.map(mod => escapeStringRegexp(mod));
return new RegExp(`[\/\\\\]node_modules[\/\\\\](?:${packages.join('|')})[\/\\\\][^:]+:\\d+:\\d+`)
}
const re = new RegExp(
'^' +
// Sometimes we strip out the ' at' because it's noisy
'(?:\\s*at )?' +
@@ -235,97 +329,6 @@ var re = new RegExp(
'(\\)?)$'
);
var methodRe = /^(.*?) \[as (.*?)\]$/;
const methodRe = /^(.*?) \[as (.*?)\]$/;
StackUtils.prototype.parseLine = function parseLine(line) {
var match = line && line.match(re);
if (!match) {
return null;
}
var ctor = match[1] === 'new';
var fname = match[2];
var evalOrigin = match[3];
var evalFile = match[4];
var evalLine = Number(match[5]);
var evalCol = Number(match[6]);
var file = match[7];
var lnum = match[8];
var col = match[9];
var native = match[10] === 'native';
var closeParen = match[11] === ')';
var res = {};
if (lnum) {
res.line = Number(lnum);
}
if (col) {
res.column = Number(col);
}
if (closeParen && file) {
// make sure parens are balanced
// if we have a file like "asdf) [as foo] (xyz.js", then odds are
// that the fname should be += " (asdf) [as foo]" and the file
// should be just "xyz.js"
// walk backwards from the end to find the last unbalanced (
var closes = 0;
for (var i = file.length - 1; i > 0; i--) {
if (file.charAt(i) === ')') {
closes ++;
} else if (file.charAt(i) === '(' && file.charAt(i - 1) === ' ') {
closes --;
if (closes === -1 && file.charAt(i - 1) === ' ') {
var before = file.substr(0, i - 1);
var after = file.substr(i + 1);
file = after;
fname += ' (' + before;
break;
}
}
}
}
if (fname) {
var methodMatch = fname.match(methodRe);
if (methodMatch) {
fname = methodMatch[1];
var meth = methodMatch[2];
}
}
this._setFile(res, file);
if (ctor) {
res.constructor = true;
}
if (evalOrigin) {
res.evalOrigin = evalOrigin;
res.evalLine = evalLine;
res.evalColumn = evalCol;
res.evalFile = evalFile && evalFile.replace(/\\/g, '/');
}
if (native) {
res.native = true;
}
if (fname) {
res.function = fname;
}
if (meth && fname !== meth) {
res.method = meth;
}
return res;
};
var bound = new StackUtils();
Object.keys(StackUtils.prototype).forEach(function (key) {
StackUtils[key] = bound[key].bind(bound);
});
module.exports = StackUtils;

2
node_modules/stack-utils/license generated vendored
View File

@@ -2,8 +2,6 @@ The MIT License (MIT)
Copyright (c) Isaac Z. Schlueter <i@izs.me>, James Talmage <james@talmage.io> (github.com/jamestalmage), and Contributors
Extracted from code in node-tap http://www.node-tap.org/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights

View File

@@ -0,0 +1,18 @@
/**
Escape RegExp special characters.
You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
@example
```
import escapeStringRegexp = require('escape-string-regexp');
const escapedString = escapeStringRegexp('How much $ for a 🦄?');
//=> 'How much \\$ for a 🦄\\?'
new RegExp(escapedString);
```
*/
declare const escapeStringRegexp: (string: string) => string;
export = escapeStringRegexp;

View File

@@ -0,0 +1,11 @@
'use strict';
const matchOperatorsRegex = /[|\\{}()[\]^$+*?.-]/g;
module.exports = string => {
if (typeof string !== 'string') {
throw new TypeError('Expected a string');
}
return string.replace(matchOperatorsRegex, '\\$&');
};

View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,83 @@
{
"_from": "escape-string-regexp@^2.0.0",
"_id": "escape-string-regexp@2.0.0",
"_inBundle": false,
"_integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"_location": "/stack-utils/escape-string-regexp",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "escape-string-regexp@^2.0.0",
"name": "escape-string-regexp",
"escapedName": "escape-string-regexp",
"rawSpec": "^2.0.0",
"saveSpec": null,
"fetchSpec": "^2.0.0"
},
"_requiredBy": [
"/stack-utils"
],
"_resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"_shasum": "a30304e99daa32e23b2fd20f51babd07cffca344",
"_spec": "escape-string-regexp@^2.0.0",
"_where": "/home/codespace/workspace/upload-google-play/node_modules/stack-utils",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/escape-string-regexp/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Escape RegExp special characters",
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
},
"engines": {
"node": ">=8"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/sindresorhus/escape-string-regexp#readme",
"keywords": [
"escape",
"regex",
"regexp",
"re",
"regular",
"expression",
"string",
"str",
"special",
"characters"
],
"license": "MIT",
"maintainers": [
{
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
{
"name": "Joshua Boy Nicolai Appelman",
"email": "joshua@jbna.nl",
"url": "jbna.nl"
}
],
"name": "escape-string-regexp",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/escape-string-regexp.git"
},
"scripts": {
"test": "xo && ava && tsd"
},
"version": "2.0.0"
}

View File

@@ -0,0 +1,29 @@
# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
> Escape RegExp special characters
## Install
```
$ npm install escape-string-regexp
```
## Usage
```js
const escapeStringRegexp = require('escape-string-regexp');
const escapedString = escapeStringRegexp('How much $ for a 🦄?');
//=> 'How much \\$ for a 🦄\\?'
new RegExp(escapedString);
```
You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@@ -1,34 +1,28 @@
{
"_args": [
[
"stack-utils@1.0.2",
"/Users/drew.heavner/Documents/Github/upload-google-play"
]
],
"_development": true,
"_from": "stack-utils@1.0.2",
"_id": "stack-utils@1.0.2",
"_from": "stack-utils@^2.0.2",
"_id": "stack-utils@2.0.2",
"_inBundle": false,
"_integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==",
"_integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==",
"_location": "/stack-utils",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "stack-utils@1.0.2",
"raw": "stack-utils@^2.0.2",
"name": "stack-utils",
"escapedName": "stack-utils",
"rawSpec": "1.0.2",
"rawSpec": "^2.0.2",
"saveSpec": null,
"fetchSpec": "1.0.2"
"fetchSpec": "^2.0.2"
},
"_requiredBy": [
"/jest-circus",
"/jest-message-util"
],
"_resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz",
"_spec": "1.0.2",
"_where": "/Users/drew.heavner/Documents/Github/upload-google-play",
"_resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz",
"_shasum": "5cf48b4557becb4638d0bc4f21d23f5d19586593",
"_spec": "stack-utils@^2.0.2",
"_where": "/home/codespace/workspace/upload-google-play/node_modules/jest-message-util",
"author": {
"name": "James Talmage",
"email": "james@talmage.io",
@@ -37,25 +31,27 @@
"bugs": {
"url": "https://github.com/tapjs/stack-utils/issues"
},
"dependencies": {},
"bundleDependencies": false,
"dependencies": {
"escape-string-regexp": "^2.0.0"
},
"deprecated": false,
"description": "Captures and cleans stack traces",
"devDependencies": {
"bluebird": "^3.1.1",
"coveralls": "^2.11.6",
"flatten": "0.0.1",
"nested-error-stacks": "^2.0.0",
"pify": "^2.3.0",
"q": "^1.4.1",
"tap": "^10.3.2"
"bluebird": "^3.7.2",
"coveralls": "^3.0.9",
"nested-error-stacks": "^2.1.0",
"pify": "^4.0.1",
"q": "^1.5.1",
"tap": "=14.10.2-unbundled"
},
"engines": {
"node": ">=0.10.0"
"node": ">=10"
},
"files": [
"index.js"
],
"homepage": "https://github.com/tapjs/stack-utils#readme",
"keywords": [],
"license": "MIT",
"name": "stack-utils",
"repository": {
@@ -63,10 +59,10 @@
"url": "git+https://github.com/tapjs/stack-utils.git"
},
"scripts": {
"postpublish": "git push origin --all; git push origin --tags",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"preversion": "npm test",
"test": "tap test/*.js --100 -J"
"test": "tap --no-esm --100"
},
"version": "1.0.2"
"version": "2.0.2"
}

17
node_modules/stack-utils/readme.md generated vendored
View File

@@ -39,7 +39,17 @@ Creates a new `stackUtils` instance.
Type: `array` of `RegularExpression`s
A set of regular expressions that match internal stack stack trace lines which should be culled from the stack trace.
`StackUtils.nodeInternals()` returns a relatively set of sensible defaults for use on the node platform.
The default is `StackUtils.nodeInternals()`, this can be disabled by setting `[]` or appended using
`StackUtils.nodeInternals().concat(additionalRegExp)`. See also `ignoredPackages`.
##### ignoredPackages
Type: `array` of `string`s
An array of npm modules to be culled from the stack trace. This list will mapped to regular
expressions and merged with the `internals`.
Default `''`.
##### cwd
@@ -59,11 +69,12 @@ A mapping function for manipulating CallSites before processing. The first argum
Returns an array of regular expressions that be used to cull lines from the stack trace that reference common Node.js internal files.
### stackUtils.clean(stack)
### stackUtils.clean(stack, indent = 0)
Cleans up a stack trace by deleting any lines that match the `internals` passed to the constructor, and shortening file names relative to `cwd`.
Returns a `string` with the cleaned up stack (always terminated with a `\n` newline character).
Spaces at the start of each line are trimmed, indentation can be added by setting `indent` to the desired number of spaces.
#### stack
@@ -106,7 +117,7 @@ The available properties are:
- `constructor`: `boolean`
- `evalOrigin`: `string`
- `native`: `boolean`
- `typename`: `string`
- `type`: `string`
- `function`: `string`
- `method`: `string`