istanbul-reports
Advanced tools
Comparing version 3.0.0-alpha.6 to 3.0.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [3.0.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.6...istanbul-reports@3.0.0) (2019-12-20) | ||
### Features | ||
* **text:** Coalesce ranges of missing lines ([#511](https://github.com/istanbuljs/istanbuljs/issues/511)) ([54636fc](https://github.com/istanbuljs/istanbuljs/commit/54636fc9acbb53e5724fe9018837d0d205413194)) | ||
# [3.0.0-alpha.6](https://github.com/istanbuljs/istanbuljs/compare/istanbul-reports@3.0.0-alpha.5...istanbul-reports@3.0.0-alpha.6) (2019-12-07) | ||
@@ -8,0 +19,0 @@ |
@@ -81,3 +81,21 @@ /* | ||
} | ||
return missingLines.join(','); | ||
const ranges = missingLines | ||
.reduce((acum, line) => { | ||
line = parseInt(line); | ||
const range = acum[acum.length - 1]; | ||
if (range && range[range.length - 1] === line - 1) range.push(line); | ||
else acum.push([line]); | ||
return acum; | ||
}, []) | ||
.map(range => { | ||
const { length } = range; | ||
if (length <= 2) return range; | ||
return `${range[0]}-${range[length - 1]}`; | ||
}); | ||
return [].concat(...ranges).join(','); | ||
} | ||
@@ -84,0 +102,0 @@ |
{ | ||
"name": "istanbul-reports", | ||
"version": "3.0.0-alpha.6", | ||
"version": "3.0.0", | ||
"description": "istanbul reports", | ||
@@ -18,3 +18,3 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", | ||
"html-escaper": "^2.0.0", | ||
"istanbul-lib-report": "^3.0.0-alpha.2" | ||
"istanbul-lib-report": "^3.0.0" | ||
}, | ||
@@ -28,3 +28,3 @@ "devDependencies": { | ||
"is-windows": "^1.0.2", | ||
"istanbul-lib-coverage": "^3.0.0-alpha.2", | ||
"istanbul-lib-coverage": "^3.0.0", | ||
"mocha": "^6.2.2", | ||
@@ -62,3 +62,3 @@ "nyc": "^15.0.0-beta.2", | ||
}, | ||
"gitHead": "9546946f0e4bc80714a5b318c59e459781f05550" | ||
"gitHead": "5319df684b508ff6fb19fe8b9a6147a3c5924e4b" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
282839
3784
0
Updatedistanbul-lib-report@^3.0.0