178 KiB
svelte
4.2.3
Patch Changes
-
fix: improve a11y-click-events-have-key-events message (#9358)
-
fix: more robust hydration of html tag (#9184)
4.2.2
Patch Changes
-
fix: support camelCase properties on custom elements (#9328)
-
fix: add missing plaintext-only value to contenteditable type (#9242)
-
chore: upgrade magic-string to 0.30.4 (#9292)
-
fix: ignore trailing comments when comparing nodes (#9197)
4.2.1
Patch Changes
-
fix: update style directive when style attribute is present and is updated via an object prop (#9187)
-
fix: css sourcemap generation with unicode filenames (#9120)
-
fix: do not add module declared variables as dependencies (#9122)
-
fix: handle
svelte:elementwith dynamic this and spread attributes (#9112) -
fix: silence false positive reactive component warning (#9094)
-
fix: head duplication when binding is present (#9124)
-
fix: take custom attribute name into account when reflecting property (#9140)
-
fix: add
indeterminateto the list of HTMLAttributes (#9180) -
fix: recognize option value on spread attribute (#9125)
4.2.0
Minor Changes
- feat: move
svelteHTMLfrom language-tools into core to load the correctsvelte/elementtypes (#9070)
4.1.2
Patch Changes
-
fix: allow child element with slot attribute within svelte:element (#9038)
-
fix: Add data-* to svg attributes (#9036)
4.1.1
Patch Changes
- fix:
svelte:componentspread props change not picked up (#9006)
4.1.0
Minor Changes
- feat: add ability to extend custom element class (#8991)
Patch Changes
-
fix: ensure
svelte:componentevaluates props once (#8946) -
fix: remove
let:variableslot bindings from select binding dependencies (#8969) -
fix: handle destructured primitive literals (#8871)
-
perf: optimize imports that are not mutated or reassigned (#8948)
-
fix: don't add accessor twice (#8996)
4.0.5
Patch Changes
- fix: generate type definition with nullable types (#8924)
4.0.4
Patch Changes
-
fix: claim svg tags in raw mustache tags correctly (#8910)
-
fix: repair invalid raw html content during hydration (#8912)
4.0.3
Patch Changes
- fix: handle falsy srcset values (#8901)
4.0.2
Patch Changes
-
fix: reflect all custom element prop updates back to attribute (#8898)
-
fix: shrink custom element baseline a bit (#8858)
-
fix: use non-destructive hydration for all
@htmltags (#8880) -
fix: align
disclose-versionexports specification (#8874) -
fix: check srcset when hydrating to prevent needless requests (#8868)
4.0.1
Patch Changes
-
fix: ensure identifiers in destructuring contexts don't clash with existing ones (#8840)
-
fix: ensure
createEventDispatcherandActionReturnwork with types from generic function parameters (#8872) -
fix: apply transition to
<svelte:element>with local transition (#8865) -
fix: relax a11y "no redundant role" rule for li, ul, ol (#8867)
-
fix: remove tsconfig.json from published package (#8859)
4.0.0
Major Changes
-
breaking: Minimum supported Node version is now Node 16 (#8566)
-
breaking: Minimum supported webpack version is now webpack 5 (#8515)
-
breaking: Bundlers must specify the
browsercondition when building a frontend bundle for the browser (#8516) -
breaking: Minimum supported vite-plugin-svelte version is now 2.4.1. SvelteKit users can upgrade to 1.20.0 or newer to ensure a compatible version (#8516)
-
breaking: Minimum supported
rollup-plugin-svelteversion is now 7.1.5 (198dbcf) -
breaking: Minimum supported
svelte-loaderis now 3.1.8 (198dbcf) -
breaking: Minimum supported TypeScript version is now TypeScript 5 (it will likely work with lower versions, but we make no guarantees about that) (#8488)
-
breaking: Remove
svelte/registerhook, CJS runtime version and CJS compiler output (#8613) -
breaking: Stricter types for
createEventDispatcher(see PR for migration instructions) (#7224) -
breaking: Stricter types for
ActionandActionReturn(see PR for migration instructions) (#7442) -
breaking: Stricter types for
onMount- now throws a type error when returning a function asynchronously to catch potential mistakes around callback functions (see PR for migration instructions) (#8136) -
breaking: Overhaul and drastically improve creating custom elements with Svelte (see PR for list of changes and migration instructions) (#8457)
-
breaking: Deprecate
SvelteComponentTypedin favor ofSvelteComponent(#8512) -
breaking: Make transitions local by default to prevent confusion around page navigations (#6686)
-
breaking: Error on falsy values instead of stores passed to
derived(#7947) -
breaking: Custom store implementers now need to pass an
updatefunction additionally to thesetfunction (#6750) -
breaking: Do not expose default slot bindings to named slots and vice versa (#6049)
-
breaking: Change order in which preprocessors are applied (#8618)
-
breaking: The runtime now makes use of
classList.toggle(name, boolean)which does not work in very old browsers (#8629) -
breaking: apply
inertto outroing elements (#8628) -
breaking: use
CustomEventconstructor instead of deprecatedcreateEventmethod (#8775)
Minor Changes
-
Add a way to modify attributes for script/style preprocessors (#8618)
-
Improve hydration speed by adding
data-svelte-hattribute to detect unchanged HTML elements (#7426) -
Add
a11y no-noninteractive-element-interactionsrule (#8391) -
Add
a11y-no-static-element-interactionsrule (#8251) -
Allow
#eachto iterate over iterables likeSet,Mapetc (#7425) -
Improve duplicate key error for keyed
eachblocks (#8411) -
Warn about
:in attributes and props to prevent ambiguity with Svelte directives (#6823) -
feat: add version info to
window. You can opt out by settingdiscloseVersiontofalsein the compiler options (#8761) -
feat: smaller minified output for destructor chunks (#8763)
Patch Changes
-
Bind
nulloption and input values consistently (#8312) -
Allow
$storeto be used with changing values including nullish values (#7555) -
Initialize stylesheet with
/* empty */to enable setting CSP directive that also works in Safari (#7800) -
Treat slots as if they don't exist when using CSS adjacent and general sibling combinators (#8284)
-
Fix transitions so that they don't require a
style-src 'unsafe-inline'Content Security Policy (CSP) (#6662). -
Explicitly disallow
vardeclarations extending the reactive statement scope (#6800) -
Improve error message when trying to use
animate:directives on inline components (#8641) -
fix: export ComponentType from
svelteentrypoint (#8578) -
fix: never use html optimization for mustache tags in hydration mode (#8744)
-
fix: derived store types (#8578)
-
Generate type declarations with dts-buddy (#8578)
-
fix: ensure types are loaded with all TS settings (#8721)
-
fix: account for preprocessor source maps when calculating meta info (#8778)
-
chore: deindent cjs output for compiler (#8785)
-
warn on boolean compilerOptions.css (#8710)
-
fix: export correct SvelteComponent type (#8721)
4.0.0-next.3
Patch Changes
-
feat: smaller minified output for destructor chunks (#8763)
-
breaking: use
CustomEventconstructor instead of deprecatedcreateEventmethod (#8775) -
fix: account for preprocessor source maps when calculating meta info (#8778)
-
chore: deindent cjs output for compiler (#8785)
-
feat: add version info to
window. You can opt out by settingdiscloseVersiontofalsein the compiler options (#8761)
4.0.0-next.2
Patch Changes
-
fix: never use html optimization for mustache tags in hydration mode (#8744)
-
fix: ensure types are loaded with all TS settings (#8721)
-
warn on boolean compilerOptions.css (#8710)
-
fix: export correct SvelteComponent type (#8721)
4.0.0-next.1
Patch Changes
-
fix: export ComponentType from
svelteentrypoint (#8694) -
fix: derived store types (#8700)
-
Generate type declarations with dts-buddy (#8702)
4.0.0-next.0
Major Changes
- breaking: Minimum supported Node version is now Node 16 (#8566)
- breaking: Minimum supported webpack version is now webpack 5 (#8515)
- breaking: Bundlers must specify the
browsercondition when building a frontend bundle for the browser (#8516) - breaking: Minimum supported vite-plugin-svelte version is now 2.4.1. SvelteKit users can upgrade to 1.20.0 or newer to ensure a compatible version (#8516)
- breaking: Minimum supported
rollup-plugin-svelteversion is now 7.1.5 (198dbcf) - breaking: Minimum supported
svelte-loaderis now 3.1.8 (198dbcf) - breaking: Minimum supported TypeScript version is now TypeScript 5 (it will likely work with lower versions, but we make no guarantees about that) (#8488)
- breaking: Remove
svelte/registerhook, CJS runtime version and CJS compiler output (#8613) - breaking: Stricter types for
createEventDispatcher(see PR for migration instructions) (#7224) - breaking: Stricter types for
ActionandActionReturn(see PR for migration instructions) (#7442) - breaking: Stricter types for
onMount- now throws a type error when returning a function asynchronously to catch potential mistakes around callback functions (see PR for migration instructions) (#8136) - breaking: Overhaul and drastically improve creating custom elements with Svelte (see PR for list of changes and migration instructions) (#8457)
- breaking: Deprecate
SvelteComponentTypedin favor ofSvelteComponent(#8512) - breaking: Make transitions local by default to prevent confusion around page navigations (#6686)
- breaking: Error on falsy values instead of stores passed to
derived(#7947) - breaking: Custom store implementers now need to pass an
updatefunction additionally to thesetfunction (#6750) - breaking: Do not expose default slot bindings to named slots and vice versa (#6049)
- breaking: Change order in which preprocessors are applied (#8618)
- breaking: The runtime now makes use of
classList.toggle(name, boolean)which does not work in very old browsers (#8629) - breaking: apply
inertto outroing elements (#8627)
Minor Changes
- Add a way to modify attributes for script/style preprocessors (#8618)
- Improve hydration speed by adding
data-svelte-hattribute to detect unchanged HTML elements (#7426) - Add
a11y no-noninteractive-element-interactionsrule (#8391) - Add
a11y-no-static-element-interactionsrule (#8251) - Allow
#eachto iterate over iterables likeSet,Mapetc (#7425) - Improve duplicate key error for keyed
eachblocks (#8411) - Warn about
:in attributes and props to prevent ambiguity with Svelte directives (#6823)
Patch Changes
- Bind
nulloption and input values consistently (#8312) - Allow
$storeto be used with changing values including nullish values (#7555) - Initialize stylesheet with
/* empty */to enable setting CSP directive that also works in Safari (#7800) - Treat slots as if they don't exist when using CSS adjacent and general sibling combinators (#8284)
- Fix transitions so that they don't require a
style-src 'unsafe-inline'Content Security Policy (CSP) (#6662). - Explicitly disallow
vardeclarations extending the reactive statement scope (#6800) - Improve error message when trying to use
animate:directives on inline components (#8641)
3.59.2
- Fix escaping
<textarea bind:value={...}>values in SSR
3.59.1
- Handle dynamic values in
a11y-autocomplete-valid(#8567)
3.59.0
- Add
ResizeObserverbindingscontentRect/contentBoxSize/borderBoxSize/devicePixelContentBoxSize(#8022) - Add
devicePixelRatiobinding for<svelte:window>(#8285) - Add
fullscreenElementandvisibilityStatebindings for<svelte:document>(#8507) - Add
a11y-autocomplete-validwarning (#8520) - Fix handling of
width/heightattributes when spreading (#6752) - Fix updating of interpolated
style:directive when using spread (#8438) - Remove
style:directive property when value isundefined(#8462) - Fix type of
VERSIONcompiler export (#8498) - Relax
a11y-no-redundant-roleswarning (#8536) - Handle nested array rest destructuring (#8552, #8554)
3.58.0
- Add
bind:innerTextforcontenteditableelements (#3311) - Add support for CSS
@containerqueries (#6969) - Respect
preserveCommentsin DOM output (#7182) - Allow use of
documentfortargetin typings (#7554) - Add
a11y-interactive-supports-focuswarning (#8392) - Fix equality check when updating dynamic text (#5931)
- Relax
a11y-no-noninteractive-element-to-interactive-rolewarning (#8402) - Properly handle microdata attributes (#8413)
- Prevent name collision when using computed destructuring variables (#8417)
- Fix escaping
<textarea value={...}>values in SSR (#8429)
3.57.0
- Add
<svelte:document>(#3310) - Add a11y
no-noninteractive-element-to-interactive-role(#8167) - Stop intro transition from triggering incorrectly (#6152, #6812)
- Support computed and literal properties when destructuring objects in the template (#6609)
- Give
style:directive precedence overstyle=attribute (#7475) - Select
<option>withselectedattribute when initial state isundefined(#8361) - Prevent derived store callbacks after store is unsubscribed from (#8364)
- Account for
bind:groupmembers being spread across multiple control flow blocks (#8372) - Revert buggy reactive statement optimization (#8374)
- Support CSS units in the
flyandblurtransitions (#7623)
3.56.0
- Add
|stopImmediatePropagationevent modifier (#5085) - Add
axisparameter toslidetransition (#6182) - Add
readonlyutility to convertwritablestore to readonly (#6518) - Add
readyStatebinding for media elements (#6666) - Generate valid automatic component names when the filename contains only special characters (#7143)
- Add
naturalWidthandnaturalHeightbindings (#7771) - Support
<!-- svelte-ignore ... -->on components (#8082) - Add a11y warnings:
- Add
data-sveltekit-replacestateanddata-sveltekit-keepfocusattribute typings (#8281) - Compute node dimensions immediately before crossfading (#4111)
- Fix potential infinite invalidate loop with
<svelte:component>(#4129) - Ensure
bind:offsetHeightupdates initially (#4233) - Don't set selected options if value is unbound or not passed (#5644)
- Validate component
:global()selectors (#6272) - Improve warnings:
- Check value equality for
<input type="search">and<input type="url">(#7027) - Do not select a disabled
<option>by default when the initial bound value is undefined (#7041) - Handle
{@html}tags inside<template>tags (#7364) - Ensure
afterUpdateis not called afteronDestroy(#7476) - Improve handling of
inertattribute (#7500) - Reduce use of template literals in SSR output for better performance (#7539)
- Ensure
<input>value persists when swapping elements with spread attributes in an{#each}block (#7578) - Simplify generated code for reactive statements if dependencies are all static (#7942)
- Fix race condition on
<svelte:element>with transitions (#7948) - Allow assigning to a property of a
constwhen destructuring (#7964) - Match browser behavior for decoding malformed HTML entities (#8026)
- Ensure
trusted-typesCSP compatibility for Web Components (#8134) - Optimise
<svelte:element>output code for static tag and static attribute (#8161) - Don't throw when calling unsubscribing from a store twice (#8186)
- Clear inputs when
bind:groupvalue is set toundefined(#8214) - Fix handling of nested arrays with keyed
{#each}containing a non-keyed{#each}(#8282)
3.55.1
- Fix
drawtransition with delay showing a dot at the beginning of the path (#6816) - Fix infinity runtime call stack when propagating bindings (#7032)
- Fix static
<svelte:element>optimization in production mode (#7937) - Fix
svelte-ignorecomment breaking named slot (#8075) - Revert change to prevent running init binding unnecessarily (#8103)
- Fix adding duplicate event listeners with
<svelte:element on:event>(#8129) - Improve detection of promises that are also functions (#8162)
- Avoid mutating spread component props during SSR (#8171)
- Add missing typing for global
partattribute (#8181) - Add missing
submitterproperty toon:submitevent type
3.55.0
- Add
svelte/elementsfor HTML/Svelte typings (#7649)
3.54.0
- Pass
options.directionargument to custom transition functions (#3918) - Support fallback a11y WAI-ARIA roles (#8044)
- Prevent running init binding unnecessarily (#5689, #6298)
- Allow updating variables from
@constdeclared function (#7843) - Do not emit
a11y-no-noninteractive-tabindexwarning if element has atabpanel(#8025) - Fix escaping SSR'd values in
style:directive (#8085)
3.53.1
- Fix exception in
rel=attribute check with dynamic values (#7994) - Do not emit deprecation warnings for
csscompiler options for now (#8009) - Make compiler run in browser again (#8010)
- Upgrade
tslib(#8013)
3.53.0
- Check whether
parentNodeexists before removing child (#6037) - Upgrade various dependencies, notably
css-treeto2.2.1(#7572, #7982) - Extend
csscompiler option with'external' | 'injected' | 'none'settings and deprecate oldtrue | falsevalues (#7914)
3.52.0
- Throw compile-time error when attempting to update
constvariable (#4895) - Warn when using
<a target="_blank">withoutrel="noreferrer"(#6188) - Support
style:foo|importantmodifier (#7365) - Fix hydration regression with
{@html}and components in<svelte:head>(#7941)
3.51.0
- Add a11y warnings:
- Warn when two-way binding to
{...rest}object in{#each}block (#6860) - Support
--style-propson<svelte:component>(#7461) - Supports nullish values for component event handlers (#7568)
- Supports SVG elements with
<svelte:element>(#7613) - Treat
inertas boolean attribute (#7785) - Support
--style-propsfor SVG components (#7808) - Fix false positive dev warnings about unset props when they are bound (#4457)
- Fix hydration with
{@html}and components in<svelte:head>(#4533, #6463, #7444) - Support scoped style for
<svelte:element>(#7443) - Improve error message for invalid value for
<svelte:component this={...}>(#7550) - Improve error message when using logic blocks or tags at invalid location (#7552)
- Warn instead of throwing error if
<svelte:element>is a void tag (#7566) - Supports custom elements in
<svelte:element>(#7733) - Fix calling component unmount if a component is mounted and then immediately unmounted (#7817)
- Do not generate
a11y-role-has-required-aria-propswarning when elements match their semantic role (#7837) - Improve performance of custom element data setting in
<svelte:element>(#7869)
3.50.1
- Add all global objects and functions as known globals (#3805, #7223)
- Fix regression with style manager (#7828)
3.50.0
- Add a11y warnings:
a11y-incorrect-aria-attribute-type: check ARIA state and property values (#6978)a11y-no-abstract-role: check that ARIA roles are non-abstract (#6241)a11y-no-interactive-element-to-noninteractive-role: check for non-interactive roles used on interactive elements (#5955)a11y-role-has-required-aria-props: check that elements withroleattribute have all required attributes for that role (#5852)
- Add
ComponentEventsconvenience type (#7702) - Add
SveltePreprocessorutility type (#7742) - Enhance action typings (#7805)
- Remove empty stylesheets created from transitions (#4801, #7164)
- Make
a11y-label-has-associated-controlwarning check all descendants for input control (#5528) - Only show lowercase component name warnings for non-HTML/SVG elements (#5712)
- Disallow invalid CSS selectors starting with a combinator (#7643)
- Use
Node.parentNodeinstead ofNode.parentElementfor legacy browser support (#7723) - Handle arrow function on
<slot>inside<svelte:fragment>(#7485) - Improve parsing speed when encountering large blocks of whitespace (#7675)
- Fix
class:directive updates in aborted/restarted transitions (#7764)
3.49.0
- Improve performance of string escaping during SSR (#5701)
- Add
ComponentTypeandComponentPropsconvenience types (#6770) - Add support for CSS
@layer(#7504) - Export
CompileOptionsfromsvelte/compiler(#7658) - Fix DOM-less components not being properly destroyed (#7488)
- Fix
class:directive updates with<svelte:element>(#7521, #7571) - Harden attribute escaping during SSR (#7530)
3.48.0
- Allow creating cancelable custom events with
createEventDispatcher(#4623) - Support
{@const}tag in{#if}blocks #7241 - Return the context object in
setContext#7427 - Allow comments inside
{#each}blocks when usinganimate:(#3999) - Fix
|localtransitions in{#key}blocks (#5950) - Support svg namespace for
{@html}(#7002, #7450) - Fix
{@const}tag not working inside a component when there's nolet:#7189 - Remove extraneous leading newline inside
<pre>and<textarea>(#7264) - Fix erroneous setting of
textContentfor<template>elements (#7297) - Fix value of
let:bindings not updating in certain cases (#7440) - Fix handling of void tags in
<svelte:element>(#7449) - Fix handling of boolean attributes in
<svelte:element>(#7478) - Add special style scoping handling of
[open]selectors on<dialog>elements (#7495)
3.47.0
- Add support for dynamic elements through
<svelte:element>(#2324) - Miscellaneous variable context fixes in
{@const}(#7222) - Fix
{#key}block not being reactive when the key variable is not otherwise used (#7408) - Add
Symbolas a known global (#7418)
3.46.6
- Actually include action TypeScript interface in published package (#7407)
3.46.5
- Add TypeScript interfaces for typing actions (#6538)
- Do not generate
unused-export-letwarning inside<script context="module">blocks (#7055) - Do not collapse whitespace-only CSS vars (#7152)
- Add
aria-descriptionto the list of allowed ARIA attributes (#7301) - Fix attribute escaping during SSR (#7327)
- Prevent
.innerHTMLoptimization from being used whenstyle:directive is present (#7386)
3.46.4
- Avoid
maximum call stack size exceedederrors on large components (#4694) - Preserve leading space with
preserveWhitespace: true(#4731) - Preserve leading space in
<pre>tags (#6437) - Improve error message when trying to use
style:directives on inline components (#7177) - Add
FormDataas a known global (#7199) - Mark
css/instance/moduleAST properties as optional in types (#7204)
3.46.3
- Ignore whitespace in
{#each}blocks when containing elements withanimate:(#5477) - Throw compiler error when variable in
context="instance"collides with import incontext="module"(#7090) - Fix compiler crash when
{@const}contains arrow functions (#7134)
3.46.2
- Export
FlipParamsinterface fromsvelte/animate(#7103) - Fix
style:directive reactivity inside{#each}block (#7136)
3.46.1
3.46.0
- Implement
{@const}tag (RFC #33, #6413) - Implement
style:directive (RFC #42, #5923) - Fix style manager conflicts when using multiple Svelte instances (#7026)
- Fix hydration when using
{@html}(#7115)
3.45.0
- Fix non-boolean attribute rendering in SSR to render truthy values as-is (#6121)
- Fix binding to a member expression also invalidating the member property (#6921)
- Fix default values in
{#each}/etc. destructurings not being considered references for the purposes of compiler warnings (#6964) - Fix
{:else if}value incorrectly being cached (#7043) - Add
a11y-no-redundant-roleswarning (#7067) - Fix code generation error with arrow functions whose bodies are object destructuring assignments (#7087)
3.44.3
- Fix
bind:thisbinding insideonMountfor manually instantiated component (#6760) - Prevent cursor jumps with one-way binding for other
type="text"-like<input>s (#6941) - Exclude
asyncloops fromloopGuardTimeout(#6945)
3.44.2
- Fix overly restrictive preprocessor types (#6904)
- More specific typing for crossfade function - returns a tuple, not an array (#6926)
- Add
URLSearchParamsas a known global (#6938) - Add
typesfield toexportsmap (#6939)
3.44.1
- Fix code generation when a multi-line
returnstatement contains comments (code-red#36) - Fix code generation when
for/if/whilestatements have empty bodies (#6884)
3.44.0
- Add
enableSourcemapcompiler option (#6835)
3.43.2
- Fix regression where user-specified
imports were not rewritten according to thesveltePathoption (#6834)
3.43.1
- Prevent a rejecting promise used in
{#await}during SSR from appearing as an unhandled rejection (#6789)
3.43.0
- Use export map to expose no-op versions of lifecycle functions for SSR (#6743)
- Prefer
contextpassed to component constructor, even when running synchronously in another component (#6753) - Handle preprocessors that return empty sourcemaps (#6757)
3.42.6
- Hide private preprocess typings (#6622)
- Fix reactive function in
{:else if}expression not being properly re-run (#6727)
3.42.5
- In
drawtransition, account forstroke-linecapin determining length (#4540) - Fix regression with destructuring assignments with default values (#6699)
3.42.4
- Only apply optimized
srcattribute handling when in anhtmlnamespace (#6575) - Fix styles for transitions and animations being attached to the wrong
documentin<iframe>s (#6637) - Fix
<select>with a{...spread}attribute that didn't provide avaluekey getting its value improperly unset (#6675)
3.42.3
- Add
BigIntas a known global (#6671) - Fix regression where
onDestroyinsvelte/ssrwas improperly a no-op (#6676)
3.42.2
- Collapse whitespace in
classandstyleattributes (#6004) - Deselect all
<option>s in a<select>where the boundvaluedoesn't match any of them (#6126) - In hydrated components, only rely on helpers for creating the types of elements present in the component (#6555)
- Add
HTMLElementandSVGElementas known globals (#6643) - Account for scaling in
flipanimations (#6657)
3.42.1
- Fix regression with reordering keyed
{#each}blocks when compiling with hydration enabled (#6561)
3.42.0
- Allow
use:actionsto be used on<svelte:body>(#3163) - Improve parser errors for certain invalid components (#6259, #6288)
- Fix paths in generator JS sourcemaps to be relative (#6598)
- Fix overzealous warnings about
context="module"variables not being reactive (#6606)
3.41.0
- Support
export { ... } fromsyntax in components (#2214) - Support
export let { ... } =syntax in components (#5612) - Support
{#await ... then/catch}without a variable for the resolved/rejected value (#6270)
3.40.3
- Fix
<slot>data when a transition is cancelled before completing (#5394) - Fix destructuring into variables beginning with
$so that they result in store updates (#5653) - Fix
in:transition configuration not properly updating when it's changed after its initial creation (#6505) - Fix applying
:global()for>selector combinator (#6550) - Fix mounting component at detached DOM node (#6567)
3.40.2
- Fix dynamic
autofocus={...}attribute handling (#4995) - Add filename to combined source map if needed (#6089)
- In AST, parse empty attribute values as an empty string (#6286)
- Fix tracking whether transition has started (#6399)
- Fix incorrect scoping of
:global()selectors (#6550)
3.40.1
- Fix store reactivity regression when using reactive statements (#6557)
3.40.0
- Support rendering a component in a shadow DOM (#5869)
- Fix
:rootselector being erroneously scoped to component (#4767) - Fix
.endin AST for expressions inside attributes (#6258) - Fix one-way
<select>binding when it has a spread attribute (#6433) - Various hydration improvements and fixes (#6449)
- Use smaller versions of internal helpers when compiling without hydration support (#6462)
- Fix two-way binding of values when updating through synchronous component accessors (#6502)
3.39.0
- Support
bind:groupin SSR (#4621) - Add a11y warning
a11y-mouse-events-have-key-eventswhich checks thatmouseover/mouseoutare accompanied byfocus/blurevent handlers (#5938) - Make it possible to silence more warnings (#5954)
- Add
|trustedevent modifier (#6137) - Add
varsReportcompiler option to include all variables reference in the component in thevariablesreport (#6192) - Add
errorModecompiler option to try to continue compiling when an error is detected (#6194) - Expose
svelte/ssrwhich exports lifecycle methods as no-ops (#6416) - Add
getAllContexts(#6447) - Throw proper error for
export default function() {}andexport default class {}rather than crashing the compiler (#3275) - Fix SSR rendering of falsy
inputvalues (#4551) - Fix
preserveCommentsin SSR mode (#4730) - Do not warn if
context="module"variables are not the only dependencies in reactive statements (#5954) - Stop checking
a11y-media-has-captiona11y warning on<audio>elements (#6054) - Fix erroneous "unknown prop" warning when using slot on a component (#6065)
- Add sourcemaps to all HTML elements (#6092)
- Relax
derivedfunction signature (#6178) - Throw compiler error when passing empty directive names (#6299)
- Fix compiler error when using
:where()inside:global()(#6434) - Fix ordering of elements in keyed
{#each}(#6444) - Remove deprecated a11y warning
a11y-no-onchange warning(#6457) - Fix
:global()with pseudo element not being seen as global (#6468) - Allow
:global()to contain multiple selectors when it is not part of a larger selector (#6477) - Make
<script>and<style>end tag parsing more robust (#6511)
3.38.3
- Speed up hydration by reducing amount of element reorderings (#4308)
- Fix escaping attribute values when using a spread in SSR (#5756)
- Throw compiler error when
:global()contains multiple selectors (#5907) - Give explicit error rather than crashing when an attribute shorthand
{}is empty (#6086) - Make
<textarea>end tag parsing more robust (#6276) - Fix
:global(...):some-pseudoclassselectors not being seen as global (#6306) - Fix type signatures of
writableandreadableso it's possible to call them without arguments (#6291, #6345) - Preserve
thisin bubbled events (#6310) - Fix slot props not updating when transition is aborted (#6386)
- Fix generic props relationship in
SvelteComponentTyped(#6400)
3.38.2
- Revert hydration optimisation for the time being (#6279)
3.38.1
- Fix hydration regression (#6274)
3.38.0
- Avoid recreating DOM elements during hydration (#1067)
- Support passing CSS custom properties to component (#5628)
- Support
:global()as part of compound CSS selectors (#6222) - Fix updating
<slot>contents when there's an aborted transition (#3542) - Fix setting boolean attributes on custom elements (#5951)
- Add missing function overload for
derivedto allow explicitly setting an initial value for non-async derived stores (#6172) - Fix dynamic
hrefvalues erroneously triggering a11y warnings (#5990) - Fix scope leak when updating an
{#await}block (#6173) - Pass full markup source to
script/stylepreprocessors (#6169) - Fix
crossfadetypes to markfallbackas optional (#6201) - Add missing "context" typing to
SvelteComponentconstructor options (#6236) - Don't automatically switch to
svgnamespace when inforeignnamespace (#6257)
3.37.0
- Allow root-level context to be passed to the component constructor (#6032)
3.36.0
- Add
this: voidtyping to store functions (#6094) - Export
Spring,TweenedandEasingFunctioninterfaces (#6070, #6056) - Export interfaces for transition parameters (#5207)
- Export store's useful TypeScript definitions (#5864)
- Fix previous breaking change to
svelte/preprocesstypes location (#6100) - Fix missing slotted elements in AST (#6066)
3.35.0
- Implement slotted components and
<svelte:fragment slot="...">(#1037, #2079) - Fix reactivity bug where
slot="..."is specified after attributes that should be reactive (#5626)
3.34.0
- Add a
cssHashoption for controlling the classname used for CSS scoping (#570)
3.33.0
- In custom elements, call
onMountfunctions when connecting and clean up when disconnecting (#1152, #2227, #4522) - Allow destructured defaults to refer to other variables (#5066)
- Do not emit
contextual-storewarnings for function parameters or declared variables (#6008)
3.32.3
- Fix removal of lone
:hostselectors (#5982)
3.32.2
- Fix unnecessary additional invalidation with
<Component bind:prop={obj.foo}/>(#3075, #4447, #5555) - Fix scoping of selectors with
:global()and~sibling combinators (#5499) - Fix removal of
:hostselectors as unused when compiling to a custom element (#5946)
3.32.1
- Warn when using
modulevariables reactively, and close weird reactivity loophole (#5847) - Throw a parser error for
class:directives with an empty class name (#5858) - Fix extraneous store subscription in SSR mode (#5883)
- Don't emit update code for
class:directives whose expression is not dynamic (#5919) - Fix type inference for derived stores (#5935)
- Make parameters of built-in animations and transitions optional (#5936)
- Make
SvelteComponentDevtypings more forgiving (#5937) - Fix
foreignelements incorrectly disallowingbind:this(#5942)
3.32.0
- Allow multiple instances of the same action on an element (#5516)
- Support
foreignnamespace, which disables certain HTML5-specific behaviour and checks (#5652) - Support inline comment sourcemaps in code from preprocessors (#5854)
3.31.2
- Rework SSR store handling to subscribe and unsubscribe as in DOM mode (#3375, #3582, #3636)
- Fix error when removing elements that are already transitioning out (#5789, #5808)
- Fix duplicate content race condition with
{#await}blocks and out transitions (#5815) - Deconflict variable names used for contextual actions (#5834)
3.31.1
- Fix scrolling of element with resize listener by making the
<iframe>havez-index: -1(#5448) - Fix location of automatically declared reactive variables (#5749)
- Warn when using
classNameorhtmlForattributes (#5777) - Fix checkbox
bind:groupin keyed{#each}where the array can be reordered (#5779) - Fix checkbox
bind:groupin nested{#each}contexts (#5811) - Add graphics roles as known ARIA roles (#5822)
- Fix local transitions if a parent has a cancelled outro transition (#5829)
- Support
use:obj.some.deep.functionas actions (#5844)
3.31.0
- Use a separate
SvelteComponentTypedinterface for typed components (#5738)
3.30.1
- Support consuming decoded sourcemaps as created by the
source-maplibrary'sSourceMapGenerator(#5722) - Actually export
hasContext(#5726)
3.30.0
- Add a typed
SvelteComponentinterface (#5431) - Support spread into
<slot>props (#5456) - Fix setting reactive dependencies which don't appear in the template to
undefined(#5538) - Support preprocessor sourcemaps during compilation (#5584)
- Fix ordering of elements when using
{#if}inside{#key}(#5680) - Add
hasContextlifecycle function (#5690) - Fix missing
walktypes insvelte/compiler(#5696)
3.29.7
- Include
./registerin exports map (#5670)
3.29.6
- Include
./package.jsonin export map (#5659)
3.29.5
- Fix
$$propsand$$restPropswhen compiling to a custom element (#5482) - Include an export map in
package.json(#5556) - Fix function calls in
<slot>props that use contextual values (#5565) - Fix handling aborted transitions in
{:else}blocks (#5573) - Add
ElementandNodeto known globals (#5586) - Fix
$$slotswhen compiling to custom elements (#5594) - Fix internal
imports so that we're exposing a valid ES module (#5617)
3.29.4
- Fix code generation error with
??alongside logical operators (#5558)
3.29.3
- Hopefully actually republish with proper UMD build for use in the REPL
3.29.2
- Republish with proper UMD build for use in the REPL
3.29.1
- Fix compiler hanging on
<slot slot="...">(#5475) - Fix types on
getfunction insvelte/store(#5483) - Add missing
endfield on ASTs for non-top-level<style>elements (#5487) - Fix
{#if}inside{#await}with destructuring (#5508) - Fix types on lifecycle hooks (#5529)
3.29.0
- Support
<slot slot="...">(#2079) - Fix unmounting components with a bidirectional transition with a delay (#4954)
- Add types to
getfunction insvelte/store(#5269) - Add a warning when a component looks like it's trying to use another component without beginning with a capital letter (#5302)
- Add
EventSourceto known globals (#5463) - Fix compiler exception with
~/+combinators and{...spread}attributes (#5465)
3.28.0
- Add
{#key}block for keying arbitrary content on an expression (#1469)
3.27.0
- Add
|nonpassiveevent modifier, explicitly passingpassive: false(#2068) - Scope CSS selectors with
~and+combinators (#3104) - Fix keyed
{#each}not reacting to key changing (#5444) - Fix destructuring into store values (#5449)
- Fix erroneous
missing-declarationwarning withuse:obj.method(#5451)
3.26.0
- Support
use:obj.methodas actions (#3935) - Support
_as numeric separator (#5407) - Fix assignments to properties on store values (#5412)
- Add special style scoping handling of
[open]selectors on<details>elements (#5421) - Support
import.metain template expressions (#5422)
3.25.1
- Fix specificity of certain styles involving a child selector (#4795)
- Fix transitions that are parameterised with stores (#5244)
- Fix scoping of styles involving child selector and
*(#5370) - Fix destructuring which reassigns stores (#5388)
- Fix
{#await}s with no{:catch}getting stuck unresolved if the promise rejects (#5401)
3.25.0
- Use
nullrather thanundefinedfor coerced bound value of<input type="number">(#1701) - Expose object of which slots have received content in
$$slots(#2106) - Correctly disallow using lifecycle hooks after synchronous component initialisation (#4259, #4899)
- Re-throw an unhandled rejection when an
{#await}block with no{:catch}gets a rejection (#5129) - Add types to
createEventDispatcher(#5211) - In SSR mode, do not automatically declare variables for reactive assignments to member expressions (#5247)
- Include selector in message of
unused-css-selectorwarning (#5252) - Fix using
<Namespaced.Component/>s in child{#await}/{#each}contexts (#5255) - Fix using
<svelte:component>in{:catch}(#5259) - Fix setting one-way bound
<input>valuetoundefinedwhen it has spread attributes (#5270) - Fix deep two-way bindings inside an
{#each}involving a store (#5286) - Use valid XHTML for elements that are optimised and inserted with
.innerHTML(#5315) - Fix reactivity of
$$propsin slot fallback content (#5367)
3.24.1
- Prevent duplicate invalidation with certain two-way component bindings (#3180, #5117, #5144)
- Fix reactivity when passing
$$propsto a<slot>(#3364) - Fix transitions on
{#each}{:else}(#4970) - Fix unneeded invalidation of
$$propsand$$restProps(#4993, #5118) - Provide better compiler error message when mismatched tags are due to autoclosing of tags (#5049)
- Add
a11y-label-has-associated-controlwarning (#5074) - Add
a11y-media-has-captionwarning (#5075) - Fix
bind:groupwhen using contextual reference (#5174)
3.24.0
- Support nullish coalescing (
??) and optional chaining (?.) operators (#1972) - Support
import.meta(#4379) - Fix only setting
<input>values when they're changed when there are spread attributes (#4418) - Fix placement of
{@html}when used at the root of a slot, at the root of a component, or in<svelte:head>(#5012, #5071) - Fix certain handling of two-way bound
contenteditableelements (#5018) - Fix handling of
imported value that is used as a store and is also mutated (#5019) - Do not display
a11y-missing-contentwarning on elements withcontenteditablebindings (#5020) - Fix handling of
thisin inline function expressions in the template (#5033) - Fix collapsing HTML with static content (#5040)
- Prevent use of
$storeat compile time when top-levelstorehas been shadowed (#5048) - Update
<select>with one-wayvaluebinding when the available<option>s change (#5051) - Fix published
tweenedtypes so the.set()and.update()options are optional (#5062) - Fix contextual
bind:thisinside{#each}block (#5067) - Preprocess self-closing
<script>and<style>tags (#5080) - Fix types for animation- and transition-related param objects so each param is optional (#5083)
3.23.2
- Fix
bind:groupinside{#each}(#3243) - Don't crash when using an arrow function as a statement (#4617)
- Deconflict
bind:thisvariable (#4636)
3.23.1
- Fix checkbox
bind:groupwhen multiple options have the same value (#4397) - Fix
bind:thisto the value of an{#each}block (#4517) - Fix reactivity when assigning to contextual
{#each}variable (#4574, #4744) - Fix binding to contextual
{#each}values that shadow outer names (#4757) - Work around EdgeHTML DOM issue when removing attributes during hydration (#4911)
- Throw CSS parser error when
:global()does not contain a selector (#4930)
3.23.0
- Update
<select>withbind:valuewhen the available<option>s change (#1764) - Add
mutedbinding for media elements (#2998) - Fix inconsistencies when setting a two-way bound
<input>toundefined(#3569) - Fix setting
<select multiple>when there are spread attributes (#4392) - Fix let-less
<slot>with context overflow (#4624) - Fix resize listening on certain older browsers (#4752)
- Add
a11y-no-onchangewarning (#4788) - Fix
use:actions being recreated when a keyed{#each}is reordered (#4693) - Fix
{@html}when using tags that can only appear inside certain tags (#4852) - Fix reactivity when binding directly to
{#each}context (#4879)
3.22.3
- Support default values and trailing commas in destructuring
{#await}(#4560, #4810) - Fix handling of
tweenedstore when set usingduration: 0(#4799, #4846) - Fix setting
valueattribute withbind:groupand attribute spread (#4803) - Fix issue with compound
{#if}block involving static condition, dynamic condition, and inline component (#4840) - Update a11y warnings per ARIA 1.2 working draft (#4844)
3.22.2
- Fix compiler exception with
a11y-img-redundant-altand value-lessaltattribute (#4777)
3.22.1
- Fix compiler exception with
a11y-img-redundant-altand dynamicaltattribute (#4770)
3.22.0
- Fix misaligned line numbers in source maps (#3906)
- Make setting a
tweenedstore usingduration: 0instantly update the value (#4399) - Fix reactivity with imported values that are then mutated (#4555)
- Fix contextual dynamic
bind:thisinside{#each}block (#4686) - Do not display a11y warning about missing
hreffor<a>withnameorid(#4697) - Disable infinite loop guard inside generators (#4698)
- Display
a11y-invalid-attributewarning forhref="javascript:..."(#4733) - Implement
a11y-img-redundant-altwarning (#4750) - Fix variable name conflict with component called
<Anchor>(#4768)
3.21.0
- Support dimension bindings in cross-origin environments (#2147)
- Fix several related outro bugs (#3202, #3410, #3685, #4620, #4630)
- Try using
globalThisrather thanglobalsfor the benefit of non-Node servers and web workers (#3561, #4545) - Support
{#await ... catch ...}syntax shorthand (#3623) - Fix attaching of JS debugging comments to HTML comments (#4565)
- Fix
<svelte:component/>within<slot/>(#4597) - Fix bug with updating simple
{#if}blocks (#4629) - Fix issues with
<input type="number">updates (#4631, #4687) - Prevent illegal attribute names (#4648)
- Fix
{#if}block directly within<slot/>(#4703)
3.20.1
- Fix compiler regression with slots (#4562)
3.20.0
- Allow destructuring in
{#await}blocks (#1851) - Allow
<svelte:self>to be used in a slot (#2798) - Expose object of unknown props in
$$restProps(#2930) - Prevent passing named slots other than from the top level within a component (#3385)
- Allow transitions and animations to work within iframes (#3624)
- Fix initialising slot fallbacks when unnecessary (#3763)
- Disallow binding directly to
constvariables (#4479) - Fix re-attaching event handlers on keyed
{#each}blocks (#4491) - Fix updating keyed
{#each}blocks with{:else}(#4536, #4549) - Fix hydration of top-level content (#4542)
3.19.2
- In
devmode, display a runtime warning when a component is passed an unexpected slot (#1020, #1447) - In
varsarray, correctly indicate whethermodulevariables aremutatedorreassigned(#3215) - Fix spread props not updating in certain situations (#3521, #4480)
- Use the fallback content for slots if they are passed only whitespace (#4092)
- Fix bitmask overflow for
{#if}blocks (#4263) - In
devmode, check for unknown props even if the component has no writable props (#4323) - Exclude global variables from
$capture_state(#4463) - Fix bitmask overflow for slots (#4481)
3.19.1
- Do not treat modifications to
$$propsas updates to a store called$props(#4368) - Deconflict
valueparameter name used in contextual bindings (#4445) - Fix dev mode validation of
{#each}blocks using strings (#4450)
3.19.0
- Fix indirect bindings involving elements with spreads (#3680)
$capture_state/$inject_statenow act on the component's entire state, rather than its props (#3822)- Warn when using
<Foo/>andFoois dynamic (#4331) - Display compilation warnings in
svelte/registerin dev mode (#4364) - Fix unneeded updating of keyed each blocks (#4373)
- Throw runtime error in dev mode for non-array-like values in
{#each}blocks (#4408)
3.18.2
- Fix binding to module-level variables (#4086)
- Improve parsing error messages when there is a pending unclosed tag (#4131)
- Disallow attribute/prop names from matching two-way-bound names or
{shorthand}attribute/prop names (#4325) - Improve performance of
flush()by not using.shift()(#4356) - Permit reserved keywords as destructuring keys in
{#each}(#4372) - Disallow reserved keywords in
{expressions}(#4372) - Fix code generation error with precedence of arrow functions (#4384)
- Fix event handlers that are dynamic via reactive declarations or stores (#4388)
- Fix invalidation in expressions like
++foo.bar(#4393)
3.18.1
- Fix code generation error with adjacent inline and block comments (#4312)
- Fix detection of unused CSS selectors that begin with a
:global()but contain a scoped portion (#4314)
3.18.0
- Fix infinite loop when instantiating another component during
onMount(#3218) - Make autosubscribing to a nullish store a no-op (#2181)
3.17.3
- Fix updating a
<slot>inside an{#if}or other block (#4292) - Fix using RxJS observables in
derivedstores (#4298) - Add dev mode check to disallow duplicate keys in a keyed
{#each}(#4301) - Fix hydration of
<title>when starting from SSR-generated code withhydratable: true(#4310)
3.17.2
- Fix removing attributes during hydration (#1733)
- Disallow two-way binding to a variable declared by an
{#await}block (#4012) - Allow access to
let:variables in sibling attributes on slot root (#4173) - Fix
~=and class selector matching against values separated by any whitespace characters (#4242) - Fix code generation for
awaited expressions that need parentheses (#4267) - Preserve JavaScript comments from the original component source where possible (#4268)
- Add some more known globals (#4276)
- Correctly apply event modifiers to
<svelte:body>events (#4278)
3.17.1
- Only attach SSR mode markers to a component's
<head>elements when compiling withhydratable: true(#4258)
3.17.0
- Remove old
<head>elements during hydration so they aren't duplicated (#1607) - Prevent text input cursor jumping in Safari with one-way binding (#3449)
- Expose compiler version in dev events (#4047)
- Don't run actions before their element is in the document (#4166)
- Fix reactive assignments with destructuring and stores where the destructured value should be undefined (#4170)
- Fix hydrating
{:else}in{#each}(#4202) - Do not automatically declare variables in reactive declarations when assigning to a member expression (#4212)
- Fix stringifying of attributes in SSR mode when there are spread attributes (#4240)
- Only render one
<title>in SSR mode when multiple components provide one (#4250)
3.16.7
- Also apply actions in the order they're given along with other directives (#2446, #4156)
- Check whether a dynamic event handler is a function before calling it (#4090)
- Correctly mark event handlers as dynamic when they involve an expression used in a
bind:elsewhere (#4155)
3.16.6
- Fix CSS specificity bug when encapsulating styles (#1277)
- Apply directives in the order they're given (#2446)
- Fix destructuring in
let:directives (#2751) - Preserve whitespace around
<tspan>s in<svg>s (#3998)
3.16.5
3.16.4
- Fix slots with props not propagating through to inner slots (#4061)
- Fix noting autosubscribed stores as
referencedinvarsfor tooling (#4081) - Fix cascading invalidations in certain situations (#4094)
3.16.3
- Fix bitmask overflow when using slotted components (#4077)
- Remove unnecessary
$$invalidatecalls from init block (#4018)
3.16.2
- Handle slot updates when parent component has a bitmask overflow (#4078)
3.16.1
- Fix unused export warning for props used as stores (#4021)
- Fix
{:then}without resolved value containing{#each}(#4022) - Fix incorrect code generated with
loopGuardTimeout(#4034) - Fix handling of bitmask overflow and globals (#4037)
- Fix
{:then}containing{#if}(#4044) - Fix bare
imports informat: 'cjs'output mode (#4055) - Warn when using a known global as a component name (#4070)
3.16.0
- Use bitmasks to track changes (#3945)
- Fix heisenbug with component styles (#3977)
- Do not warn about missing expected props for
export function foo() {}(#3954) - Fix
context="module"exports with the same name as an instance variable (#3983) - Fix binding to contextual values from
{#each}blocks referring to global variables (#3992) - Use
requestAnimationFramecallback argument for smoother transitions (#4014) - Fix
listen_devargument order (#4016)
3.15.0
- Hide commented sections from preprocessors (#3894)
- Add
seekingandendedbindings to media elements (#3650) - Add
videoWidthandvideoHeightbindings to video elements (#3927) - Fix for dynamic event handlers (#3934)
- Handle scale transforms when using the
flipanimation (#3555) - Fix some code generation bugs (#3929, #3939)
- Add
aria-hidden="true"to objects generated when adding resize-listeners, to improve accessibility (#3948)
3.14.1
- Deconflict block method names with other variables (#3900)
- Fix entity encoding issue in text nodes with constant expressions (#3911)
- Make code for unknown prop warnings compatible with older js engines (#3914)
3.14.0
- Add
loopGuardTimeoutoption that augmentsfor/whileloops to prevent infinite loops, primarily for use in the REPL (#3887) - Keep component bindings in sync when changed in reactive statements (#3382)
- Update attributes before bindings (#3857)
- Prevent variable naming conflict (#3899)
3.13.0
- New structured code generation, which eliminates a number of edge cases and obscure bugs (#3539)
Also:
- Fix
{#each}context not shadowing outer scope when usingbind:(#1565) - Fix edge cases in matching selectors against elements (#1710)
- Fix several bugs related to interaction of
{...spread}attributes with other features (#2721, #2916, #3421, #3681, #3764, #3790) - Allow exiting a reactive block early with
break $(#2828) - Fix binding to props that have been renamed with
export { ... as ... }(#3508) - Fix application of style scoping class in cases of ambiguity (#3544)
- Check attributes have changed before setting them to avoid image flicker (#3579)
- Fix generating malformed code for
{@debug}tags with no dependencies (#3588) - Fix generated code in specific case involving compound ifs and child components (#3595)
- Fix
bind:thisbinding to a store (#3591) - Use safer
HTMLElementcheck before extending class (#3608) - Add
locationas a known global (#3619) - Support
{#await}with{:catch}but no{:then}(#3623) - Clean up dead code emitted for
<slot/>s (#3631) - Fix tracking of dependencies of compound assignments in reactive statements (#3634)
- Flush changes in newly attached block when using
{#await}(#3660) - Throw exception immediately when calling
createEventDispatcher()after component instantiation (#3667) - Fix globals shadowing contextual template scope (#3674)
- Fix
<svelte:window>bindings to stores (#3832) - Deconflict generated var names with builtins (#3724)
- Allow spring/tweened values to be initially undefined (#3761)
- Warn if using
<svelte:options tag="...">withoutcustomElement: trueoption (#3782) - Add
Eventto list of known globals (#3810) - Throw helpful error on empty CSS declaration (#3801)
- Support
easingparam onfadetransition (#3823) - Generate valid names from filenames with unicode characters (#3845)
- Don't generate any code for markup-less components (#2200)
- Deconflict with internal name
block(#3854) - Set attributes before bindings, to prevent erroneous assignments to
input.files(#3828) - Smarter unused CSS detection (#3825)
- Allow dynamic event handlers (#3040)
- Prevent erroneous
"undefined"class name (#3876) - Prevent resetting of
srcattribute unless changed (#3579) - Prevent hydration of void element 'children' (#3882)
- Hoist globals even if mentioned in
<script>block (#3745)
3.12.1
- Escape
@symbols in props, again (#3545)
3.12.0
- Fire events on
documentin development to facilitate dev tooling (#3005) - Remove old props when the keys in spread props are removed (#2282)
3.11.0
$capture_stateand$inject_stateHMR hooks in dev mode (#3148)- Allow unclosed tags inside if/each/etc blocks (#2807)
- Invalidate unreferenced store values inside
<script>(#3537) - Print
nulltext when hydrating (#3379)
3.10.1
- Preserve reactivity inside if block heads etc (#3512)
- Fix store bindings inside each blocks (#3455)
- Generate correct code for if-else blocks with static conditions (#3505)
- Avoid generating unnecessary component update code (#3526)
- Make
bind:currentTimemore reliable (#3524) - Prevent errors when setting spread props on SVG elements (#3522)
3.10.0
- Add
blurtransition (#3477) - Prevent
<input type="number">edge case with spread props (#3426) - Robustify cyclical dependency detection, improve errors (#3459)
3.9.2
- Fix handling of additional @-rules in style blocks (#2995)
- Fix if blocks with complex but static conditions (#3447)
3.9.1
- Only update style properties if necessary (#3433)
- Only update if/await blocks if necessary (#2355)
- Set context correctly inside await blocks (#2443)
- Handle
!importantinline styles (#1834) - Make index references reactive in event handlers inside keyed each blocks (#2569)
3.9.0
- Support
isattribute on elements, with a warning (#3182) - Handle missing slot prop (#3322)
- Don't set undefined/null input values, unless previous value exists (#1233)
- Fix style attribute optimisation bailout (#1830)
3.8.1
- Set SVG namespace for slotted elements (#3321)
3.8.0
- Add
selfevent modifier (#3372) - Generate valid code when spreading literal (#3185)
- Coerce tag values to string before checking equality (#2290)
3.7.1
- Assume
letvariables are dynamic for slots (#3354) - Allow transition functions to return nothing (#2246)
3.7.0
- Disable warnings via
svelte-ignorecomments (#3351) - Throw if
$or$$...is referenced as global (#3272) - Remount HTML tags correctly (#3329)
- Treat data attributes like other attributes (#3337)
3.6.11
- Handle reassigned RxJS observables (#3304)
- Remove commas from HTMLified attributes with multiple chunks (#3341)
- Prevent
classon element with scoped styles from rendering asundefined(#3283) - Allow references to index in key expression (#3274)
- Mark attribute selectors as used if corresponding binding exists (#3281)
- Preserve
async/*when hoisting functions (#3179) - Make
rafa noop on server (#3324) - Prevent erroneous a11y warning for image input with alt attribute (#3331)
- Add several well-known globals (#3316)
3.6.10
- Use
changeevent for file inputs (#3226) - Always fire reactive declarations with
$$props(#3286) - More conservative spread prop updates (#3289)
- Quote props if necessary in SSR mode (#3312)
3.6.9
- Always update derived stores with a derived input whose value does not change (#3191)
3.6.8
- Preserve global keyframes that don't match local elements (#3228)
- Fix spread/
class:combination (#3242) - Never scope
:rootselector (#3250) - Prevent trailing commas in function arguments (#3255)
3.6.7
- Prevent corruption of outro callbacks with nested keyed each blocks (#3209)
- Prevent cursor jumping in bound input in Safari (#3199)
- Make resize listener object unfocusable (#3206)
3.6.6
3.6.5
- Handle RxJS-style observables with
get(#3153) - Pass
letvalues to bindings (#3140) - Escape
@symbols in props (#3173) - Scale crossfaded elements (#3175)
3.6.4
- Run
onMountfunctions in correct order, and before initialafterUpdatefunctions (#2281) - Fix code transformation for shorthand methods (#2906)
- Fix assignments in inline functions (#3038)
3.6.3
- Fix await block mounting inside removed if block (#1496)
- Update when element references are removed (#2034)
- Don't attempt to serialize non-string values in server-rendered bindings (#2135)
- Recognise dependencies in function expressions (#2693)
- Scope pseudo-class selectors without class/type (#1705)
- Allow nested at-rules (#3135)
- Allow attributes to contain
=characters (#3149)
3.6.2
- Fix placement of each-else block (#2917)
- Make context accessible to
bind:this(#2806) - Pass hoisted values to slots (#2586)
3.6.1
- Fix escaping of
@in dev mode debug filename (#3114)
3.6.0
- Add
innerHTMLandtextContentbindings forcontenteditableelements (#2996) - Fix destructuring assignments where targets are member expressions (#3092)
- Deconflict with used globals (#2963)
- Always run
onDestroyfunctions, not just for detaching components (#3058) - Fix scope analysis around catch clauses (#3064)
- Add error constructors to known globals (#3064)
- Always bail out of hoisting on encountering local state in function definition (#3044)
- Fix incorrect merging of top-level text nodes (#3027)
- Handle removal of components in each blocks without props (#3035)
- Only call subscriber once when resubscribing to a store (#3022)
- Check for existence of dynamic component before introing (#3054)
- Sanitize names of bubbled event handlers (#2923)
3.5.4
- Preserve whitespace at the boundaries of
{#each}blocks (#713) - Fix dynamic
bind:thison components (#2333) - Fix binding to values in a component when it uses
$$props(#2725) - Fix parsing ambiguous HTML entities (#3071)
3.5.3
- Don't double-destroy keyed each blocks with outros (#3055)
3.5.2
- Prevent duplicated outros causing errors (#3001)
- Fix automatic name generation (#2843)
- Fix .d.ts stubs (#3009)
- Don't strip non-breaking spaces (#3014)
- Fix
requestAnimationFramecontext (#2933) - Allow space before attribute value (#3026)
- Remove null/undefined attributes (#1434)
- Fix whitespace in static markup (#3030)
3.5.1
- Accommodate webpack idiosyncrasies
3.5.0
- Update package folder structure (#2887)
- Support
oncemodifier on component events (#2654) - Allow empty
<title>tags (#2980) - Render textarea binding values inside element (#2975)
- Fix delayed animation glitch (#2871)
- Solve diamond dependencies problem with stores (#2660)
- Fix missing outros inside each blocks (#2689)
- Support animations without transitions (#2908)
- Add missing transition events (#2912)
3.4.4
- Publish type declaration files (#2874)
- Don't trigger updates for unreferenced values (#2865)
- Omit readonly bindings from SSR output (#2339)
- Prevent outdated animation CSS (#2871)
- Repair dynamic
{@html ...}in head (#2880) - Don't create unknown prop warnings for internal props, or if component has
$$props(#2881)
3.4.3
- Add type declaration files for everything (#2842)
- Prevent
svelte/storebeing bundled (#2786) - Warn on unknown props in dev mode (#2840)
- Treat
requestAnimationFrameas a no-op on the server (#2856) - Add
rawproperty to AST'sTextnodes (#2714) - Add
<details bind:open>(#2854)
3.4.2
- Use empty string for empty data attributes (#2804)
- Support
customElement: truewith no<svelte:options>(#2821) - Add docstrings to
svelte/store(#2795)
3.4.1
- Handle non-falsy non-function return values from derivers (#2780)
- Allow
springto work server-side (#2773)
3.4.0
- Allow custom element to be defined without a
tag(#2417) - Fix parsing of quote marks inside attribute values (#2715)
- Convert
svelte/storeto TypeScript (#2733) - Allow
debugtags to include hoisted values (#2764) - Parse error if attribute name is missing
=(#1513) - Allow reactive declarations to depend on mutated
constvalues (#2728)
3.3.0
- Allow multiple event listeners on a single node (#2688)
- Allow derivers to return a cleanup function (#2553)
- Support namespaced components (
<Foo.Bar/>) (#2743)
3.2.2
- Add
windowanddocumentto expected globals (#2722) - Prevent hoisting of functions that depend on reactive state (#2703)
- Generate correct code when slot has no changes (#2697)
- Prevent
Object.prototype-related bugs (#2696)
3.2.1
- Use same comparison logic for
derivedas for other stores (#2644) - Invalidate dependencies of reactive declarations (#2444)
- Fix instrumentation of auto-subscription self-assignments (#2681)
- Warn on non-top-level or module-context statements labeled with
$:(#2176)
3.2.0
- Improve
springanimations, and addhard/softoptions (#2627) - Expose
parseandwalkfunctions (#2661, #2534) - Support array/object rest in
eachblock destructuring patterns (#2647, #2658) - Use
setAttributeto changeformproperty on form elements (#1742) - Fix a11y warning when
<figcaption>is non-direct descendant of<figure>(#2582) - Squelch erroneous 'empty block' warnings (#1716)
- Fix IE9/10 error with
insertBefore(#2573) - Prevent
$$scopefrom being spread onto an element (#2520) - Resubscribe to stores that are assigned to in
<script>(#2435) - Allow reactive declarations to depend on
constvariables (#2285) - Trigger store changes on UpdateExpression (#2625)
- Squelch missing prop warning if variable is initialised (#2635)
- Add
alert,confirmandpromptto known globals (#2648)
3.1.0
- Allow store subscribe functions to return an object with an
unsubscribemethod, providing native RxJS support (#2549)
3.0.1
- Prevent text input cursor jumping in Safari (#2506)
- Allow assignments to member expressions (#2510)
- Prevent mutually dependent functions causing an infinite during hoisting (#2542)
- Reuse scheduler promise instead of creating new one each time (#2555)
- Various site/docs fixes
3.0.0
- Everything
2.15.4
- IE
classListfix (#1868)
2.15.3
- Don't mutate AST
2.15.2
- Expose
stats.props(#1837)
2.15.1
- Don't throw missing store error when store is declared in component (#1828)
2.15.0
- Event modifiers (#1088)
- Wheel and touch events are passive by default (#1088)
- Add
<svelte:document>tag (#1484) - Include binding values in server-rendered HTML (#1205)
- Remove attributes when value is undefined/null (#1434)
- Initialise window scroll from component data (#938)
- Remove references to unused properties in generated code (#1187)
- Add TypeScript definitions for store (#1207)
- Better error for missing store (#1807)
2.14.3
- Account for directive dependencies (#1793)
- Detach each block iterations in each blocks with no update method (#1795)
2.14.2
- Fix issue with nested
{#if}blocks (#1780)
2.14.1
- Fix block insertion order regression (#1778)
- Fix blocks inside
<svelte:head>(#1774) - Better attribute parsing (#1772)
- Fix parse errors inside directives (#1788)
2.14.0
- Refactor internals (#1678)
- Deprecate
onerroroption (#1745) - Handle edge cases where
destroyis called beforemount(#1653) - Make
scrollbinding more efficient (#1579) - Make 'readonly property' store error more informative (#1761)
2.13.5
- Fix missing dependencies in shorthand class directives (#1739)
2.13.4
- Support dynamic
import()in template expressions
2.13.3
- Fix bug with keyed each blocks and nested components (#1706)
2.13.2
- Coalesce simultaneous store/component updates (#1520)
- Fix nested transitions preventing each block item removal (#1617)
- Add
classdirective shorthand and encapsulate styles (#1695) - Prevent erroneous updates of bound inputs (#1699)
2.13.1
- Coerce second argument to
toggleClass(#1685)
2.13.0
2.12.1
- Allow actions to take any expression (#1676)
- Run transitions in component context (#1675)
- Correctly set select value on mount (#1666)
- Support
{@debug}in SSR (#1659) - Don't treat
as empty whitespace (#1658) - Fix outros for if blocks with no else (#1688)
- Set
style.cssTextin spread attributes (#1684)
2.12.0
- Initialise actions on mount rather than hydrate (#1653)
- Allow nonexistent components to be destroyed (#1677)
- Pass AMD ID from CLI correctly (#1672)
- Minor AST tweaks (#1673, #1674)
- Reduce code duplication in component initialisation (#1670)
2.11.0
- Add
--sharedCLI option (#1649) - Run first
onstatebefore fragment is rendered (#1522) - Exclude current computed prop from state object (#1544)
2.10.1
- Add sourcemaps to
{@debug}tags (#1647)
2.10.0
- Add a
{@debug}tag, for inspecting values in templates in dev mode (#1635) - Fix dimension bindings in iOS (#1642)
2.9.11
- Pass props to custom elements rather than setting attributes, where appropriate (#875)
- Handle whitespace in lists consistently between SSR and DOM renderers (#1637)
- Improve error for invalid
refnames (#1613)
2.9.10
- Handle
nullconsistently in tags (#1598) - Support object rest in computed properties (#1540)
- Always update dynamic components when expression changes (#1621)
- Encapsulate local styles inside global styles (#1618)
2.9.9
- Fix attribute name regex (#1623)
2.9.8
- Sanitize spread attributes in SSR — fixes vulnerability CVE-2018-6341 (#1623)
2.9.7
- Allow
<input type=file bind:files>(#1608) - Ensure child window exists before removing listener in
addResizeHandler(#1600) - Handle transitions in
elseblock (#1589)
2.9.6
- Provide more useful error if SSR component attempts to render non-SSR component (#1605)
2.9.5
- Null out refs to dynamic components (#1596)
2.9.4
2.9.3
- Fix bug when an each block contains transitions but its else branch does not (#1559)
- If an event handler throws an exception, don't block all future calls to that handler (#1573)
2.9.2
- Fix conflict when using multiple if-else blocks, some of which use outros and some of which do not (#1580)
- Fix some cases where
.innerHTMLwas being used to create child elements when it shouldn't (#1581)
2.9.1
- Use
template.contentinstead oftemplatewhere appropriate (#1571)
2.9.0
- Play outro transitions on
<svelte:component>ifnestedTransitionsis true (#1568) - Allow illegal identifiers to be component prop names, for e.g. spreading
data-fooprops (#887) - Abort transition when node is detached (#1561)
- Only include
transitionManagerwhen necessary (#1514)
2.8.1
- Fix prefixed animation name replacement (#1556)
2.8.0
- Correctly set store on nested components (to parent store, not root store) (#1538)
2.7.2
- Prevent unnecessary remounts (#1527)
- Allow
refs.*as callee (#1526) - Handle empty lists when outroing (#1532)
2.7.1
- Fix spread props with multiple dependencies (#1515)
2.7.0
- Add
__svelte_metaobject to elements in dev mode, containing source info (#1499) - Fix
bind:onlinein dev mode (#1502) - Update v1 warnings/errors (#1508)
- Transform prefixed keyframes (#1504)
2.6.6
- Fix nested transition bug (#1497)
2.6.5
- Handle cases where only some
ifblock branches have outros (#1492)
2.6.4
2.6.3
- Nested transitions respect
skipIntroByDefault(#1460) - Always create outro for top-level block (#1470)
2.6.2
- Fix spread+bindings on dynamic components (#1433)
- Abort in-progress animations, if a new one starts (#1458)
- Allow animations to be parameterised (#1462)
2.6.1
- Absolutely position outroing animated nodes (#1457)
2.6.0
- Add
animatedirective (#1454) - Add
skipIntroByDefaultcompiler option andintro: trueinit option (#1448) - Add
nestedTransitionscompiler option (#1451) - Component outros, if
nestedTransitionsis true (#1211) - Allow transition functions to return a function, for inter-transition coordination (#1453)
- Pass
1 - tas second argument to transition functions (#1452)
2.5.1
- Add new ARIA attributes (#1436)
- Add
Promiseto whitelisted globals (#1441) - Allow spaces around reserved keyword attributes (#1445)
2.5.0
- Support transitions in
awaitblocks (#956) - Abort outros if block is recreated (#1425)
- Wait until transitions have completed before removing styles (#648)
- Support event shorthand on dynamic components (#1427)
- Various codegen improvements (#1419, #1421, #1422, #1424)
- Correctly handle
awaitblocks with no dynamic content (#1417) - Allow spread props on elements with static attribute tests (#1429)
2.4.4
2.4.3
refdirectives prevent HTMLified content (#1407)- Store computed properties update components immediately upon declaration (#1327)
2.4.2
- Evaluate
eachkey in child scope (#1397) - Prevent false negatives and positives when detecting cyclical computed store properties (#1399)
- Only update dynamic component props (#1394)
2.4.1
- Fix DOM event context (#1390)
2.4.0
- Integrate CLI (#1360)
- Allow arbitrary destructuring for each block items, with binding (#1385)
- Each block keys can use arbitrary expressions (#703)
bind:offsetWidth,bind:offsetHeight,bind:clientWidthandbind:clientHeight(#984)- Leaner generated code for
eachblocks (#1287)
2.3.0
- Allow computed properties to have entire state object as dependency (#1303)
- Fix
statswhenoptions.generateisfalse(#1368) - Assign custom methods to custom elements (#1369)
- Fix
thisvalue in custom event handlers (#1297) - Re-evaluate
eachvalues lazily (#1286) - Preserve outer context in
awaitblocks (#1251)
2.2.0
- Internal refactoring (#1367)
2.1.1
- Report initial
changedbased on state, not expected props (#1356) - Set state to empty object, not null, on destroy (#1354)
- Prevent stale state in component event handlers (#1353)
2.1.0
2.0.0
See the blog post for information on how to upgrade your apps
- New template syntax (#1318)
- Emit ES2015 code, not ES5 (#1348)
- Add
onstateandonupdatehooks, removecomponent.observemethod (#1197) - Use destructuring syntax for computed properties (#1069
- Change signature of
svelte.compile(#1298) - Remove
validateandStylesheetfrom public API (#1348) - Don't typecast numeric attributes (#657)
- Always compile with
Storesupport, and cascading disabled (#1348) - Remove unused
hashproperty from AST (#1348) - Rename
locproperty tostartin warnings and errors (#1348)
1.64.1
- Fix computed properties in SSR renderer (#1349)
1.64.0
- Deprecate passing a string argument to
component.get(#1347)
1.63.1
- Allow
observemethod to be overwritten
1.63.0
- Add
onstateandonupdatelifecycle hooks and deprecatecomponent.observe(#1197) - Add
onandfiretoStore, deprecateonchangeandobserve(#1344) - Require computed properties to have destructured argument in v2 mode (#1069)
1.62.0
- Add a
codefield to errors and warnings (#474) - When using v2 syntax, do not use interpolation in non-root
<style>tags (#1339)
1.61.0
- Support v2 syntax with
parser: 'v2'option (#1318)
1.60.3
- Fix validation of
multipleattributes on bound<select>elements (#1331)
1.60.2
- Fix order of insertions for keyed each blocks with siblings (#1306)
- Bail out of CSS DCE if element has spread attribute (#1300)
- Allow
consoleetc in component events (#1278) - Deconflict against inherited contexts (#1275)
- Make CSS DCE case insensitive (#1269)
- Error on dynamic
multipleattribute for bound select (#1270) - Allow custom events on
<:Window>(#1268)
1.60.1
- Fix spread updates on dynamic components (#1307)
1.60.0
- Spread properties (#195)
svelte.compilereturns an object with{ js, css, ast }properties, wherejsandcssare{ code, map }objects (#1298)- Fixed broken compile errors when using Rollup (#1296)
1.59.0
- Deprecate
teardownin custom event handlers (#531) - Allow static content in keyed
eachblock (#1291) - Allow empty content in keyed
eachblock (#1295) - Only delete applicable transitions (#1290)
1.58.5
- Allow backtick string literals for
svg,tag, andpropsproperties (#1284) - Fix removal of transition styles under Firefox (#1288)
1.58.4
- Fix initial state regression (#1283)
1.58.3
- Actions run in the context of the component (#1279)
- Set refs when mounting dynamic components (#1280)
1.58.2
- (1.58.1 failed to publish)
1.58.1
- Actions (#1247)
- Support
preserveCommentsoption in SSR mode (#1265) - Fix performance regression (#1274)
1.58.0
- Fast row swapping (#588)
- Better error messages for invalid directives (#1242)
- Fix local context variable bugs (#1240, #1254)
- Skip missing property warnings for computed/global properties in dev mode (#1246)
- Add end position to warnings (#1250)
1.57.4
- Deconflict context names (#1229)
- Use
setAttributeto set input types (#1209) - Scale transition duration correctly (#1221)
1.57.3
- Fix scoped CSS on static child elements (#1223)
1.57.2
- Fix scoped CSS on SVG elements (#1224)
1.57.1
- Add each_value to contextProps (#1206)
1.57.0
- Use classes (not attributes) for style encapsulation, and base36-encode hashes (#1118)
1.56.4
- Allow
componentandstateto be context names (#1213) - Don't remove
@supportsrules whencascade: false(#1215)
1.56.3
- Top-level transitions work inside nested components (#1188)
- Always use internal
_mountmethod (#1201)
1.56.2
- Null out
keyfor children of keyed each blocks (#1202)
1.56.1
1.56.0
- Internal refactor (#1122)
- Use correct context for component events (#1184)
- Allow observing
$fooin dev mode (#1181) - Handle dynamic data in default slot (#1144)
1.55.1
- Fix cancellation of store
onchangehandlers (#1177) - Write
["default"]instead of.defaultin legacy mode (#1166) - Upgrade Acorn (#1182)
- Don't warn about capitalisation if
options.namebegins with non-alphabetical character (#1179)
1.55.0
- Add
immutablecompiler option for Svelte and runtime option forStore(#1146) - Fix component store bindings (#1100)
- Fire
oncreatewhen custom element is attached (#1117) - Downgrade empty blocks to a warning (#1156)
- Error on unclosed comment (#1156)
1.54.2
- Prevent
awaitblocks using stale state (#1131) - Prevent erroneous missing data warnings for custom elements (#1065)
- Remove empty selectors in prod mode (#1138)
- Escape attribute values in SSR mode (#1155)
- Remove
<noscript>elements in DOM mode (#1108) - Allow hydration of non-root
<script>/<style>tags (#1163) - Allow interpolation in non-root
<style>tags (#1163)
1.54.1
1.54.0
- Run
oncreatehooks depth-first, top-to-bottom (#1135) - Render boolean attributes correctly in SSR mode (#1109)
- Add
feedaria role to expected roles when doing a11y checks (#1124) - More complete fix for case sensitive attributes (#1062)
- Handle CLRF line endings in await block comments (#1132)
1.53.0
- Base scoping selectors on
<style>contents alone (#1091)
1.52.0
- Deconflict referenced globals (#1079)
- Validate contents of
awaitblocks (#1061) - Fire
oncreatefor components inawaitblocks (#1061) - Automatically fix attribute casing (#1062)
- Fix escaping in
<script>and<style>(#1082) - Error if invalid characters are used in computed properties, and allow any valid identifier in props (#1083)
- Don't run a11y tests on components (#1110)
- Respect
storeoption in SSR mode (#1107)
1.51.1
- Only escape <, > and & characters (#1082)
1.51.0
- Lock
scrollbindings (#1071) - Escape HTML entities when compiling to static HTML (#1066)
- Apply a11y warnings to SVG
<a>attributes withxlink:href(#1008)
1.50.1
- Prevent main fragment being created twice in custom elements (#1064)
1.50.0
- Detect unused/misplaced components (#1039)
- Warn on unused event definitions/transitions (#1051)
- Remove whitespace inside
<:Head>(#1026) - Optimise
<title>(#1027) - Add
bind: falseoption to disable two-way binding (#54)
1.49.3
- Return
htmlfrom SSR compilerrender().toString()methods (#1044) - Correctly reinitialise dynamic components (#1040)
- Allow
<option>outside<select>(#1022) - Fix data references in await-block event handlers (#1032)
1.49.2
1.49.1
- Pass
storeto children in SSR mode (#1029)
1.49.0
- Support
storeas a component property (#1028)
1.48.0
- Added
<:Head>component for injecting contents into document head (#1013)) - SSR
render(...)method now returns a{ html, css: { code, map }, head }object (#1013) - SSR
renderCss(...)method is deprecated (#1013) - Add a
preloadfunction to components (#1015) - Expose
this.rooton nested components (#1023)
1.47.2
- Deconflict computed properties against arguments to
_recompute(#1012) - Allow
awaitblocks in slots (#1018) - Allow components without slots to have whitespace as only child (#1007)
- Correctly set
toStringonCompileError(#1016)
1.47.1
- Sanitize filenames in SSR mode (#1005)
1.47.0
- Support dynamic
import(...)inside<script>tags (#1003)
1.46.1
await...thenshorthand (#957)- Allow dynamic components inside elements (#993)
- Don't use
dataseton SVG nodes (#982) - Fix erroneous
<figcaption>a11y warning (#991) - Handle empty classes when pruning unused selectors (#978)
- Better trimming of SSR'd output (#976)
- Don't add
eventtoexpectedProperties(#972) - Emit error on bad
setarguments in dev mode (#990)
1.46.0
- Pass
filenamethrough to preprocessors (#983)
1.45.0
- Dynamic components (#971)
1.44.2
1.44.1
- Fix bidirectional transitions that reference state (#962)
1.44.0
1.43.1
- Fix parameterised transitions (#962)
- Prevent boolean attributes breaking estree-walker expectations (#961)
- Throw error on cyclical store computations (#964)
1.43.0
- Export
Storeclass to manage global state (#930) - Recognise
aria-current(#953) - Support SSR register options including
extensions(#939) - Friendlier error for illegal contexts (#934)
- Remove whitespace around
<:Window>components (#943)
1.42.1
- Correctly append items inside a slotted
eachblock (#932) - Fix
<:Window bind:online/>(#936) - Attach globals to state upon initialisation (#908)
1.42.0
- Implement
indeterminatebinding for checkbox inputs (#910) - Use
<option>children asvalueattribute if none exists (#928) - Allow quoted property names in default export and sub-properties (#914)
- Various improvements to generated code for bindings
1.41.4
- Handle self-destructive bindings (#917)
- Prevent
innerHTMLwith<option>elements (#915) - Use
datasetunlesslegacyis true (#858) - Add
preparescript to facilitate installing from git (#923)
1.41.3
- Prevent argument name clashes (#911)
- Fix UMD factory arguments (#918)
- Don't attempt to set computed values (#893)
- Fix TypeScript build error (#919)
1.41.2
- Handle attribute selectors with no value (#905)
- Retain
asynckeyword when extracting functions (#904) - Shallow clone
dataon initialisation (#891)
1.41.1
1.41.0
onwarnandonerrorreceive default handlers as second arguments (#883)- Recognise
mutedas boolean property on<audio>elements (#886) - Array destructuring for
eachblock contexts (#889)
1.40.2
1.40.1
- Always use explicit closing tags with
innerHTML(#866) - Escape text in
textContentandinnerHTMLexpressions (#868)
1.40.0
1.39.4
- Extract shared init logic (#855)
- Allow
console.*calls in event handlers (#782) - Marker comments in output (#823)
- Use
textContentandinnerHTMLwhere appropriate (#23) - Various improvements to generated code
1.39.3
- Allow
slot='...'inside custom elements (#827) - Disallow
slot='...'inside if/each blocks (#849) - Use correct parent node for slotted if blocks (#850)
1.39.2
1.39.1
- Always use anchors for slotted content (#822)
- Prevent ES6 in helpers (#838)
- Correctly determine whether to use
timeRangesToArray(#837)
1.39.0
- Always attach fragment to shadow root (#821)
- Add
buffered,seekable,playedbindings to media elements (#819) - Quote
classproperties in legacy mode (#830) - Warn on missing
langattribute on<html>(#828)
1.38.0
- Compile-time a11y warnings (#815)
- Remove redundant input blowback guards (#645)
- Use component name in debugging messages (#781)
1.37.0
- Experimental support for compiling to custom elements (#797)
1.36.0
- Optimize
styleattributes where possible (#455)
1.35.0
setandgetcontinue to work untildestroyis complete (#788)- Observers of unchanged bound values don't fire incorrectly (#804)
- Nested components with slotted content render correctly in SSR mode (#801)
- More efficient rendering of raw and slotted content (#637)
- Handle unquoted attributes in attribute selectors (#798)
1.34.0
- Support nested
<slot>elements (#790) - Attach
optionsto instance (#550, #777) - Error if transitions are applied to component (#791)
- Handle CSS variables in
<style>tag (#757)
1.33.0
- Replace
{{yield}}with<slot>— adds fallback content named slots, andoptions.slots(#763)
1.32.0
- Allow
anchorinitialisation option, alongsidetarget(#784) - Remove leading CSS selectors safely (#783)
1.31.0
- Add
legacycompile option, which adds IE9 compatibility (#773)
1.30.0
- Update all component bindings simultaneously (#760)
- Fix
@keyframesatrules withfromandtoselectors (#774)
1.29.3
- Only recompute tag and attribute values if they could have changed (#768)
- Fix CSS scoping with multiple levels of descendant selectors (#767)
1.29.2
- Preserve space before non-parenthesized media query expression (#759)
- Call
create()on new iterations of static each blocks (#762) - Use
changeevents as well asinputevents to bind range inputs (#740)
1.29.1
- Replace
setanddestroywithnoopwhen component is destroyed (#744)
1.29.0
1.28.1
- Fix unescaping of special words in SSR mode (#741)
1.28.0
- Support
ref:fooas a CSS selector (#693) - Prevent magic-string bugs by only minifying CSS combinators if
cascade: false(#743) - Don't throw an error if component is destroyed twice (#643)
1.27.0
- Minify CSS and remove unused styles (#697)
- Optimize ternary expressions when excluding unused CSS (#696)
- Clear refs after
ondestroycallbacks fire (#706) - Prevent certain forms of component binding blowback (#721)
- Use helper to encapsulate styles (#375)
- Event propagation shorthand —
on:fooequalson:foo='fire("foo", event)(#638) - Allow
refs.*in event handlers, and validate them (#686)
1.26.2
- Unescape
#characters (#722)
1.26.1
- Fix select binding regression (#724)
1.26.0
- Enforce correct order of operations when initialising (#708 and #714)
- Ensure data is up-to-date when re-rendering yield block (#711)
- Fix unescaping of strings, preserve at-rules in CSS (#712)
- Preserve whitespace at end of each blocks (#713)
1.25.1
- Better CSS sourcemaps (#716)
1.25.0
- Fix hoisted event handlers (#699)
- Fire
intro.startandoutro.startevents (#702) - Preserve order of components in keyed each blocks (#700)
- Add
cssMapproperty to compiler output (#698)
1.24.0
- Deconflict names with imports in SSR compiler (#655)
- Improved transition performance (#670)
- Run transitions on initial render (#651)
- Add dev mode warning if
hydrateis true buthydratablewas false (#664) - Manipulate sourcemap to make missing loop values obvious (#683)
- Only add CSS scoping attributes where necessary (#679)
- Warn on unused CSS selectors (#678)
- Fix
<select>binding in loop (#685) - Prevent bindings from calling
oncreatefunctions prematurely (#694) - Simpler codegen (#673)
1.23.4
- Don't recreate if blocks incorrectly (#669)
1.23.3
- Pass parameters to
get_block(#667)
1.23.2
- Fix if blocks being recreated on update (#665)
1.23.1
- Fix each-else blocks that are empty on initial render (#662)
1.23.0
1.22.5
- Fix nested component unmounting bug (#643)
1.22.4
- Include
astinsvelte.compilereturn value (#632) - Set initial value of
<select>binding, if unspecified (#639) - Mark indirect dependencies of
<select>bindings (i.e. the dependencies of their<option>values) (#639)
1.22.3
- Fix nested component unmounting bug (#625)
- Allow components to have computed member expression bindings (#624)
- Handle empty
<style>tags (#634) - Warn on missing component (#623)
- Allow dynamic
typeattribute for unbound inputs (#620) - Rename
addEventListenerandremoveEventListenerdirectives (#621)
1.22.2
- Escape template strings correctly in SSR output (#616)
- Prevent magic-string deprecation warning (#617)
1.22.1
- Sanitise event handler names (#612)
1.22.0
- Symmetry between
mountandunmount. This is potentially a breaking change if your components import other components that were precompiled with an earlier version of Svelte (#592) - Add
cascadeoption, which prevents styles affecting child components iffalse, unless selectors are wrapped in:global(...)and keyframe declaration IDs are prefixed with-global-. This will become the default behaviour in v2 (#583) - Support binding to computed member expressions (#602)
- Coerce empty string in
number/rangeinputs toundefined, not0(#584) - Fix insert location of DOM elements in each/if/nested component edge cases (#610)
1.21.0
- Always use
helpersif referenced, not just for call expressions (#575) - Fix parsing of
<textarea>children (#599) - Treat
<textarea>value attributes and children as equivalent, and fail validation if both are present (#599) - Fix
<textarea>SSR (#599) - Apply CSS transition styles immediately if transition has delay (#574)
- Ensure
transitionManageris treeshakeable (#593) - Fix for environments where
node.style.animationis undefined (#587) - Fix order of operations when dealing with
<select>elements (#590) - Downgrade 'invalid callee' to a warning (#579)
- Convert to TypeScript (#573)
1.20.2
- Fix destruction of compound if-blocks with outros (#572)
1.20.1
- Fix insertion order of
ifblocks and their anchors (#569)
1.20.0
- Faster, better updates of keyed each blocks (#373, #543)
- Use element IDs to robustly track dynamically injected
<style>tags (#554) - Abort outros before corresponding intros (#546)
- Generate less code for
ifblocks withelseblocks (#540) - Ensure
{{yield}}block content is injected into the right place (#561) - Simpler, more readable codegen code (#559)
- Validate transition directives (#564)
- Apply delays to bidirectional transitions (#562)
- Handle all valid HTML entities (#565)
- Fix outros on compound
ifblocks (#565) - Validation for
<:Window>tags (#565) - Increased test coverage (#565)
1.19.1
- Export
generateKeyframes, so that CSS transitions work
1.19.0
- Experimental support for transitions (#7)
- Use
querySelector(':checked')instead ofselectedOptions(#539) - Stringify helpers before bundling them, to avoid renaming errors (#538)
1.18.2
- Parenthesize if-block conditions (#532)
- Fix parsing of parenthesized expressions (#534)
- Fix error on
bind:checkedthat doesn't belong to a checkbox input (#529)
1.18.1
1.18.0
- Visit
<select>attributes after children, to ensure options are in the right state (#521) - Use sibling elements as anchors rather than creating comment nodes wherever possible (#3)
1.17.2
- Replace bad characters when creating variable names based on element names (#516)
1.17.1
1.17.0
- Add
currentTime,durationandpausedbindings for media elements (#406) - Don't treat helpers as dependencies (#492)
- Allow
<:Window>event handlers to access component state (#497) - Allow two-way binding to properties named 'component' (#495)
- Group checkbox bindings correctly, to avoid erroneously unchecking siblings (#498)
- Validate two-way bindings (#494)
- Allow dynamic each-block to have static else-block (#501)
- Initialise
<select>value correctly (#502)
1.16.0
1.15.1
- Clone data before merging it with state (#479)
- Apply binding event handlers before user event handlers (#486)
1.15.0
- Dev mode — downgrade 'missing data' to a warning, and ignore whitelisted globals (#475)
- Fix
<select>value binding when options are updated late (#476) - Throw at compile time if event handler references invalid callee (#473)
- Check for helper function purity (#473)
- Validate
namespaceoption (#473)
1.14.1
- Replace bad characters when creating variable names based on attributes (#470)
1.14.0
- Better guard against naming conflicts (#465)
- Better error if getters and setters are used with
methods(#425) - Don't create whitespace nodes inside elements that can't use them (#189)
- Collapse consecutive
ifstatements with the same condition (#450) - Window
scrollbindings are bidirectional (#404) - Add
bind:onlineto window (#404) - In dev mode, throw if read-only properties are set (#404)
- Prevent conflicts with component name (#464)
- Ensure event handler names are deconflicted (#466)
1.13.7
- Fix observers —
defer: truenow triggers callback after DOM is updated (#441) - Handle empty
computedproperty (#452) - Correctly bind one-way
<select>value attributes with objects (#423) - Hoist event handlers inside each blocks, where possible (#456)
- Don't bind event handler callbacks (#433)
- Internal refactoring and neater code generation (#453)
1.13.6
- Use
assignhelper instead ofObject.assignfor better performance and legacy compatibility (#431) - Improved code generation (#419), (#440), (#442)
1.13.5
1.13.4
- Prevent unclosed
<script>tag causing infinite loop (#435)
1.13.3
- Correctly handle
{{true}},{{false}}and{{null}}(#424) - Update
<select>value attributes correctly (#423) - Bind custom event handler callbacks (#428)
- Disallow
import root(#430) - Prevent component bindings mutating the wrong object (#432)
1.13.2
- Fix deep component bindings (#420)
- Include
cssproperty in compiler output (#409) - Treat functions as mutable objects when recomputing (#413
- Include magic-string in bundle (#410)
- Disable unneeded Bublé transformations for slimmer output (#411)
1.13.1
1.13.0
- Add
<:Window>meta tag with event listeners, and a handful of bindings (#371) - Don't uncheck radios incorrectly (#399)
1.12.1
- Deconflict non-helper functions (
addCssetc) (#388) - Allow reserved words in tags, e.g.
{{class}}(#383)
1.12.0
- Shorthand attributes —
<Widget :foo/>is equivalent to<Widget foo='{{foo}}'/>(#384) - Support
bind:groupfor radio and checkbox inputs (#311, #312) - Better sourcemap support for two-way bindings
1.11.4
- Dev mode warning for bad
component.observearguments (#369) - Translate
component.on('teardown', ...)tocomponent.on('destroy', ...)and add dev warning (#365) - Use shared prototype to save bytes (#378)
1.11.3
1.11.2
- Add component CSS to each document a component is rendered to (#331)
1.11.1
- Fix two-way binding for components inside
eachblocks (#356)
1.11.0
- Add
format: 'eval'andsvelte.create, to create components directly from source code (#345) - Node 4 compatibility (#109)
1.10.3
- Prevent
'</script>'string occurrence breaking pages (#349) - Allow reference to whitelisted globals without properties (#333)
- Don't remove
incorrectly (#348) let->varinaddCssblock (#351)
1.10.2
- Accept any case for doctype declarations (#336)
- Allow non-top-level
<script>and<style>tags to pass through without processing (#335)
1.10.1
- typecheck argument in _set when in dev mode (#342)
- Prevent duplicate helpers in non-shared mode (#337)
1.10.0
1.9.1
1.9.0
- Add development warnings (#13), (#320), (#177), (#249)
- Better error if parser encounters an unmatched closing tag (#321)
1.8.1
- Allow implicitly closed elements (#318)
- More informative error messages for unclosed elements/blocks (#258)
- Deprecate
onrenderandonteardownin favour ofoncreateandondestroy(#40)
1.8.0
- Prevent duplicate imports (#308)
- Use
inputevents (notchange) for all input elements other thancheckboxandradio, and textareas (#309) - Encapsulate keyframe declarations (#245)
1.7.1
- Deconflict imports and shared helpers (#222)
- Deconflict each-block contexts and reserved words (#222)
- Allow shorthand properties in expressions (#296)
1.7.0
- Include CSS AST in
svelte.parseoutput (#302) - Better handling of CSS parse errors (#302)
- Initialise
<select>elements with two-way binding correctly (#301) - Allow local context in component event handlers inside
eachblocks (#290) - Fix two-way binding for components inside
eachblocks (#290)
1.6.11
- Initialise dynamic
<option>value correctly (#291)
1.6.10
- Ensure
sourcesandsourcesContentare populated in sourcemaps, even if none of the original code is used (#295) - Add
outputFilenameoption to populatefileandsourcessourcemap properties correctly (#295)
1.6.9
- Don't trigger bindings for torn-down components (#277)
- SSR: Handle two-way bindings (#275)
- Improve performance by checking data has changed before updates (#279)
- Parse CSS with css-tree to prevent transformation errors with unconventional styles (#288)
1.6.8
- Always trigger
onrender, including when change initiator is a nested component (#263) - Handle default function parameters in computations (#274)
1.6.7
1.6.6
1.6.5
- Handle
<!doctype>declarations (#255)
1.6.4
- Fix updates of yields inside each blocks (20e1b05)
- SSR: Handle attributes with values that begin with a number (#248)
- Handle multiline comments in CSS (#252)
1.6.3
- Fix
{{yield}}bugs for components insideifandeachblocks (#230, #231) - Set attributes on
<svg>elements correctly (#233) - Add
svelte.VERSIONproperty to compiler
1.6.2
- Use helpers for
addEventListener,removeEventListener,setAttribute(#227) - Escape
sharedPath(#229) - Handle attributes with values that begin with a number (#234)
- Update dependencies
1.6.1
- SSR: Handle component directives at arbitrary positions (#221)
- Provide useful feedback on invalid void closing tag (#224)
1.6.0
- Replace
standalone: falsewithshared: true, orshared: 'custom/path/to/shared.js'(#218) - Include
shared.jsin package
1.5.0
1.4.0
- Keyed
eachblocks (#81)
1.3.1
1.3.0
- SSR compiler: Support
formatoption (#196) - SSR compiler: Don't self-close 'normal' elements (#200)
- Remove leading spaces from scoped CSS (#140)
- Internal refactoring
1.2.5
- Allow whitelisted globals in templates (#185)
- Intercept parse errors with
options.onerror
1.2.4
1.2.3
- Add support for
namespacedeclaration for SVG (etc) components (#147) - Throw error if methods or lifecycle hooks are arrow functions that use
thisorarguments(#179) - Use
setAttribute()forlistattributes, to preserve link to<datalist>(#178) - Throw error if default export is not an object literal (#190)
- Internal refactoring
1.2.2
- Omit directives in server-side rendering (#163)
- Handle comments in SSR (#165)
- Support calling methods of
event/thisin event handlers (#162) - Remove
mountfrom public API (#150)
1.2.1
- Server-side rendering is available as a compiler option (
generate: 'ssr') (#159) - Allow call expressions where function is not in
helpers(#163)
1.2.0
1.1.3
- Handle
xmlnsattributes correctly (#142) - Error on duplicate
<style>/<script>tags rather than failing silently (#142) - Don't create whitespace text nodes inside SVG elements (#142)
- Require void elements to be lowercase, to eliminate confusion with components (#137)
1.1.2
1.1.1
- Support multiple SVG elements in a component (#130)
1.1.0
- Separate fragment creation from
mount(#91) - Trigger
onrenderhook at correct time for nested components (#103) - Fix keypath dynamic attributes in components (#46)
- Implement
{{yield}}(#112) - Optimise teardown (#99)
- Require computed properties to have at least one dependency (#115)
- Support
{{#each ...}}...{{else}}...{{/each}}(#90) - Triple mustaches (#35)
1.0.7
- Correctly escape HTML entities (#85)
1.0.6
- Generate useful sourcemaps (#60)
1.0.5
- Ensure compiler only generates ES5 code (#75)
get()without arguments returns entire state object (#73)
1.0.4
- Handle empty attributes in elements and components (#63)
- Detach top-level text nodes inside departing each blocks (#62)
1.0.3
- Better generated code for
ifblocks, especially withelse/elseifchains (#28) - Trim unnecessary whitespace from
else/elseifblocks (#49) - Handle trailing comments in script tags (#64)
1.0.2
Set style.cssText rather than style (#44)
1.0.1
- Preserve SVG namespace inside each blocks
- Always use
setAttributewith SVG elements
1.0.0
- Generate AMD, CJS, IIFE and UMD builds
- Correctly insert text nodes before anchors (#31)
0.3.0
- Fix bug where departing element would unset
refincorrectly (#24) - Basic template validation (#6)
- Fire
onrenderhooks once component is in DOM (#18) - Only detach nodes when necessary to do so (#26)
0.2.2
- On second thoughts, don't transpile build. Was only really for Uglify's benefit, which is daft
0.2.1
- Transpile build
0.2.0
- Only generate UMD build, for now
- Include dependencies in the build, treat as
devDependencies - Faster initial render
- Parent data overrides child defaults
- Remove top-level text nodes on teardown
- Handle
readUntilerrors in parser - Basic
<select>binding - Handle missing data
- Prevent infinite set/observe loops
- Add
bind:fooshorthand elseandelseifblocks- Hoist imports
0.1.1
- Support unquoted attributes
- Handle entities in attributes
- Inline nested components
fireandonmethods
0.1.0
- Breaking change – Svelte compiler now generates constructor functions rather than factories (#2)
- SVG support
0.0.2
- First release capable of building TodoMVC
0.0.1
- Just squatting on the package name