Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

compact-yarn-audit

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

compact-yarn-audit - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

3

package.json
{
"name": "compact-yarn-audit",
"version": "1.0.1",
"version": "1.1.0",
"description": "Presents output from yarn audit in a compact table",

@@ -36,2 +36,3 @@ "engines": {

"get-stream": "^6.0.1",
"lodash.uniqby": "^4.7.0",
"strip-ansi": "^7.0.0",

@@ -38,0 +39,0 @@ "text-table": "^0.2.0"

@@ -0,1 +1,3 @@

import uniqBy from "lodash.uniqby";
function auditLog2Object(pAuditLog) {

@@ -12,3 +14,2 @@ return JSON.parse(`[${pAuditLog.split("\n").join(",")}]`.replace(",]", "]"));

title: pLogEntry.data.advisory.title,
cves: pLogEntry.data.advisory.cves.join(", "),
fixable: lFixable,

@@ -34,2 +35,4 @@ fixString: lFixable

function unique(pTerseEntries) {}
function sortEntry(pEntryLeft, pEntryRight) {

@@ -41,7 +44,14 @@ return `${severity2Order(pEntryLeft.severity)}|${pEntryLeft.module_name}` >

}
function wholeRecordAsString(pLogEntry) {
return `${pLogEntry.severity}|${pLogEntry.title}|${pLogEntry.fixString}|${pLogEntry.module_name}|${pLogEntry.via}`;
}
export function terseLog(pLog) {
return auditLog2Object(pLog)
.filter((pLogEntry) => pLogEntry.type === "auditAdvisory")
.map(extractUsefulAttributesFromLogEntry)
.sort(sortEntry);
return uniqBy(
auditLog2Object(pLog)
.filter((pLogEntry) => pLogEntry.type === "auditAdvisory")
.map(extractUsefulAttributesFromLogEntry)
.sort(sortEntry),
wholeRecordAsString
);
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc