Skip to content

Commit e198ac0

Browse files
committed
1 parent 1cb107d commit e198ac0

File tree

5 files changed

+25
-27
lines changed

5 files changed

+25
-27
lines changed

node_modules/cli-table3/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cli-table3",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "Pretty unicode tables for the command line. Based on the original cli-table.",
55
"main": "index.js",
66
"types": "index.d.ts",
@@ -13,21 +13,20 @@
1313
"test": "test"
1414
},
1515
"dependencies": {
16-
"object-assign": "^4.1.0",
1716
"string-width": "^4.2.0"
1817
},
1918
"devDependencies": {
2019
"ansi-256-colors": "^1.1.0",
2120
"cli-table": "^0.3.1",
2221
"eslint-config-prettier": "^6.0.0",
2322
"eslint-plugin-prettier": "^3.0.0",
24-
"jest": "^24.0.0",
23+
"jest": "^25.2.4",
2524
"jest-runner-eslint": "^0.7.0",
2625
"lerna-changelog": "^1.0.1",
27-
"prettier": "2.0.2"
26+
"prettier": "2.3.2"
2827
},
2928
"optionalDependencies": {
30-
"colors": "^1.1.2"
29+
"colors": "1.4.0"
3130
},
3231
"scripts": {
3332
"changelog": "lerna-changelog",

node_modules/cli-table3/src/layout-manager.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
const objectAssign = require('object-assign');
21
const Cell = require('./cell');
32
const { ColSpanCell, RowSpanCell } = Cell;
43

54
(function () {
65
function layoutTable(table) {
76
table.forEach(function (row, rowIndex) {
7+
let prevCell = null;
88
row.forEach(function (cell, columnIndex) {
99
cell.y = rowIndex;
10-
cell.x = columnIndex;
10+
cell.x = prevCell ? prevCell.x + 1 : columnIndex;
1111
for (let y = rowIndex; y >= 0; y--) {
1212
let row2 = table[y];
1313
let xMax = y === rowIndex ? columnIndex : row2.length;
@@ -17,6 +17,7 @@ const { ColSpanCell, RowSpanCell } = Cell;
1717
cell.x++;
1818
}
1919
}
20+
prevCell = cell;
2021
}
2122
});
2223
});
@@ -224,7 +225,7 @@ function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
224225
}
225226
}
226227

227-
objectAssign(vals, result);
228+
Object.assign(vals, result);
228229
for (let j = 0; j < vals.length; j++) {
229230
vals[j] = Math.max(forcedMin, vals[j] || 0);
230231
}

node_modules/cli-table3/src/utils.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const objectAssign = require('object-assign');
21
const stringWidth = require('string-width');
32

43
function codeRegex(capture) {
@@ -235,9 +234,9 @@ function defaultOptions() {
235234
function mergeOptions(options, defaults) {
236235
options = options || {};
237236
defaults = defaults || defaultOptions();
238-
let ret = objectAssign({}, defaults, options);
239-
ret.chars = objectAssign({}, defaults.chars, options.chars);
240-
ret.style = objectAssign({}, defaults.style, options.style);
237+
let ret = Object.assign({}, defaults, options);
238+
ret.chars = Object.assign({}, defaults.chars, options.chars);
239+
ret.style = Object.assign({}, defaults.style, options.style);
241240
return ret;
242241
}
243242

@@ -286,7 +285,7 @@ function colorizeLines(input) {
286285
for (let i = 0; i < input.length; i++) {
287286
let line = rewindState(state, input[i]);
288287
state = readState(line);
289-
let temp = objectAssign({}, state);
288+
let temp = Object.assign({}, state);
290289
output.push(unwindState(temp, line));
291290
}
292291
return output;

package-lock.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"chalk": "^4.1.2",
102102
"chownr": "^2.0.0",
103103
"cli-columns": "^4.0.0",
104-
"cli-table3": "^0.6.0",
104+
"cli-table3": "^0.6.1",
105105
"columnify": "~1.5.4",
106106
"fastest-levenshtein": "^1.0.12",
107107
"glob": "^7.2.0",
@@ -1862,19 +1862,18 @@
18621862
}
18631863
},
18641864
"node_modules/cli-table3": {
1865-
"version": "0.6.0",
1866-
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz",
1867-
"integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==",
1865+
"version": "0.6.1",
1866+
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.1.tgz",
1867+
"integrity": "sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA==",
18681868
"inBundle": true,
18691869
"dependencies": {
1870-
"object-assign": "^4.1.0",
18711870
"string-width": "^4.2.0"
18721871
},
18731872
"engines": {
18741873
"node": "10.* || >= 12.*"
18751874
},
18761875
"optionalDependencies": {
1877-
"colors": "^1.1.2"
1876+
"colors": "1.4.0"
18781877
}
18791878
},
18801879
"node_modules/cli-table3/node_modules/ansi-regex": {
@@ -5843,7 +5842,7 @@
58435842
"version": "4.1.1",
58445843
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
58455844
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
5846-
"inBundle": true,
5845+
"dev": true,
58475846
"engines": {
58485847
"node": ">=0.10.0"
58495848
}
@@ -12270,12 +12269,11 @@
1227012269
}
1227112270
},
1227212271
"cli-table3": {
12273-
"version": "0.6.0",
12274-
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.0.tgz",
12275-
"integrity": "sha512-gnB85c3MGC7Nm9I/FkiasNBOKjOiO1RNuXXarQms37q4QMpWdlbBgD/VnOStA2faG1dpXMv31RFApjX1/QdgWQ==",
12272+
"version": "0.6.1",
12273+
"resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.1.tgz",
12274+
"integrity": "sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA==",
1227612275
"requires": {
12277-
"colors": "^1.1.2",
12278-
"object-assign": "^4.1.0",
12276+
"colors": "1.4.0",
1227912277
"string-width": "^4.2.0"
1228012278
},
1228112279
"dependencies": {
@@ -15415,7 +15413,8 @@
1541515413
"object-assign": {
1541615414
"version": "4.1.1",
1541715415
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
15418-
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
15416+
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
15417+
"dev": true
1541915418
},
1542015419
"object-inspect": {
1542115420
"version": "1.11.1",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"chalk": "^4.1.2",
7070
"chownr": "^2.0.0",
7171
"cli-columns": "^4.0.0",
72-
"cli-table3": "^0.6.0",
72+
"cli-table3": "^0.6.1",
7373
"columnify": "~1.5.4",
7474
"fastest-levenshtein": "^1.0.12",
7575
"glob": "^7.2.0",

0 commit comments

Comments
 (0)