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

mythx-report-helper

Package Overview
Dependencies
Maintainers
3
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mythx-report-helper - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

52

build/src/metrics.js

@@ -7,6 +7,15 @@ "use strict";

return issuesClone.map((issues) => {
let InstructionCoverageOverTime = issues.meta.InstructionCoverageOverTime;
let PercentageCoverageOverTime = issues.meta.PercentageCoverageOverTime &&
JSON.parse(issues.meta.PercentageCoverageOverTime);
let LineCoverage = issues.meta.LineCoverage && JSON.parse(issues.meta.LineCoverage);
let InstructionCoverageOverTime = issues.meta.InstructionCoverageOverTime || [];
let PercentageCoverageOverTime = issues.meta.PercentageCoverageOverTime
? JSON.parse(issues.meta.PercentageCoverageOverTime)
: [];
let BranchCoverageOverTime = issues.meta.BranchCoverageOverTime
? JSON.parse(issues.meta.BranchCoverageOverTime)
: [];
let PathCoverageOverTime = issues.meta.PathCoverageOverTime
? JSON.parse(issues.meta.PathCoverageOverTime)
: [];
let LineCoverage = issues.meta.LineCoverage
? JSON.parse(issues.meta.LineCoverage)
: [];
if (InstructionCoverageOverTime &&

@@ -16,10 +25,33 @@ typeof InstructionCoverageOverTime === 'string') {

}
if (InstructionCoverageOverTime) {
const [instructionSeries, instructionsUnit] = normalizeTimeSeries(InstructionCoverageOverTime);
issues.meta = Object.assign({}, issues.meta, { InstructionCoverageOverTime: instructionSeries, InstructionCoverageOverTimeUnit: instructionsUnit });
;
[
InstructionCoverageOverTime,
PercentageCoverageOverTime,
BranchCoverageOverTime,
PathCoverageOverTime,
] = [
InstructionCoverageOverTime,
PercentageCoverageOverTime,
BranchCoverageOverTime,
PathCoverageOverTime,
].map((originalSeries) => {
if (originalSeries.length && originalSeries.length > 0) {
const [series, unit] = normalizeTimeSeries(originalSeries);
return [series, unit];
}
else
return [];
});
if (InstructionCoverageOverTime.length === 2) {
issues.meta = Object.assign({}, issues.meta, { InstructionCoverageOverTime: InstructionCoverageOverTime[0], InstructionCoverageOverTimeUnit: InstructionCoverageOverTime[1] });
}
if (PercentageCoverageOverTime) {
const [percentageSeries, percentageUnit] = normalizeTimeSeries(PercentageCoverageOverTime);
issues.meta = Object.assign({}, issues.meta, { PercentageCoverageOverTime: percentageSeries, PercentageCoverageOverTimeUnit: percentageUnit });
if (PercentageCoverageOverTime.length === 2) {
issues.meta = Object.assign({}, issues.meta, { PercentageCoverageOverTime: PercentageCoverageOverTime[0], PercentageCoverageOverTimeUnit: PercentageCoverageOverTime[1] });
}
if (BranchCoverageOverTime.length === 2) {
issues.meta = Object.assign({}, issues.meta, { BranchCoverageOverTime: BranchCoverageOverTime[0], BranchCoverageOverTimeUnit: BranchCoverageOverTime[1] });
}
if (PathCoverageOverTime.length === 2) {
issues.meta = Object.assign({}, issues.meta, { PathCoverageOverTime: PathCoverageOverTime[0], PathCoverageOverTimeUnit: PathCoverageOverTime[1] });
}
if (LineCoverage) {

@@ -26,0 +58,0 @@ let lineCoverage = {};

2

package.json
{
"name": "mythx-report-helper",
"version": "1.3.0",
"version": "1.4.0",
"description": "TS helper to manage mythx reports",

@@ -5,0 +5,0 @@ "main": "./build/src/index.js",

Sorry, the diff of this file is not supported yet

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