ReviewOS

also looking at this

stacks/ts-tokens

chore(deps): update all non-major dependencies

#418
Closed chris wants to merge buddy-bot/update-non-major-updates-1770683029988 into main
11 files +442 -40
.github/workflows/bundle-size.ymladded+40-0
Changes to .github/workflows/bundle-size.yml
@@ -0,0 +1,40 @@
1name: Bundle Size Check
2
3on:
4 pull_request:
5 paths:
6 - 'packages/ts-tokens/src/**'
7 - 'packages/react/src/**'
8 - 'packages/vue/src/**'
9
10jobs:
11 bundle-size:
12 runs-on: ubuntu-latest
13 steps:
14 - uses: actions/checkout@v4
15 - uses: oven-sh/setup-bun@v2.1.2
16 - uses: actions/cache@v4
17 with:
18 path: node_modules
19 key: node-modules-${{ hashFiles('**/bun.lock') }}
20 - run: bun install
21 - run: bun run build
22 working-directory: packages/ts-tokens
23 - name: Check bundle size
24 run: |
25 node -e "
26 const { analyzeBundleSize, checkBundleBudget } = require('./packages/ts-tokens/dist/utils/bundle-optimizer.js');
27 analyzeBundleSize('./packages/ts-tokens/dist').then(report => {
28 console.log('Bundle Size Report:');
29 console.log('Total:', (report.totalSizeBytes / 1024).toFixed(1), 'KB');
30 console.log('Gzip:', (report.totalGzipBytes / 1024).toFixed(1), 'KB');
31 report.entries.sort((a,b) => b.sizeBytes - a.sizeBytes).slice(0,10).forEach(e => {
32 console.log(' ' + e.name + ': ' + (e.sizeBytes / 1024).toFixed(1) + ' KB');
33 });
34 const result = checkBundleBudget(report, { maxTotalBytes: 5 * 1024 * 1024 });
35 if (!result.passed) {
36 console.error('Budget violations:', result.violations);
37 process.exit(1);
38 }
39 });
40 "