Skip to content

Commit 38e56fc

Browse files
ryansolidclaude
andcommitted
ci: tree-shaking regression guard for the client runtime (solidjs/solid#2883)
Bundles import-subset fixtures from src/client.js with rxcore external (measuring only this package's tree-shaken contribution) and fails when gzip cost exceeds committed ceilings with ~5% headroom. The compiled-JSX core scenario excludes the hydrate()-installed runtime — the property #544 established and this guard keeps. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 03edc32 commit 38e56fc

5 files changed

Lines changed: 374 additions & 8 deletions

File tree

‎.github/workflows/size.yml‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Size
2+
3+
# Tree-shaking regression guard (solidjs/solid#2883): bundles import-subset
4+
# fixtures of the client runtime with rxcore external and fails if the
5+
# tree-shaken gzip cost exceeds the committed ceilings (~5% headroom). A
6+
# deliberate feature addition bumps the ceiling in the same PR with a reason.
7+
on:
8+
pull_request:
9+
branches: [main, next]
10+
11+
jobs:
12+
size:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: pnpm
21+
- run: pnpm install --frozen-lockfile
22+
- run: node scripts/size-guard.mjs

‎package.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"version": "changeset version && pnpm --filter @dom-expressions/jsx-compiler run napi:version",
2626
"publish:release": "pnpm run build && changeset publish",
2727
"jsx-sync-types": "node packages/runtime/src/jsx-update.mjs",
28-
"jsx-customize-types": "node packages/runtime/src/jsx-customize.mjs"
28+
"jsx-customize-types": "node packages/runtime/src/jsx-customize.mjs",
29+
"size": "node scripts/size-guard.mjs"
2930
},
3031
"simple-git-hooks": {
3132
"pre-commit": "pnpm run format"
@@ -45,6 +46,7 @@
4546
"babel-plugin-tester": "^10.1.0",
4647
"babel-plugin-transform-rename-import": "^2.3.0",
4748
"coveralls": "^3.1.1",
49+
"esbuild": "^0.28.1",
4850
"jest": "~29.3.1",
4951
"jest-environment-jsdom": "^29.3.1",
5052
"jest-resolve": "^29.3.1",

0 commit comments

Comments
 (0)