🚀 sveltejs/svelte - Release Notes

svelte@5.25.6 (2025-04-01)

### Patch Changes

-   fix: ignore generic type arguments while creating AST ([#15659](https://github.com/sveltejs/svelte/pull/15659))

-   fix: better consider component and its snippets during css pruning ([#15630](https://github.com/sveltejs/svelte/pull/15630))

svelte@5.25.5 (2025-03-31)

### Patch Changes

-   fix: add setters to `$derived` class properties ([#15628](https://github.com/sveltejs/svelte/pull/15628))

-   fix: silence assignment warning on more function bindings ([#15644](https://github.com/sveltejs/svelte/pull/15644))

-   fix: make sure CSS is preserved during SSR with bindings ([#15645](https://github.com/sveltejs/svelte/pull/15645))

svelte@5.25.4 (2025-03-31)

### Patch Changes

-   fix: support TS type assertions ([#15642](https://github.com/sveltejs/svelte/pull/15642))

-   fix: ensure `undefined` class still applies scoping class, if necessary ([#15643](https://github.com/sveltejs/svelte/pull/15643))

svelte@5.25.3 (2025-03-23)

### Patch Changes

-   fix: prevent state runes from being called with spread ([#15585](https://github.com/sveltejs/svelte/pull/15585))

svelte@5.25.2 (2025-03-21)

### Patch Changes

-   feat: migrate reassigned deriveds to `$derived` ([#15581](https://github.com/sveltejs/svelte/pull/15581))

svelte@5.25.1 (2025-03-21)

### Patch Changes

-   fix: prevent dev server from throwing errors when attempting to retrieve the proxied value of an iframe's contentWindow ([#15577](https://github.com/sveltejs/svelte/pull/15577))

svelte@5.25.0 (2025-03-21)

### Minor Changes

-   feat: make deriveds writable ([#15570](https://github.com/sveltejs/svelte/pull/15570))

svelte@5.24.1 (2025-03-21)

### Patch Changes

-   fix: use `get` in constructor for deriveds ([#15300](https://github.com/sveltejs/svelte/pull/15300))

-   fix: ensure toStore root effect is connected to correct parent effect ([#15574](https://github.com/sveltejs/svelte/pull/15574))

svelte@5.24.0 (2025-03-21)

### Minor Changes

-   feat: allow state created in deriveds/effects to be written/read locally without self-invalidation ([#15553](https://github.com/sveltejs/svelte/pull/15553))

### Patch Changes

-   fix: check if DOM prototypes are extensible ([#15569](https://github.com/sveltejs/svelte/pull/15569))

-   Keep inlined trailing JSDoc comments of properties when running svelte-migrate ([#15567](https://github.com/sveltejs/svelte/pull/15567))

-   fix: simplify set calls for proxyable values ([#15548](https://github.com/sveltejs/svelte/pull/15548))

-   fix: don't depend on deriveds created inside the current reaction ([#15564](https://github.com/sveltejs/svelte/pull/15564))

svelte@5.23.2 (2025-03-18)

### Patch Changes

-   fix: don't hoist listeners that access non hoistable snippets ([#15534](https://github.com/sveltejs/svelte/pull/15534))

svelte@5.23.1 (2025-03-17)

### Patch Changes

-   fix: invalidate parent effects when child effects update parent dependencies ([#15506](https://github.com/sveltejs/svelte/pull/15506))

-   fix: correctly match `:has()` selector during css pruning ([#15277](https://github.com/sveltejs/svelte/pull/15277))

-   fix: replace `undefined` with `void 0` to avoid edge case ([#15511](https://github.com/sveltejs/svelte/pull/15511))

-   fix: allow global-like pseudo-selectors refinement ([#15313](https://github.com/sveltejs/svelte/pull/15313))

-   chore: don't distribute unused types definitions ([#15473](https://github.com/sveltejs/svelte/pull/15473))

-   fix: add `files` and `group` to HTMLInputAttributes in elements.d.ts ([#15492](https://github.com/sveltejs/svelte/pull/15492))

-   fix: throw rune_invalid_arguments_length when $state.raw() is used with more than 1 arg ([#15516](https://github.com/sveltejs/svelte/pull/15516))

svelte@5.23.0 (2025-03-11)

### Minor Changes

-   fix: make values consistent between effects and their cleanup functions ([#15469](https://github.com/sveltejs/svelte/pull/15469))

svelte@5.22.6 (2025-03-07)

### Patch Changes

-   fix: skip `log_if_contains_state` if only logging literals ([#15468](https://github.com/sveltejs/svelte/pull/15468))

-   fix: Add `closedby` property to HTMLDialogAttributes type ([#15458](https://github.com/sveltejs/svelte/pull/15458))

-   fix: null and warnings for local handlers ([#15460](https://github.com/sveltejs/svelte/pull/15460))

svelte@5.22.5 (2025-03-06)

### Patch Changes

-   fix: memoize `clsx` calls ([#15456](https://github.com/sveltejs/svelte/pull/15456))

-   fix: respect `svelte-ignore hydration_attribute_changed` on elements with spread attributes ([#15443](https://github.com/sveltejs/svelte/pull/15443))

-   fix: always use `setAttribute` when setting `style` ([#15323](https://github.com/sveltejs/svelte/pull/15323))

-   fix: make `style:` directive and CSS handling more robust ([#15418](https://github.com/sveltejs/svelte/pull/15418))

svelte@5.22.4 (2025-03-05)

### Patch Changes

-   fix: never deduplicate expressions in templates ([#15451](https://github.com/sveltejs/svelte/pull/15451))

svelte@5.22.3 (2025-03-05)

### Patch Changes

-   fix: run effect roots in tree order ([#15446](https://github.com/sveltejs/svelte/pull/15446))

svelte@5.22.2 (2025-03-05)

### Patch Changes

-   fix: correctly set `is_updating` before flushing root effects ([#15442](https://github.com/sveltejs/svelte/pull/15442))

svelte@5.22.1 (2025-03-04)

### Patch Changes

-   chore: switch acorn-typescript plugin ([#15393](https://github.com/sveltejs/svelte/pull/15393))

svelte@5.22.0 (2025-03-04)

### Minor Changes

-   feat: Add `idPrefix` option to `render` ([#15428](https://github.com/sveltejs/svelte/pull/15428))

### Patch Changes

-   fix: make dialog element and role interactive ([#15429](https://github.com/sveltejs/svelte/pull/15429))

svelte@5.21.0 (2025-03-03)

### Minor Changes

-   chore: Reduce hydration comment for {:else if} ([#15250](https://github.com/sveltejs/svelte/pull/15250))

### Patch Changes

-   fix: disallow `bind:group` to snippet parameters ([#15401](https://github.com/sveltejs/svelte/pull/15401))

svelte@5.20.5 (2025-02-27)

### Patch Changes

-   fix: allow double hyphen css selector names ([#15384](https://github.com/sveltejs/svelte/pull/15384))

-   fix: class:directive not working with $restProps #15386 ([#15389](https://github.com/sveltejs/svelte/pull/15389))
    fix: spread add an useless cssHash on non-scoped element

-   fix: catch error on @const tag in svelte:boundary in DEV mode ([#15369](https://github.com/sveltejs/svelte/pull/15369))

-   fix: allow for duplicate `var` declarations ([#15382](https://github.com/sveltejs/svelte/pull/15382))

-   fix : bug "$0 is not defined" on svelte:element with a function call on class ([#15396](https://github.com/sveltejs/svelte/pull/15396))

svelte@5.20.4 (2025-02-24)

### Patch Changes

-   fix: update types and inline docs for flushSync ([#15348](https://github.com/sveltejs/svelte/pull/15348))

svelte@5.20.3 (2025-02-24)

### Patch Changes

-   fix: allow `@const` inside `#key` ([#15377](https://github.com/sveltejs/svelte/pull/15377))

-   fix: remove unnecessary `?? ''` on some expressions ([#15287](https://github.com/sveltejs/svelte/pull/15287))

-   fix: correctly override class attributes with class directives ([#15352](https://github.com/sveltejs/svelte/pull/15352))

svelte@5.20.2 (2025-02-18)

### Patch Changes

-   chore: remove unused `options.uid` in `render` ([#15302](https://github.com/sveltejs/svelte/pull/15302))

-   fix: do not warn for `binding_property_non_reactive` if binding is a store in an each ([#15318](https://github.com/sveltejs/svelte/pull/15318))

-   fix: prevent writable store value from becoming a proxy when reassigning using $-prefix ([#15283](https://github.com/sveltejs/svelte/pull/15283))

-   fix: `muted` reactive without `bind` and select/autofocus attributes working with function calls ([#15326](https://github.com/sveltejs/svelte/pull/15326))

-   fix: ensure input elements and elements with `dir` attribute are marked as non-static ([#15259](https://github.com/sveltejs/svelte/pull/15259))

-   fix: fire delegated events on target even it was disabled in the meantime ([#15319](https://github.com/sveltejs/svelte/pull/15319))

svelte@5.20.1 (2025-02-14)

### Patch Changes

-   fix: ensure AST analysis on `svelte.js` modules succeeds ([#15297](https://github.com/sveltejs/svelte/pull/15297))

-   fix: ignore typescript abstract methods ([#15267](https://github.com/sveltejs/svelte/pull/15267))

-   fix: correctly ssr component in `svelte:head` with `$props.id()` or `css='injected'` ([#15291](https://github.com/sveltejs/svelte/pull/15291))

svelte@5.20.0 (2025-02-12)

### Minor Changes

-   feat: SSR-safe ID generation with `$props.id()` ([#15185](https://github.com/sveltejs/svelte/pull/15185))

### Patch Changes

-   fix: take private and public into account for `constant_assignment` of derived state ([#15276](https://github.com/sveltejs/svelte/pull/15276))

-   fix: value/checked not correctly set using spread ([#15239](https://github.com/sveltejs/svelte/pull/15239))

-   chore: tweak effect self invalidation logic, run transition dispatches without reactive context ([#15275](https://github.com/sveltejs/svelte/pull/15275))

-   fix: use `importNode` to clone templates for Firefox ([#15272](https://github.com/sveltejs/svelte/pull/15272))

-   fix: recurse into `$derived` for ownership validation ([#15166](https://github.com/sveltejs/svelte/pull/15166))

svelte@5.19.10 (2025-02-11)

### Patch Changes

-   fix: when re-connecting unowned deriveds, remove their unowned flag ([#15255](https://github.com/sveltejs/svelte/pull/15255))

-   fix: allow mutation of private derived state ([#15228](https://github.com/sveltejs/svelte/pull/15228))

svelte@5.19.9 (2025-02-06)

### Patch Changes

-   fix: ensure unowned derived dependencies are not duplicated when reactions are skipped ([#15232](https://github.com/sveltejs/svelte/pull/15232))

-   fix: hydrate `href` that is part of spread attributes ([#15226](https://github.com/sveltejs/svelte/pull/15226))

svelte@5.19.8 (2025-02-05)

### Patch Changes

-   fix: properly set `value` property of custom elements ([#15206](https://github.com/sveltejs/svelte/pull/15206))

-   fix: ensure custom element updates don't run in hydration mode ([#15217](https://github.com/sveltejs/svelte/pull/15217))

-   fix: ensure tracking returns true, even if in unowned ([#15214](https://github.com/sveltejs/svelte/pull/15214))

svelte@5.19.7 (2025-02-03)

### Patch Changes

-   chore: remove unused code from signal logic ([#15195](https://github.com/sveltejs/svelte/pull/15195))

-   fix: encounter svelte:element in blocks as sibling during pruning css ([#15165](https://github.com/sveltejs/svelte/pull/15165))