also looking at this
chore(deps): update all non-major dependencies
#418
11 files
+442
-40
Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.
| @@ -0,0 +1,40 @@ | ||
| 1 | name: Bundle Size Check | |
| 2 | ||
| 3 | on: | |
| 4 | pull_request: | |
| 5 | paths: | |
| 6 | - 'packages/ts-tokens/src/**' | |
| 7 | - 'packages/react/src/**' | |
| 8 | - 'packages/vue/src/**' | |
| 9 | ||
| 10 | jobs: | |
| 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 | " | |
| @@ -0,0 +1,26 @@ | ||
| 1 | { | |
| 2 | "name": "candy-machine-ui", | |
| 3 | "private": true, | |
| 4 | "version": "0.0.0", | |
| 5 | "type": "module", | |
| 6 | "scripts": { | |
| 7 | "dev": "vite", | |
| 8 | "build": "tsc && vite build", | |
| 9 | "preview": "vite preview" | |
| 10 | }, | |
| 11 | "dependencies": { | |
| 12 | "bun": "^1.3.9", | |
| 13 | "dev": "^0.1.3", | |
| 14 | "react": "^18.3.0", | |
| 15 | "react-dom": "^18.3.0", | |
| 16 | "ts-tokens": "workspace:*" | |
| 17 | }, | |
| 18 | "devDependencies": { | |
| 19 | "@types/react": "^18.3.0", | |
| 20 | "@types/react-dom": "^18.3.0", | |
| 21 | "@vitejs/plugin-react": "^4.3.0", | |
| 22 | "typescript": "^5.9.3", | |
| 23 | "vite": "^5.4.0", | |
| 24 | "vite-plugin-node-polyfills": "^0.25.0" | |
| 25 | } | |
| 26 | } | |
| @@ -44,7 +44,8 @@ | ||
| 44 | 44 | "dist" |
| 45 | 45 | ], |
| 46 | 46 | "scripts": { |
| 47 | "build": "bun build ./src/index.ts --outdir ./dist --target browser", | |
| 47 | "dev": "vite --config vite.config.ts", | |
| 48 | "build": "bun build ./src/index.ts --outdir ./dist --target browser --sourcemap=external", | |
| 48 | 49 | "lint": "bunx --bun eslint .", |
| 49 | 50 | "lint:fix": "bunx --bun eslint . --fix", |
| 50 | 51 | "release": "bun publish --access public --provenance", |
| @@ -60,8 +61,10 @@ | ||
| 60 | 61 | "@solana/web3.js": ">=1.87.0" |
| 61 | 62 | }, |
| 62 | 63 | "devDependencies": { |
| 63 | "vue": "^3.5.28", | |
| 64 | "better-dx": "^0.2.5" | |
| 64 | "@vue/test-utils": "^2.4.6", | |
| 65 | "better-dx": "^0.2.5", | |
| 66 | "happy-dom": "^20.6.1", | |
| 67 | "vue": "^3.5.28" | |
| 65 | 68 | }, |
| 66 | 69 | "lint-staged": { |
| 67 | 70 | "*.{js,ts,vue}": "bunx --bun eslint . --fix" |