tty-table 4.1.5 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tty-table",
3
- "version": "4.1.5",
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.0",
58
- "kleur": "^4.1.4",
57
+ "csv": "^5.5.3",
58
+ "kleur": "^4.1.5",
59
59
  "smartwrap": "^2.0.2",
60
- "strip-ansi": "^6.0.0",
60
+ "strip-ansi": "^6.0.1",
61
61
  "wcwidth": "^1.0.1",
62
- "yargs": "^17.1.1"
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/factory.d.ts CHANGED
@@ -18,7 +18,7 @@ declare namespace TtyTable {
18
18
  color?: string;
19
19
  footerAlign?: string;
20
20
  footerColor?: string;
21
- formatter: Formatter;
21
+ formatter?: Formatter;
22
22
  headerAlign?: string;
23
23
  headerColor?: string;
24
24
  marginLeft?: number;
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
package/src/render.js CHANGED
@@ -252,7 +252,7 @@ module.exports.buildCell = (config, elem, columnIndex, rowType, rowIndex, rowDat
252
252
 
253
253
  default:
254
254
  // elem is assumed to be a scalar
255
- cellValue = elem || ""
255
+ cellValue = elem
256
256
  }
257
257
 
258
258
  // run formatter