@oclif/table 0.3.0 → 0.3.1

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.
Files changed (2) hide show
  1. package/lib/table.js +3 -4
  2. package/package.json +1 -1
package/lib/table.js CHANGED
@@ -340,11 +340,10 @@ function renderPlainTable(props) {
340
340
  horizontalAlignment,
341
341
  overflow,
342
342
  padding,
343
- value: column.column,
343
+ value: headings[column.column] ?? column.column,
344
344
  width,
345
345
  });
346
- const columnHeader = headings[text] ?? text;
347
- return `${acc}${' '.repeat(marginLeft)}${columnHeader}${' '.repeat(marginRight)}`;
346
+ return `${acc}${' '.repeat(marginLeft)}${text}${' '.repeat(marginRight)}`;
348
347
  }, '');
349
348
  console.log(headerString);
350
349
  console.log('-'.repeat(headerString.length));
@@ -412,7 +411,7 @@ function Container(props) {
412
411
  * @throws {Error} Throws an error if the total number of rows across all tables exceeds 30,000.
413
412
  */
414
413
  export function printTables(tables, options) {
415
- if (tables.reduce((acc, table) => acc + table.data.length, 0) > 30_000) {
414
+ if (tables.reduce((acc, table) => acc + table.data.length, 0) > 10_000) {
416
415
  throw new Error('The data is too large to print multiple tables. Please use `printTable` instead.');
417
416
  }
418
417
  const output = new Output();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/table",
3
3
  "description": "Display table in terminal",
4
- "version": "0.3.0",
4
+ "version": "0.3.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/table/issues",
7
7
  "dependencies": {