Rich Harris
faa2e937ab
chore: exclude local playground from eslint ( #11596 )
6 months ago
Simon H
d408d20cdd
fix: replicate Svelte 4 props update detection in legacy mode ( #11577 )
...
* fix: replicate Svelte 4 props update detection in legacy mode
fixes #11448 by wrapping props in deriveds
* fix test
* Update packages/svelte/src/compiler/phases/3-transform/client/utils.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* dedicated flag
* prettier
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Simon H
a0bdac8cd7
fix: correctly handle falsy values of style directives in SSR mode ( #11583 )
...
fixes #11044
6 months ago
Matei Trandafir
a2bc0f5f7d
Add documentation for svelte/elements ( #11587 )
...
closes #11451
6 months ago
Dominic Gannaway
dc16668773
chore: improve runtime overhead of creating comment templates ( #11591 )
...
* chore: improve runtime overhead of creating comment templates
* Update packages/svelte/src/internal/client/dom/template.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* changeset
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
이요
965afc5ccc
docs: correct variable references ( #11582 )
6 months ago
Rich Harris
61bf97210b
chore: improve local playground ( #11575 )
6 months ago
Paolo Ricciuti
81517a506c
fix: allow for non optional chain call expression in render ( #11578 )
6 months ago
github-actions[bot]
61238d0fd3
Version Packages (next) ( #11564 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Rich Harris
9c680f1030
chore: optimise effects ( #11569 )
...
* optimise effects
* tweak
* don't allocate array unnecessarily
* filter_flags appears to be unnecessary?
* lint
* tweak
* simplify (#11570 )
* changeset
6 months ago
Dominic Gannaway
5497b3d0bc
fix: ensure all effect cleanup functions are untracked ( #11567 )
...
* fix: ensure all effect cleanup functions are untracked
* add test
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Dominic Gannaway
f6e87772cb
Revert "fix: ensure Svelte action destroy effects are untracked ( #11562 )" ( #11568 )
...
This reverts commit e49f1f7f11
.
6 months ago
Dominic Gannaway
e49f1f7f11
fix: ensure Svelte action destroy effects are untracked ( #11562 )
...
* fix: unesure Svelte action destroy effects are untracked
* fix: unesure Svelte action destroy effects are untracked
6 months ago
github-actions[bot]
816335f906
Version Packages (next) ( #11561 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Dominic Gannaway
643bbf2be2
Better process effects ( #11560 )
...
* fix: improve internal mechanism for handling process_effects
6 months ago
github-actions[bot]
4cadd07676
Version Packages (next) ( #11559 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Dominic Gannaway
a3702e8171
fix: adjust heuristics for effect_update_depth_exceeded ( #11558 )
...
* fix: adjust heuristics for effect_update_depth_exceeded
* fix: adjust heuristics for effect_update_depth_exceeded
* fix: further adjust heuristics for effect_update_depth_exceeded
6 months ago
github-actions[bot]
18f61a575f
Version Packages (next) ( #11554 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Dominic Gannaway
43ad72b1ce
fix: adjust heuristics for effect_update_depth_exceeded ( #11557 )
...
* fix: adjust heuristics for effect_update_depth_exceeded
* fix: adjust heuristics for effect_update_depth_exceeded
6 months ago
Dominic Gannaway
597715ff98
fix: improved $inspect handling of reactive Map/Set/Date ( #11553 )
6 months ago
github-actions[bot]
7e9b109de6
Version Packages (next) ( #11541 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Dominic Gannaway
3103a0d81e
fix: improve REPL error button styling ( #11547 )
6 months ago
Dominic Gannaway
c450cdb7a7
fix: better support for lazy img elements ( #11545 )
...
* fix: better support for lazy img elements
* tune
* fix
6 months ago
Dominic Gannaway
fcc72ae2f3
feat: provide better error messages in DEV ( #11526 )
...
* feat: provide better error messages in DEV
* fix stuff
* fix stuff
* fix tests
* fix
* assert.include results in better errors on mismatches
* remove indentation
* tweak
* rename
* fix issues
* more fixes
* more fixes
* neaten up stack trace
* Update packages/svelte/src/internal/client/reactivity/effects.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* address feedback
* lint
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Simon H
641e411cf1
fix: ensure spread events are always added ( #11535 )
...
In edge cases it may happen that set_attributes is re-run before the effect is executed. In that case the render effect which initiates this re-run will destroy the inner effect and it will never run. But because next and prev may have the same keys, the event would not get added again and it would get lost. We prevent this by using a root effect.
The added test case doesn't fail for some reason without this fix, but it does fail when you test it out manually, so I still added it.
Found through https://github.com/sveltejs/svelte/issues/10359#issuecomment-2101167524
6 months ago
Simon H
31f8fea22d
fix: don't warn on writes to `$state` ( #11540 )
...
fixes #10905
6 months ago
Simon H
65223363e9
fix: handle falsy prop aliases correctly ( #11539 )
...
fixes #10854
6 months ago
Dominic Gannaway
4ea8a5e36b
chore: add derived effect ownership tests ( #11538 )
...
* chore: add derived effect ownership tests
* chore: add derived effect ownership tests
6 months ago
Fabio Rotondo
f219c795f4
fix: check for falsy values in spread ( #11388 )
...
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
6 months ago
Simon H
f70c0370be
chore: deduplicate code ( #11534 )
6 months ago
Rich Harris
4b7e0025a8
feat: better REPL autocomplete ( #11530 )
...
* feat: make autocomplete more robust
* handle `$inspect(...).with(...)` special case
* autocomplete imports
* only allow $props at the top level of .svelte files
* only autocomplete runes in svelte files
6 months ago
github-actions[bot]
59f4feb4d8
Version Packages (next) ( #11518 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Rich Harris
8742823e39
fix: make `$effect.active()` true when updating deriveds ( #11500 )
...
* fix: make `$effect.active()` true when updating deriveds
* WIP
* this seems to work?
* prevent effects being created in unowned deriveds
* update test
* fix issue
---------
Co-authored-by: Dominic Gannaway <dg@domgan.com>
6 months ago
Dominic Gannaway
30caaef2e5
fix: improve behaviour of unowned derived signals ( #11521 )
6 months ago
Paolo Ricciuti
70419daf5f
fix: use snippet as parent element of snippets childrens in validator ( #11463 )
...
* fix: use snippet as parent element of snippets childrens in validator
* Update packages/svelte/src/compiler/phases/2-analyze/validation.js
* Update .changeset/wet-pears-remain.md
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
6 months ago
github-actions[bot]
4fb4365567
Version Packages (next) ( #11503 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Rich Harris
b1b2dddc3b
feat: add support for svelte inspector (alternative approach) ( #11514 )
...
* mostly working
* fix
* fix
* handle dynamic elements too
* add __svelte_meta to prototype
* changeset
* cheeky fix
6 months ago
Dominic Gannaway
3c756cf14c
chore: use clear_text_content in more areas ( #11512 )
6 months ago
Dominic Gannaway
f543856cc3
fix: skip AST analysis of TypeScript AST nodes ( #11513 )
...
* fix: skip AST analysis of TypeScript AST nodes
* fix: skip AST analysis of TypeScript AST nodes
* lint
6 months ago
Dominik G
28f3755e40
fix: use acceptExports to support partial hmr ( #11453 )
...
* fix: use acceptExports to support partial hmr
* fix: add condition to only use acceptExports when it is available
* fix: update test snapshot
* fix: format
6 months ago
Paolo Ricciuti
0cf6d56ffe
fix: increment and decrement edge case ( #11506 )
...
* fix: increment and decrement edge case
* fix/simplify test
* simplify
* Apply suggestions from code review
* golf
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Rich Harris <hello@rich-harris.dev>
6 months ago
github-actions[bot]
8318b3d142
Version Packages (next) ( #11474 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
6 months ago
Rich Harris
dca8861c5a
feat: better error for `bind:this` legacy API usage ( #11498 )
6 months ago
Vladislav Logvin
85d680582b
Fix: bind:scroll resets scroll state ( #11469 )
...
* Fixed: bind:scroll resets scroll state
* failing test
* bail if value is undefined
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
6 months ago
Simon H
6bd6f0971b
fix: ensure derived is detected as dirty correctly ( #11496 )
...
Deriveds where under certain conditions not detected as dirty correctly. The reason is that a transitive check_dirtiness call could update the flag of a derived, even if the condition doesn't ulimately result to true. That's why the check for "is now dirty" needs to be moved out of the inner if block.
Fixes #11481
This may also fix a yet undetected overfiring bug in the "is unowned" case because the previous inner "is now dirty?" check didn't take unowned into account.
6 months ago
Simon H
d86b05279f
fix: prevent false positive ownership warning ( #11490 )
...
fixes #11483
We need to keep track of the component function similar to how we keep track of the component context, so that effects etc have the correct one associated
6 months ago
Philipp Pracht
3e1f82b8c4
fix: additional check for component on destroy ( #11488 )
...
fixes #10454
6 months ago
Paolo Ricciuti
fa3e98e8c6
fix: allow to access private fields after `this` reassignment ( #11487 )
...
Fixes #11480
Fixes #11476
6 months ago
Rich Harris
0d5a32d5f7
typo
6 months ago
Paolo Ricciuti
34079a0ec5
fix: restore value after attribute removal during hydration ( #11465 )
...
Fix #11457
6 months ago