Repository navigation
Add CI and a bundle-size performance budget - #5
Merged
Merged
Conversation
No CI existed for this repo at all until now -- every validation command had been run manually, every session, by whoever was working. Added .github/workflows/ci.yml: on every push to main and every PR, installs with --frozen-lockfile, then runs typecheck -> lint -> test -> build -> test:consumer -> test:react-consumer -> test:nextjs-consumer -> check:bundle-size, in that order -- the exact sequence this project's sessions have been running by hand. Added scripts/check-bundle-size.mjs (pnpm check:bundle-size) -- a plain Node script, no new dependency, consistent with this repo's minimal-dependencies preference over pulling in something like size-limit. Checks dist/lib/index.js (budget 5 kB, current 2.28 kB), react.js (budget 30 kB, current 20.19 kB), react.css (budget 20 kB, current 11.56 kB), and any other shared chunk (budget 2 kB each, current 0.48 kB) -- each budget set with real headroom above the current verified size, not tuned to just barely pass. Verified the check-script can actually fail, not just always pass: temporarily patched a copy of the script with an impossibly small budget, confirmed it printed [FAIL] and exited non-zero, then discarded the patched copy. A budget check nobody's ever seen fail is indistinguishable from no check at all. This resolves RISK_PERFORMANCE_AUDIT.md's R-005 -- the last Medium-severity open risk. Both Medium risks (R-005, R-006) are now resolved. Validated: ran the exact full CI sequence locally end-to-end (typecheck -> lint -> test -> build -> test:consumer -> test:react-consumer -> test:nextjs-consumer -> check:bundle-size) -- all pass, 13 files/43 tests unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/ci.yml: on every push tomainand every PR, runstypecheck→lint→test→build→test:consumer→test:react-consumer→test:nextjs-consumer→check:bundle-size.scripts/check-bundle-size.mjs(pnpm check:bundle-size) — plain Node, no new dependency. Checksdist/lib/index.js(budget 5 kB, current 2.28 kB),react.js(budget 30 kB, current 20.19 kB),react.css(budget 20 kB, current 11.56 kB), and any shared chunk (budget 2 kB each) — all with real headroom above current verified sizes.[FAIL]output and a non-zero exit code, then discarded the patched copy.RISK_PERFORMANCE_AUDIT.md's R-005 — the last Medium-severity open risk. Both Medium risks (R-005, R-006) are now resolved.Test plan
🤖 Generated with Claude Code