fix(svelte-query-devtools): update the devtools instance when options change after mount - #11009
fix(svelte-query-devtools): update the devtools instance when options change after mount#11009sukvvon wants to merge 5 commits into
Conversation
|
View your CI Pipeline Execution ↗ for commit bc827ba
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview10 package(s) bumped directly, 15 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesSvelte devtools reactive option forwarding
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to This localized change makes post-mount devtools option updates take effect and adds coverage for initial and changed values; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 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 📦
|
… change after mount
fe47bdb to
67b8c38
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
🎯 Changes
The
devtoolsinstance inDevtools.svelteis created asynchronously insideonMount(via a dynamicimport). Because it was declared as a plainletrather than$state, the$effects that call its setters (setPosition,setButtonPosition,setInitialIsOpen,setErrorTypes) never re-ran once the instance was created. As a result, changing those options after mount had no effect on the devtools — unlike the React and Solid adapters, where the instance is part of reactive state.Declaring
devtoolsas$statemakes those effects re-run once the instance is created, so option changes are forwarded to the devtools instance.Added tests for
Devtools.sveltecovering both the initial option values and option changes after mount being forwarded to the devtools instance (position,buttonPosition,initialIsOpen,errorTypes).✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit