refactor(preact-query*): rename local 'useRef' variables with the 'Ref' suffix - #11792
Conversation
|
View your CI Pipeline Execution ↗ for commit 8abb43f
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version PreviewNo changeset entries found. Merging this PR will not cause a version bump for any packages. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: TanStack/query/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change renames internal refs and local test variables, and replaces index-based React keys in infinite-query tests with page-value keys. Restore, mutation-state, and query test behavior remains unchanged. ChangesPreact query maintenance
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to No product behavior change or material merge risk is established. The test key updates use unique page values; merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
size-limit report 📦
|
🎯 Changes
useRefvariables with theRefsuffix:result→resultRefinpreact-query/src/useMutationState.ts, andrefs→optionsRefanddidRestore→didRestoreRefinpreact-query-persist-client/src/PersistQueryClientProvider.tsx.preact-querytests, nameuseStatevalue and setter pairs instead of using holes or_([_state, setState],[_ref, setRef],[_newState, setNewState],setIsPrefetched), renamemountedtomountedRef, and use stable keys instead of array indexes inuseInfiniteQueryandusePrefetchInfiniteQuerytests.There is no runtime change. The built
.d.tsfiles are identical, and the built JS only differs in the renamed local variables (and the Babel temporary variable names derived from them in the legacy build), so no changeset is needed.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit