istanbul-reports
Advanced tools
Comparing version 1.4.1 to 1.5.0
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="1.5.0"></a> | ||
# [1.5.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.4.1...istanbul-reports@1.5.0) (2018-06-06) | ||
### Features | ||
* ability to skip rows with full coverage ([#170](https://github.com/istanbuljs/istanbuljs/issues/170)) ([bbcdc07](https://github.com/istanbuljs/istanbuljs/commit/bbcdc07)) | ||
<a name="1.4.1"></a> | ||
@@ -8,0 +19,0 @@ ## [1.4.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@1.4.0...istanbul-reports@1.4.1) (2018-05-31) |
@@ -130,3 +130,10 @@ /* | ||
function tableRow(node, context, colorizer, maxNameCols, level, skipEmpty) { | ||
function isFull(metrics) { | ||
return metrics.statements.pct === 100 && | ||
metrics.branches.pct === 100 && | ||
metrics.functions.pct === 100 && | ||
metrics.lines.pct === 100; | ||
} | ||
function tableRow(node, context, colorizer, maxNameCols, level, skipEmpty, skipFull) { | ||
var name = nodeName(node), | ||
@@ -136,2 +143,4 @@ metrics = node.getCoverageSummary(), | ||
if (skipEmpty && isEmpty) { return ''; } | ||
if (skipFull && isFull(metrics)) { return ''; } | ||
var mm = { | ||
@@ -167,2 +176,3 @@ statements: isEmpty ? 0 : metrics.statements.pct, | ||
this.skipEmpty = opts.skipEmpty; | ||
this.skipFull = opts.skipFull; | ||
} | ||
@@ -191,3 +201,3 @@ | ||
var nodeDepth = depthFor(node); | ||
var row = tableRow(node, context, this.cw.colorize.bind(this.cw),this.nameWidth, nodeDepth, this.skipEmpty); | ||
var row = tableRow(node, context, this.cw.colorize.bind(this.cw),this.nameWidth, nodeDepth, this.skipEmpty, this.skipFull); | ||
if (row) { this.cw.println(row); } | ||
@@ -194,0 +204,0 @@ }; |
{ | ||
"name": "istanbul-reports", | ||
"version": "1.4.1", | ||
"version": "1.5.0", | ||
"description": "istanbul reports", | ||
@@ -16,11 +16,11 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", | ||
"dependencies": { | ||
"handlebars": "^4.0.3" | ||
"handlebars": "^4.0.11" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"is-windows": "^1.0.1", | ||
"istanbul-lib-coverage": "^1.2.0", | ||
"istanbul-lib-report": "^1.1.4", | ||
"jshint": "^2.8.0", | ||
"mocha": "^3.1.2" | ||
"chai": "^4.1.2", | ||
"is-windows": "^1.0.2", | ||
"istanbul-lib-coverage": "^2.0.0", | ||
"istanbul-lib-report": "^2.0.0", | ||
"jshint": "^2.9.5", | ||
"mocha": "^5.2.0" | ||
}, | ||
@@ -27,0 +27,0 @@ "license": "BSD-3-Clause", |
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
89199
1789
Updatedhandlebars@^4.0.11