This release is mostly a quality-of-life and compatibility pass on the road to 2.0. It tightens JSX validation, improves exports and custom element support, and smooths out a handful of hydration and typing issues.
What's new
- Adds better JSX validation by using JSDOM in the compiler to catch more invalid HTML at build time, including nested markup the browser would silently correct, such as
<a>inside<a>. This is meant to surface template mistakes earlier. (#?) - Improves
solid-js/webexports so client methods are exported from the server side too. They now throw if used in the wrong environment, but the export shape is less likely to trigger import errors. It also removes thebrowserfield to avoid bundlers resolving the wrong entry point. (#?) - Expands custom element support. Elements with an
isattribute are now treated as custom elements, shadow-DOM event retargeting handles more of the tree, and a newbool:attribute namespace lets you explicitly apply boolean-attribute rules, for examplebool:enable={isEnabled()}. (#?) - Adds support for
handleEventobjects on non-delegated events throughon:. That lets you pass listener objects with fields likeonceorpassive, and it deprecates the olderoncapture:style. (#?) - Improves hydration diagnostics by including the template when an ID match cannot be found. That should make hydration failures easier to track down. (#?)
Fixes
- Lazy images in templates are now handled with
importNodeinstead ofcloneNode, which fixes a cloning issue with those images. (#?) - Fixes
createMutablegetters on the prototype so they work as expected. (#2027) - Fixes a reconcile case where a nested array was not replaced by an object. (#2020)
- Fixes
createSignalbeing missing when bundled in certain builds. (#1964) - Fixes missing
indexArrayin the server-side runtime, and avoids the server crash whenmapArrayreceivesundefined. (#1920)
Other notable changes
- Improves some JSX and signal-setter types.
- Adds the
typesdirectory export for each package, which helps when you need to import specific internal.d.tsfiles under non-default TypeScript module resolution. (#1948) - Points API references and JSDoc suggestions at the new docs site. (#2143)
- Removes the
browserfield from package exports, which may affect older packages that still rely on browser-field resolution.
Contributors
@atilafassina @hamirmahal @mdynnl @frank-weindel @titoBouzout @thetarnav @CrabNejonas @takeramagan @marvin-j97 @deining @dependabot[bot] @nygmaaa @Gpx @lxsmnsyc @0x241F31 @chee