Patch Changes
-
cdf4542: fix(web): only a server function call made inside an action gets the default revalidation (#4913)
A non-GET call made while an action body runs (a core
action, or a routerformAction) is a mutation: it asks for single-flight collection, and its response reaches the flight consumers even with nothing folded, so a router revalidates every query. A call made anywhere else, such as a query's fetcher, no longer does, which stops the refetch loop that started in rc.22. ExplicitX-Revalidatekeys and redirects still reach the consumers wherever the call was made. -
7302320: A server function called with one argument whose encoding has no bytes (
'', an emptyURLSearchParams,Blob,ArrayBufferorUint8Array) receives that value when the host passes the request on with no body, as Node adapters do forContent-Length: 0(#4939). The format tag says one argument was sent, so the server decodes it from the empty body. Before, the call ran with no arguments:echo('')ran asecho(undefined). An untagged empty POST is still a zero-argument call. -
6c7f186: A reactive spread that evaluates to a falsy value (
{...(cond() && { k: 1 })}) contributes no props, as{}does, on components and elements, on the client and the server (#4937). Since rc.9 it threwCannot use 'in' operator … in falseand halted reactivity: function sources were only checked for nullish values. -
eb31c86: Fix the reactivity bugs in Milo's
lean.test.tsrepros (21 of 25; the other four stay pinned as open questions or as rulings not built yet):- Sync glitches: a stale CHECK no longer stops the next flush's marking (S0). A memo that reads its own child sees the updated value (S1). A queued child moves with its owner and no longer runs before the owner that disposes it (S3). Height adjustment no longer requeues an owner that reads its child (S2). A pass's owned write to a signal it just read is a missed wake (S4, F-10).
- A tick that nets back to its starting value (D-8) no longer asks async readers a new question. A pass that read only committed values asks the committed question again, which is a quiet re-ask (F-9, K1/K1b).
refresh()no longer launders a held new question (K4). latest()keeps showing a held error, or a held first answer, while the next question is in flight (D-22, D-41; T2, K3).- A write lands while an
<Errored>shows its fallback over a pending read (F-3, F-12; E1). - A hold's commit lands each async node on the answer to its own question, and a user effect waits for the end of the hold: a run owed for a superseded pass is dropped (F-1, F-2; T1).
Size offsets:
solid-jsexportscreateRoot,createSignalandcreateRenderEffectas live bindings thatenableHydration()reassigns, instead of wrappers that spread their arguments into the hydrated or core function. A client-only app calls the core function directly. -
0f6a978:
serovalandseroval-pluginsnow depend on^1.8.0instead of the exact1.7.0pin, so apps can share one seroval copy with other packages on 1.8. -
bed865a: An SSR document a shared cache may store (
Cache-Controlwithpublicors-maxage, or a storableCDN-Cache-Control) no longer tells the browser the request's trace: no<meta name="traceparent">in the shell head and no trace entry inServer-Timing(#4938). The cache replays one response to every viewer, so each browser attached its spans to the request that filled the cache, and the per-request meta tag changed the body on every render, which defeatedETagrevalidation. The decision reads the response head when the shell head is written, so anhttpHeader("Cache-Control", …)set while the shell renders counts. Server-function reads already worked this way (#3985).getTraceContext()is unchanged. -
93fa11a: fix:
csstypeis declared by the packages whose published JSX types import it (#4922).@solidjs/web(#4923) and@solidjs/hnow depend on it, andsolid-js, whose types no longer use it, drops it. -
6b317b2:
@solidjs/web's published declarations no longer importheldReadfromsolid-js, which strips it from its own declarations. Any project withskipLibCheck: falsegot a type error from rc.22'sclient.d.ts. The seam now comes fromsolid-js/internal, which declares it. A newskipLibCheck: falsetype check over every@solidjs/webentry's published declarations catches a stripped import before release. -
Updated dependencies [cdf4542]
-
Updated dependencies [eb31c86]
-
Updated dependencies [0f6a978]
-
Updated dependencies [93fa11a]
-
Updated dependencies [6b317b2]
- solid-js@2.0.0-rc.23