@oclif/table
Advanced tools
Comparing version 0.1.21 to 0.1.22
@@ -288,2 +288,8 @@ /* eslint-disable react/prop-types */ | ||
class Stream extends WriteStream { | ||
// Override the rows so that ink doesn't clear the entire terminal when | ||
// unmounting the component and the height of the output is greater than | ||
// the height of the terminal | ||
// https://github.com/vadimdemedes/ink/blob/v5.0.1/src/ink.tsx#L174 | ||
// This might be a bad idea but it works. | ||
rows = 10_000; | ||
frames = []; | ||
@@ -306,4 +312,8 @@ lastFrame() { | ||
constructor() { | ||
const fd = process.env.OCLIF_TABLE_FD ? Number(process.env.OCLIF_TABLE_FD) : 0; | ||
this.stream = process.env.NODE_ENV === 'test' ? process.stdout : new Stream(fd); | ||
// Use process.stdout if NODE_ENV is `test` OR if tests are being run by wireit on windows (windows + tests run by wireit | ||
// are problematic for an unknown reason) | ||
this.stream = | ||
(process.platform === 'win32' && process.env.npm_lifecycle_script === 'wireit') || process.env.NODE_ENV === 'test' | ||
? process.stdout | ||
: new Stream(process.env.OCLIF_TABLE_FD ? Number(process.env.OCLIF_TABLE_FD) : process.stdout.fd); | ||
} | ||
@@ -310,0 +320,0 @@ maybePrintLastFrame() { |
{ | ||
"name": "@oclif/table", | ||
"description": "Display table in terminal", | ||
"version": "0.1.21", | ||
"version": "0.1.22", | ||
"author": "Salesforce", | ||
@@ -22,3 +22,3 @@ "bugs": "https://github.com/oclif/table/issues", | ||
"@oclif/prettier-config": "^0.2.1", | ||
"@oclif/test": "^4.0.9", | ||
"@oclif/test": "^4.1.0", | ||
"@types/chai": "^4.3.16", | ||
@@ -25,0 +25,0 @@ "@types/mocha": "^10.0.9", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45323
1227
5