Skip to content

Commit

Permalink
wtf
Browse files Browse the repository at this point in the history
  • Loading branch information
illright committed Dec 17, 2024
1 parent ce4cd6a commit 86b7110
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/bundle-size.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ jobs:
const sizesPR = parseDuOutput(fs.readFileSync(`sizes-${${{ toJson(github.head_ref) }}}.txt`, 'utf8'));
core.summary.addHeading('📊 Package size report', '3');
core.summary.addTable([
{ data: 'Package', header: true },
{ data: 'Before', header: true },
{ data: 'After', header: true },
].concat(Object.keys(sizes).flatMap((packageName) => {
const size = sizes[packageName];
const sizePR = sizesPR[packageName];
return [packageName, formatSize(size), sizePR === size ? 'No change' : formatSize(sizePR)];
})));
...(['Package', 'Before', 'After'].map((data) => ({ data, header: true }))),
...Object.keys(sizes).flatMap((packageName) => {
const size = sizes[packageName];
const sizePR = sizesPR[packageName];
return [packageName, formatSize(size), sizePR === size ? 'No change' : formatSize(sizePR)];
}).map((data) => ({ data })),
);
core.summary.write();

0 comments on commit 86b7110

Please sign in to comment.