compact-yarn-audit
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -33,2 +33,9 @@ import { EOL } from "node:os"; | ||
} | ||
function truncateTitle(pTitle, pWidth) { | ||
let lReturnValue = pTitle.padEnd(pWidth).slice(0, pWidth); | ||
if (pTitle.length > pWidth) { | ||
lReturnValue = `${lReturnValue.slice(0, -1)}…`; | ||
} | ||
return lReturnValue; | ||
} | ||
export function terseAdvisoryLog2Table(pTerseEntries, pColumnsAvailable = process.stdout.columns) { | ||
@@ -43,5 +50,4 @@ const lColumnWidths = getColumnWidths(pTerseEntries, pColumnsAvailable); | ||
.map((pEntry) => { | ||
return (`${colorBySeverity(pEntry.severity, `${pEntry.severity.padEnd(lColumnWidths.get("severity"))} `)}${pEntry.title | ||
.padEnd(lColumnWidths.get("title")) | ||
.slice(0, lColumnWidths.get("title"))} ` + | ||
return (`${colorBySeverity(pEntry.severity, `${pEntry.severity.padEnd(lColumnWidths.get("severity"))} `)}` + | ||
`${truncateTitle(pEntry.title, lColumnWidths.get("title"))} ` + | ||
`${pEntry.module_name.padEnd(lColumnWidths.get("module_name"))} ` + | ||
@@ -48,0 +54,0 @@ `${pEntry.via.padEnd(lColumnWidths.get("via"))} ` + |
{ | ||
"name": "compact-yarn-audit", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"description": "Presents output from yarn audit in a compact table", | ||
@@ -40,3 +40,3 @@ "engines": { | ||
"upem:install": "npm install", | ||
"version": "npm-run-all test scm:stage" | ||
"version": "npm-run-all build check scm:stage" | ||
}, | ||
@@ -43,0 +43,0 @@ "keywords": [ |
@@ -7,3 +7,3 @@ [![GitHub Workflow Status](https://github.com/sverweij/compact-yarn-audit/actions/workflows/ci.yml/badge.svg)](https://github.com/sverweij/compact-yarn-audit/actions/workflows/ci.yml) | ||
It presents `yarn audit` output in a compact table, ordered by severity. | ||
_compact-yarn-audit_ presents `yarn audit` output in a compact table, ordered by severity. | ||
@@ -13,3 +13,3 @@ ## Usage | ||
```sh | ||
yarn audit --json | npx compact-yarn-audit | ||
yarn audit --json | npx compact-yarn-audit@latest | ||
``` | ||
@@ -26,5 +26,5 @@ | ||
critical Command Injection destructomatic vertex-cli no fix available | ||
critical Remote code execution whe steering-wheel beach-cruiser "steering-wheel": ">=4.7.7" | ||
critical Remote code execution wh… steering-wheel beach-cruiser "steering-wheel": ">=4.7.7" | ||
critical Prototype Pollution steering-wheel beach-cruiser "steering-wheel": ">=4.1.2" | ||
high Regular Expression Denial oedipus-regex vertexql-types no fix available | ||
high Regular Expression Denia… oedipus-regex vertexql-types no fix available | ||
high Command Injection snowdash beach-cruiser "snowdash": ">=4.17.21" | ||
@@ -41,3 +41,3 @@ high Prototype Pollution snowdash beach-cruiser "snowdash": ">=4.17.12" | ||
moderate Information Exposure mars-server-core mars-server "mars-server-core": ">=2.14.2" | ||
moderate Regular Expression Denial chestnut beach-cruiser "chestnut": ">=7.1.1" | ||
moderate Regular Expression Denia… chestnut beach-cruiser "chestnut": ">=7.1.1" | ||
moderate Denial of Service steering-wheel beach-cruiser "steering-wheel": ">=4.4.5" | ||
@@ -44,0 +44,0 @@ low Prototype Pollution minifog beach-cruiser "minifog": "<1.0.0 || >=1.2.3" |
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
12484
143