@@ -89435,7 +89435,7 @@ var fromString = function (str) {
89435
89435
return new Stats({
89436
89436
lines: new Coverage(m.statements, m.coveredstatements),
89437
89437
methods: new Coverage(m.methods, m.coveredmethods),
89438
- branchs : new Coverage(m.conditionals, m.coveredconditionals)
89438
+ branches : new Coverage(m.conditionals, m.coveredconditionals)
89439
89439
}, allFiles
89440
89440
.map(function (f) {
89441
89441
f._attributes.name = f._attributes.path || f._attributes.name;
@@ -89450,7 +89450,7 @@ var fromString = function (str) {
89450
89450
metrics: {
89451
89451
lines: new Coverage(m.statements, m.coveredstatements),
89452
89452
methods: new Coverage(m.methods, m.coveredmethods),
89453
- branchs : new Coverage(m.conditionals, m.coveredconditionals)
89453
+ branches : new Coverage(m.conditionals, m.coveredconditionals)
89454
89454
}
89455
89455
}));
89456
89456
}, new Map()));
@@ -89543,10 +89543,11 @@ var limitedFragment = function (limit, noSpaceLeft) {
89543
89543
}
89544
89544
return html;
89545
89545
};
89546
- var line = function (name, m, lang, o, showDelta) {
89546
+ var line = function (name, m, lang, o, showDelta, showBranchesColumn ) {
89547
89547
if (o === void 0) { o = null; }
89548
89548
if (showDelta === void 0) { showDelta = false; }
89549
- return tr.apply(void 0, __spreadArray([td(name)], ["lines", "methods", "branchs"].map(function (p) {
89549
+ if (showBranchesColumn === void 0) { showBranchesColumn = true; }
89550
+ return tr.apply(void 0, __spreadArray([td(name)], __spreadArray(["lines", "methods"], (showBranchesColumn ? ["branches"] : []), true).map(function (p) {
89550
89551
return td(c2s(m[p], lang) +
89551
89552
(!showDelta ? "" : compareFile(m[p], o && o[p], lang)), {
89552
89553
align: "right"
@@ -89573,22 +89574,26 @@ var total = function (name, c, oldC) {
89573
89574
var link = function (folder, file) {
89574
89575
return a("".concat(baseUrl, "/").concat(folder, "/").concat(file), file);
89575
89576
};
89576
- var html = function (withTable, c, o, deltaPerFile ) {
89577
+ var html = function (c, o, configs ) {
89577
89578
if (o === void 0) { o = null; }
89578
- if (deltaPerFile === void 0) { deltaPerFile = false; }
89579
- return (withTable ? tableWrap(c, o, deltaPerFile) : span)("Summary - ".concat([
89579
+ if (configs === void 0) { configs = { withTable: false, deltaPerFile: false, showBranchesColumn: true }; }
89580
+ return (configs.withTable
89581
+ ? tableWrap(c, o, configs.deltaPerFile, configs.showBranchesColumn)
89582
+ : span)("Summary - ".concat([
89580
89583
total("Lines", c.total.lines, o === null || o === void 0 ? void 0 : o.total.lines),
89581
89584
total("Methods", c.total.methods, o === null || o === void 0 ? void 0 : o.total.methods),
89582
- total("Branchs", c.total.branchs, o === null || o === void 0 ? void 0 : o.total.branchs),
89585
+ configs.showBranchesColumn &&
89586
+ total("Branches", c.total.branches, o === null || o === void 0 ? void 0 : o.total.branches),
89583
89587
]
89584
89588
.filter(function (v) { return v; })
89585
89589
.join(" | ")));
89586
89590
};
89587
- var tableWrap = function (c, o, showDelta) {
89591
+ var tableWrap = function (c, o, showDelta, showBranchesColumn ) {
89588
89592
if (o === void 0) { o = null; }
89589
89593
if (showDelta === void 0) { showDelta = false; }
89594
+ if (showBranchesColumn === void 0) { showBranchesColumn = true; }
89590
89595
return function (summaryText) {
89591
- return details(summary(summaryText), "<br />", table(thead(tr(th("Files"), th("Lines"), th("Methods"), th("Branchs "))), tbody(c.folders.size === 0
89596
+ return details(summary(summaryText), "<br />", table(thead(tr(th("Files"), th("Lines"), th("Methods"), showBranchesColumn && th("Branches "))), tbody(c.folders.size === 0
89592
89597
? tr(td("No files reported or matching filters", { colspan: 4 }))
89593
89598
: limitedFragment.apply(void 0, __spreadArray([65536 - 4000,
89594
89599
tr(td(b("Table truncated to fit comment"), { colspan: 4 }))], Array.from(c.folders.entries())
@@ -89598,7 +89603,7 @@ var tableWrap = function (c, o, showDelta) {
89598
89603
tr(td(b(folder.name), { colspan: 4 }))
89599
89604
], folder.files.map(function (f) {
89600
89605
var _a;
89601
- return line(" ".concat(link(folder.name, f.name)), f.metrics, lang, (_a = o === null || o === void 0 ? void 0 : o.get(k, f.name)) === null || _a === void 0 ? void 0 : _a.metrics, showDelta);
89606
+ return line(" ".concat(link(folder.name, f.name)), f.metrics, lang, (_a = o === null || o === void 0 ? void 0 : o.get(k, f.name)) === null || _a === void 0 ? void 0 : _a.metrics, showDelta, showBranchesColumn );
89602
89607
}), true);
89603
89608
})
89604
89609
.reduce(function (accum, item) { return __spreadArray(__spreadArray([], accum, true), item, true); }, []), false)))));
@@ -89611,8 +89616,9 @@ var file = coreExports.getInput("file") || process.env.FILE;
89611
89616
var baseFile = coreExports.getInput("base-file") || process.env.BASE_FILE;
89612
89617
var onlyWithCover = coreExports.getBooleanInput("only-with-cover");
89613
89618
var onlyWithCoverableLines = coreExports.getBooleanInput("only-with-coverable-lines");
89614
- var withChart = coreExports.getInput("with-chart") == "true";
89615
- var withTable = coreExports.getInput("with-table") == "true";
89619
+ var withChart = coreExports.getBooleanInput("with-chart");
89620
+ var withTable = coreExports.getBooleanInput("with-table");
89621
+ var showBranchesColumn = coreExports.getBooleanInput("with-branches");
89616
89622
var tableWithOnlyBellow = Number(coreExports.getInput("table-below-coverage") || 100);
89617
89623
var tableWithOnlyAbove = Number(coreExports.getInput("table-above-coverage") || 0);
89618
89624
var tableWithChangeAbove = Number(coreExports.getInput("table-coverage-change") || 0);
@@ -89635,15 +89641,19 @@ var comment = function (cStats, oldStats, coverageType) { return __awaiter$1(voi
89635
89641
}));
89636
89642
});
89637
89643
return [2 /*return*/, ((withChart ? chart(cStats, oldStats) : "") +
89638
- html(withTable, filter(cStats, {
89644
+ html(filter(cStats, {
89639
89645
cover: onlyWithCover,
89640
89646
coverableLines: onlyWithCoverableLines
89641
89647
}, {
89642
89648
type: coverageType,
89643
89649
min: tableWithOnlyAbove,
89644
89650
max: tableWithOnlyBellow,
89645
89651
delta: tableWithChangeAbove
89646
- }, oldStats), oldStats, showPercentageChangePerFile))];
89652
+ }, oldStats), oldStats, {
89653
+ withTable: withTable,
89654
+ deltaPerFile: showPercentageChangePerFile,
89655
+ showBranchesColumn: showBranchesColumn
89656
+ }))];
89647
89657
});
89648
89658
}); };
89649
89659
var filter = function (s, onlyWith, onlyBetween, o) {
@@ -89729,7 +89739,7 @@ var run = function () { return __awaiter$1(void 0, void 0, void 0, function () {
89729
89739
return __generator(this, function (_k) {
89730
89740
switch (_k.label) {
89731
89741
case 0:
89732
- if (!["lines", "methods", "branchs "].includes(tableWithTypeLimit)) {
89742
+ if (!["lines", "methods", "branches "].includes(tableWithTypeLimit)) {
89733
89743
coreExports.error("there is no coverage type ".concat(tableWithTypeLimit));
89734
89744
return [2 /*return*/];
89735
89745
}
0 commit comments