Skip to content

Releases: sveltejs/svelte

svelte@5.57.3

Choose a tag to compare

@github-actions github-actions released this 26 Oct 18:15
23bb146

Patch Changes

  • fix: use the first valid fallback role in role for a11y checks (#19045)

  • chore: remove obsolete code (#19051)

  • fix: keep creating state sources for property checks during component init (#18949)

  • fix: skip redundant attribute writes during hydration (#18869)

  • fix: track missing state property checks in unowned deriveds (#18944)

  • fix: devalue link in hydratable_serialization_failed error (#18999)

svelte@5.57.2

Choose a tag to compare

@github-actions github-actions released this 06 Oct 14:20
10fdca7

Patch Changes

  • fix: don't create async deriveds for a component destroyed while waiting for its top-level await (#18931)

  • fix: prevent untracked derived reads from retaining disconnected dependencies (#18829)

  • fix: error if {:else} is followed by another {:else} or {:else if ...} (#18900)

  • fix: avoid tracking SvelteURLSearchParams during URL updates (#18791)

  • fix: restore hydration state when custom element attribute updates throw (#18467)

  • fix: attach event handlers that are assigned after a top-level await in production (#18933)

  • fix: flush anything pending before invoking flushSync callback function (#18878)

  • fix: preserve location information for await wrappers (#18859)

  • fix: keep a reactive assignment with no dependencies when migrate cannot turn it into a declaration (#18817)

  • fix: don't hang migrate on a declaration that shares a line with its script tag (#18816)

  • fix: prevent duplicate subscriptions when reconnecting deriveds (#18899)

  • fix: recover when an unexpected node replaces a nested boundary comment during hydration (#18925)

  • fix: print {#await} blocks that only have a pending branch (#18908)

  • fix: don't warn about a redundant link role on <area> elements without an href (#18872)

  • fix: don't throw state_unsafe_mutation when the focused element is removed while bind:activeElement is used (#18921)

  • fix: don't overwrite an unchanged spread value, preserving incomplete number input (#18864)

  • fix: read batch-local array on each-block commit (#18879)

  • fix: error at compile time when a declaration in a snippet redeclares one of its parameters (#18842)

  • fix: error when using let: directives on a component with a children snippet (#18873)

  • fix: ignore stale boundary reset callbacks (#18886)

  • fix: handle deferred transitions aborted before initialization (#18776)

  • fix: prevent hydration mismatch recovery from being intercepted by error boundaries (#18841)

  • fix: preserve dynamic element connections during hydration (#18855)

svelte@5.57.1

Choose a tag to compare

@github-actions github-actions released this 18 Sep 23:51
636eaaa

Patch Changes

  • fix: cancel deferred event listeners during cleanup (#18749)

  • fix: preserve global CSS in components without scopable elements (#18793)

  • fix: reduce SSR render result garbage collection (#18798)

  • fix: resolve the fallback of an each block in the enclosing scope (#18803)

  • perf: speed up parser interactions with Acorn or avoid them where possible (#18740)

  • fix: prevent effect tree of batches from interfering with each other (#18508)

  • fix: serialize input default values during server rendering (#18733)

  • fix: remove WAS_MARKED flag in favor of Set (#18127)

  • fix: throw set_context_after_init when setContext is called after an await during SSR (#18739)

  • fix: make Object.hasOwn reactive for state proxy ownership changes (#18838)

  • fix: keep $state.eager when used as a variable initializer (#18809)

  • perf: avoid regex matching in parser where possible (#18736)

  • fix: in non-async mode, only push variable to current_sources when active_reaction is updating (#18550)

  • fix: recognise aria-braillelabel and aria-brailleroledescription as known ARIA attributes (#18765)

svelte@5.57.0

Choose a tag to compare

@github-actions github-actions released this 28 Aug 23:31
7bc0a70

Minor Changes

  • feat: export RenderOutput, SyncRenderOutput, Csp and Sha256Source from svelte/server (#18648)

  • feat: add has function to createContext (#18472)

  • feat: support defaultValue on <select> (#18591)

  • feat: add getOrInsert/getOrInsertComputed to SvelteMap (#18728)

Patch Changes

  • fix: block template store subscriptions on the promise that assigns the store (#18582)

  • fix: route $derived teardown errors through invoke_error_boundary (#18486)

  • fix: track SvelteDate snapshots in reactions (#18700)

  • fix: remove <svelte:head> anchors on unmount (#18697)

  • fix: warn on undeclared shorthand event handlers on <svelte:window>, <svelte:document> and <svelte:body> (#18480)

  • perf: reuse the cached value in the <option>/<select> value guard (#18713)

  • fix: prevent malformed AST output for <select> with static value attribute (#18449)

  • fix: apply ownership mutation ignores to binding assignments (#18718)

  • fix: prevent onoutroend from firing twice when compilerOptions.hmr is true (#18655)

  • fix: preserve whitespace after inline elements when printing (#18685)

  • perf: fold SSR block-open markers into the branch's first push (#18712)

  • fix: run onDestroy callbacks when a server render throws (#18585)

  • fix: report derived_invalid_export for export let x = $derived(...) in runes mode (#18692)

  • fix: never apply class hash to elements inside <svelte:head> (#18160)

  • fix: keep defaultChecked on hydrated radio inputs with spread attributes (#18701)

  • fix: accept onfocusin/onfocusout in a11y_mouse_events_have_key_events (#18689)

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

  • fix: distinct memoizer on style/class directives (#18466)

  • fix: measure nested transitions before applying their starting styles (#18647)

  • fix: don't turn component instances stored in $state into state proxies (#18646)

  • perf: emit $.only_child for elements with a single child (#18717)

  • fix: omit bind:focused from SSR output (it has no HTML attribute) (#18724)

  • fix: more robust rendering of Svelte custom element slots (#18710)

  • perf: optimize simple object destructuring in @const tags (#18390)

  • fix: properly apply static textarea value attribute during CSR (#18727)

  • fix: end a restored reaction context at the end of its synchronous segment (#18694)

  • fix: keep the dependencies of a reaction that throws, so deriveds it read are neither leaked nor stuck in their error (#18703)

  • fix: don't resurrect outroing elements when an ancestor block is paused and resumed (#18431)

  • perf: use $.comment() for single-comment templates (#18714)

  • chore: move @types/trusted-types to devDependencies (#18730)

  • perf: store setters cache as Set instead of Array (#18251)

  • fix: transform derived assignments and select function bindings correctly during server-side rendering (#18669)

  • fix: keep boolean attributes with an empty string value when rendering attribute objects on the server (#18721)

  • fix: sync SvelteURL port signal when the protocol setter clears the port (#18705)

  • fix: block declaration tags and {@const} on async values read inside closures (#18533)

  • fix: avoid css tree-shaking for exported Snippet (#18540)

  • perf: treat <img loading> as a static element again (#18711)

  • fix: prevent selectedcontent mutation from changing the selected option (#18495)

  • fix: avoid NaN keyframe values in slide transition for elements without a layout box (#18430)

  • fix: preserve line feed character references in attribute values (#18691)

  • fix: decode uppercase-X hex numeric character references (&#X...;) (#18708)

  • chore: clarify when $effect.pre runs relative to DOM updates (#18534)

  • fix: scope SSR boundary failed snippets to their boundary (#18593)

svelte@5.56.10

Choose a tag to compare

@github-actions github-actions released this 20 Aug 19:20
56a036f

Patch Changes

  • fix: preserve CSS escape sequences when printing selectors (#18667)

  • fix: parse :nth-child(2n of.foo) where of is not followed by whitespace (#18611)

  • fix: transform expressions inside labeled statements during server compilation (#18617)

  • docs: clarify that context lookup includes the current component and all ancestors (#18581)

  • fix: apply CSS custom properties with falsy values on components (#18634)

  • fix: correctly print {#await ... catch x} et al (#18645)

  • fix: ignore comments of Program node during migration script (#18656)

  • fix: reliably resolve append_style to its correct root (#18614)

  • fix: clean up removed capture event handlers from spread attributes (#18618)

  • fix: don't corrupt renderer type during SSR's legacy bind: retry loop (#18616)

  • fix: treat concise arrow function bodies as implicit returns when calculating blockers (#18613)

  • fix: give effect teardowns the value from before the first write in a flush (#18620)

  • fix: avoid double-calling a derived reference when destructuring $derived of another $derived during server-side rendering (#18668)

  • fix: preserve namespaces in CSS type selectors (#18678)

  • fix: increment private state fields through a non-this receiver (#18622)

  • chore: deduplicate client and server context helpers (#18580)

  • fix: release last_propagated_event after event propagation settles so it no longer retains the last event's target subtree (#18569)

  • fix: allow custom elements to receive async values as props (#18661)

  • fix: strip comments from inline style values in linear time (#18553)

  • fix: prevent declaration comments from breaking server derived references (#18641)

  • perf: make async blocker analysis scale linearly with the number of top-level references (#18549)

  • fix: preserve short-circuiting for logical assignments to private state fields (#18594)

svelte@5.56.9

Choose a tag to compare

@github-actions github-actions released this 12 Aug 18:12
20b341f

Patch Changes

  • fix: skip controlled each fast path while another batch is pending (#18625)

  • fix: better whitespace handling inside printer (#18638)

  • fix: don't duplicate comments in attributes (#18636)

  • fix: preserve CSS comments in the AST printer (#18637)

svelte@5.56.8

Choose a tag to compare

@github-actions github-actions released this 24 Jul 22:09
44a7813

Patch Changes

  • fix: call onerror and provide a working reset when hydrating a failed boundary (#18556)

  • fix: preserve select selection when spread attributes omit value (#18561)

svelte@5.56.7

Choose a tag to compare

@github-actions github-actions released this 20 Jul 19:31
b29d700

Patch Changes

  • chore: provide indent option for print (#18474)

svelte@5.56.6

Choose a tag to compare

@github-actions github-actions released this 16 Jul 22:26
4a6a85b

Patch Changes

  • perf: skip unnecessary blocker analysis when compiling components without top-level await (#18548)

  • fix: rerun derived that had an abort controller on reconnection (#18551)

svelte@5.56.5

Choose a tag to compare

@github-actions github-actions released this 14 Jul 12:03
602a873

Patch Changes

  • chore: drop dead code that make TSGO fail (#18496)

  • fix: don't (re)connect deriveds when read inside branch/root effects (#18527)

  • fix: skip unnecessary derived effect in earlier batch (#18525)

  • fix: avoid declaration tag warning in event handlers (#18500)

  • fix: abort deriveds own AbortSignal when it disconnects (#18400)

  • fix: ensure $state.eager() is correctly transormed for SSR output (#18530)

  • fix: correctly transform declaration tags during SSR (#18492)

  • fix: transform computed keys in keyed {#each} destructuring patterns (#18521)

  • fix: chain preprocessor sourcemaps with an empty sources[0] instead of dropping them (#18518)

  • fix: clear previous_task reference after abort in Tween to prevent memory leak on interrupted tweens (#18541)

  • fix: don't treat declaration tags as parts inside each blocks (#18507)