Skip to content

fix(solid-query): follow Solid 2.0.0-rc.9 - #11543

Open
ryansolid wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
ryansolid:solid-rc9
Open

ryansolid wants to merge 1 commit into
TanStack:solid-query-v6-prefrom
ryansolid:solid-rc9

Conversation

@ryansolid

Copy link
Copy Markdown

Lockstep update for solid-js / @solidjs/web 2.0.0-rc.9 and @solidjs/vite-plugin 3.0.0-next.44. Surfaced by Solid's solid-query release gate once it compiled the adapter with a matching compiler (solidjs/solid#3534): five tests, one adapter fix, four assertion updates.

Toolchain

  • Compiler. rc.9 moved delegated event handlers to the _$$<type> key; the fixture's babel-preset-solid still emitted $$<type>, so every click in the suite was dead. The three packages' tsup configs now compile JSX with @solidjs/babel-plugin (the Solid 2.0 compiler), and the peer floor is solid-js / @solidjs/web >=2.0.0-rc.9 since compiled output and runtime moved together.
  • Vite 8, scoped. @solidjs/vite-plugin next.32+ requires vite ^8 (defaultExternalConditions). The repo stays on vite 6; pnpm-workspace.yaml overrides vite to ^8.3.0 for the three Solid packages, the five vite-based Solid examples and integrations/solid-vite. The examples needed it anyway: their ^2.0.0-rc.0 runtime already resolves to rc.9 while their compiler pin emitted $$. vitest stays at the root's single version — vite is a peer of vitest, so pnpm gives the Solid packages a vite-8 instance of the same 4.1.2 (a per-package vitest version bump was tried first; two vitest versions break @testing-library/jest-dom's module augmentation, which TypeScript resolves per package version). Sherif ignores only vite.

Adapter fix — hydration

hydration.test.tsx › cache writes during the open stream commit when hydration completes failed: #header showed updated-client mid-stream instead of holding header-server until the feed boundary landed.

Cause: useQuery's two setup-time snapshots (the meta projection's seed, mountedAt) read the cache through query(), which reads the hook's version signal — after priming had already bumped it in the same setup. Solid holds a write made during the hydration pass: a computation in the pass that reads the written signal, tracked or not, is served the pre-write snapshot and replays at release. For the hook's own projections that replay is the takeover. Here the ambient computation was the <Loading> boundary's children computed, so the replay re-evaluated props.children, re-created HeaderQuery outside hydrating (no wrappers, live compute) and disposed the hydrated instance. rc.8 passed by accident — the boundary computed predated the lazily marked snapshot scope; solidjs/solid#3504 marks the scope at the root first, which is correct.

Fix: lookupQuery() — client sync + cache get/build, no version() — for the setup snapshots; query() = version(); lookupQuery() for the derived nodes. Ruled by-design on the Solid side: solidjs/solid#3542.

Test adaptations — rc.9's committed frame

