solidjs/solid v1.8.0 → v1.9.0

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/web exports 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 the browser field to avoid bundlers resolving the wrong entry point. (#?)
  • Expands custom element support. Elements with an is attribute are now treated as custom elements, shadow-DOM event retargeting handles more of the tree, and a new bool: attribute namespace lets you explicitly apply boolean-attribute rules, for example bool:enable={isEnabled()}. (#?)
  • Adds support for handleEvent objects on non-delegated events through on:. That lets you pass listener objects with fields like once or passive, and it deprecates the older oncapture: 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 importNode instead of cloneNode, which fixes a cloning issue with those images. (#?)
  • Fixes createMutable getters 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 createSignal being missing when bundled in certain builds. (#1964)
  • Fixes missing indexArray in the server-side runtime, and avoids the server crash when mapArray receives undefined. (#1920)

Other notable changes

  • Improves some JSX and signal-setter types.
  • Adds the types directory export for each package, which helps when you need to import specific internal .d.ts files under non-default TypeScript module resolution. (#1948)
  • Points API references and JSDoc suggestions at the new docs site. (#2143)
  • Removes the browser field 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