Skip to content

feat: migrate to SolidJS v2.0 and release 2.0.0-beta - #20

Merged
Akin01 merged 6 commits into
mainfrom
feat/solid-v2
Oct 2, 2026
Merged

Akin01 merged 6 commits into
mainfrom
feat/solid-v2

Conversation

@Akin01

@Akin01 Akin01 commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Overview

Migrates Solid Email monorepo to SolidJS v2.0 (solid-js@^2.0.0-rc.0 and @solidjs/web@^2.0.0-rc.0) with breaking changes and performance optimizations, preparing release 2.0.0-beta. The previous v1 state (0.1.5) is preserved on semantic version branch v0.1.5 (and v0.1.x).

Highlights

  • SolidJS v2.0 Migration:

    • Switched JSX runtime and types to @solidjs/web across all packages (jsxImportSource: "@solidjs/web").
    • Replaced internal renderToStringAsync with renderToStream from @solidjs/web.
    • Replaced createResource and Suspense in Tailwind with createMemo and Loading from solid-js.
    • Replaced splitProps with omit across components.
    • Replaced legacy attr: namespace prefix on HTML attributes in table primitives with standard HTML attributes.
    • Replaced vite-plugin-solid with @solidjs/vite-plugin.
    • Updated E2E integration fixtures (Vite, TanStack Start, Cloudflare TanStack Start) and all benchmark suites.
  • High-Performance Optimizations:

    • @solid-email/html-to-text: Added bounded LRU and WeakMap compilation caching for convert() (~20x faster repeated text conversions, 5.56x faster than upstream html-to-text), DecisionTree selector caching, and a 64KB Uint8Array character lookup table for O(1) whitespace classification.
    • @solid-email/render: Precomputed requiredSlots validation, fast dictionary slot replacements (Object.create(null)), and direct SSR template extraction (extractSsrHtml) for slot rendering to bypass redundant renderToString root creation.
    • Tailwind Inlining: Added tagCache to TailwindRenderPlan for O(1) repeated element inlining and pre-compiled static regexes for class/style attribute parsing.
    • Compiled Plain-Text Rendering: Fixed uppercase heading slot matching (resolveContentSlotName), boosting compiled plain-text rendering to 0.29ms (3,432.87 hz) (5x faster than v1, 189x faster than React Email).
  • Benchmark Summary:

    • Cached compileSync: 20µs (49,108 ops/s) — 125.8x faster than React Email, using 53x less heap.
    • renderSync: 645µs (1,551 ops/s) — 4.0x faster than React Email.
    • Tailwind rendering: 1.95ms (510.95 hz) — down to only 1.06x overhead vs non-Tailwind rendering.
  • Version Bump:

    • Bumped @akin01/solid-email, @solid-email/render, and @solid-email/html-to-text to 2.0.0-beta.

Akin01 added 6 commits October 2, 2026 21:16
- Bump catalog dependencies to SolidJS v2.0 (`solid-js@^2.0.0-rc.0`, `@solidjs/web@^2.0.0-rc.0`, `@solidjs/vite-plugin@^2.0.0-rc.0`).
- Update JSX namespace resolution to `@solidjs/web` across tsconfig presets and build configs.
- Migrate component prop utilities from `splitProps` to `omit` and replace `attr:` namespace prefixes with standard HTML attributes.
- Align client preview entrypoint with Solid 2.0 DOM rendering.
- Migrate Vite and TanStack Start fixtures to SolidJS v2.0 and `@solidjs/vite-plugin`.
- Update Cloudflare Workers and TanStack Start email route handlers for Solid 2.0 streaming and SSR.
- Deduplicate nested pnpm workspace definitions in integration fixtures.
- Update benchmark Vite and Vitest configs to use `@solidjs/vite-plugin` and Solid 2.0 JSX transforms.
- Update benchmark email fixtures for Solid 2.0 component contracts.
- Refresh baseline metrics across cross-library, rendering, tailwind, and plain-text suites.
…sification, and text builder

- Add bounded LRU and WeakMap compilation caching for instant convert() re-renders.
- Cache DecisionTree selector pickers to skip Selderee AST re-compilation.
- Replace whitespace regular expressions with a 64KB Uint8Array lookup table for O(1) character classification.
- Implement zero-regex countNewlinesNoWords and fast character code checks in trim helpers.
- Optimize InlineTextBuilder and BlockTextBuilder with fastJoin, direct property access, and zero-allocation optional parameter defaults.
- Speed up findFirstBody with direct child scanning to bypass deep head tree traversals.
…, and tailwind inlining

- Precompute requiredSlots in buildSlotLookup to eliminate Set and array allocations during render validation.
- Fast-path extractSsrHtml in renderSlotValueSync and renderSlotValueTextSync to bypass redundant renderToString calls on Solid SSR objects.
- Fix plainTextTemplate case-sensitivity with resolveContentSlotName for uppercase headings, restoring fast compiled text rendering.
- Add tagCache to TailwindRenderPlan and use static pre-compiled regexes for class/style attribute parsing and removal.
- Add noScripts: true to solidRenderOptions for sync and async renders.
…ks documentation

- Bump package versions to 2.0.0-beta across @akin01/solid-email, @solid-email/render, and @solid-email/html-to-text.
- Update skill metadata and installation guides for SolidJS v2.0 dependencies.
- Update benchmark tables in README, README.es-ES, and README.id-ID reflecting performance gains.
- Document breaking changes, additions, optimizations, and related commit hashes in CHANGELOG.
@Akin01
Akin01 merged commit 49128af into main Oct 2, 2026
8 checks passed
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.

1 participant