solid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
by solidjsTypeScript
Commit activity
Last 12 weeks · 18 commits
Community health
5 of 6 standards met
Recent PRs & issues
Summary A throwing reactive during an unfinished memo's rerun leaves the module-global collector installed. After the caller catches the error, disposing an unrelated lazy memo's last observer appends it to the abandoned collector instead of releasing it, so its cleanup does not run. This regresses behavior before #4164: the public-signals repro runs the unrelated cleanup once on its direct parent, , but zero times on the tested base, . The cleanup error escapes in both versions. Restore the previous collector in . This restores the earlier release behavior while preserving the original exception, interrupted teardown, and successful-pass deferral/draining behavior. Adds throwing/non-throwing public-API regressions and a patch changeset. Minimal JSX playground: click Run to see ; replacing the throw with and rebuilding gives . The hosted package build is ; the same component separately reproduces against unchanged upstream source at . How did you test this change? The new throwing case fails before the fix ( is 0 instead of 1); the non-throwing control passes. Both pass after the fix and check that the original cleanup error still escapes. Existing rebuilt-reader/lazy-release regressions also pass. Signals JS build and source declaration check pass. Full signals suite: 327 files, 5,411 tests passed, three expected failures and two skips. The unchanged base passes 326 files / 5,409 tests. Prettier checks on all three files and pass. Rolldown 1.2.11: +13 minified bytes in each of the four signals scenarios. All comparison gates pass; createStore has a brotli warning within the existing minified allowance. No caps changed. Focused local production timings on Node 24.19.0: five warm-up batches per version and 11 alternating measured rounds for chains, diamonds and pending-frame rebuilds. Patched medians were within 3% of the base, with no apparent slowdown; these noisy microbenchmarks are not an application-performance guarantee.
Split out of #4028 (proposal 1). Deferred until after 2.0. Problem Hydration data is currently executable JS: each flush writes an inline script that assigns seroval output into . Fragment swaps (), head ops, the shell-end marker and redirects are inline scripts too. Under a strict CSP an inline script runs only with a per-request nonce or a listed hash. A cached or CDN-served SSR page can't carry a fresh nonce. Hashes don't help either, because the data scripts' bodies differ per page, so the CSP header can't be written ahead of time. #4161 made async-mode output deterministic, so the same data now gives the same bytes and the same hashes. That doesn't help when the data itself differs. Idea Inert data: emit values as script blocks. The browser never executes them, so CSP doesn't apply. Fixed pump: one runtime script whose bytes are identical on every render, so its hash is a build-time constant for a static CSP header. It decodes the JSON blocks into and settles streamed promises. Streaming chunks are each followed by the same constant trigger script. Today's executable tasks (fragment swaps, head ops, shell-end marker) become data records the pump applies. The redirect becomes a meta refresh. Cost and constraints JSON can't express seroval's JS output (shared and cyclic refs, promises, Maps, Dates), so the data uses the JSON data-table format ( / ) plus a client decoder. This is a second hydration wire format to keep in sync on both server () and client (, , the bootstrap runtime). It must be opt-in and pay-for-use: apps that don't enable it should ship zero extra bytes, with the decoder tree-shaken away. Rough estimate: 600–1,000 lines plus byte-exact fixtures. Who needs it: apps serving cached or static SSR HTML under a hash-based CSP. Nonce-based CSP works today.
Recent fixes
Summary Before: the rc.16 release stopped before publishing anything. The compiler-binaries run's WASI test failed in ("the path is relative to "). A WASI binding starts at and can't see the host's working directory. So an absolute filename with no gave instead of . The same math feeds directive hashes. Real wasm users, such as StackBlitz, got those paths too. After: the WASI binding produces the same paths and hashes as the native one. How: the compiler's JS entry gives , and a that needs no working directory. Beside an absolute filename, is made absolute (the working directory when unset). Beside a relative filename, an absolute is made relative. The native binding computes the same result either way. There's no Rust change. No changeset on purpose. A pending changeset would make the release workflow open a new version PR instead of publishing the rc.16 that's already versioned on . Merging this re-runs the release with the fix. How did you test this change? Built the WASI binding locally () and ran the release's WASI step (). Without the fix: fails 1 of 28, the same assertion as the release run. With the fix: 45 files and 6192 tests pass. Native coverage comes from CI. _Generated by Claude Code_
Problem. We run a Solid 2 storefront (rc.13, start mode) behind a shared CDN cache, with a CSP that has no . Three facts collide: 1. A nonce is unusable on a cached page.** The stored response publishes its CSP header and its `$df("k")window.location=REPLACE_SCRIPTHEAD_SCRIPTHydrationScript$RrenderToStream(…, { dataMode: 'json' })@solidjs/web/serializationcreateJSONSerializercreateJSONDataTable_$HY.p()p.sp.vPROMISE_SUCCESSrenderToStringcsp.mode: 'hash' 'auto'autosecurity.cspsv`. Size and decode benchmarks on a real catalogue page. The docs section on running Solid behind a shared cache with a strict CSP. We are happy to start with (2) or (3) if (1) is too large for 2.0.
Summary Fixes #4166. Before: during a held action, a ` 0}>{n()}011prevLaneprevLane === nulllaneRootcore.tsrecomputefinallylaneStageHookprevLanepackages/signals/tests/verdict-mount-render-effect-4166.test.tsnextpackages/web/test/show-latest-loading-render-effect-4166.spec.tsxnext010pendingpackages/signalsnextpackages/web`: passes after a rebuild. 🤖 Generated with Claude Code https://claude.ai/code/session_015hPxMkC3jg3Uivh65gvaf2
Repository: solidjs/solid. Description: A declarative, efficient, and flexible JavaScript library for building user interfaces. Stars: 36146, Forks: 1132. Primary language: TypeScript. Languages: TypeScript (73.6%), JavaScript (26.2%), CSS (0.2%). License: MIT. Homepage: https://solidjs.com Topics: declarative, fine-grained, javascript, jsx, performance, proxies, reactive, solid. Latest release: v1.9.0 (2y ago). Open PRs: 12, open issues: 23. Last activity: 1h ago. Community health: 87%. Top contributors: ryansolid, thetarnav, otonashixav, Jutanium, trusktr, dependabot[bot], davedbase, bikeshedder, aminya, Gavin-Gong and others.