diff --git a/node_modules/.gitignore b/node_modules/.gitignore index 89ca630fecdde..69731618ef376 100644 --- a/node_modules/.gitignore +++ b/node_modules/.gitignore @@ -66,6 +66,7 @@ readme* /acorn-globals /acorn-jsx /acorn-walk +/ajv /ansi-colors /anymatch /append-transform @@ -73,12 +74,18 @@ readme* /array-find-index /array-includes /array.prototype.flat +/asn1 +/assert-plus /astral-regex /async-hook-domain +/asynckit +/aws-sign2 +/aws4 /babel-plugin-apply-mdx-type-prop /babel-plugin-extract-import-names /bail /base64-js +/bcrypt-pbkdf /bind-obj-methods /bindings /bl @@ -91,6 +98,7 @@ readme* /callsites /camelcase /camelcase-css +/caseless /ccount /character-entities /character-entities-legacy @@ -99,14 +107,17 @@ readme* /cliui /cmark-gfm /collapse-white-space +/combined-stream /comma-separated-tokens /commondir /convert-source-map +/core-util-is /correct-license-metadata /coveralls /cross-spawn /cssom /cssstyle +/dashdash /data-urls /decamelize /decimal.js @@ -115,12 +126,14 @@ readme* /deep-is /default-require-extensions /define-properties +/delayed-stream /detab /detect-libc /docopt /docs /doctrine /domexception +/ecc-jsbn /end-of-stream /enquirer /error-ex @@ -148,6 +161,10 @@ readme* /esutils /events-to-array /expand-template +/extend +/extsprintf +/fast-deep-equal +/fast-json-stable-stringify /fast-levenshtein /file-entry-cache /file-uri-to-path @@ -158,6 +175,7 @@ readme* /flat-cache /flatted /foreground-child +/forever-agent /form-data /fromentries /fs-access @@ -170,9 +188,12 @@ readme* /get-caller-file /get-intrinsic /get-package-type +/getpass /github-from-package /glob-parent /globals +/har-schema +/har-validator /has-bigints /has-symbols /hasha @@ -185,6 +206,7 @@ readme* /html-encoding-sniffer /html-escaper /html-void-elements +/http-signature /ieee754 /ignore /import-fresh @@ -214,6 +236,7 @@ readme* /is-whitespace-character /is-windows /is-word-character +/isstream /istanbul-lib-coverage /istanbul-lib-hook /istanbul-lib-instrument @@ -224,12 +247,17 @@ readme* /jackspeak /js-tokens /js-yaml +/jsbn /jsdom /jsesc /json-parse-better-errors /json-parse-errback +/json-schema +/json-schema-traverse /json-stable-stringify-without-jsonify +/json-stringify-safe /json5 +/jsprim /lcov-parse /levn /libtap @@ -252,6 +280,8 @@ readme* /mdast-util-definitions /mdast-util-to-hast /mdurl +/mime-db +/mime-types /mimic-response /minimist /mkdirp-classic @@ -266,6 +296,7 @@ readme* /null-check /nwsapi /nyc +/oauth-sign /object-inspect /object-keys /object.assign @@ -286,6 +317,7 @@ readme* /path-key /path-parse /path-type +/performance-now /picomatch /pify /pkg-dir @@ -296,7 +328,10 @@ readme* /progress /prop-types /property-information +/psl /pump +/punycode +/qs /queue-microtask /rc /react @@ -312,6 +347,7 @@ readme* /remark-parse /remark-squeeze-paragraphs /repeat-string +/request /require-directory /require-from-string /require-main-filename @@ -335,6 +371,7 @@ readme* /spdx-ranges /spdx-whitelisted /sprintf-js +/sshpk /stack-utils /state-toggle /string.prototype.trimend @@ -361,6 +398,8 @@ readme* /trivial-deferred /trough /tsconfig-paths +/tunnel-agent +/tweetnacl /type-check /type-fest /unbox-primitive @@ -377,8 +416,11 @@ readme* /unist-util-visit /unist-util-visit-parents /universalify +/uri-js /util-promisify +/uuid /v8-compile-cache +/verror /vfile /vfile-location /vfile-message diff --git a/node_modules/cli-columns/color.js b/node_modules/cli-columns/color.js index 82c1bef5f8735..11027047f24fe 100644 --- a/node_modules/cli-columns/color.js +++ b/node_modules/cli-columns/color.js @@ -1,6 +1,7 @@ const chalk = require('chalk'); const columns = require('.'); +// prettier-ignore const values = [ 'blue' + chalk.bgBlue('berry'), '笔菠萝' + chalk.yellow('苹果笔'), diff --git a/node_modules/cli-columns/index.js b/node_modules/cli-columns/index.js index 61efe981a0571..1090aa21c2bdf 100644 --- a/node_modules/cli-columns/index.js +++ b/node_modules/cli-columns/index.js @@ -9,7 +9,7 @@ const defaults = { newline: '\n', padding: 2, sort: true, - width: 0 + width: 0, }; function byPlainText(a, b) { @@ -56,16 +56,15 @@ function columns(values, options) { values = concat.apply([], values); options = Object.assign({}, defaults, options); - let cells = values - .filter(Boolean) - .map(String); + let cells = values.filter(Boolean).map(String); if (options.sort !== false) { cells = cells.sort(byPlainText); } const termWidth = options.width || process.stdout.columns; - const cellWidth = Math.max.apply(null, cells.map(stringWidth)) + options.padding; + const cellWidth = + Math.max.apply(null, cells.map(stringWidth)) + options.padding; const columnCount = Math.floor(termWidth / cellWidth) || 1; const rowCount = Math.ceil(cells.length / columnCount) || 1; diff --git a/node_modules/cli-columns/node_modules/ansi-regex/index.d.ts b/node_modules/cli-columns/node_modules/ansi-regex/index.d.ts new file mode 100644 index 0000000000000..2dbf6af2b6f3b --- /dev/null +++ b/node_modules/cli-columns/node_modules/ansi-regex/index.d.ts @@ -0,0 +1,37 @@ +declare namespace ansiRegex { + interface Options { + /** + Match only the first ANSI escape. + + @default false + */ + onlyFirst: boolean; + } +} + +/** +Regular expression for matching ANSI escape codes. + +@example +``` +import ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001B[4mcake\u001B[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001B[4mcake\u001B[0m'.match(ansiRegex()); +//=> ['\u001B[4m', '\u001B[0m'] + +'\u001B[4mcake\u001B[0m'.match(ansiRegex({onlyFirst: true})); +//=> ['\u001B[4m'] + +'\u001B]8;;https://github.com\u0007click\u001B]8;;\u0007'.match(ansiRegex()); +//=> ['\u001B]8;;https://github.com\u0007', '\u001B]8;;\u0007'] +``` +*/ +declare function ansiRegex(options?: ansiRegex.Options): RegExp; + +export = ansiRegex; diff --git a/node_modules/cli-columns/node_modules/ansi-regex/index.js b/node_modules/cli-columns/node_modules/ansi-regex/index.js new file mode 100644 index 0000000000000..616ff837d3ff0 --- /dev/null +++ b/node_modules/cli-columns/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/node_modules/cli-columns/node_modules/ansi-regex/license b/node_modules/cli-columns/node_modules/ansi-regex/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/cli-columns/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/cli-columns/node_modules/ansi-regex/package.json b/node_modules/cli-columns/node_modules/ansi-regex/package.json new file mode 100644 index 0000000000000..017f53116a9e2 --- /dev/null +++ b/node_modules/cli-columns/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.d.ts b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.d.ts new file mode 100644 index 0000000000000..729d2020516f0 --- /dev/null +++ b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.d.ts @@ -0,0 +1,17 @@ +/** +Check if the character represented by a given [Unicode code point](https://en.wikipedia.org/wiki/Code_point) is [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms). + +@param codePoint - The [code point](https://en.wikipedia.org/wiki/Code_point) of a character. + +@example +``` +import isFullwidthCodePoint from 'is-fullwidth-code-point'; + +isFullwidthCodePoint('谢'.codePointAt(0)); +//=> true + +isFullwidthCodePoint('a'.codePointAt(0)); +//=> false +``` +*/ +export default function isFullwidthCodePoint(codePoint: number): boolean; diff --git a/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.js b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.js new file mode 100644 index 0000000000000..671f97f760779 --- /dev/null +++ b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.js @@ -0,0 +1,50 @@ +/* eslint-disable yoda */ +'use strict'; + +const isFullwidthCodePoint = codePoint => { + if (Number.isNaN(codePoint)) { + return false; + } + + // Code points are derived from: + // http://www.unix.org/Public/UNIDATA/EastAsianWidth.txt + if ( + codePoint >= 0x1100 && ( + codePoint <= 0x115F || // Hangul Jamo + codePoint === 0x2329 || // LEFT-POINTING ANGLE BRACKET + codePoint === 0x232A || // RIGHT-POINTING ANGLE BRACKET + // CJK Radicals Supplement .. Enclosed CJK Letters and Months + (0x2E80 <= codePoint && codePoint <= 0x3247 && codePoint !== 0x303F) || + // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A + (0x3250 <= codePoint && codePoint <= 0x4DBF) || + // CJK Unified Ideographs .. Yi Radicals + (0x4E00 <= codePoint && codePoint <= 0xA4C6) || + // Hangul Jamo Extended-A + (0xA960 <= codePoint && codePoint <= 0xA97C) || + // Hangul Syllables + (0xAC00 <= codePoint && codePoint <= 0xD7A3) || + // CJK Compatibility Ideographs + (0xF900 <= codePoint && codePoint <= 0xFAFF) || + // Vertical Forms + (0xFE10 <= codePoint && codePoint <= 0xFE19) || + // CJK Compatibility Forms .. Small Form Variants + (0xFE30 <= codePoint && codePoint <= 0xFE6B) || + // Halfwidth and Fullwidth Forms + (0xFF01 <= codePoint && codePoint <= 0xFF60) || + (0xFFE0 <= codePoint && codePoint <= 0xFFE6) || + // Kana Supplement + (0x1B000 <= codePoint && codePoint <= 0x1B001) || + // Enclosed Ideographic Supplement + (0x1F200 <= codePoint && codePoint <= 0x1F251) || + // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane + (0x20000 <= codePoint && codePoint <= 0x3FFFD) + ) + ) { + return true; + } + + return false; +}; + +module.exports = isFullwidthCodePoint; +module.exports.default = isFullwidthCodePoint; diff --git a/node_modules/cli-columns/node_modules/is-fullwidth-code-point/license b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/cli-columns/node_modules/is-fullwidth-code-point/package.json b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/package.json new file mode 100644 index 0000000000000..2137e888fa503 --- /dev/null +++ b/node_modules/cli-columns/node_modules/is-fullwidth-code-point/package.json @@ -0,0 +1,42 @@ +{ + "name": "is-fullwidth-code-point", + "version": "3.0.0", + "description": "Check if the character represented by a given Unicode code point is fullwidth", + "license": "MIT", + "repository": "sindresorhus/is-fullwidth-code-point", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd-check" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "fullwidth", + "full-width", + "full", + "width", + "unicode", + "character", + "string", + "codepoint", + "code", + "point", + "is", + "detect", + "check" + ], + "devDependencies": { + "ava": "^1.3.1", + "tsd-check": "^0.5.0", + "xo": "^0.24.0" + } +} diff --git a/node_modules/cli-columns/node_modules/string-width/index.d.ts b/node_modules/cli-columns/node_modules/string-width/index.d.ts new file mode 100644 index 0000000000000..12b5309751dd5 --- /dev/null +++ b/node_modules/cli-columns/node_modules/string-width/index.d.ts @@ -0,0 +1,29 @@ +declare const stringWidth: { + /** + Get the visual width of a string - the number of columns required to display it. + + Some Unicode characters are [fullwidth](https://en.wikipedia.org/wiki/Halfwidth_and_fullwidth_forms) and use double the normal width. [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) are stripped and doesn't affect the width. + + @example + ``` + import stringWidth = require('string-width'); + + stringWidth('a'); + //=> 1 + + stringWidth('古'); + //=> 2 + + stringWidth('\u001B[1m古\u001B[22m'); + //=> 2 + ``` + */ + (string: string): number; + + // TODO: remove this in the next major version, refactor the whole definition to: + // declare function stringWidth(string: string): number; + // export = stringWidth; + default: typeof stringWidth; +} + +export = stringWidth; diff --git a/node_modules/cli-columns/node_modules/string-width/index.js b/node_modules/cli-columns/node_modules/string-width/index.js new file mode 100644 index 0000000000000..f4d261a96a099 --- /dev/null +++ b/node_modules/cli-columns/node_modules/string-width/index.js @@ -0,0 +1,47 @@ +'use strict'; +const stripAnsi = require('strip-ansi'); +const isFullwidthCodePoint = require('is-fullwidth-code-point'); +const emojiRegex = require('emoji-regex'); + +const stringWidth = string => { + if (typeof string !== 'string' || string.length === 0) { + return 0; + } + + string = stripAnsi(string); + + if (string.length === 0) { + return 0; + } + + string = string.replace(emojiRegex(), ' '); + + let width = 0; + + for (let i = 0; i < string.length; i++) { + const code = string.codePointAt(i); + + // Ignore control characters + if (code <= 0x1F || (code >= 0x7F && code <= 0x9F)) { + continue; + } + + // Ignore combining characters + if (code >= 0x300 && code <= 0x36F) { + continue; + } + + // Surrogates + if (code > 0xFFFF) { + i++; + } + + width += isFullwidthCodePoint(code) ? 2 : 1; + } + + return width; +}; + +module.exports = stringWidth; +// TODO: remove this in the next major version +module.exports.default = stringWidth; diff --git a/node_modules/cli-columns/node_modules/string-width/license b/node_modules/cli-columns/node_modules/string-width/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/cli-columns/node_modules/string-width/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/cli-columns/node_modules/string-width/package.json b/node_modules/cli-columns/node_modules/string-width/package.json new file mode 100644 index 0000000000000..28ba7b4cae9bf --- /dev/null +++ b/node_modules/cli-columns/node_modules/string-width/package.json @@ -0,0 +1,56 @@ +{ + "name": "string-width", + "version": "4.2.3", + "description": "Get the visual width of a string - the number of columns required to display it", + "license": "MIT", + "repository": "sindresorhus/string-width", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "string", + "character", + "unicode", + "width", + "visual", + "column", + "columns", + "fullwidth", + "full-width", + "full", + "ansi", + "escape", + "codes", + "cli", + "command-line", + "terminal", + "console", + "cjk", + "chinese", + "japanese", + "korean", + "fixed-width" + ], + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.1", + "xo": "^0.24.0" + } +} diff --git a/node_modules/cli-columns/node_modules/strip-ansi/index.d.ts b/node_modules/cli-columns/node_modules/strip-ansi/index.d.ts new file mode 100644 index 0000000000000..907fccc29269e --- /dev/null +++ b/node_modules/cli-columns/node_modules/strip-ansi/index.d.ts @@ -0,0 +1,17 @@ +/** +Strip [ANSI escape codes](https://en.wikipedia.org/wiki/ANSI_escape_code) from a string. + +@example +``` +import stripAnsi = require('strip-ansi'); + +stripAnsi('\u001B[4mUnicorn\u001B[0m'); +//=> 'Unicorn' + +stripAnsi('\u001B]8;;https://github.com\u0007Click\u001B]8;;\u0007'); +//=> 'Click' +``` +*/ +declare function stripAnsi(string: string): string; + +export = stripAnsi; diff --git a/node_modules/cli-columns/node_modules/strip-ansi/index.js b/node_modules/cli-columns/node_modules/strip-ansi/index.js new file mode 100644 index 0000000000000..9a593dfcd1fd5 --- /dev/null +++ b/node_modules/cli-columns/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/node_modules/cli-columns/node_modules/strip-ansi/license b/node_modules/cli-columns/node_modules/strip-ansi/license new file mode 100644 index 0000000000000..e7af2f77107d7 --- /dev/null +++ b/node_modules/cli-columns/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (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. diff --git a/node_modules/cli-columns/node_modules/strip-ansi/package.json b/node_modules/cli-columns/node_modules/strip-ansi/package.json new file mode 100644 index 0000000000000..1a41108d42831 --- /dev/null +++ b/node_modules/cli-columns/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/node_modules/cli-columns/package.json b/node_modules/cli-columns/package.json index cd1c252cd6865..129f2c1316d2f 100644 --- a/node_modules/cli-columns/package.json +++ b/node_modules/cli-columns/package.json @@ -1,10 +1,10 @@ { "name": "cli-columns", - "version": "3.1.2", + "version": "4.0.0", "description": "Columnated lists for the CLI.", "scripts": { - "report": "nyc report -r text-lcov | coveralls", - "test": "xo && nyc ava" + "lint": "npx eslint --fix '*.js' && npx prettier --write '*.js'", + "test": "node test.js && node color.js" }, "keywords": [ "ansi", @@ -30,17 +30,25 @@ "*.js" ], "dependencies": { - "string-width": "^2.0.0", - "strip-ansi": "^3.0.1" + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "devDependencies": { - "ava": "^0.19.1", - "chalk": "^1.1.3", - "coveralls": "^2.13.1", - "nyc": "^11.0.2", - "xo": "^0.18.2" + "chalk": "^4.1.2" }, "engines": { - "node": ">= 4" + "node": ">= 10" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true + }, + "parserOptions": { + "ecmaVersion": 8 + } + }, + "prettier": { + "singleQuote": true } } diff --git a/node_modules/cli-columns/test.js b/node_modules/cli-columns/test.js index 1ff642cd54b87..4d95e7cf07323 100644 --- a/node_modules/cli-columns/test.js +++ b/node_modules/cli-columns/test.js @@ -1,8 +1,28 @@ -import test from 'ava'; -import chalk from 'chalk'; -import stripAnsi from 'strip-ansi'; -import columns from './index'; +'use strict'; +const assert = require('assert'); +const chalk = require('chalk'); +const stripAnsi = require('strip-ansi'); +const columns = require('./index.js'); +const tests = []; + +function test(msg, fn) { + tests.push([msg, fn]); +} + +process.nextTick(async function run() { + for (const [msg, fn] of tests) { + try { + await fn(assert); + console.log(`pass - ${msg}`); + } catch (error) { + console.error(`fail - ${msg}`, error); + process.exit(1); + } + } +}); + +// prettier-ignore test('should print one column list', t => { const cols = columns(['foo', ['bar', 'baz'], ['bar', 'qux']], { width: 1 @@ -15,9 +35,10 @@ test('should print one column list', t => { 'foo\n' + 'qux'; - t.is(cols, expected); + t.equal(cols, expected); }); +// prettier-ignore test('should print three column list', t => { const cols = columns(['foo', ['bar', 'baz'], ['bat', 'qux']], { width: 16 @@ -27,9 +48,10 @@ test('should print three column list', t => { 'bar baz qux \n' + 'bat foo '; - t.is(cols, expected); + t.equal(cols, expected); }); +// prettier-ignore test('should print complex list', t => { const cols = columns( [ @@ -50,9 +72,10 @@ test('should print complex list', t => { 'apricot baz foo 嶜憃撊 噾噿嚁 \n' + 'banana pineapple blueberry pomegranate '; - t.is(stripAnsi(cols), expected); + t.equal(stripAnsi(cols), expected); }); +// prettier-ignore test('should optionally not sort', t => { const cols = columns( [ @@ -74,5 +97,5 @@ test('should optionally not sort', t => { 'bar blueberry durian banana pineapple \n' + 'baz apple star fruit '; - t.is(stripAnsi(cols), expected); + t.equal(stripAnsi(cols), expected); }); diff --git a/package-lock.json b/package-lock.json index 3aec69a7f8ec2..5f7234996c1ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -99,7 +99,7 @@ "cacache": "^15.3.0", "chalk": "^4.1.2", "chownr": "^2.0.0", - "cli-columns": "^3.1.2", + "cli-columns": "^4.0.0", "cli-table3": "^0.6.0", "columnify": "~1.5.4", "fastest-levenshtein": "^1.0.12", @@ -1744,16 +1744,60 @@ } }, "node_modules/cli-columns": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-3.1.2.tgz", - "integrity": "sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-4.0.0.tgz", + "integrity": "sha512-XW2Vg+w+L9on9wtwKpyzluIPCWXjaBahI7mTcYjx+BVIYD9c3yqcv/yKC7CmdCZat4rq2yiE1UMSJC5ivKfMtQ==", "inBundle": true, "dependencies": { - "string-width": "^2.0.0", - "strip-ansi": "^3.0.1" + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">= 4" + "node": ">= 10" + } + }, + "node_modules/cli-columns/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "inBundle": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-columns/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "inBundle": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-columns/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "inBundle": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-columns/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "inBundle": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/cli-table3": { @@ -11804,12 +11848,42 @@ "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" }, "cli-columns": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-3.1.2.tgz", - "integrity": "sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-columns/-/cli-columns-4.0.0.tgz", + "integrity": "sha512-XW2Vg+w+L9on9wtwKpyzluIPCWXjaBahI7mTcYjx+BVIYD9c3yqcv/yKC7CmdCZat4rq2yiE1UMSJC5ivKfMtQ==", "requires": { - "string-width": "^2.0.0", - "strip-ansi": "^3.0.1" + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "requires": { + "ansi-regex": "^5.0.1" + } + } } }, "cli-table3": { diff --git a/package.json b/package.json index bd5675f95d348..ae2f22a91d90a 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "cacache": "^15.3.0", "chalk": "^4.1.2", "chownr": "^2.0.0", - "cli-columns": "^3.1.2", + "cli-columns": "^4.0.0", "cli-table3": "^0.6.0", "columnify": "~1.5.4", "fastest-levenshtein": "^1.0.12",