From e198ac0d1c1e536db57e84af6e7f40089b4c1bfc Mon Sep 17 00:00:00 2001 From: Gar Date: Mon, 31 Jan 2022 14:27:40 -0800 Subject: [PATCH] deps: cli-table3@0.6.1 --- node_modules/cli-table3/package.json | 9 +++---- node_modules/cli-table3/src/layout-manager.js | 7 +++--- node_modules/cli-table3/src/utils.js | 9 +++---- package-lock.json | 25 +++++++++---------- package.json | 2 +- 5 files changed, 25 insertions(+), 27 deletions(-) diff --git a/node_modules/cli-table3/package.json b/node_modules/cli-table3/package.json index 7d8542e17c008..82a4905f6ec4e 100644 --- a/node_modules/cli-table3/package.json +++ b/node_modules/cli-table3/package.json @@ -1,6 +1,6 @@ { "name": "cli-table3", - "version": "0.6.0", + "version": "0.6.1", "description": "Pretty unicode tables for the command line. Based on the original cli-table.", "main": "index.js", "types": "index.d.ts", @@ -13,7 +13,6 @@ "test": "test" }, "dependencies": { - "object-assign": "^4.1.0", "string-width": "^4.2.0" }, "devDependencies": { @@ -21,13 +20,13 @@ "cli-table": "^0.3.1", "eslint-config-prettier": "^6.0.0", "eslint-plugin-prettier": "^3.0.0", - "jest": "^24.0.0", + "jest": "^25.2.4", "jest-runner-eslint": "^0.7.0", "lerna-changelog": "^1.0.1", - "prettier": "2.0.2" + "prettier": "2.3.2" }, "optionalDependencies": { - "colors": "^1.1.2" + "colors": "1.4.0" }, "scripts": { "changelog": "lerna-changelog", diff --git a/node_modules/cli-table3/src/layout-manager.js b/node_modules/cli-table3/src/layout-manager.js index 8bcef03a0e09e..fe84ef844da79 100644 --- a/node_modules/cli-table3/src/layout-manager.js +++ b/node_modules/cli-table3/src/layout-manager.js @@ -1,13 +1,13 @@ -const objectAssign = require('object-assign'); const Cell = require('./cell'); const { ColSpanCell, RowSpanCell } = Cell; (function () { function layoutTable(table) { table.forEach(function (row, rowIndex) { + let prevCell = null; row.forEach(function (cell, columnIndex) { cell.y = rowIndex; - cell.x = columnIndex; + cell.x = prevCell ? prevCell.x + 1 : columnIndex; for (let y = rowIndex; y >= 0; y--) { let row2 = table[y]; let xMax = y === rowIndex ? columnIndex : row2.length; @@ -17,6 +17,7 @@ const { ColSpanCell, RowSpanCell } = Cell; cell.x++; } } + prevCell = cell; } }); }); @@ -224,7 +225,7 @@ function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) { } } - objectAssign(vals, result); + Object.assign(vals, result); for (let j = 0; j < vals.length; j++) { vals[j] = Math.max(forcedMin, vals[j] || 0); } diff --git a/node_modules/cli-table3/src/utils.js b/node_modules/cli-table3/src/utils.js index 3ac919c532611..1e6254af984d0 100644 --- a/node_modules/cli-table3/src/utils.js +++ b/node_modules/cli-table3/src/utils.js @@ -1,4 +1,3 @@ -const objectAssign = require('object-assign'); const stringWidth = require('string-width'); function codeRegex(capture) { @@ -235,9 +234,9 @@ function defaultOptions() { function mergeOptions(options, defaults) { options = options || {}; defaults = defaults || defaultOptions(); - let ret = objectAssign({}, defaults, options); - ret.chars = objectAssign({}, defaults.chars, options.chars); - ret.style = objectAssign({}, defaults.style, options.style); + let ret = Object.assign({}, defaults, options); + ret.chars = Object.assign({}, defaults.chars, options.chars); + ret.style = Object.assign({}, defaults.style, options.style); return ret; } @@ -286,7 +285,7 @@ function colorizeLines(input) { for (let i = 0; i < input.length; i++) { let line = rewindState(state, input[i]); state = readState(line); - let temp = objectAssign({}, state); + let temp = Object.assign({}, state); output.push(unwindState(temp, line)); } return output; diff --git a/package-lock.json b/package-lock.json index 432d3f58a45b6..d637a7bcd1c4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,7 @@ "chalk": "^4.1.2", "chownr": "^2.0.0", "cli-columns": "^4.0.0", - "cli-table3": "^0.6.0", + "cli-table3": "^0.6.1", "columnify": "~1.5.4", "fastest-levenshtein": "^1.0.12", "glob": "^7.2.0", @@ -1862,19 +1862,18 @@ } }, "node_modules/cli-table3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", - "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.1.tgz", + "integrity": "sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA==", "inBundle": true, "dependencies": { - "object-assign": "^4.1.0", "string-width": "^4.2.0" }, "engines": { "node": "10.* || >= 12.*" }, "optionalDependencies": { - "colors": "^1.1.2" + "colors": "1.4.0" } }, "node_modules/cli-table3/node_modules/ansi-regex": { @@ -5843,7 +5842,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "inBundle": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -12270,12 +12269,11 @@ } }, "cli-table3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz", - "integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.1.tgz", + "integrity": "sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA==", "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", + "colors": "1.4.0", "string-width": "^4.2.0" }, "dependencies": { @@ -15415,7 +15413,8 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true }, "object-inspect": { "version": "1.11.1", diff --git a/package.json b/package.json index 2486a1aadf87e..9d4263da098a4 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "chalk": "^4.1.2", "chownr": "^2.0.0", "cli-columns": "^4.0.0", - "cli-table3": "^0.6.0", + "cli-table3": "^0.6.1", "columnify": "~1.5.4", "fastest-levenshtein": "^1.0.12", "glob": "^7.2.0",