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

monocart-coverage-reports

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monocart-coverage-reports - npm Package Compare versions

Comparing version 1.0.4 to 1.0.6

6

lib/converter/collect-source-maps.js

@@ -26,8 +26,8 @@ const fs = require('fs');

const p = fileURLToPath(url);
const json = Util.readJSONSync(p);
if (!json) {
const content = Util.readFileSync(p);
if (!content) {
Util.logDebug(EC.red(`failed to load sourcemap ${p}`));
return;
}
return json;
return JSON.parse(content);
}

@@ -34,0 +34,0 @@

@@ -14,2 +14,10 @@

export type Watermarks = [number, number] | {
statements?: [number, number],
functions?: [number, number],
branches?: [number, number],
lines?: [number, number],
bytes?: [number, number]
}
export type ReportDescription =

@@ -114,11 +122,14 @@ ['v8'] |

// (Object) Istanbul: { statements:[50,80], functions:[50,80], branches:[50,80], lines:[50,80] }, V8: { bytes:[50,80] }.
watermarks?: [number, number] | {
statements?: [number, number],
functions?: [number, number],
branches?: [number, number],
lines?: [number, number],
bytes?: [number, number]
}
};
watermarks?: Watermarks
}
export type CoverageResults = {
type: "v8" | "istanbul",
reportPath: string,
name: string,
watermarks: Watermarks,
summary: any,
files: any
}
export class CoverageReport {

@@ -131,3 +142,3 @@ constructor(options?: CoverageReportOptions);

// generate report
generate: () => Promise<any>;
generate: () => Promise<CoverageResults>;

@@ -134,0 +145,0 @@ // check if cache exists

{
"name": "monocart-coverage-reports",
"version": "1.0.4",
"version": "1.0.6",
"description": "Monocart coverage reports",

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

@@ -26,4 +26,4 @@ # Monocart Coverage Reports

await coverageReport.add(coverageData2);
const report = await coverageReport.generate();
console.log(report.summary);
const coverageResults = await coverageReport.generate();
console.log(coverageResults.summary);
```

@@ -96,4 +96,4 @@ - [example v8](https://github.com/cenfun/monocart-coverage-reports/blob/main/tests/test-v8.js)

const coverageReport = new CoverageReport(options);
const report = await coverageReport.generate();
console.log(report.summary);
const coverageResults = await coverageReport.generate();
console.log(coverageResults.summary);
```

@@ -100,0 +100,0 @@

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