@@ -39,16 +39,11 @@ async function generateReport(
3939 ] ) ;
4040
4141 // All unique tests from both branches
42- const allTests = new Set ( [
43- ...Object . keys ( prGrouped ) ,
44- ...Object . keys ( targetGrouped ) ,
45- ] ) ;
42+ const allTests = new Set ( [ ...Object . keys ( prGrouped ) , ...Object . keys ( targetGrouped ) ] ) ;
4643
4744 // Split tests into static and dynamic
48- const staticTests = [ ...allTests ] . filter ( ( t ) => ! t . includes ( '_from_' ) )
49- . toSorted ( ) ;
50- const dynamicTests = [ ...allTests ] . filter ( ( t ) => t . includes ( '_from_' ) )
51- . toSorted ( ) ;
45+ const staticTests = [ ...allTests ] . filter ( ( t ) => ! t . includes ( '_from_' ) ) . toSorted ( ) ;
46+ const dynamicTests = [ ...allTests ] . filter ( ( t ) => t . includes ( '_from_' ) ) . toSorted ( ) ;
5247
5348 // Summary statistics
5449 let totalDecreased = 0 ;
@@ -93,8 +88,7 @@ async function generateReport(
9388 output += '## 📊 Bundle Size Comparison\n\n' ;
9489 output += '| 🟢 Decreased | ➖ Unchanged | 🔴 Increased | ❔ Unknown |\n' ;
9590 output += '| :---: | :---: | :---: | :---: |\n' ;
96- output +=
97- `| **${ totalDecreased } ** | **${ totalUnchanged } ** | **${ totalIncreased } ** | **${ totalUnknown } ** |\n\n` ;
91+ output += `| **${ totalDecreased } ** | **${ totalUnchanged } ** | **${ totalIncreased } ** | **${ totalUnknown } ** |\n\n` ;
9892
9993 output += `## 👀 Notable results\n\n` ;
10094 output += `### Static test results:\n${ staticTable } \n\n` ;
@@ -104,8 +98,7 @@ async function generateReport(
10498 output += `${ allTable } \n\n` ;
10599
106100 if ( allBundlers . size === 1 ) {
107- output +=
108- `If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.\n` ;
101+ output += `If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu.\n` ;
109102 }
110103
111104 return output ;
@@ -115,9 +108,7 @@ async function main() {
115108 const [ prFile , targetFile ] = process . argv . slice ( 2 ) ;
116109
117110 if ( ! prFile || ! targetFile ) {
118- console . error (
119- 'Usage: compare-results.js <pr-results.json> [target-results.json]' ,
120- ) ;
111+ console . error ( 'Usage: compare-results.js <pr-results.json> [target-results.json]' ) ;
121112 process . exit ( 1 ) ;
122113 }
123114
@@ -142,10 +133,7 @@ async function main() {
142133 }
143134
144135 // Generate appropriate report
145- const markdownReport = await generateReport (
146- prResults ,
147- targetResults ,
148- ) ;
136+ const markdownReport = await generateReport ( prResults , targetResults ) ;
149137 console . log ( markdownReport ) ;
150138}
151139
0 commit comments