Update checked-in dependencies
This commit is contained in:
parent
4fad06f438
commit
40a500c743
4168 changed files with 298222 additions and 374905 deletions
35
node_modules/clean-stack/index.d.ts
generated
vendored
35
node_modules/clean-stack/index.d.ts
generated
vendored
|
|
@ -1,24 +1,32 @@
|
|||
declare namespace cleanStack {
|
||||
interface Options {
|
||||
/**
|
||||
Prettify the file paths in the stack:
|
||||
export interface Options {
|
||||
/**
|
||||
Prettify the file paths in the stack:
|
||||
|
||||
`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15`
|
||||
`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15`
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly pretty?: boolean;
|
||||
}
|
||||
@default false
|
||||
*/
|
||||
readonly pretty?: boolean;
|
||||
|
||||
/**
|
||||
Remove the given base path from stack trace file paths, effectively turning absolute paths into relative ones.
|
||||
|
||||
Example with `'/Users/sindresorhus/dev/clean-stack/'` as `basePath`:
|
||||
|
||||
`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `unicorn.js:2:15`
|
||||
*/
|
||||
readonly basePath?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
Clean up error stack traces. Removes the mostly unhelpful internal Node.js entries.
|
||||
|
||||
@param stack - The `stack` property of an `Error`.
|
||||
@returns The cleaned stack or `undefined` if the given `stack` is `undefined`.
|
||||
|
||||
@example
|
||||
```
|
||||
import cleanStack = require('clean-stack');
|
||||
import cleanStack from 'clean-stack';
|
||||
|
||||
const error = new Error('Missing unicorn');
|
||||
|
||||
|
|
@ -39,9 +47,4 @@ console.log(cleanStack(error.stack));
|
|||
// at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
|
||||
```
|
||||
*/
|
||||
declare function cleanStack(
|
||||
stack: string,
|
||||
options?: cleanStack.Options
|
||||
): string;
|
||||
|
||||
export = cleanStack;
|
||||
export default function cleanStack<T extends string | undefined>(stack: T, options?: Options): T;
|
||||
|
|
|
|||
32
node_modules/clean-stack/index.js
generated
vendored
32
node_modules/clean-stack/index.js
generated
vendored
|
|
@ -1,12 +1,16 @@
|
|||
'use strict';
|
||||
const os = require('os');
|
||||
import os from 'os';
|
||||
import escapeStringRegexp from 'escape-string-regexp';
|
||||
|
||||
const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
|
||||
const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
|
||||
const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir();
|
||||
const extractPathRegex = /\s+at.*[(\s](.*)\)?/;
|
||||
const pathRegex = /^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;
|
||||
const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir().replace(/\\/g, '/');
|
||||
|
||||
module.exports = (stack, options) => {
|
||||
options = Object.assign({pretty: false}, options);
|
||||
export default function cleanStack(stack, {pretty = false, basePath} = {}) {
|
||||
const basePathRegex = basePath && new RegExp(`(at | \\()${escapeStringRegexp(basePath.replace(/\\/g, '/'))}`, 'g');
|
||||
|
||||
if (typeof stack !== 'string') {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return stack.replace(/\\/g, '/')
|
||||
.split('\n')
|
||||
|
|
@ -21,7 +25,9 @@ module.exports = (stack, options) => {
|
|||
// Electron
|
||||
if (
|
||||
match.includes('.app/Contents/Resources/electron.asar') ||
|
||||
match.includes('.app/Contents/Resources/default_app.asar')
|
||||
match.includes('.app/Contents/Resources/default_app.asar') ||
|
||||
match.includes('node_modules/electron/dist/resources/electron.asar') ||
|
||||
match.includes('node_modules/electron/dist/resources/default_app.asar')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -30,11 +36,15 @@ module.exports = (stack, options) => {
|
|||
})
|
||||
.filter(line => line.trim() !== '')
|
||||
.map(line => {
|
||||
if (options.pretty) {
|
||||
return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));
|
||||
if (basePathRegex) {
|
||||
line = line.replace(basePathRegex, '$1');
|
||||
}
|
||||
|
||||
if (pretty) {
|
||||
line = line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));
|
||||
}
|
||||
|
||||
return line;
|
||||
})
|
||||
.join('\n');
|
||||
};
|
||||
}
|
||||
|
|
|
|||
2
node_modules/clean-stack/license
generated
vendored
2
node_modules/clean-stack/license
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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:
|
||||
|
||||
|
|
|
|||
16
node_modules/clean-stack/node_modules/escape-string-regexp/index.d.ts
generated
vendored
Normal file
16
node_modules/clean-stack/node_modules/escape-string-regexp/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/**
|
||||
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 from 'escape-string-regexp';
|
||||
|
||||
const escapedString = escapeStringRegexp('How much $ for a 🦄?');
|
||||
//=> 'How much \\$ for a 🦄\\?'
|
||||
|
||||
new RegExp(escapedString);
|
||||
```
|
||||
*/
|
||||
export default function escapeStringRegexp(string: string): string;
|
||||
11
node_modules/clean-stack/node_modules/escape-string-regexp/index.js
generated
vendored
Normal file
11
node_modules/clean-stack/node_modules/escape-string-regexp/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
export default function escapeStringRegexp(string) {
|
||||
if (typeof string !== 'string') {
|
||||
throw new TypeError('Expected a string');
|
||||
}
|
||||
|
||||
// Escape characters with special meaning either inside or outside character sets.
|
||||
// Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.
|
||||
return string
|
||||
.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
|
||||
.replace(/-/g, '\\x2d');
|
||||
}
|
||||
9
node_modules/clean-stack/node_modules/escape-string-regexp/license
generated
vendored
Normal file
9
node_modules/clean-stack/node_modules/escape-string-regexp/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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.
|
||||
40
node_modules/clean-stack/node_modules/escape-string-regexp/package.json
generated
vendored
Normal file
40
node_modules/clean-stack/node_modules/escape-string-regexp/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "escape-string-regexp",
|
||||
"version": "5.0.0",
|
||||
"description": "Escape RegExp special characters",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/escape-string-regexp",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"escape",
|
||||
"regex",
|
||||
"regexp",
|
||||
"regular",
|
||||
"expression",
|
||||
"string",
|
||||
"special",
|
||||
"characters"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
}
|
||||
}
|
||||
34
node_modules/clean-stack/node_modules/escape-string-regexp/readme.md
generated
vendored
Normal file
34
node_modules/clean-stack/node_modules/escape-string-regexp/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# escape-string-regexp
|
||||
|
||||
> Escape RegExp special characters
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install escape-string-regexp
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import escapeStringRegexp from '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.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
19
node_modules/clean-stack/package.json
generated
vendored
19
node_modules/clean-stack/package.json
generated
vendored
|
|
@ -1,16 +1,19 @@
|
|||
{
|
||||
"name": "clean-stack",
|
||||
"version": "2.2.0",
|
||||
"version": "4.2.0",
|
||||
"description": "Clean up error stack traces",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/clean-stack",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
"node": ">=12"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
|
|
@ -25,13 +28,15 @@
|
|||
"trace",
|
||||
"traces",
|
||||
"error",
|
||||
"err",
|
||||
"electron"
|
||||
],
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
},
|
||||
"browser": {
|
||||
"os": false
|
||||
|
|
|
|||
35
node_modules/clean-stack/readme.md
generated
vendored
35
node_modules/clean-stack/readme.md
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
# clean-stack [](https://travis-ci.org/sindresorhus/clean-stack)
|
||||
# clean-stack
|
||||
|
||||
> Clean up error stack traces
|
||||
|
||||
|
|
@ -6,18 +6,16 @@ Removes the mostly unhelpful internal Node.js entries.
|
|||
|
||||
Also works in Electron.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install clean-stack
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const cleanStack = require('clean-stack');
|
||||
import cleanStack from 'clean-stack';
|
||||
|
||||
const error = new Error('Missing unicorn');
|
||||
|
||||
|
|
@ -40,37 +38,42 @@ Error: Missing unicorn
|
|||
*/
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### cleanStack(stack, [options])
|
||||
### cleanStack(stack, options?)
|
||||
|
||||
Returns the cleaned stack or `undefined` if the given `stack` is `undefined`.
|
||||
|
||||
#### stack
|
||||
|
||||
Type: `string`
|
||||
Type: `string | undefined`
|
||||
|
||||
The `stack` property of an `Error`.
|
||||
The `stack` property of an [`Error`](https://github.com/microsoft/TypeScript/blob/eac073894b172ec719ca7f28b0b94fc6e6e7d4cf/lib/lib.es5.d.ts#L972-L976).
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
Type: `object`
|
||||
|
||||
##### pretty
|
||||
|
||||
Type: `boolean`<br>
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
Prettify the file paths in the stack:
|
||||
|
||||
`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15`
|
||||
|
||||
##### basePath
|
||||
|
||||
Type: `string?`
|
||||
|
||||
Remove the given base path from stack trace file paths, effectively turning absolute paths into relative ones.
|
||||
|
||||
Example with `'/Users/sindresorhus/dev/clean-stack/'` as `basePath`:
|
||||
|
||||
`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `unicorn.js:2:15`
|
||||
|
||||
## Related
|
||||
|
||||
- [extrack-stack](https://github.com/sindresorhus/extract-stack) - Extract the actual stack of an error
|
||||
- [extract-stack](https://github.com/sindresorhus/extract-stack) - Extract the actual stack of an error
|
||||
- [stack-utils](https://github.com/tapjs/stack-utils) - Captures and cleans stack traces
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue