Skip to content

chore(deps): update dependency lucide-react to v1.33.0 #1884

chore(deps): update dependency lucide-react to v1.33.0

chore(deps): update dependency lucide-react to v1.33.0 #1884

Workflow file for this run

name: Bundle Size Check
on:
pull_request:
branches:
- main
paths:
- 'src/**'
- 'package.json'
- 'package-lock.json'
- 'tsup.config.ts'
- '.sizelimit.json'
permissions:
contents: read
pull-requests: write
jobs:
size-check:
runs-on: ubuntu-latest
name: Check bundle size
steps:
- name: Checkout PR code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '24.15.0'
cache: 'npm'
- name: Install dependencies
run: npm ci --include=optional --ignore-scripts
- name: Build current branch
run: npm run build
- name: Analyze current bundle size
run: npm run size -- --output out/current-bundle.json
- name: Checkout base branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ github.base_ref }}
path: base
persist-credentials: false
- name: Check if comparison script exists on base
id: check_script
run: |
if [ -f "base/scripts/compare-sizes.ts" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
echo "⚠️ Comparison script not found on base branch. Skipping size comparison."
fi
- name: Install dependencies (base)
if: steps.check_script.outputs.exists == 'true'
working-directory: base
run: npm ci --include=optional --ignore-scripts
- name: Build base branch
if: steps.check_script.outputs.exists == 'true'
working-directory: base
run: npm run build
- name: Analyze base bundle size
if: steps.check_script.outputs.exists == 'true'
working-directory: base
run: npm run size -- --output ../out/base-bundle.json
- name: Compare bundle sizes
id: compare
run: |
# Check if we have comparison data
if [ "${STEPS_CHECK_SCRIPT_OUTPUTS_EXISTS}" != "true" ]; then
echo "⚠️ Comparison script not found in base branch. Showing current bundle size only."
npm exec tsx scripts/format-current-size.ts out/current-bundle.json > out/size-report.md
else
# Run comparison and capture output
npm exec tsx scripts/compare-sizes.ts out/base-bundle.json out/current-bundle.json > out/size-report.md 2>&1 || true
fi
# Read the report for the PR comment
REPORT=$(cat out/size-report.md)
# Set output for PR comment (escape for GitHub Actions)
echo "report<<EOF" >> $GITHUB_OUTPUT
echo "$REPORT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
env:
STEPS_CHECK_SCRIPT_OUTPUTS_EXISTS: ${{ steps.check_script.outputs.exists }}
- name: Post PR comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const report = process.env.SIZE_REPORT;
// Find existing comment
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const botComment = comments.find(comment =>
comment.user.type === 'Bot' &&
comment.body.includes('📦 Bundle Size Report')
);
const commentBody = report;
if (botComment) {
// Update existing comment
await github.rest.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: botComment.id,
body: commentBody
});
} else {
// Create new comment
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody
});
}
env:
SIZE_REPORT: ${{ steps.compare.outputs.report }}
- name: Check size limits
run: npm run size:check
- name: Upload bundle analysis
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: always()
with:
name: bundle-size-analysis
path: |
out/current-bundle.json
out/base-bundle.json
out/size-report.md
retention-days: 30