Dominic Gannaway
ef5bcfe542
fix: ensure event handlers containing arguments are not hoisted ( #9758 )
...
* fix: ensure event handlers containing arguments are not hoisted
* add test
* handle rest arguments
12 months ago
Dominic Gannaway
2017af407d
fix: ensure computed props are cached with derived ( #9757 )
...
Fixes #9751
12 months ago
Simon Holthausen
aaa1797ed8
fix: css parser fix
...
when inside a pseudo-class, only `)` is a valid end, and when outside, only `{` is - reflect that in the logic
12 months ago
Simon H
402a322317
chore: more validation errors ( #9723 )
...
* invalid directive on component
* duplicate animation
* invalid animation
* no const assignment
* expected token
* invalid-attribute-name
* fixes
* invalid event modifier
* component name
* slot validation
* fix test
* const validation + fix double declaration bug
* omg this validation is skipped in svelte 4, remove it entirely then
* gah
* unskip
* contenteditable
* invalid css selector
* css global selector + css parser fixes
* export default
* dynamic element
* each block
* html tag
* logic block
* reactive declaration
* duplicate script
* namespace
* module context
* slot
* svelte fragment
* textarea
* title
* transition
* window bindings
* changeset
* svelte head, let directive, tweaks
12 months ago
Ignatius Bagus
d19e622e90
docs: update `create` -> `createRoot` ( #9750 )
12 months ago
github-actions[bot]
61e5e53eee
Version Packages (next) ( #9736 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12 months ago
Rich Harris
765d01d76c
correctly inspect derived values ( #9731 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
12 months ago
github-actions[bot]
1108587f1b
Version Packages (next) ( #9707 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12 months ago
Dominic Gannaway
2fa06447cf
fix: improve template text node serialization ( #9722 )
...
fix: improve template text node serialization
12 months ago
Dominic Gannaway
7eba35b9d1
fix: improve infinite loop capturing ( #9721 )
12 months ago
gtmnayan
8266229c42
fix repl ( #9720 )
12 months ago
Simon H
cb1ea1f2db
fix: ensure `$$slots` exists in runes mode ( #9718 )
...
fixes #9683
12 months ago
Simon H
4a8f0bc7e7
fix: keep fallback value after spread update not setting that prop ( #9717 )
...
fixes #9716
12 months ago
Simon H
65fa717ccd
fix: port over props that were set prior to initialization ( #9704 )
...
Svelte 5 version of #9701
12 months ago
Dominic Gannaway
2e461eb314
chore: remove redundant hydration code ( #9698 )
12 months ago
Simon H
e3dc185a4c
fix: tweak const tag parsing ( #9715 )
...
fixes #9711
12 months ago
Simon H
f88895e955
fix: allow `bind:this` with dynamic type on inputs ( #9713 )
...
fixes #9709
12 months ago
Simon H
1fe0152dd4
fix: delegate events on elements with bind-this ( #9696 )
...
fixes #9688
12 months ago
Simon H
2416587215
fix: ensure implicit children snippet renders correctly ( #9706 )
...
place anchors around render tags, not snippet tags
fixes #9678
12 months ago
Rich Harris
bde42d5676
`$inspect` rune ( #9705 )
...
* feat: add $log rune
* fix issues
* fix issues
* tune
* avoid static state reference validation
* work around unfortunate browser behavior
* call it ExpectedError
* cleanup
* Fix docs
* tweaks
* tweaks
* lint
* repl, dev: true
* repl dev mode
* Update sites/svelte-5-preview/src/lib/Repl.svelte
* squelch static-state-reference warning
* simplify
* remove redundant code
* Update packages/svelte/src/main/ambient.d.ts
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* Update packages/svelte/src/main/ambient.d.ts
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* Update packages/svelte/src/main/ambient.d.ts
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* only pause/trace on change
* Update packages/svelte/src/main/ambient.d.ts
* Update .changeset/chatty-hotels-grin.md
* Update sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* $log.break and $log.trace no-op during SSR
* Update sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
* update test
* improve break experience
* fix ts
* remove unnecessary if (DEV) checks - log runes are removed in prod
* ensure hoisting doesnt mess up source maps
* check visited for cyclical values
* rename $log to $inspect, remove children
* custom inspect function
* implement custom inspect functions
* changeset
* update docs
* only fire on change
* lint
* make inspect take a single argument
* ugh eslint
* document console.trace trick
* demos
* fix site
---------
Co-authored-by: Dominic Gannaway <dg@domgan.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>
12 months ago
github-actions[bot]
3e3ae925f3
Version Packages (next) ( #9692 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12 months ago
Hans
8c2cbb87dd
site: remove banner ( #9620 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
12 months ago
Simon H
75295ac79f
docs: enhance breaking change section ( #9674 )
...
* docs: enhance breaking change section
- mention createRoot first, explain difference to mount
- mentiond bind:this change
- sub headings
- adjust createRoot type that missed the events property
* Update packages/svelte/src/internal/client/render.js
Co-authored-by: Conduitry <git@chor.date>
* clarify
---------
Co-authored-by: Conduitry <git@chor.date>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
12 months ago
Rich Harris
dd4061bc38
rename dev script, update contributor guide and readme ( #9673 )
...
* rename dev script, update contributor guide and readme
* turns out we can do this!
* increase accuracy
* justify FILTER
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
12 months ago
Simon H
f9ba528265
fix: add children to element typings ( #9679 )
...
* fix: add children to element typings
Add this here so that libraries doing `props$<HTMLButtonAttributes>()` don't need a separate interface
fixes #https://github.com/sveltejs/language-tools/issues/2218
* typo
12 months ago
Simon H
aabab263ee
fix: handle ts expressions when dealing with runes ( #9681 )
...
* fix: handle ts expressions when dealing with runes
related to #9639
* docs, more tests
* simplify
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
12 months ago
github-actions[bot]
a31b2e1b8e
Version Packages (next) ( #9650 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12 months ago
Dominic Gannaway
81d3e47d1c
feat: add $effect.root rune ( #9638 )
...
* feat: effect-root-rune
feat: add $effect.root rune
update doc
update doc
fix validation
* cleanup logic
* Update sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md
* address feedback
---------
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
12 months ago
Ben McCann
2660727a93
chore: tweak changeset ( #9667 )
...
* chore: tweak changeset
* Update .changeset/slimy-clouds-talk.md
* Update seven-ravens-check.md
12 months ago
Rich Harris
48e78e420f
chore: remove static value handling ( #9571 )
...
The deleted code ensured that a static variable wouldn't update when it's in the same text expression as a reactive variable. We solved this through emitting a warning about this instead, marking it as undefined behavior.
12 months ago
Rich Harris
5836c1cdbd
chore: improve output for `<svelte:element>` ( #9648 )
...
- doesn't add spread_dynamic_element_attributes when there are no attributes — Unnecessary spread_dynamic_element_attributes call #9646
- skips the child render function altogether if there is nothing to do
12 months ago
Rich Harris
6e863e617c
feat: warn on referenced mutated nonstate ( #9669 )
...
Walk the path and warn if this is a mutated normal variable that's referenced inside a function scope
12 months ago
Rich Harris
9c44fd7854
feat: ignore href when hydrating ( #9662 )
...
* ignore href when hydrating
* remove unused export keyword
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
12 months ago
Yuichiro Yamashita
da1aa7c4a8
feat: support type annotations in `{@const ...}` tag ( #9609 )
...
* support type for const tag
* use expression directly
* lint
* format
* format
* revert
* legacy mode
* format
* revert and update .prettierignore
12 months ago
Yuichiro Yamashita
075c268f42
add ci on node21 ( #9621 )
12 months ago
Simon H
617d63dd90
fix: take event attributes into account when checking a11y ( #9664 )
...
also adjusted the warning messages slightly so they make sense for both variants of event handlers
fixes #9654
12 months ago
Simon H
83fd001157
fix: prevent reactive snippet from reinitializing unnecessarily ( #9665 )
...
untrack the invocation itself, only track the snippet function
fixes #9652
12 months ago
Dominik G
5619cd9bfc
chore: update playgrounds/demo ( #9666 )
...
* chore: update playgrounds/demo to exclude svelte from being optimized and generate an App.svelte so first run doesn't throw
* chore: fix format
12 months ago
Rich Harris
405e9da4ff
chore: bump esrap ( #9649 )
...
* bump esrap
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
12 months ago
github-actions[bot]
66d540d3c5
Version Packages (next) ( #9642 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12 months ago
Simon H
7f237c2e41
fix: omit this bind this arg if we know it's not a signal ( #9635 )
...
fixes #9629
Co-authored-by: Dominic Gannaway <dg@domgan.com>
12 months ago
Dominic Gannaway
dee5bed829
fix: improve each block index handling ( #9644 )
...
* fix: improve each block index handling
* format
12 months ago
Dominic Gannaway
02f3f42981
fix: apply keyed validation only for keyed each ( #9641 )
12 months ago
github-actions[bot]
94afdc8a4b
Version Packages (next) ( #9633 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12 months ago
Simon Holthausen
63e5831846
fix: adjust mount and createRoot types
...
they expect the component constructor, not the instance
12 months ago
Simon Holthausen
a3bc7d5698
fix: type-level back-compat for default slot and children prop
...
If someone has an existing SvelteComponent type definition and using the slot generic to type the default slot, automatically add that slot to the prop type as "children"
12 months ago
Simon Holthausen
cb4b1f0a18
fix: remove constructor overload
...
The original intent was for typing generation tools like svelte2tsx to use the virtual constructor instead, but it does more harm than good. Most notably, the TS error message when props are wrong becomes completely useless. It's better for tooling to silence the deprecation message and switch over to a new virtual constructor once we remove the deprecated one.
12 months ago
github-actions[bot]
b7af2ffabd
Version Packages (next) ( #9607 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
12 months ago
Simon H
78a69acfa1
fix: dont error on stores looking like runes when runes explicitly turned off ( #9615 )
12 months ago
Simon H
72d3a2a8ce
fix: better attribute casing logic ( #9626 )
...
- don't lowercase attributes on svg and custom element elements, fixes #9605
- better lowercasing + property alias checking for spreads, fixes #9305
12 months ago