istanbul-reports
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -6,2 +6,9 @@ # Change Log | ||
### [3.0.5](https://www.github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.0.4...istanbul-reports-v3.0.5) (2021-10-13) | ||
### Bug Fixes | ||
* cobertura reports in root folder ([#571](https://www.github.com/istanbuljs/istanbuljs/issues/571)) ([596f6ff](https://www.github.com/istanbuljs/istanbuljs/commit/596f6ff1342ae4baa6688bf3ee7786c75d4df947)) | ||
### [3.0.4](https://www.github.com/istanbuljs/istanbuljs/compare/istanbul-reports-v3.0.3...istanbul-reports-v3.0.4) (2021-10-12) | ||
@@ -8,0 +15,0 @@ |
@@ -14,4 +14,7 @@ 'use strict'; | ||
opts = opts || {}; | ||
this.cw = null; | ||
this.xml = null; | ||
this.timestamp = opts.timestamp || Date.now().toString(); | ||
this.projectRoot = opts.projectRoot || process.cwd(); | ||
@@ -45,3 +48,3 @@ this.file = opts.file || 'cobertura-coverage.xml'; | ||
'branch-rate': metrics.branches.pct / 100.0, | ||
timestamp: Date.now().toString(), | ||
timestamp: this.timestamp, | ||
complexity: '0', | ||
@@ -57,5 +60,2 @@ version: '0.1' | ||
onSummary(node) { | ||
if (node.isRoot()) { | ||
return; | ||
} | ||
const metrics = node.getCoverageSummary(true); | ||
@@ -66,3 +66,3 @@ if (!metrics) { | ||
this.xml.openTag('package', { | ||
name: escape(asJavaPackage(node)), | ||
name: node.isRoot() ? 'main' : escape(asJavaPackage(node)), | ||
'line-rate': metrics.lines.pct / 100.0, | ||
@@ -75,3 +75,4 @@ 'branch-rate': metrics.branches.pct / 100.0 | ||
onSummaryEnd(node) { | ||
if (node.isRoot()) { | ||
const metrics = node.getCoverageSummary(true); | ||
if (!metrics) { | ||
return; | ||
@@ -78,0 +79,0 @@ } |
{ | ||
"name": "istanbul-reports", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "istanbul reports", | ||
@@ -5,0 +5,0 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", |
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
287075