New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@code-pushup/utils

Package Overview
Dependencies
Maintainers
3
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@code-pushup/utils - npm Package Compare versions

Comparing version 0.3.2 to 0.4.0

26

index.js

@@ -908,2 +908,26 @@ // packages/utils/src/lib/execute-process.ts

}
function compareIssues(a, b) {
if (a.severity !== b.severity) {
return -compareIssueSeverity(a.severity, b.severity);
}
if (!a.source && b.source) {
return -1;
}
if (a.source && !b.source) {
return 1;
}
if (a.source?.file !== b.source?.file) {
return a.source?.file.localeCompare(b.source?.file || "") || 0;
}
if (!a.source?.position && b.source?.position) {
return -1;
}
if (a.source?.position && !b.source?.position) {
return 1;
}
if (a.source?.position?.startLine !== b.source?.position?.startLine) {
return (a.source?.position?.startLine || 0) - (b.source?.position?.startLine || 0);
}
return 0;
}

@@ -1240,3 +1264,3 @@ // packages/utils/src/lib/execute-process.ts

detailsTableHeaders,
...audit.details.issues.map((issue) => {
...audit.details.issues.sort(compareIssues).map((issue) => {
const severity = `${getSeverityIcon(issue.severity)} <i>${issue.severity}</i>`;

@@ -1243,0 +1267,0 @@ const message = issue.message;

2

package.json
{
"name": "@code-pushup/utils",
"version": "0.3.2",
"version": "0.4.0",
"dependencies": {

@@ -5,0 +5,0 @@ "@code-pushup/models": "*",

@@ -1,2 +0,2 @@

import { CategoryRef, IssueSeverity as CliIssueSeverity, Format, PersistConfig, Report } from '@code-pushup/models';
import { CategoryRef, IssueSeverity as CliIssueSeverity, Format, Issue, PersistConfig, Report } from '@code-pushup/models';
import { EnrichedAuditReport, EnrichedScoredAuditGroupWithAudits, ScoredReport, WeighedAuditReport } from './scoring';

@@ -30,2 +30,3 @@ export declare const FOOTER_PREFIX = "Made with \u2764 by";

export declare function getPluginNameFromSlug(slug: string, plugins: ScoredReport['plugins']): string;
export declare function compareIssues(a: Issue, b: Issue): number;
export {};
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