svelte
5.58.0 · 18 Nov 2026MIT10.4M / weekRepositoryHomepagenpmAtom feed
5.59.1 is the newest release of 5.x.
In short
4 new8 faster33 fixed2 internal
Release note
Minor Changes
Export
RenderOutput,SyncRenderOutput,CspandSha256Sourcefromsvelte/serverAdd
hasfunction tocreateContextSupport
defaultValueon<select>Add getOrInsert/getOrInsertComputed to SvelteMap
Patch Changes
Block template store subscriptions on the promise that assigns the store
Route $derived teardown errors through invoke_error_boundary
Track SvelteDate snapshots in reactions
Remove
<svelte:head>anchors on unmountWarn on undeclared shorthand event handlers on
<svelte:window>,<svelte:document>and<svelte:body>Reuse the cached value in the
<option>/<select>value guardPrevent malformed AST output for
<select>with staticvalueattributeApply ownership mutation ignores to binding assignments
Prevent onoutroend from firing twice when compilerOptions.hmr is true
Preserve whitespace after inline elements when printing
Fold SSR block-open markers into the branch's first push
Run
onDestroycallbacks when a server render throwsReport
derived_invalid_exportforexport let x = $derived(...)in runes modeNever apply class hash to elements inside
<svelte:head>Keep
defaultCheckedon hydrated radio inputs with spread attributesAccept
onfocusin/onfocusoutina11y_mouse_events_have_key_eventsO(n²)→O(n) Map lookups for legacy
$:reactive statement orderingDistinct memoizer on style/class directives
Measure nested transitions before applying their starting styles
Don't turn component instances stored in
$stateinto state proxiesEmit
$.only_childfor elements with a single childOmit
bind:focusedfrom SSR output (it has no HTML attribute)More robust rendering of Svelte custom element slots
Optimize simple object destructuring in
@consttagsProperly apply static textarea value attribute during CSR
End a restored reaction context at the end of its synchronous segment
Keep the dependencies of a reaction that throws, so deriveds it read are neither leaked nor stuck in their error
Don't resurrect outroing elements when an ancestor block is paused and resumed
Use
$.comment()for single-comment templatesStore setters cache as
Setinstead ofArrayTransform derived assignments and select function bindings correctly during server-side rendering
Keep boolean attributes with an empty string value when rendering attribute objects on the server
Sync
SvelteURLport signal when the protocol setter clears the portBlock declaration tags and
{@const}on async values read inside closuresAvoid css tree-shaking for exported Snippet
Treat
<img loading>as a static element againPrevent
selectedcontentmutation from changing the selected optionAvoid
NaNkeyframe values inslidetransition for elements without a layout boxPreserve line feed character references in attribute values
Decode uppercase-
Xhex numeric character references (&#X...;)Scope SSR boundary failed snippets to their boundary
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.