From bd65d4bbd451dab3d206c6a7b1963671412ad4f2 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 19:01:46 +0200 Subject: [PATCH 1/8] docs: explain Temporal serialization requirements --- .../v2/(1)advanced/(4)serialization.mdx | 22 +++++++++++++++++++ .../v2/reference/config/solid-start.mdx | 2 ++ 2 files changed, 24 insertions(+) diff --git a/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx b/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx index 07d59a1df..f630c08a5 100644 --- a/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx +++ b/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx @@ -41,6 +41,28 @@ export default defineConfig({ If your app enforces a Content Security Policy, keep `json`. +## Temporal values + +SolidStart preserves JavaScript [`Temporal`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal) values in server function and action payloads. The value is reconstructed as the same Temporal type on the receiving side. + +SolidStart does not install a Temporal implementation. Both the client and server must provide a compatible global `Temporal` before a payload is serialized or deserialized. If any runtime targeted by your app does not provide it natively, install a global polyfill: + +```sh +pnpm add temporal-polyfill +``` + +```ts title="src/temporal.ts" +import "temporal-polyfill/global"; +``` + +Import the shared module before application initialization in both entrypoints: + +```tsx title="src/entry-client.tsx and src/entry-server.tsx" +import "./temporal"; +``` + +Use the polyfill's global entrypoint. A local import such as `import { Temporal } from "temporal-polyfill"` does not define the global that serialization requires. Without a compatible global on either side, sending a Temporal value causes serialization or deserialization to fail. + ## Custom types Use a custom Seroval plugin when a server function needs to accept or return a value that Seroval does not support, such as a database identifier, decimal type, or another custom class. diff --git a/src/routes/solid-start/v2/reference/config/solid-start.mdx b/src/routes/solid-start/v2/reference/config/solid-start.mdx index d28e3a09c..cffc3d589 100644 --- a/src/routes/solid-start/v2/reference/config/solid-start.mdx +++ b/src/routes/solid-start/v2/reference/config/solid-start.mdx @@ -108,6 +108,8 @@ Controls server-function argument and result serialization. `json` avoids `eval` The `plugins` option points to a module containing custom Seroval plugins for values that Seroval does not support by default. +Built-in serialization of `Temporal` values requires a compatible global `Temporal` implementation on both the client and server. SolidStart does not install a polyfill. + See [Serialization](/solid-start/v2/advanced/serialization). ### `solid` From 9ad6f0bdda4a86fb08eb01f5ac6116f4a96f3b4b Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 19:06:21 +0200 Subject: [PATCH 2/8] runtime support --- .../solid-start/v2/(1)advanced/(4)serialization.mdx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx b/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx index f630c08a5..42e57111f 100644 --- a/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx +++ b/src/routes/solid-start/v2/(1)advanced/(4)serialization.mdx @@ -45,7 +45,17 @@ If your app enforces a Content Security Policy, keep `json`. SolidStart preserves JavaScript [`Temporal`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal) values in server function and action payloads. The value is reconstructed as the same Temporal type on the receiving side. -SolidStart does not install a Temporal implementation. Both the client and server must provide a compatible global `Temporal` before a payload is serialized or deserialized. If any runtime targeted by your app does not provide it natively, install a global polyfill: +SolidStart does not install a Temporal implementation. Native server-runtime availability is: + +| Runtime | Unflagged global `Temporal` support | +| ------- | ---------------------------------------------------------------- | +| Node.js | [26 and later](https://nodejs.org/en/blog/release/v26.0.0/) | +| Deno | [2.7 and later](https://deno.com/blog/v2.7) | +| Bun | [No stable release](https://github.com/oven-sh/bun/issues/15853) | + +Server-runtime support does not guarantee browser support. Both the client and server must provide a compatible global `Temporal` before a payload is serialized or deserialized. Check `typeof globalThis.Temporal !== "undefined"` in each target environment. + +If any runtime targeted by your app does not provide `Temporal` natively, install a global polyfill: ```sh pnpm add temporal-polyfill From 8213f6971fd8006c170791d30de4af206c6c8b84 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 19:16:39 +0200 Subject: [PATCH 3/8] docs: update SolidStart v2 release candidate --- src/routes/solid-start/v2/(2)migrating-from-v1.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/solid-start/v2/(2)migrating-from-v1.mdx b/src/routes/solid-start/v2/(2)migrating-from-v1.mdx index 0c5253fa7..5ea99d6b5 100644 --- a/src/routes/solid-start/v2/(2)migrating-from-v1.mdx +++ b/src/routes/solid-start/v2/(2)migrating-from-v1.mdx @@ -24,7 +24,7 @@ Audit those dependencies before shipping a production upgrade. ### Update dependencies ```package-install -@solidjs/start@2.0.0-rc.5 nitro@3 vite@8 +@solidjs/start@2.0.0-rc.7 nitro@3 vite@8 ``` ```package-remove From 14858e223b4d2585c70491308e4131e31fa8bbd6 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 19:33:09 +0200 Subject: [PATCH 4/8] async handler --- src/routes/solid-start/v2/reference/config/solid-start.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/solid-start/v2/reference/config/solid-start.mdx b/src/routes/solid-start/v2/reference/config/solid-start.mdx index cffc3d589..8f9df082c 100644 --- a/src/routes/solid-start/v2/reference/config/solid-start.mdx +++ b/src/routes/solid-start/v2/reference/config/solid-start.mdx @@ -143,6 +143,8 @@ Path to a module whose default export handles values thrown by server functions The handler can report the original value and return a safer replacement for the client. Return `undefined` to preserve the original value. The module is bundled only into the server, so it can import server-only code. +The handler may be async. SolidStart awaits it before serializing the error, allowing monitoring services to flush first. + ```tsx title="vite.config.ts" solidStart({ serverFunctions: { From bf1a71cbf7dc7f4a0f1b36dc1d9bd2e142bc1fee Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 19:33:55 +0200 Subject: [PATCH 5/8] docs: note async error handler release --- src/routes/solid-start/v2/reference/config/solid-start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/solid-start/v2/reference/config/solid-start.mdx b/src/routes/solid-start/v2/reference/config/solid-start.mdx index 8f9df082c..be0fae043 100644 --- a/src/routes/solid-start/v2/reference/config/solid-start.mdx +++ b/src/routes/solid-start/v2/reference/config/solid-start.mdx @@ -143,7 +143,7 @@ Path to a module whose default export handles values thrown by server functions The handler can report the original value and return a safer replacement for the client. Return `undefined` to preserve the original value. The module is bundled only into the server, so it can import server-only code. -The handler may be async. SolidStart awaits it before serializing the error, allowing monitoring services to flush first. +Starting with `@solidjs/start@2.0.0-rc.8`, the handler may be async. SolidStart awaits it before serializing the error, allowing monitoring services to flush first. ```tsx title="vite.config.ts" solidStart({ From 7983e7e139847c3f1f308424371caa20b77a25a9 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 19:36:47 +0200 Subject: [PATCH 6/8] don't mention rc.8 --- src/routes/solid-start/v2/reference/config/solid-start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/solid-start/v2/reference/config/solid-start.mdx b/src/routes/solid-start/v2/reference/config/solid-start.mdx index be0fae043..8f9df082c 100644 --- a/src/routes/solid-start/v2/reference/config/solid-start.mdx +++ b/src/routes/solid-start/v2/reference/config/solid-start.mdx @@ -143,7 +143,7 @@ Path to a module whose default export handles values thrown by server functions The handler can report the original value and return a safer replacement for the client. Return `undefined` to preserve the original value. The module is bundled only into the server, so it can import server-only code. -Starting with `@solidjs/start@2.0.0-rc.8`, the handler may be async. SolidStart awaits it before serializing the error, allowing monitoring services to flush first. +The handler may be async. SolidStart awaits it before serializing the error, allowing monitoring services to flush first. ```tsx title="vite.config.ts" solidStart({ From 2a56a2290e80509b252b3c435453faf43d765423 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 19:56:18 +0200 Subject: [PATCH 7/8] docs: clarify async error handler results --- src/routes/solid-start/v2/reference/config/solid-start.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/solid-start/v2/reference/config/solid-start.mdx b/src/routes/solid-start/v2/reference/config/solid-start.mdx index 8f9df082c..b57c56e9e 100644 --- a/src/routes/solid-start/v2/reference/config/solid-start.mdx +++ b/src/routes/solid-start/v2/reference/config/solid-start.mdx @@ -141,9 +141,9 @@ solidStart({ Path to a module whose default export handles values thrown by server functions before SolidStart serializes them into a response. -The handler can report the original value and return a safer replacement for the client. Return `undefined` to preserve the original value. The module is bundled only into the server, so it can import server-only code. +The handler can report the original value and return—or resolve to—a safer replacement for the client. SolidStart awaits the handler before serializing the response, allowing a monitoring service to flush first. -The handler may be async. SolidStart awaits it before serializing the error, allowing monitoring services to flush first. +Returning or resolving to `undefined` or `null` preserves the original value. A `Response` preserves control flow, while any other value replaces the original. The module is bundled only into the server, so it can import server-only code. ```tsx title="vite.config.ts" solidStart({ From 11198527f5c2b2a4222ac8c008e36812b5906af6 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Wed, 29 Jul 2026 20:05:46 +0200 Subject: [PATCH 8/8] docs: simplify error handler wording --- src/routes/solid-start/v2/reference/config/solid-start.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/solid-start/v2/reference/config/solid-start.mdx b/src/routes/solid-start/v2/reference/config/solid-start.mdx index b57c56e9e..46bf10c65 100644 --- a/src/routes/solid-start/v2/reference/config/solid-start.mdx +++ b/src/routes/solid-start/v2/reference/config/solid-start.mdx @@ -141,7 +141,7 @@ solidStart({ Path to a module whose default export handles values thrown by server functions before SolidStart serializes them into a response. -The handler can report the original value and return—or resolve to—a safer replacement for the client. SolidStart awaits the handler before serializing the response, allowing a monitoring service to flush first. +The handler can report the original value and provide a safer replacement for the client. SolidStart awaits the handler before serializing the response, allowing a monitoring service to flush first. Returning or resolving to `undefined` or `null` preserves the original value. A `Response` preserves control flow, while any other value replaces the original. The module is bundled only into the server, so it can import server-only code.