compact-yarn-audit
Advanced tools
Comparing version 4.0.4 to 4.0.5
import { EOL } from "node:os"; | ||
import chalk from "chalk"; | ||
import pc from "picocolors"; | ||
function colorBySeverity(pSeverity, pString) { | ||
const lSeverity2ChalkFunction = new Map([ | ||
["critical", chalk.red], | ||
["high", chalk.magenta], | ||
["moderate", chalk.yellow], | ||
["info", chalk.blue], | ||
const lSeverity2ColorFunction = new Map([ | ||
["critical", pc.red], | ||
["high", pc.magenta], | ||
["moderate", pc.yellow], | ||
["info", pc.blue], | ||
]); | ||
const lFunction = lSeverity2ChalkFunction.get(pSeverity) || ((pX) => pX); | ||
const lFunction = lSeverity2ColorFunction.get(pSeverity) || ((pX) => pX); | ||
return lFunction(pString); | ||
@@ -58,3 +58,3 @@ } | ||
const lColumnWidths = getColumnWidths(pTerseEntries, pColumnsAvailable); | ||
const lTitle = chalk.bold( | ||
const lTitle = pc.bold( | ||
`${"severity".padEnd(lColumnWidths.get("severity"))} ` + | ||
@@ -61,0 +61,0 @@ `${"title".padEnd(lColumnWidths.get("title"))} ` + |
{ | ||
"name": "compact-yarn-audit", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Presents output from yarn audit in a compact table", | ||
@@ -27,11 +27,5 @@ "engines": { | ||
"dependencies": { | ||
"chalk": "^5.3.0", | ||
"ndjson": "^2.0.0" | ||
"ndjson": "^2.0.0", | ||
"picocolors": "1.0.1" | ||
}, | ||
"overrides": { | ||
"semver": "^7.5.4" | ||
}, | ||
"resolutions": { | ||
"semver": "^7.5.4" | ||
}, | ||
"files": [ | ||
@@ -38,0 +32,0 @@ "dist", |
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
9960
+ Addedpicocolors@1.0.1
+ Addedpicocolors@1.0.1(transitive)
- Removedchalk@^5.3.0
- Removedchalk@5.3.0(transitive)