summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/cli-columns
diff options
context:
space:
mode:
authornpm team <ops+robot@npmjs.com>2021-10-07 20:21:11 +0000
committerMyles Borins <mylesborins@github.com>2021-10-07 20:39:53 -0400
commitdbc91de0115bddaa7b90f9675f12de6748363ba2 (patch)
tree0516deefba9c2b2a3d60932f6d17d31392eed544 /deps/npm/node_modules/cli-columns
parent58739edf9921ef6d07d3a66230af24abf4e2d1a6 (diff)
downloadnode-new-dbc91de0115bddaa7b90f9675f12de6748363ba2.tar.gz
deps: upgrade npm to 8.0.0
PR-URL: https://github.com/nodejs/node/pull/40369 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Danielle Adams <adamzdanielle@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/cli-columns')
-rw-r--r--deps/npm/node_modules/cli-columns/color.js1
-rw-r--r--deps/npm/node_modules/cli-columns/index.js9
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.d.ts37
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js10
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license9
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json55
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.d.ts17
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.js50
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/license9
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/package.json42
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/string-width/index.d.ts29
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/string-width/index.js47
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/string-width/license9
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/string-width/package.json56
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.d.ts17
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js4
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license9
-rw-r--r--deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json54
-rw-r--r--deps/npm/node_modules/cli-columns/package.json30
-rw-r--r--deps/npm/node_modules/cli-columns/test.js39
20 files changed, 509 insertions, 24 deletions
diff --git a/deps/npm/node_modules/cli-columns/color.js b/deps/npm/node_modules/cli-columns/color.js
index 82c1bef5f8..11027047f2 100644
--- a/deps/npm/node_modules/cli-columns/color.js
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/index.js b/deps/npm/node_modules/cli-columns/index.js
index 61efe981a0..1090aa21c2 100644
--- a/deps/npm/node_modules/cli-columns/index.js
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.d.ts b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.d.ts
new file mode 100644
index 0000000000..2dbf6af2b6
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js
new file mode 100644
index 0000000000..616ff837d3
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license
@@ -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.
diff --git a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json
new file mode 100644
index 0000000000..017f53116a
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.d.ts b/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.d.ts
new file mode 100644
index 0000000000..729d202051
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.js b/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/index.js
new file mode 100644
index 0000000000..671f97f760
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/license b/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/license
@@ -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.
diff --git a/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/package.json b/deps/npm/node_modules/cli-columns/node_modules/is-fullwidth-code-point/package.json
new file mode 100644
index 0000000000..2137e888fa
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/string-width/index.d.ts b/deps/npm/node_modules/cli-columns/node_modules/string-width/index.d.ts
new file mode 100644
index 0000000000..12b5309751
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/string-width/index.js b/deps/npm/node_modules/cli-columns/node_modules/string-width/index.js
new file mode 100644
index 0000000000..f4d261a96a
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/string-width/license b/deps/npm/node_modules/cli-columns/node_modules/string-width/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/cli-columns/node_modules/string-width/license
@@ -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.
diff --git a/deps/npm/node_modules/cli-columns/node_modules/string-width/package.json b/deps/npm/node_modules/cli-columns/node_modules/string-width/package.json
new file mode 100644
index 0000000000..28ba7b4cae
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.d.ts b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.d.ts
new file mode 100644
index 0000000000..907fccc292
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js
new file mode 100644
index 0000000000..9a593dfcd1
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license
new file mode 100644
index 0000000000..e7af2f7710
--- /dev/null
+++ b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license
@@ -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.
diff --git a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json
new file mode 100644
index 0000000000..1a41108d42
--- /dev/null
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/package.json b/deps/npm/node_modules/cli-columns/package.json
index cd1c252cd6..129f2c1316 100644
--- a/deps/npm/node_modules/cli-columns/package.json
+++ b/deps/npm/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/deps/npm/node_modules/cli-columns/test.js b/deps/npm/node_modules/cli-columns/test.js
index 1ff642cd54..4d95e7cf07 100644
--- a/deps/npm/node_modules/cli-columns/test.js
+++ b/deps/npm/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);
});