Skip to content

Commit 2e082a9

Browse files
committed
[wip]
1 parent d2bb7fa commit 2e082a9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/compare-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
- name: Combine results
104104
id: combine
105105
run: |
106-
ls -r
106+
tree .
107107
cat results/**/*.txt > combined.txt
108108
echo "combined<<EOF" >> $GITHUB_OUTPUT
109109
cat combined.txt >> $GITHUB_OUTPUT

scripts/compare-builds/web.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const formatBytes = bytes => {
3030
const formatDiff = (base, head) => {
3131
const diff = head - base;
3232
const pct = base ? `${((diff / base) * 100).toFixed(2)}%` : 'N/A';
33-
const sign = diff > 0 ? '+' : diff < 0 ? '' : '';
33+
const sign = diff > 0 ? '+' : '';
3434

3535
return `${sign}${formatBytes(diff)} (${sign}${pct})`;
3636
};
@@ -83,11 +83,11 @@ if (changedFiles.length) {
8383
const baseSize = baseStats.get(file);
8484
const headSize = headStats.get(file);
8585

86-
if (baseSize === undefined) {
86+
if (!baseSize) {
8787
return `| \`${file}\` | - | ${formatBytes(headSize)} | Added |`;
8888
}
8989

90-
if (headSize === undefined) {
90+
if (!headSize) {
9191
return `| \`${file}\` | ${formatBytes(baseSize)} | - | Removed |`;
9292
}
9393

0 commit comments

Comments
 (0)