- Prevent argument name clashes (#911)
- Fix UMD factory arguments (#918)
- Don't attempt to set computed values (#893)
- Fix TypeScript build error (#919)
- Handle attribute selectors with no value (#905)
- Retain
async
keyword when extracting functions (#904) - Shallow clone
data
on initialisation (#891)
onwarn
andonerror
receive default handlers as second arguments (#883)- Recognise
muted
as boolean property on<audio>
elements (#886) - Array destructuring for
each
block contexts (#889)
- Always use explicit closing tags with
innerHTML
(#866) - Escape text in
textContent
andinnerHTML
expressions (#868)
- Extract shared init logic (#855)
- Allow
console.*
calls in event handlers (#782) - Marker comments in output (#823)
- Use
textContent
andinnerHTML
where appropriate (#23) - Various improvements to generated code
- Allow
slot='...'
inside custom elements (#827) - Disallow
slot='...'
inside if/each blocks (#849) - Use correct parent node for slotted if blocks (#850)
- Always use anchors for slotted content (#822)
- Prevent ES6 in helpers (#838)
- Correctly determine whether to use
timeRangesToArray
(#837)
- Always attach fragment to shadow root (#821)
- Add
buffered
,seekable
,played
bindings to media elements (#819) - Quote
class
properties in legacy mode (#830) - Warn on missing
lang
attribute on<html>
(#828)
- Compile-time a11y warnings (#815)
- Remove redundant input blowback guards (#645)
- Use component name in debugging messages (#781)
- Experimental support for compiling to custom elements (#797)
- Optimize
style
attributes where possible (#455)
set
andget
continue to work untildestroy
is 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)
- Support nested
<slot>
elements (#790) - Attach
options
to instance (#550, #777) - Error if transitions are applied to component (#791)
- Handle CSS variables in
<style>
tag (#757)
- Replace
{{yield}}
with<slot>
— adds fallback content named slots, andoptions.slots
(#763)
- Allow
anchor
initialisation option, alongsidetarget
(#784) - Remove leading CSS selectors safely (#783)
- Add
legacy
compile option, which adds IE9 compatibility (#773)
- Update all component bindings simultaneously (#760)
- Fix
@keyframes
atrules withfrom
andto
selectors (#774)
- Only recompute tag and attribute values if they could have changed (#768)
- Fix CSS scoping with multiple levels of descendant selectors (#767)
- Preserve space before non-parenthesized media query expression (#759)
- Call
create()
on new iterations of static each blocks (#762) - Use
change
events as well asinput
events to bind range inputs (#740)
- Replace
set
anddestroy
withnoop
when component is destroyed (#744)
- Fix unescaping of special words in SSR mode (#741)
- Support
ref:foo
as 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)
- Minify CSS and remove unused styles (#697)
- Optimize ternary expressions when excluding unused CSS (#696)
- Clear refs after
ondestroy
callbacks fire (#706) - Prevent certain forms of component binding blowback (#721)
- Use helper to encapsulate styles (#375)
- Event propagation shorthand —
on:foo
equalson:foo='fire("foo", event)
(#638) - Allow
refs.*
in event handlers, and validate them (#686)
- Unescape
#
characters (#722)
- Fix select binding regression (#724)
- 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)
- Better CSS sourcemaps (#716)
- Fix hoisted event handlers (#699)
- Fire
intro.start
andoutro.start
events (#702) - Preserve order of components in keyed each blocks (#700)
- Add
cssMap
property to compiler output (#698)
- Deconflict names with imports in SSR compiler (#655)
- Improved transition performance (#670)
- Run transitions on initial render (#651)
- Add dev mode warning if
hydrate
is true buthydratable
was 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
oncreate
functions prematurely (#694) - Simpler codegen (#673)
- Don't recreate if blocks incorrectly (#669)
- Pass parameters to
get_block
(#667)
- Fix if blocks being recreated on update (#665)
- Fix each-else blocks that are empty on initial render (#662)
- Fix nested component unmounting bug (#643)
- Include
ast
insvelte.compile
return 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)
- 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
type
attribute for unbound inputs (#620) - Rename
addEventListener
andremoveEventListener
directives (#621)
- Escape template strings correctly in SSR output (#616)
- Prevent magic-string deprecation warning (#617)
- Sanitise event handler names (#612)
- Symmetry between
mount
andunmount
. This is potentially a breaking change if your components import other components that were precompiled with an earlier version of Svelte (#592) - Add
cascade
option, 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
/range
inputs toundefined
, not0
(#584) - Fix insert location of DOM elements in each/if/nested component edge cases (#610)
- Always use
helpers
if 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
transitionManager
is treeshakeable (#593) - Fix for environments where
node.style.animation
is undefined (#587) - Fix order of operations when dealing with
<select>
elements (#590) - Downgrade 'invalid callee' to a warning (#579)
- Convert to TypeScript (#573)
- Fix destruction of compound if-blocks with outros (#572)
- Fix insertion order of
if
blocks and their anchors (#569)
- 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
if
blocks withelse
blocks (#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
if
blocks (#565) - Validation for
<:Window>
tags (#565) - Increased test coverage (#565)
- Export
generateKeyframes
, so that CSS transitions work
- Experimental support for transitions (#7)
- Use
querySelector(':checked')
instead ofselectedOptions
(#539) - Stringify helpers before bundling them, to avoid renaming errors (#538)
- Parenthesize if-block conditions (#532)
- Fix parsing of parenthesized expressions (#534)
- Fix error on
bind:checked
that doesn't belong to a checkbox input (#529)
- 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)
- Replace bad characters when creating variable names based on element names (#516)
- Add
currentTime
,duration
andpaused
bindings 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)
- Clone data before merging it with state (#479)
- Apply binding event handlers before user event handlers (#486)
- 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
namespace
option (#473)
- Replace bad characters when creating variable names based on attributes (#470)
- 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
if
statements with the same condition (#450) - Window
scroll
bindings are bidirectional (#404) - Add
bind:online
to 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)
- Fix observers —
defer: true
now triggers callback after DOM is updated (#441) - Handle empty
computed
property (#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)
- Use
assign
helper instead ofObject.assign
for better performance and legacy compatibility (#431) - Improved code generation (#419), (#440), (#442)
- Prevent unclosed
<script>
tag causing infinite loop (#435)
- 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)
- Fix deep component bindings (#420)
- Include
css
property 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)
- Add
<:Window>
meta tag with event listeners, and a handful of bindings (#371) - Don't uncheck radios incorrectly (#399)
- Deconflict non-helper functions (
addCss
etc) (#388) - Allow reserved words in tags, e.g.
{{class}}
(#383)
- Shorthand attributes —
<Widget :foo/>
is equivalent to<Widget foo='{{foo}}'/>
(#384) - Support
bind:group
for radio and checkbox inputs (#311, #312) - Better sourcemap support for two-way bindings
- Dev mode warning for bad
component.observe
arguments (#369) - Translate
component.on('teardown', ...)
tocomponent.on('destroy', ...)
and add dev warning (#365) - Use shared prototype to save bytes (#378)
- Add component CSS to each document a component is rendered to (#331)
- Fix two-way binding for components inside
each
blocks (#356)
- Add
format: 'eval'
andsvelte.create
, to create components directly from source code (#345) - Node 4 compatibility (#109)
- Prevent
'</script>'
string occurence breaking pages (#349) - Allow reference to whitelisted globals without properties (#333)
- Don't remove
incorrectly (#348) let
->var
inaddCss
block (#351)
- Accept any case for doctype declarations (#336)
- Allow non-top-level
<script>
and<style>
tags to pass through without processing (#335)
- typecheck argument in _set when in dev mode (#342)
- Prevent duplicate helpers in non-shared mode (#337)
- Add development warnings (#13), (#320), (#177), (#249)
- Better error if parser encounters an unmatched closing tag (#321)
- Allow implicitly closed elements (#318)
- More informative error messages for unclosed elements/blocks (#258)
- Deprecate
onrender
andonteardown
in favour ofoncreate
andondestroy
(#40)
- Prevent duplicate imports (#308)
- Use
input
events (notchange
) for all input elements other thancheckbox
andradio
, and textareas (#309) - Encapsulate keyframe declarations (#245)
- Deconflict imports and shared helpers (#222)
- Deconflict each-block contexts and reserved words (#222)
- Allow shorthand properties in expressions (#296)
- Include CSS AST in
svelte.parse
output (#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
each
blocks (#290) - Fix two-way binding for components inside
each
blocks (#290)
- Initialise dynamic
<option>
value correctly (#291)
- Ensure
sources
andsourcesContent
are populated in sourcemaps, even if none of the original code is used (#295) - Add
outputFilename
option to populatefile
andsources
sourcemap properties correctly (#295)
- 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)
- Always trigger
onrender
, including when change initiator is a nested component (#263) - Handle default function parameters in computations (#274)
- Handle
<!doctype>
declarations (#255)
- 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)
- Fix
{{yield}}
bugs for components insideif
andeach
blocks (#230, #231) - Set attributes on
<svg>
elements correctly (#233) - Add
svelte.VERSION
property to compiler
- Use helpers for
addEventListener
,removeEventListener
,setAttribute
(#227) - Escape
sharedPath
(#229) - Handle attributes with values that begin with a number (#234)
- Update dependencies
- SSR: Handle component directives at arbitrary positions (#221)
- Provide useful feedback on invalid void closing tag (#224)
- Replace
standalone: false
withshared: true
, orshared: 'custom/path/to/shared.js'
(#218) - Include
shared.js
in package
- Keyed
each
blocks (#81)
- SSR compiler: Support
format
option (#196) - SSR compiler: Don't self-close 'normal' elements (#200)
- Remove leading spaces from scoped CSS (#140)
- Internal refactoring
- Allow whitelisted globals in templates (#185)
- Intercept parse errors with
options.onerror
- Add support for
namespace
declaration for SVG (etc) components (#147) - Throw error if methods or lifecycle hooks are arrow functions that use
this
orarguments
(#179) - Use
setAttribute()
forlist
attributes, to preserve link to<datalist>
(#178) - Throw error if default export is not an object literal (#190)
- Internal refactoring
- Omit directives in server-side rendering (#163)
- Handle comments in SSR (#165)
- Support calling methods of
event
/this
in event handlers (#162) - Remove
mount
from public API (#150)
- Server-side rendering is available as a compiler option (
generate: 'ssr'
) (#159) - Allow call expressions where function is not in
helpers
(#163)
- Handle
xmlns
attributes 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)
- Support multiple SVG elements in a component (#130)
- Separate fragment creation from
mount
(#91) - Trigger
onrender
hook 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)
- Correctly escape HTML entities (#85)
- Generate useful sourcemaps (#60)
- Ensure compiler only generates ES5 code (#75)
get()
without arguments returns entire state object (#73)
- Handle empty attributes in elements and components (#63)
- Detach top-level text nodes inside departing each blocks (#62)
- Better generated code for
if
blocks, especially withelse
/elseif
chains (#28) - Trim unnecessary whitespace from
else
/elseif
blocks (#49) - Handle trailing comments in script tags (#64)
Set style.cssText
rather than style
(#44)
- Preserve SVG namespace inside each blocks
- Always use
setAttribute
with SVG elements
- Generate AMD, CJS, IIFE and UMD builds
- Correctly insert text nodes before anchors (#31)
- Fix bug where departing element would unset
ref
incorrectly (#24) - Basic template validation (#6)
- Fire
onrender
hooks once component is in DOM (#18) - Only detach nodes when necessary to do so (#26)
- On second thoughts, don't transpile build. Was only really for Uglify's benefit, which is daft
- Transpile build
- 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
readUntil
errors in parser - Basic
<select>
binding - Handle missing data
- Prevent infinite set/observe loops
- Add
bind:foo
shorthand else
andelseif
blocks- Hoist imports
- Support unquoted attributes
- Handle entities in attributes
- Inline nested components
fire
andon
methods
- Breaking change – Svelte compiler now generates constructor functions rather than factories (#2)
- SVG support
- First release capable of building TodoMVC
- Just squatting on the package name