Skip to content

WIP: Upgrade to solid 2 beta#2091

Draft
brenelz wants to merge 45 commits into
mainfrom
upgrade-to-solid-2-beta
Draft

WIP: Upgrade to solid 2 beta#2091
brenelz wants to merge 45 commits into
mainfrom
upgrade-to-solid-2-beta

Conversation

@brenelz

@brenelz brenelz commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

Seeing what It take to update SolidStart to use Solid 2.0 beta. The examples work even with solid-router

@netlify

netlify Bot commented Mar 4, 2026

Copy link
Copy Markdown

Deploy Preview for solid-start-landing-page ready!

Name Link
🔨 Latest commit 712731b
🔍 Latest deploy log https://app.netlify.com/projects/solid-start-landing-page/deploys/6a5e95037b28ad0008d2b582
😎 Deploy Preview https://deploy-preview-2091--solid-start-landing-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot

changeset-bot Bot commented Mar 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 712731b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@solidjs/start Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Mar 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@solidjs/start@2091

commit: 712731b

Comment thread packages/start/src/server/assets/index.ts Outdated
Comment thread packages/start/src/server/assets/render.tsx Outdated
Comment thread packages/start/package.json Outdated
Comment thread packages/start/src/fns/handler.ts Outdated
Comment thread packages/start/src/shared/dev-overlay/DevOverlayDialog.tsx Outdated
Comment thread packages/start/package.json Outdated
@lxsmnsyc

Copy link
Copy Markdown
Member

We can probably use ^2.0.0-beta.3 based on my tests

@lxsmnsyc

Copy link
Copy Markdown
Member

needs rebasing

brenelz and others added 10 commits March 21, 2026 15:04
- Update leftover accessor-style children callbacks to beta.15 semantics:
  non-keyed <For> and keyed <Show> now pass raw values, not accessors
  (notes, hackernews, todomvc fixtures + one missed spot in the dev overlay)
- Patch terracotta to shim removed @solidjs/web createDynamic export
- Align @solidjs/signals in apps/tests with solid-js 2.0.0-beta.15

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts:
#	apps/tests/vite.config.ts
#	packages/start/package.json
#	packages/start/src/config/index.ts
#	packages/start/src/fns/handler.ts
#	packages/start/src/fns/server.ts
#	packages/start/src/server/handler.ts
#	pnpm-lock.yaml
- onSettled no longer accepts async callbacks (a returned Promise is an
  invalid cleanup value) — wrap the async work in a void IIFE across the
  test routes, and convert main's new server-env route from
  createEffect(async) to the same pattern
- dev overlay: Errored's fallback now receives an accessor, and signal
  writes inside the boundary's owned scope throw — read the error and
  defer the push to a microtask

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
In Solid 2, createEffect's compute runs during SSR, so the export check
executed on the server — where the "use server" module legitimately still
exports testQuery — baking "true" into the markup. Use onSettled (a
server no-op) like the other server-function routes so the check runs
against the client module, where non-function exports are stripped.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
terracotta next.6 migrated to solid 2.0.0-beta.15 (own createDynamic
helper, JSX types from @solidjs/web), so the pnpm patch shimming the
removed @solidjs/web createDynamic export is no longer needed, and the
dev overlay's Select props no longer need the `as any` cast.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread packages/start/src/shared/lazy.ts
Comment thread packages/start/src/server/handler.ts Outdated
brenelz and others added 13 commits July 8, 2026 10:25
Bring back the withAssets logic in shared/lazy.ts (id$$ manifest lookup +
useAssets injection with nonce), adapted to beta.15 where lazy() takes a
required moduleUrl in SSR:

- config/lazy.ts: inject vite-plugin-solid's __SOLID_LAZY_MODULE__
  placeholder into user-land lazy() calls before rewriting the solid-js
  import, since the plugin only injects it for "solid-js" imports
- server/handler.ts: resolve unknown moduleUrls in the dev manifest via a
  Proxy fallback so client hydration can preload lazy modules in dev
