You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore: measure the typical React Query bundle size - #12768
Add a react typical entry to Size Limit. It measures useQuery and useMutation together with QueryClient and QueryClientProvider. This adds a measurement for apps that read and write data.
The local build measured 9,336 bytes after minification and Brotli compression. The limit is 10,000 bytes. pnpm run test:size and pnpm run test:pr --files=.size-limit.json passed locally.
I have tested code changes locally with pnpm run test:pr, or these tests do not apply to this pull request.
I have followed the AI contribution policy and fully understand the code in this pull request, including any code generated with AI assistance.
🚀 Release Impact
This change affects published code, and I have generated a changeset.
This change is docs/CI/dev-only (no release).
Summary by CodeRabbit
Chores
Added a bundle-size check for the modern React Query build, with a 10 kB limit.
The check measures a build that includes common query and mutation features, along with query client setup and provider components. It excludes the React and React DOM packages from the measurement.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
No actionable comments were generated in the recent review.
Walkthrough
The size-limit configuration defines a typical bundle check for the modern React Query build. The pull request workflow passes the size-limit command with JSON output.
Changes: React Query bundle size limit
Layer / File(s)
Summary
Configure the typical React bundle size check .size-limit.json, .github/workflows/pr.yml
Adds a size-limit entry for the modern React Query build. It imports useQuery, useMutation, QueryClient, and QueryClientProvider, ignores react and react-dom, and sets a 10.00 kB limit. The workflow passes ./node_modules/.bin/size-limit --json to the Size Limit step.
This change adds a bundle size check and adjusts the CI command that runs it. It does not affect shipped behavior, and no merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "chore: measure the typical React Query bundle size" matches the main change. The PR adds a react typical Size Limit entry that measures useQuery, useMutation, QueryClient, and QueryClient…
Description check
The description follows the template structure. It includes the Changes section with motivation, the local measurement (9,336 bytes against a 10,000-byte limit), and the test commands run. The Checkli…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "chore: measure the typical React Query bundle size" matches the main change. The PR adds a react typical Size Limit entry that measures useQuery, useMutation, QueryClient, and QueryClientProvider. The title is specific and concise. It uses the conventional commit prefix "chore:", which fits a CI and dev-only change.
Full details: Description check
Explanation
The description follows the template structure. It includes the Changes section with motivation, the local measurement (9,336 bytes against a 10,000-byte limit), and the test commands run. The Checklist and Release Impact sections are present. The docs/CI/dev-only box is checked, which matches the CI-only change. The first contributing-guide and AI-policy boxes remain unchecked, and the test:pr box is checked. The author should confirm these boxes before merge. Those are checklist status issues, not missing content.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 7c529b4 and 2fc2817.
Files selected for processing: 1
.github/workflows/pr.yml
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
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
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.
🎯 Changes
Add a
react typicalentry to Size Limit. It measuresuseQueryanduseMutationtogether withQueryClientandQueryClientProvider. This adds a measurement for apps that read and write data.The local build measured 9,336 bytes after minification and Brotli compression. The limit is 10,000 bytes.
pnpm run test:sizeandpnpm run test:pr --files=.size-limit.jsonpassed locally.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit