danger-plugin-coverage
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -76,8 +76,4 @@ "use strict"; | ||
} = file; | ||
const fileMetrics = (metrics === null || metrics === void 0 ? void 0 : metrics[0].$) || {}; | ||
const uncoveredLines = lines.filter(line => { | ||
var _line$$; | ||
return !Number(((_line$$ = line.$) === null || _line$$ === void 0 ? void 0 : _line$$.count) || 0); | ||
}); | ||
const fileMetrics = metrics?.[0].$ || {}; | ||
const uncoveredLines = lines.filter(line => !Number(line.$?.count || 0)); | ||
return { ...fileMetrics, | ||
@@ -130,4 +126,2 @@ lines: lines.length, | ||
return parts.map((pathPart, i) => { | ||
var _parts; | ||
const isLastPart = parts.length - 1 === i; | ||
@@ -137,3 +131,3 @@ const newPart = isLastPart ? pathPart : `${pathPart}/`; | ||
if (currentChars + (((_parts = parts[i + 1]) === null || _parts === void 0 ? void 0 : _parts.length) || 0) > maxPerLine) { | ||
if (currentChars + (parts[i + 1]?.length || 0) > maxPerLine) { | ||
currentChars = 0; | ||
@@ -168,8 +162,6 @@ return `${newPart}<br>`; | ||
}) => { | ||
var _danger$git, _danger$git$commits; | ||
const fileMetrics = getFileMetrics(file); | ||
const { | ||
sha | ||
} = ((_danger$git = danger.git) === null || _danger$git === void 0 ? void 0 : (_danger$git$commits = _danger$git.commits) === null || _danger$git$commits === void 0 ? void 0 : _danger$git$commits[danger.git.commits.length - 1]) || {}; | ||
} = danger.git?.commits?.[danger.git.commits.length - 1] || {}; | ||
@@ -287,6 +279,4 @@ const longPath = _path.default.relative(process.cwd(), file.$.path); | ||
}) => { | ||
var _danger$git2, _danger$git3; | ||
const files = getFlatFiles(coverageXml); | ||
const allFiles = [...(((_danger$git2 = danger.git) === null || _danger$git2 === void 0 ? void 0 : _danger$git2.created_files) || []), ...(((_danger$git3 = danger.git) === null || _danger$git3 === void 0 ? void 0 : _danger$git3.modified_files) || [])]; | ||
const allFiles = [...(danger.git?.created_files || []), ...(danger.git?.modified_files || [])]; | ||
const relevantFiles = files.filter(file => allFiles.includes(_path.default.relative(process.cwd(), file.$.path))); | ||
@@ -293,0 +283,0 @@ |
{ | ||
"name": "danger-plugin-coverage", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "A Danger plugin to report code coverage.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -34,4 +34,4 @@ # danger-plugin-coverage | ||
|Impacted Files|% Stmts|% Branch|% Funcs|% Line|Uncovered Lines| | ||
|---|:-:|:-:|:-:|:-:|:-:| | ||
|Impacted Files|% Stmts|% Branch|% Funcs|% Line|Uncovered Lines|| | ||
|---|:-:|:-:|:-:|:-:|:-:|:-:| | ||
|[src/module-one.js]()|100|100|100|100||:white_check_mark:| | ||
@@ -48,4 +48,4 @@ |[src/module-two.js]()|95.24|33.33|66.67|80|[1](), [42](), [1337]()...|:x:| | ||
|Impacted Files|% Stmts|% Branch|% Funcs|% Lines|| | ||
|---|:-:|:-:|:-:|:-:|:-:| | ||
|Impacted Files|% Stmts|% Branch|% Funcs|% Line|Uncovered Lines|| | ||
|---|:-:|:-:|:-:|:-:|:-:|:-:| | ||
|[src/module-six.js]()|100|100|100|100||:white_check_mark:| | ||
@@ -52,0 +52,0 @@ |[src/module-seven.js]()|100|100|100|100||:white_check_mark:| |
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
57052
23
1388