Releases: solidjs/solid-router
Release list
v2.0.0-next.21
Patch Changes
- 7ff74bf: Track the server-function data address (solidjs/solid#3094). Scripted calls now go to
<endpoint>/data/<id>while rendered action urls stay at the bare<endpoint>/<id>; the router needed no functional change — synthesized form actions already hand the rendered url tocreateServerReference, and the transport re-addresses its own calls — so this updates the wire-shape expectations in tests and the synthesis doc comment. Requires@solidjs/web2.0.0-rc.5 (the release carrying the data-address split); the peer floor is raised to^2.0.0-rc.5. - 033b6f1: Navigate from the redirect carrier instead of sniffing Location. Server-function redirects now arrive as
X-Server-Function-Redirect: <status> <resolved-url>(solidjs/solid#3102), so the soft/hard split is a real origin comparison — same-origin targets navigate softly withreplace: true(the target takes the submission's place in history, matching HTTP's form-post semantics), anything else hard-navigates — never a guess from how the author spelled the target, which sent relative and absolute spellings down different navigation paths (solidjs/solid#3107). A locally-producedredirect()(a client-side action) still navigates from its real 3xx + Location; aLocationon any other status is the author's data and never navigates.
v2.0.0-next.20
Patch Changes
- b8b48ce: Rebuild navigation commitment on Solid's transition engine. Programmatic and native navigation now write one canonical location source, repeated writes use engine last-write-wins, and history updates only after the winning transition settles. This fixes dropped soft navigations and native/programmatic races while preserving redirect options, pending link/search state, and lazy-route error delivery.
v2.0.0-next.19
Patch Changes
- 31ea11b: Adopt path-based server function addressing (solidjs/solid#3076). Action urls are now
<endpoint>/<id>[?args=...]— the id in the path, bound arguments staying in the query. The generic form-action fallback reads the id back through the runtime'sparseServerFunctionUrlinstead of parsing?id=by hand, so the router no longer hard-codes the addressing scheme. Requires@solidjs/web2.0.0-rc.4; the peer floor is raised to^2.0.0-rc.4.
v2.0.0-next.18
Patch Changes
-
5b9ffb2: Fix navigation and redirects with typed paths under hashHistory (#582). Paths nodes now carry their logical path under the global
Hrefbrand (Symbol.for("solid.Href")):navigate()routes the logical path directly instead of coercing the node to its display href, andredirect(paths()...)no longer throws@solidjs/web's Href guard. Display-form strings (terminated paths calls, redirect Location headers) starting with#are mapped back through the history integration's parser, the same way anchor clicks are. Plain string arguments remain logical paths and are never parsed. -
c81606b:
liveQuery()— keyed live queries over value-shaped streams (prototype)Declares a keyed live query: an async-iterable producer whose yields are
successive values of one logical query, re-yielding current state on every
invocation. liveQuery IS the live declaration — no separate wrapper needed:
server functions are declared GET at creation (likequery), the server
face brands the resolved iterable so SSR live policy applies (document face
renders the first value, hydration adopts it and reconnects), and the
client channel owns reconnect-with-backoff when a connected stream dies.One connection per (name + args) key is shared by every consumer: late
subscribers receive the latest value immediately, delivery is latest-wins,
and the connection closes when the last consumer leaves (microtask linger
so a re-running memo doesn't thrash it). Connections are lazy — calling the
function returns a live-branded iterable; the first pull connects — so
hydration traces open nothing. Retry is for transient deaths only: a
definite rejection (4xx — the transport stamps HTTP statuses onto
failures) ends the channel and surfaces the error to consumers, like a
first-connect failure does. On the server, channels are request-scoped:
every consumer of a key within one render observes the same first value
(the record is retained past teardown for replay), and separate requests
never share connections. Calling under preload intent warms the channel
(a temporary hold spans the preload window), so navigation renders against
an already-connected stream instead of holding the transition on connect
plus first yield.Live queries participate in both router data protocols. Explicit
revalidate(key)reconnects (the producer re-yields current state on
invocation). Single-flight participation is delivery-side: a mutation's
flight payload pushes straight into open channels — the mutation response
is the round trip — while the post-mutation sweep leaves the healthy
connection in place, since the live stream is itself the freshness
mechanism. NewregisterRevalidateHook/registerFlightDataHookseams in
query let keyed stores join those protocols without coupling.The callable carries the
queryconventions (key,keyFor) plus a
reactivestatus(...args)read ("idle" | "connecting" | "connected" |
"reconnecting" | "closed"). -
0484065: fix #588: preserve nested route layouts between sibling navigations
-
29e08ad: Update to solid-js 2.0.0-rc.3 and raise the peer floor to
^2.0.0-rc.3. rc.3 deprecates reactive writes during SSR ([SERVER_WRITE]), and the router's one server-side signal write — the lazy-subtree version bump — now keeps its count in plain module state on the server (the client still mirrors it into a signal for subscription), so server renders stay warning-free and ready for when the deprecation becomes an error.
v2.0.0-next.17
Patch Changes
- c22e671: Developer diagnostics (the nested-router warning, the relative-routing-unsupported warning, the invalid-path error log) are now gated behind solid's
DEVflag, so app bundlers fold them out of production bundles. - 569743d: A failed lazy route subtree load now surfaces to the nearest error boundary like a failed
lazy()component, instead of silently stalling the navigation on the old screen. The failure is not cached: the rejection is held only through its settlement flush (so the erroring match computation delivers it once rather than refiring the import in a loop), and any later attempt — an error boundaryreset(), a new navigation — re-fetches, matching the platform's contract for failed dynamic imports andlazy()in solid 2.0.0-rc.1. Failed loads no longer surface as unhandled promise rejections, and a speculative preload that fails defers silently to the real navigation. - 569743d: Update to solid-js 2.0.0-rc.1. Adapts
fileRoutestolazy()'s new signature (the module URL moved to the third argument behind an options slot) and raises the peer dependency floor to^2.0.0-rc.1.
v2.0.0-next.16
Patch Changes
- 11503e4: Update
solid-js/@solidjs/webto2.0.0-rc.0and move the peer ranges from>=2.0.0-beta.33 <2.0.0-experimental.0to^2.0.0-rc.0. The old experimental-capped upper bound excluded the rc line entirely (experimentalsorts beforercin prerelease ordering), so the published manifest could not admit 2.0.0-rc.0; the caret keeps flooring above the hazardous 2.0.0-experimental.* publishes and auto-graduates to stable 2.x.
v2.0.0-next.15
Patch Changes
- 3daa4d0: Slot hydration flight-entry adoption into the cache's freshness model instead of granting it fetched-now freshness.
query()'s keyed consumption path (sharedConfig.has/load) deliberately stays open past hydrationdone— a boundary inside a deferred claim scope (a lazy route module) can make its first call late and must adopt the promise the server DOM was rendered from (#2964) — but adoption used to stamp the seeded entry fresh, so a payload consumed on a client-side navigation minutes after load masqueraded as just-fetched for the staleness logic. The adopted payload is now treated as a fetch performed at boot: the entry is stamped with the payload's age (not consumption time), and adoption itself is gated per navigation intent — hydration and late claim reads (no navigation in flight) adopt at any age since server-DOM consistency wins; back/forward restores honor the payload withinCACHE_TIMEOUT(180s, the cache's own retention bar); an active new navigation or preload accepts it only withinPRELOAD_TIMEOUT(5s), exactly the window a real preload would get, and refetches otherwise. The hydration render burst still dedups through the normal window/count reuse (it happens within milliseconds of boot), and a preloaded-then-abandoned payload no longer satisfies a navigation that comes along after the window. - bae09cc: The
@solidjs/router/fsemission adapter consumes eagerly delivered manifests: a$componentref materialized withfilesystem-routing'scodeSplitting: falsearrivesrequire()-shaped (statically imported), andfileRoutespasses its component through as-is — nolazy()wrapper, no suspense on first render — while code-splitimport()refs keep thelazypath unchanged. - c2fddb0: Drop the eager
@solidjs/web/server-functionsimports from the router's
always-shipped graph (requires the solid release exporting the
server-function registry layer from the core entries).query()now reads
theGETdeclaration wrapper anddecodeResponsethrough the late-bound
RPC seam (getServerFunctionRPCfrom@solidjs/web), which the transport
fills when a'use server'reference is created — androuting.tstakes
the flash-cookie helpers from the core entry, where they live beside the
cookie codec. An app using the router with zero server functions no longer
ships seroval + theseroval-plugins/webset + the fetch RPC client
(~7.5 KB gz eager in the basic template, measured); apps with server
functions behave exactly as before — the seam is filled before any
integration code can hold a reference. The action layer is untouched: it is
the transport's real consumer and only enters a bundle that uses actions
(or lazily, through the server-form submit path). - 46158a3: Update
solid-js/@solidjs/webto2.0.0-beta.33and raise the peer floor to match (dom-expressions0.50.0-next.41line, resolved transitively from the registry). beta.33 publishes the pieces the router now reads through core: the server-function declaration/metadata registry and the late-bound RPC seam (getServerFunctionRPC) the transport fills, so the router's eager graph stays codec-free. The earlier beta.32 migration rides along: tests and docs moved off the removedrenderToStringAsync— awaitingrenderToStream(...)resolves with the settled HTML and is the fully-settled-string form of the streaming render.