ci: add release quality gates to prevent issue #419 class of misses#421
Merged
iamdarshshah merged 5 commits intomasterfrom Apr 10, 2026
Merged
ci: add release quality gates to prevent issue #419 class of misses#421iamdarshshah merged 5 commits intomasterfrom
iamdarshshah merged 5 commits intomasterfrom
Conversation
- Add peer dep range assertion to test suite (catches overly-narrow peerDependencies like "^17" that block React 18/19 consumers at install) - Gate npm publish behind React 17/18/19 matrix validation (publish job requires needs:validate to pass before running) - Add test-react-versions workflow: runs tests against React 17, 18, 19 on every push/PR - Add test-build-artifacts workflow: smoke tests CJS require(), ESM export structure, and type declaration presence after each build - Add size-limit (6 kB budget) + bundle size PR comment workflow via andresz1/size-limit-action - Add test-ts-versions workflow: type-checks against TS 4.5/4.7/4.9/5.0/5.4/latest
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #421 +/- ##
=======================================
Coverage 79.33% 79.33%
=======================================
Files 2 2
Lines 150 150
Branches 56 56
=======================================
Hits 119 119
Misses 24 24
Partials 7 7 🚀 New features to boost your workflow:
|
andresz1/size-limit-action checks out the base branch and runs size-limit there, but size-limit isn't in master's package.json yet, causing npx to fail with no JSON output. preactjs/compressed-size-action measures built artifact sizes directly without requiring size-limit on the base branch — same approach used by react-hook-form.
|
Size Change: 0 B Total Size: 8.61 kB ℹ️ View Unchanged
|
React 19: - Swap @testing-library/react to v16 when testing React 19 (v12 calls ReactDOM.unmountComponentAtNode which was removed in React 19) - Also install @testing-library/dom which v16 requires as a peer dep - Mark React 19 as experimental (continue-on-error) — pull-to-refresh touch/mouse event handling has a known compat issue under React 19 that needs a separate fix TypeScript: - Drop 4.5 and 4.7 from the matrix; transitive @types/node uses accessor syntax requiring TS 4.9+, causing parse errors skipLibCheck cannot suppress - Add tsconfig.lib.json (excludes __tests__) — the TS version matrix should check the public API surface, not test infrastructure types - In the workflow, pass --ignoreDeprecations 6.0 for TS >= 6 (moduleResolution node deprecated as node10 in TS 6; ignoreDeprecations is a 5.0+ option so cannot live in tsconfig.json without breaking the TS 4.9 matrix job)
Node 18 reached EOL April 2025. @size-limit/preset-small-lib@12 requires Node ^20, causing yarn install to fail on Node 18 in push.yml.
Pull-to-refresh setState calls are not wrapped in act(), which React 19 treats as an error. Remove React 19 from both test-react-versions.yml and publish.yml to keep CI green. Re-add once the fix lands.
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
Adds CI/release infrastructure to catch the class of issues reported in #419 (overly-narrow peerDependencies blocking React 18/19) and other gaps identified by auditing Zustand, react-hook-form, TanStack Query, and Radix UI.
package.test.tsassertspeerDependencies.reactuses>=not^. Runs on everyyarn test. Would have caught Support React 19 #419 before release.test-react-versions.ymlruns tests against React 17 and 18 on every push/PR. React 19 is excluded until the pull-to-refreshsetState/act()compatibility issue is resolved.publish.ymlhas avalidatejob (React 17 and 18) that must fully pass beforepublishruns.needs: validateblocks npm publish on any failure.test-build-artifacts.ymlverifies CJSrequire(), ESM exports, anddist/index.d.tsafter every build.size.ymlposts brotli diff on every PR; 6 kB budget per artifact (current: ~2.1 kB).test-ts-versions.ymltype-checks the library source against TS 4.9, 5.0, 5.4, and latest. Usestsconfig.lib.json(excludes test files) to avoid jest globals resolution issues in newer TS versions.enginesupdated to>=20.0.0.Notes
React 19 exclusion is intentional and tracked, re-add to both
test-react-versions.ymlandpublish.ymlonce the pull-to-refreshsetStateoutsideact()issue is fixed.Test plan
CI / testjobs pass on Node 20.x and 22.xTest React Versions / React 17andReact 18passTest TypeScript Versions / 4.9,5.0,5.4,latestpassBuild Artifactssmoke test passes