diff --git a/.github/generate-dist-files-size-diff.mjs b/.github/generate-dist-files-size-diff.mjs index 6df0b3c575..40bd4d03f3 100644 --- a/.github/generate-dist-files-size-diff.mjs +++ b/.github/generate-dist-files-size-diff.mjs @@ -85,14 +85,25 @@ export function main() { return output; } + const displayedPackageRow = new Set(); output += 'Thanks for the PR! Here is the difference in size of the dist files between the base and the PR.\n'; output += 'Please review the changes and make sure they are expected.\n\n'; output += `
File | Diff (B) | Diff (%) |
---|---|---|
${row} | ||
${file} ${details.state === 'added' ? '(new)' : (details.state === 'removed' ? '(deleted)' : '')} |
+ ${fileShort} ${details.state === 'added' ? '(new)' : (details.state === 'removed' ? '(deleted)' : '')} |
Size: ${formatBytes(base[file]?.size || 0)} → ${formatBytes(pr[file]?.size || 0)} Gzip: ${formatBytes(base[file]?.size_gz || 0)} → ${formatBytes(pr[file]?.size_gz || 0)} diff --git a/.github/workflows/dist-files-size-diff.yaml b/.github/workflows/dist-files-size-diff.yaml index 679cec6787..a32bd41e28 100644 --- a/.github/workflows/dist-files-size-diff.yaml +++ b/.github/workflows/dist-files-size-diff.yaml @@ -3,9 +3,8 @@ name: Dist Files Size Diff on: pull_request: paths: - - 'src/*/**' - - '!src/*/doc/**' - - '.github/**' + - 'src/*/assets/dist/**' + - 'src/*/src/Bridge/*/assets/dist/**' jobs: dist-files-size-diff: @@ -60,6 +59,7 @@ jobs: with: result-encoding: string script: | + console.log(context); const { main } = await import('${{ github.workspace }}/.github/generate-dist-files-size-diff.mjs') return await main() |