Svelte 5.59.2
Svelte 5.59.2 was published on November 25, 2026, one day after 5.59.1. The patch carries nineteen fixes and no features. Most of them land in the compiler and the reactivity scheduler, which is where the sharpest edges have been since the runes rewrite, and a few touch rendering edge cases that only show up in production.
Async and Error Boundaries
Errors thrown inside deferred {await} branches are now caught by error boundaries instead of escaping to the window (PR #19028). Anyone using <svelte:boundary> around a component that loads data will notice the difference immediately: the fallback renders where the app used to break.
Reactivity and Scheduling
- A derived that disconnects while another batch is pending no longer keeps a stale value (PR #19426).
- Successive batches are processed iteratively rather than recursively, which removes slow stack capture in development builds (PR #19391).
- Flushing effects that write state no longer does quadratic work (PR #19395). Large forms with interdependent state should feel the change.
- Reactive classes and
$stateproxies are left untouched when a write is refused withstate_unsafe_mutation, so a rejected mutation no longer corrupts the object it targeted (PR #19405).
Template and Compiler Fixes
<!--and-->inside<style>are treated as CSS tokens, not as comment delimiters (PR #19370). Comment terminators are escaped in all commented out CSS as well (PR #19380).- A component whose filename starts with
$is no longer named after a reserved binding (PR #19414). {@const}declarator ranges now exclude comments that follow the initializer, which fixes source map and tooling offsets (PR #19394). The same treatment applies to parenthesized template expressions and their leading and trailing comments (PR #19389).- Directive names containing optional chaining, such as
use:a?.b, parse correctly (PR #19404). - When TypeScript syntax fails to parse, the compiler now hints at a missing
lang="ts"attribute instead of failing with a generic message (PR #19428). - Attribute name casing is handled consistently between server and client rendering.
- Destructuring array-like values respects the length bound.
Custom Elements and Transitions
Object props on a custom element are assigned as properties even after a spread onto an unregistered element with the same tag (PR #19441). Styles are applied correctly to elements using duration: 0 transitions (PR #19444), and {#each} items are removed when zero and non-zero duration outros run together (PR #19042). Custom renderers receive comments instead of text nodes (PR #19376).
Dependency Note
The release bumps devalue to 6.0.4 (PR #18857).
Upgrading
npm install [email protected]. Nothing here requires a code change. If you maintain a project that wraps async content in an error boundary, re-test that path, because the new behaviour routes failures that previously crashed the page into the fallback instead.