"A write becomes visible at flush — to every channel" (solidjs/solid#3473). The meta projection's status flip is held in the same batch as the pending data node, so the committed faces read one frame mid-hold; the pending probe (isFetching) is the channel for "a new answer is outstanding". rc.8 leaked the staged meta write, and these tests pinned the torn frame.

  • useQuery › should not fetch when switching to a disabled query: status: 'success', fetchStatus: 'idle', isFetching: true, DOM holds data: 0.
  • useQuery › resetQueries ×2: isPending: false mid-hold with the previous frame up; the disabled reset keeps fetchStatus: 'idle' as the "nothing in flight" face.
  • useMutation › settles atomically with invalidation-triggered refetches: the optimistic frame releases once nothing authoritative is left to wait on — fresh data and the lifted overlay commit in one frame, ['0:false', '0:true', '1:false'].

Verification

solid-query 366 passed / 1 skipped (pre-existing), solid-query-devtools 33, solid-query-persist-client 7 — exit 0, no unhandled rejections (the 670 CancelledErrors and the OOM in the gate run were downstream of the five). test:sherif, test:knip, test:eslint, test:types (TS 5.4–6.0), test:build, build green for the three packages; examples/solid/basic and integrations/solid-vite vite build on vite 8.

Made with Cursor

Build with @solidjs/babel-plugin (the Solid 2.0 compiler; rc.9 moved
delegated handlers to the `_$$` key, so the compiled output must match
the runtime), test under vite 8 for the Solid packages, examples and the
vite integration (scoped overrides; @solidjs/vite-plugin next.32+ needs
vite ^8), and raise the solid-js / @solidjs/web peer floor to rc.9.

useQuery: setup-time snapshots (meta projection seed, mount counts) read
the cache through lookupQuery() instead of query(), which reads the
version signal. Under hydration, priming writes that signal during setup
and Solid holds a write made during the pass: a computation in the pass
that reads it is served the pre-write value and replays at release. For
the hook's derived nodes that is the takeover; for the computation
instantiating the component (a <Loading> boundary's children) it was a
remount that re-created the hydrated component as a client render, so
cache writes reached the DOM while the stream was open.

Tests: four assertions adapted to rc.9's committed-frame model (a write
becomes visible at flush, to every channel): status/isPending read the
held frame mid-hold, isFetching is the pending probe; the mutation
settle commits fresh data and the lifted overlay in one frame.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c6cac463-a8de-4c2f-b1df-b16796894221

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedvite@​8.3.0991008296100
Updated@​solidjs/​web@​2.0.0-rc.6 ⏵ 2.0.0-rc.910010083 +197100
Added@​solidjs/​babel-plugin@​2.0.0-rc.98710010094100
Updatedsolid-js@​2.0.0-rc.6 ⏵ 2.0.0-rc.9100 +110095 +196 +1100
Updated@​solidjs/​vite-plugin@​3.0.0-next.27 ⏵ 3.0.0-next.4497 +22100100 +196 +9100
Updated@​solidjs/​signals@​2.0.0-rc.6 ⏵ 2.0.0-rc.9100100100 +197100

View full report

@nx-cloud

nx-cloud Bot commented Sep 18, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 24d8bfe

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 8m 29s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2m 7s View ↗

☁️ Nx Cloud last updated this comment at 2026-09-18 21:13:21 UTC

@pkg-pr-new

pkg-pr-new Bot commented Sep 18, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-query-experimental

npm i https://pkg.pr.new/@tanstack/angular-query-experimental@11543

@tanstack/eslint-plugin-query

npm i https://pkg.pr.new/@tanstack/eslint-plugin-query@11543

@tanstack/lit-query

npm i https://pkg.pr.new/@tanstack/lit-query@11543

@tanstack/preact-query

npm i https://pkg.pr.new/@tanstack/preact-query@11543

@tanstack/preact-query-devtools

npm i https://pkg.pr.new/@tanstack/preact-query-devtools@11543

@tanstack/preact-query-persist-client

npm i https://pkg.pr.new/@tanstack/preact-query-persist-client@11543

@tanstack/query-async-storage-persister

npm i https://pkg.pr.new/@tanstack/query-async-storage-persister@11543

@tanstack/query-broadcast-client-experimental

npm i https://pkg.pr.new/@tanstack/query-broadcast-client-experimental@11543

@tanstack/query-core

npm i https://pkg.pr.new/@tanstack/query-core@11543

@tanstack/query-devtools

npm i https://pkg.pr.new/@tanstack/query-devtools@11543

@tanstack/query-persist-client-core

npm i https://pkg.pr.new/@tanstack/query-persist-client-core@11543

@tanstack/query-sync-storage-persister

npm i https://pkg.pr.new/@tanstack/query-sync-storage-persister@11543

@tanstack/react-query

npm i https://pkg.pr.new/@tanstack/react-query@11543

@tanstack/react-query-devtools

npm i https://pkg.pr.new/@tanstack/react-query-devtools@11543

@tanstack/react-query-next-experimental

npm i https://pkg.pr.new/@tanstack/react-query-next-experimental@11543

@tanstack/react-query-persist-client

npm i https://pkg.pr.new/@tanstack/react-query-persist-client@11543

@tanstack/solid-query

npm i https://pkg.pr.new/@tanstack/solid-query@11543

@tanstack/solid-query-devtools

npm i https://pkg.pr.new/@tanstack/solid-query-devtools@11543

@tanstack/solid-query-persist-client

npm i https://pkg.pr.new/@tanstack/solid-query-persist-client@11543

@tanstack/svelte-query

npm i https://pkg.pr.new/@tanstack/svelte-query@11543

@tanstack/svelte-query-devtools

npm i https://pkg.pr.new/@tanstack/svelte-query-devtools@11543

@tanstack/svelte-query-persist-client

npm i https://pkg.pr.new/@tanstack/svelte-query-persist-client@11543

@tanstack/vue-query

npm i https://pkg.pr.new/@tanstack/vue-query@11543

@tanstack/vue-query-devtools

npm i https://pkg.pr.new/@tanstack/vue-query-devtools@11543

commit: 24d8bfe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants