Svelte 5.56.5
Svelte 5.56.5 has been released — a patch release focused on fixing derived reactivity, improving SSR correctness, and resolving memory leaks. Here is the full breakdown of changes in this update.
Overview
Svelte 5.56.5 ships today as a stable patch on the 5.56.x line. This release addresses several issues discovered in the runtime and compiler, particularly around derived store reconnection, SSR transformation of $state.eager(), and preprocessor sourcemap chaining. The team has also fixed a memory leak in the Tween system and improved handling of declaration tags inside each blocks.
Key Fixes
- Derived reconnection fix — Fixed an issue where deriveds would incorrectly (re)connect when read inside branch or root effects, causing stale values in complex reactive graphs
- Unnecessary derived effect — Skipped an unnecessary derived effect evaluation when processing earlier batches, improving runtime performance in reactive chains
- Declaration tag warnings — Resolved a false-positive warning about declaration tags appearing inside event handlers
- AbortSignal cleanup — Deriveds now properly abort their own AbortSignal when they disconnect, preventing leaked signal handlers
- $state.eager() SSR — Ensured that $state.eager() is correctly transformed for server-side rendered output, matching client behavior
- Computed keys in keyed each — Computed keys in keyed {#each} destructuring patterns are now correctly transformed by the compiler
- Preprocessor sourcemaps — Chained preprocessor sourcemaps now use an empty sources[0] value instead of dropping them entirely, preserving source map integrity
- Tween memory leak — Fixed a memory leak in interrupted tweens where the previous_task reference was not cleared after abort
- Declaration tags in each blocks — Declaration tags are no longer treated as parts when nested inside each blocks, fixing SSR output
How to Upgrade
To upgrade your existing Svelte project to 5.56.5, run your package manager of choice:
- npm:
npm install [email protected] - pnpm:
pnpm add [email protected] - yarn:
yarn add [email protected]
This is a patch release with no breaking changes, so your existing code should compile and run without modifications. As always, run your test suite after upgrading to ensure everything works as expected.
Svelte 5.56.5 is available now on npm. Visit the official Svelte website for more information.