Comparing version 0.5.1 to 0.5.2
@@ -1,3 +0,9 @@ | ||
# [Unreleased](https://github.com/G-Rath/audit-app/compare/v0.5.1...HEAD) (YYYY-MM-DD) | ||
# [Unreleased](https://github.com/G-Rath/audit-app/compare/v0.5.2...HEAD) (YYYY-MM-DD) | ||
# [0.5.2](https://github.com/G-Rath/audit-app/compare/v0.5.1...v0.5.2) (2021-02-24) | ||
### Bug fixes | ||
- use `wrap-ansi` for wrapping text when formatting tables ([191652d8][]) | ||
# [0.5.1](https://github.com/G-Rath/audit-app/compare/v0.5.0...v0.5.1) (2021-02-15) | ||
@@ -81,2 +87,3 @@ | ||
[191652d8]: https://github.com/G-Rath/audit-app/commit/191652d8 | ||
[70ced7f9]: https://github.com/G-Rath/audit-app/commit/70ced7f9 | ||
@@ -83,0 +90,0 @@ [2e10def0]: https://github.com/G-Rath/audit-app/commit/2e10def0 |
@@ -9,2 +9,3 @@ "use strict"; | ||
const strip_ansi_1 = __importDefault(require("strip-ansi")); | ||
const wrap_ansi_1 = __importDefault(require("wrap-ansi")); | ||
exports.SupportedReportFormats = [ | ||
@@ -28,8 +29,2 @@ 'summary', | ||
const pad = (str) => ` ${str.trim()} `; | ||
const wrap = (str, width) => { | ||
var _a; | ||
const regexp = new RegExp(`.{1,${width}}(?:[\\s\u200B]+|$)|[^\\s\u200B]+?(?:[\\s\u200B]+|$)`, 'gu'); | ||
// eslint-disable-next-line @typescript-eslint/prefer-regexp-exec | ||
return (_a = str.match(regexp)) !== null && _a !== void 0 ? _a : []; | ||
}; | ||
var BoxChar; | ||
@@ -77,3 +72,5 @@ (function (BoxChar) { | ||
return warpInTopAndBottomBorders(maxLabelWidth, maxValueWidth, contents.reduce((acc, [label, value], index) => { | ||
const lines = wrap(pad(value), maxValueWidth); | ||
const lines = wrap_ansi_1.default(value, maxValueWidth - 2, { | ||
hard: true | ||
}).split('\n'); | ||
return acc.concat([ | ||
@@ -80,0 +77,0 @@ index && rowSpacer, |
{ | ||
"name": "audit-app", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "A cli tool for auditing apps & packages using their respective package managers.", | ||
@@ -51,2 +51,3 @@ "keywords": [ | ||
"strip-ansi": "^6.0.0", | ||
"wrap-ansi": "^7.0.0", | ||
"yargs": "^16.0.3" | ||
@@ -60,2 +61,3 @@ }, | ||
"@types/readline-transform": "^1.0.0", | ||
"@types/wrap-ansi": "^3.0.0", | ||
"@types/yargs": "^16.0.0", | ||
@@ -62,0 +64,0 @@ "@typescript-eslint/eslint-plugin": "^4.15.0", |
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
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
43289
5
27
625
+ Addedwrap-ansi@^7.0.0