Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/generate-dist-files-size-diff.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function main() {
const base = JSON.parse(process.env.BASE_DIST_FILES);
/** @type {Record<string, {size: number, size_gz: number}>} */
const pr = JSON.parse(process.env.PR_DIST_FILES);
let output = '<h1>📊 Dist packagesFiles size difference</h1>\n\n';
let output = '<h1>📊 Packages dist files size difference</h1>\n\n';

/**
* @type {Map<string, {
Expand Down Expand Up @@ -139,7 +139,7 @@ export function main() {
return output;
}

output += 'Thanks for the PR! Here is the difference in size of the dist packagesFiles between the base and the PR.\n';
output += 'Thanks for the PR! Here is the difference in size of the packages dist files between the base branch and the PR.\n';
output += 'Please review the changes and make sure they are expected.\n\n';
output += `<table>
<thead><tr><th>File</th><th>Before (Size / Gzip)</th><th>After (Size / Gzip)</th></tr></thead>
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dist-files-size-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
set -e

FILES=$(find src -mindepth 2 -path '*/assets/dist/*' \( -name "*.js" -o -name "*.css" \) -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
FILES=$(find src -mindepth 2 -type f -path '*/assets/dist/*' -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
echo "{\"$file\": {\"size\": $(wc -c < "$file"), \"size_gz\": $(gzip -c "$file" | wc -c)}}"
done | jq -s 'add' -c)

Expand All @@ -38,7 +38,7 @@ jobs:
run: |
set -e

FILES=$(find src -mindepth 2 -path '*/assets/dist/*' \( -name "*.js" -o -name "*.css" \) -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
FILES=$(find src -mindepth 2 -type f -path '*/assets/dist/*' -not \( -path '*/tests/*' -o -path '*/public/*' -o -path '*/vendor/*' \) | sort | while read -r file; do
echo "{\"$file\": {\"size\": $(wc -c < "$file"), \"size_gz\": $(gzip -c "$file" | wc -c)}}"
done | jq -s 'add' -c)

Expand Down