- css fixture: replace removed createAsync with createMemo, pass an
  explicit moduleUrl for the import.meta.glob lazy, and fix onSettled
  returning a non-cleanup value

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The raw-HTML-string workaround existed for a babel-plugin-jsx-dom-expressions
spread crash that's fixed in 0.50.0-next.14. The remaining blocker was
beta.15's owner-based hydration keys: useAssets thunks run at shell-injection
time with no owner, so ssrElement's getNextContextId call threw and killed the
server process. Wrapping the asset JSX in <NoHydration> provides an owner with
hydration-key generation disabled — correct for head tags, which never hydrate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Solid v2 renders the css already itself
Co-authored-by: Cursor <cursoragent@cursor.com>
The dom-expressions asset registry + vite-plugin-solid's virtual
manifests now cover everything Start's custom plumbing did:

- pass virtual:solid-manifest straight to renderToString/renderToStream
  (dev: async resolver collecting inline styles from the module graph;
  prod: the client build manifest), replacing getSsrManifest,
  collect-styles, and the per-request asset collection in createPageEvent
- register entry-owned CSS at render start in dev (the resolver manifest
  can't be enumerated by the runtime) and inject vite-plugin-solid's
  devStylePatch for HMR adoption of streamed style tags
- acquire/release route CSS on the client through
  virtual:solid-manifest/client + acquireAsset, keyed by route source,
  so navigations add stylesheets before paint and drop them on leave
- use solid-js lazy directly; its moduleUrl transform, hydration-id
  keyed module map, and modulepreload registration replace Start's
  wrapper and the lazy() config transforms
- delete the now-unused manifest/, assets/, collect-styles, shared/lazy
  modules and the capture-client-bundle plugin

Co-authored-by: Cursor <cursoragent@cursor.com>
…ization protocol

Deletes src/directives/* in favor of the serverFunctions() plugin hoisted
into vite-plugin-solid (same compiler, plus root-relative function id
hashing and a persisted client->SSR manifest for two-invocation builds).

Ports fns/serialization.ts onto @solidjs/web/serialization: the default
JSON codec now gets its plugin set, feature policy, and depth limit from
the shared protocol layer, and the opt-in "js" (eval) mode shares the
same plugin resolution. Files are annotated with a protocol/generic/
policy taxonomy to guide what hoists next.

Co-authored-by: Cursor <cursoragent@cursor.com>
Start's fns layer is now configuration over the core runtime: the
client re-exports the fetch transport (endpoint set from BASE_URL), the
server configures event provisioning and endpoint over the core
registry, and the HTTP handler is core handleServerFunctionRequest with
Start's policies as hooks (single-flight collection, no-JS flash
cookie). The bespoke registration/serialization/shared modules and the
customBody shim are deleted — the router (0.17.0-next.5) consumes the
core protocol directly. The eval-based SEROVAL_MODE option is dropped.
Everything now resolves from the published stack: solid 2.0.0-beta.19,
router 0.17.0-next.5, vite-plugin-solid 3.0.0-next.11 (local link
overrides removed).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
esbuildOptions: {
plugins: [
{
name: "solid-compat",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can probably be removed

ryansolid and others added 3 commits July 20, 2026 14:20
Single-flight collection and the no-JS flash-cookie convention move to
@solidjs/router (their vocabulary — query cache keys, submissions — is
the router's). handleSingleFlight's data-only app render, transformResult,
createSingleFlightHeaders, handleNoJS, and the flash-cookie SSR seeding
are deleted; the handler wires createFlightDataCollector({ routes, base })
(the router's pure preload runner over the file-system route tree) and
createNoJSHandler({ base }) from @solidjs/router/server into the core
handler hooks. TEMPORARY workspace overrides link the sibling
solid-router/solid checkouts until the releases carrying the flight
bridge ship.

Co-authored-by: Cursor <cursoragent@cursor.com>
Start's GET read the client proxy's .GET property, which the core
extension surface removed (references now declare their method through
GET(fn) over the metadata channel). The shim would silently return
undefined; @solidjs/start now re-exports GET from
@solidjs/web/server-functions so the import surface is unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
… 3.0.0-next.14

The published releases now carry the flight bridge and the router's
server-function integration, so the TEMPORARY workspace links to the
sibling solid/solid-router checkouts are removed in favor of pinned
versions.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

4 participants