tty-table 4.1.6 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -5
- package/src/format.js +2 -0
- package/src/render.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tty-table",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Node cli table",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"types": "src/factory.d.ts",
|
|
@@ -54,17 +54,18 @@
|
|
|
54
54
|
"homepage": "https://github.com/tecfu/tty-table",
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"chalk": "^4.1.2",
|
|
57
|
-
"csv": "^5.5.
|
|
58
|
-
"kleur": "^4.1.
|
|
57
|
+
"csv": "^5.5.3",
|
|
58
|
+
"kleur": "^4.1.5",
|
|
59
59
|
"smartwrap": "^2.0.2",
|
|
60
|
-
"strip-ansi": "^6.0.
|
|
60
|
+
"strip-ansi": "^6.0.1",
|
|
61
61
|
"wcwidth": "^1.0.1",
|
|
62
|
-
"yargs": "^17.
|
|
62
|
+
"yargs": "^17.7.1"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@rollup/plugin-commonjs": "^11.0.2",
|
|
66
66
|
"@rollup/plugin-node-resolve": "^7.1.1",
|
|
67
67
|
"@rollup/plugin-replace": "^2.3.1",
|
|
68
|
+
"axios-error": "^1.0.4",
|
|
68
69
|
"babel-core": "^6.26.3",
|
|
69
70
|
"babel-preset-babili": "0.1.4",
|
|
70
71
|
"babel-preset-es2015": "^6.24.1",
|
package/src/format.js
CHANGED
|
@@ -274,6 +274,8 @@ module.exports.getColumnWidths = (config, rows) => {
|
|
|
274
274
|
const totalRelativeWidths = relativeWidths.reduce((prev, current) => prev + current)
|
|
275
275
|
widths = (totalRelativeWidths < totalWidth) ? relativeWidths : widths
|
|
276
276
|
}
|
|
277
|
+
} else {
|
|
278
|
+
widths = widths.map(Math.floor)
|
|
277
279
|
}
|
|
278
280
|
|
|
279
281
|
return widths
|