Packages

svelte

5.58.0 · 18 Nov 2026MIT10.4M / weekRepositoryHomepagenpmAtom feed

Your version

5.57.0

28 Aug 2026Where it was published

5.59.1 is the newest release of 5.x.

In short

4 new8 faster33 fixed2 internal

Release note

Minor Changes

  • Export RenderOutput, SyncRenderOutput, Csp and Sha256Source from svelte/server

  • Add has function to createContext

  • Support defaultValue on <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 unmount

  • Warn on undeclared shorthand event handlers on <svelte:window>, <svelte:document> and <svelte:body>

  • Reuse the cached value in the <option>/<select> value guard

  • Prevent malformed AST output for <select> with static value attribute

  • Apply 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 onDestroy callbacks when a server render throws

  • Report derived_invalid_export for export let x = $derived(...) in runes mode

  • Never apply class hash to elements inside <svelte:head>

  • Keep defaultChecked on hydrated radio inputs with spread attributes

  • Accept onfocusin/onfocusout in a11y_mouse_events_have_key_events

  • O(n²)→O(n) Map lookups for legacy $: reactive statement ordering

  • Distinct memoizer on style/class directives

  • Measure nested transitions before applying their starting styles

  • Don't turn component instances stored in $state into state proxies

  • Emit $.only_child for elements with a single child

  • Omit bind:focused from SSR output (it has no HTML attribute)

  • More robust rendering of Svelte custom element slots

  • Optimize simple object destructuring in @const tags

  • Properly 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 templates

  • Store setters cache as Set instead of Array

  • Transform 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 SvelteURL port signal when the protocol setter clears the port

  • Block declaration tags and {@const} on async values read inside closures

  • Avoid css tree-shaking for exported Snippet

  • Treat <img loading> as a static element again

  • Prevent selectedcontent mutation from changing the selected option

  • Avoid NaN keyframe values in slide transition for elements without a layout box

  • Preserve line feed character references in attribute values

  • Decode uppercase-X hex 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.