github-actions[bot]
3e3ae925f3
Version Packages (next) ( #9692 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-28 21:37:35 -05:00
Hans
8c2cbb87dd
site: remove banner ( #9620 )
...
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2023-11-28 16:32:51 -08:00
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>
2023-11-28 17:31:22 -05:00
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>
2023-11-28 17:27:49 -05:00
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
2023-11-28 17:00:40 -05:00
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>
2023-11-28 16:59:20 -05:00
github-actions[bot]
a31b2e1b8e
Version Packages (next) ( #9650 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-27 13:47:38 -05:00
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>
2023-11-27 13:34:22 -05:00
Ben McCann
2660727a93
chore: tweak changeset ( #9667 )
...
* chore: tweak changeset
* Update .changeset/slimy-clouds-talk.md
* Update seven-ravens-check.md
2023-11-27 13:31:50 -05:00
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.
2023-11-27 19:19:07 +01:00
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
2023-11-27 19:15:04 +01:00
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
2023-11-27 17:25:08 +01:00
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>
2023-11-27 08:49:47 -05:00
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
2023-11-27 08:39:29 -05:00
Yuichiro Yamashita
075c268f42
add ci on node21 ( #9621 )
2023-11-27 08:37:37 -05:00
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
2023-11-27 08:36:47 -05:00
Simon H
83fd001157
fix: prevent reactive snippet from reinitializing unnecessarily ( #9665 )
...
untrack the invocation itself, only track the snippet function
fixes #9652
2023-11-27 08:36:13 -05:00
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
2023-11-27 08:34:06 -05:00
Rich Harris
405e9da4ff
chore: bump esrap ( #9649 )
...
* bump esrap
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-25 17:29:18 -05:00
github-actions[bot]
66d540d3c5
Version Packages (next) ( #9642 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-25 14:41:17 -05:00
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>
2023-11-24 23:54:52 +00:00
Dominic Gannaway
dee5bed829
fix: improve each block index handling ( #9644 )
...
* fix: improve each block index handling
* format
2023-11-24 23:02:53 +00:00
Dominic Gannaway
02f3f42981
fix: apply keyed validation only for keyed each ( #9641 )
2023-11-24 21:48:18 +00:00
github-actions[bot]
94afdc8a4b
Version Packages (next) ( #9633 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-24 17:46:40 +01:00
Simon Holthausen
63e5831846
fix: adjust mount and createRoot types
...
they expect the component constructor, not the instance
2023-11-24 16:36:04 +01:00
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"
2023-11-24 16:34:34 +01:00
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.
2023-11-24 14:51:46 +01:00
github-actions[bot]
b7af2ffabd
Version Packages (next) ( #9607 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-23 16:57:21 +00:00
Simon H
78a69acfa1
fix: dont error on stores looking like runes when runes explicitly turned off ( #9615 )
2023-11-23 17:29:06 +01:00
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
2023-11-23 17:26:19 +01:00
Dominic Gannaway
ef68b66dee
fix: improve member expression mutation logic ( #9625 )
...
* fix: improve member expression mutation logic
* cleanup
* Update .changeset/moody-frogs-exist.md
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2023-11-23 16:19:24 +00:00
Yuichiro Yamashita
7825570b07
fix typos ( #9622 )
2023-11-23 15:49:02 +00:00
Yuichiro Yamashita
c7121aa38c
feat: add type of $effect.active
( #9624 )
2023-11-23 16:03:32 +01:00
Dominic Gannaway
d8d9be39d3
fix: apply correct snippet scope ( #9623 )
2023-11-23 14:55:06 +00:00
Dominic Gannaway
509f92d29e
fix: correctly assign bind:this with multiples ( #9617 )
...
* fix: correctly assign bind:this with multiples
* better fix
* better fix
* lint
* lint
* Update packages/svelte/src/internal/client/render.js
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2023-11-23 13:42:22 +00:00
Dominic Gannaway
c22ebffb00
chore: untrack keyed validation logic ( #9618 )
...
* untrack validation logic
* chore: untrack keyed validation logic
2023-11-23 12:07:31 +00:00
Dominic Gannaway
8118efd115
fix: handle undefined bubble events ( #9614 )
...
Fixes #9610
2023-11-23 11:00:39 +01:00
Rich Harris
0283e50070
chore: reuse common templates ( #9601 )
...
#9589 - add comment and space as reusable templates to save a few bytes. We can definitely take this idea further, but this is a base to iterate from.
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
2023-11-23 09:47:19 +01:00
github-actions[bot]
d83bd7f7c1
Version Packages (next) ( #9576 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-22 17:44:32 -05:00
Simon H
88f1a8f62e
chore: better error message for not using snippet type ( #9602 )
...
language tools checks that a function passed to `{@render ..}` is returning a type that adheres to the `Snippet` return type. When it does not, the error message is pretty useless without this additional info text.
2023-11-22 23:43:17 +01:00
Rich Harris
5f6c5ca8ae
chore: remove get_callee_name ( #9595 )
...
no longer necessary with the enhanced get_rune function
2023-11-22 23:34:31 +01:00
Simon H
13c6c273c6
fix: prevent false positives when detecting runes mode ( #9599 )
...
Move references from module scope to instance scope if we determined that these references are store subscriptions
fixes #9580
2023-11-22 15:56:47 -05:00
Rich Harris
f40efb2027
$effect.active
docs (#9598 )
...
* docs: $effect.active
* link
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-22 20:00:24 +00:00
Rich Harris
c837771ca6
chore: better get_rune
helper ( #9594 )
...
* chore: add $effect.active rune
* chore: add $effect.active rune
* WIP
* allow get_rune to return a keypath
* oops
---------
Co-authored-by: Dominic Gannaway <dg@domgan.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-22 14:28:19 -05:00
Rich Harris
1f4ae5ef45
chore: remove some unused code ( #9593 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-22 20:10:12 +01:00
Dominic Gannaway
cf9130613d
feat: add $effect.active rune ( #9591 )
...
* chore: add $effect.active rune
* chore: add $effect.active rune
2023-11-22 13:56:49 -05:00
Rich Harris
13aef5245b
put nested class warning on the declaration, not the usage site ( #9592 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-22 13:17:01 -05:00
Rich Harris
fe9c0bc19d
chore: bump esrap ( #9590 )
2023-11-22 09:54:34 -08:00
Dominic Gannaway
eb0b4dc6e5
chore: add inline new class warning ( #9583 )
...
* chore: add inline new class warning
* Address feedback
* address feedback
* more tests
2023-11-22 15:51:08 +00:00
Rich Harris
d57eff76ed
generate AST first ( #9587 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2023-11-21 11:42:22 -05:00