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 1 commit into
Conversation
|
View your CI Pipeline Execution ↗ for commit fe47bdb
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 3 bumped as dependents. 🟩 Patch bumps
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthrough
Svelte devtools reactive option forwarding
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
size-limit report 📦
|
… change after mount
fe47bdb to
67b8c38
Compare
🎯 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