(rows, totalMasterFileSize, totalFileSize)
| 77 | }; |
| 78 | |
| 79 | const getSummary = (rows, totalMasterFileSize, totalFileSize) => { |
| 80 | const numFiles = rows.length; |
| 81 | const maybeS = rows.length > 0 ? 's' : ''; |
| 82 | const byteDiff = absDiff(totalMasterFileSize, totalFileSize); |
| 83 | const percentDiff = percDiff(totalMasterFileSize, totalFileSize); |
| 84 | |
| 85 | return `A total of ${numFiles} file${maybeS} have changed, with a combined diff of ${byteDiff} (${percentDiff}).`; |
| 86 | }; |
| 87 | |
| 88 | const run = async () => { |
| 89 | const minified = await getChangedMinifiedFiles(); |