Skip to content

Commit 3247805

Browse files
committed
fix formatting
1 parent e9ce11b commit 3247805

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dev-packages/size-limit-gh-action/utils/SizeLimitFormatter.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export class SizeLimitFormatter {
1212
return bytes.format(size, { unitSeparator: ' ' });
1313
}
1414

15-
formatSizeLimitResult(size, sizeLimit, passed) {
15+
formatName(name, sizeLimit, passed) {
1616
if (passed) {
17-
return this.formatBytes(size);
17+
return name;
1818
}
1919

20-
return `⛔️ ${this.formatBytes(size)}\n(max: ${this.formatBytes(sizeLimit)})`;
20+
return `⛔️ ${name} (max: ${this.formatBytes(sizeLimit)})`;
2121
}
2222

2323
formatPercentageChange(base = 0, current = 0) {
@@ -72,8 +72,8 @@ export class SizeLimitFormatter {
7272

7373
formatSizeResult(name, base, current) {
7474
return [
75-
name,
76-
this.formatSizeLimitResult(current.size, current.sizeLimit, current.passed),
75+
this.formatName(name, current.sizeLimit, current.passed),
76+
this.formatBytes(current.size),
7777
this.formatPercentageChange(base.size, current.size),
7878
this.formatChange(base.size, current.size),
7979
];

0 commit comments

Comments
 (0)