Dominic Gannaway
2ca9a81679
fix: ensure user effects are correctly executed on initialisation ( #13697 )
2 months ago
Dominic Gannaway
ae10f4d37c
breaking: state mutations inside the template are no longer allowed ( #13660 )
...
* breaking: state mutations inside the template are no longer allowed
* fix test
* fix test
* lint
* update error message
* fix test
2 months ago
github-actions[bot]
966a6bda05
Version Packages (next) ( #13695 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Dominic Gannaway
a577ce08c6
chore: ensure effect destruction of deriveds is consistent ( #13693 )
...
* chore: ensure effect destruction of deriveds is consistent
* chore: ensure effect destruction of deriveds is consistent
2 months ago
Dominic Gannaway
bb491f1229
fix: avoid chromium issue with dispatching blur on element removal ( #13694 )
...
* fix: avoid chromium issue with dispatching blur on element removal
* fix: avoid chromium issue with dispatching blur on element removal
* fix: avoid chromium issue with dispatching blur on element removal
* active effect too
* try/finally
2 months ago
github-actions[bot]
793a8de06e
Version Packages (next) ( #13650 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Paolo Ricciuti
18c5a5ba2d
fix: bail out if slot name changes and $$slots assigned to variable ( #13678 )
2 months ago
Paolo Ricciuti
ab9eeb46fe
fix: migrated snippet shadowing prop and let directive removal ( #13679 )
2 months ago
Dominic Gannaway
894b1c37ad
chore: CompileDiagnostic no longer extends Error ( #13651 )
2 months ago
Dominic Gannaway
61391c8704
fix: ensure migrate correctly handles named slots ( #13676 )
...
* fix: ensure migrate correctly handles named slots
* tweak
* fix
2 months ago
Dominic Gannaway
c9d85c2d52
fix: migrate reactive statements with inner blocks ( #13675 )
2 months ago
Dominic Gannaway
f398929fdd
fix: correct migration of uninitialised state ( #13673 )
...
* fix: correct migration of uninitialised state
* better fix
2 months ago
Paolo Ricciuti
0598f2bbe1
fix: reset `reset_element` in `render` to prevent runtime error ( #13669 )
2 months ago
Paolo Ricciuti
9f930f4e9b
feat: tell users of `@migration-task` ( #13668 )
2 months ago
Paolo Ricciuti
969e6aa750
feat: add `migration-task` for impossible to migrate slots ( #13658 )
...
* feat: add `migration-task` for impossible to migrate slots
* Update packages/svelte/src/compiler/migrate/index.js
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
* Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
* Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
* Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
* Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
---------
Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>
2 months ago
Paolo Ricciuti
0dcd4f6c6e
feat: add `migration-task` comment after errors ( #13659 )
2 months ago
Paolo Ricciuti
b352f08e9d
fix: migrating rest props type includes props types ( #13632 )
...
* fix: rest props type includes props types
* chore: remove extra line
* Update .changeset/spotty-kings-hug.md
2 months ago
github-actions[bot]
d7cf76bbb6
Version Packages (next) ( #13640 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Dominic Gannaway
193cc37f7a
fix: correctly applies autofocus to static elements ( #13648 )
...
* fix: correctly applies autofocus to static elements
* lint
* fix other case
2 months ago
Dominic Gannaway
e21e624fff
chore: avoid reporting inspections when an exception occurs ( #13601 )
...
* chore: avoid reporting inspections when an exception occurs
* add test
* revise
2 months ago
adiGuba
bb245445fc
fix : $.component() break transition ( #13646 )
...
* $.component() must use EFFECT_TRANSPARENT
* changeset
* Update .changeset/eight-pans-worry.md
---------
Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>
2 months ago
Dominic Gannaway
139114bdcb
fix: ensure legacy run utility does not cause cycles ( #13643 )
...
* fix: ensure legacy run utility does not cause cycles
* add warning
* add warning
* lint
* feedback
* lint
* lint
2 months ago
Frédéric Crozatier
ffa2af7549
fix: `method` is case insensitive ( #13639 )
...
* fix method
* changeset
2 months ago
Paolo Ricciuti
372884cf99
fix: use `internal_set` in `await` block ( #13642 )
2 months ago
Paolo Ricciuti
440017d442
fix: better migration for leading and trailing comments ( #13630 )
2 months ago
github-actions[bot]
f579a3ba7d
Version Packages (next) ( #13627 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Frédéric Crozatier
53ae2b8170
breaking: stronger enumerated types ( #13624 )
...
* dir
* as
* http-equiv
* kind
* preload
* shape
* scope
* method
* enctype
* template
* writingsuggestions
* autocapitalize
* autocapitalize is standard
* autocorrect
* changeset
2 months ago
Dominic Gannaway
2070c8a166
breaking: disallow state mutations in logic block expression ( #13625 )
2 months ago
Dominic Gannaway
7429854383
chore: improve runtime performance of derived signals ( #13626 )
2 months ago
github-actions[bot]
99c744adbe
Version Packages (next) ( #13621 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Dominic Gannaway
75fecf82a6
fix: ensure each block consistency to internal mutations to the collection ( #13614 )
...
* fix: ensure bind_checked defers mutation to ensure reactive graph stability
* better fix
* better fix
* better fix
* better fix
* lint
* simplify
2 months ago
Dominic Gannaway
ed790ee166
fix: ensure await block scope transforms are isolated ( #13622 )
2 months ago
Dominic Gannaway
6a38bbe8a3
chore: improve derived ownership model ( #13623 )
...
* chore: improve derived ownership model
* remove redundant assertion
2 months ago
Dominic Gannaway
974e823b5b
chore: improve internal benchmarking ( #13620 )
...
* chore: improve internal benchmarking
* update type
* simplify
2 months ago
Paolo Ricciuti
48f0bfc73f
fix: ensure inserted code is preserved during migration ( #13617 )
...
* fix: moving deriveds during migration deletes part of the inserted code
* fix: use update instead of remove
* Update .changeset/cool-apes-confess.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2 months ago
github-actions[bot]
a17a28b30e
Version Packages (next) ( #13603 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Frédéric Crozatier
76067a5fbc
feat: hidden until found and beforematch ( #13612 )
...
* add types
* changeset
2 months ago
Dominic Gannaway
68a2263415
fix: ensure local prop value is read during teardown ( #13611 )
...
* fix: ensure local prop value is read during teardown
* add test
* cleanup
* less overhead
2 months ago
Simon H
829be3d611
fix: take snippets into account when scoping CSS ( #13589 )
...
fixes #10143
2 months ago
Simon H
6f03561ae4
breaking: scope :not(...) selectors ( #13568 )
...
The other part of #13395
This implements scoping for selectors inside `:not(...)`. The approach is almot the same as for `:is/where(...)`.
This is a breaking change because people could've used `:not(.unknown)` with `.unknown` not appearing in the HTML, and so they need to do `:not(:global(.unknown))` instead.
While implementing it I also discovered a few bugs, which are fixed in this PR:
- `foo :is(bar baz)` wasn't properly handled. This selector can mean `foo bar baz` but it can also mean `bar foo baz` (super weird, but it is what it is). Since our current algorithm isn't suited for handling this, we just assume it matches and scope it. Worst case is we missed a prune
- `bar` in `:global(foo):is(bar)` was always marked as unused, even if it matched
2 months ago
Rich Harris
94aea0f624
gah missed a spot
2 months ago
Rich Harris
caaf74b854
docs: more fixes ( #13608 )
2 months ago
Simon H
81f28ccf5d
fix: handle leading combinators within `:has(...)` ( #13606 )
...
We need to ignore the leading combinator within a `:has(...)`, else it would not stop matching, assuming there are more parent selectors (which there aren't) and always fail.
https://github.com/sveltejs/svelte/pull/13567#issuecomment-2412405131
2 months ago
Simon H
eb6488cd90
breaking: scope `:has(...)` selectors ( #13567 )
...
The main part of #13395
This implements scoping for selectors inside `:has(...)`. The approach is to first descend into the contents of a `:has(...)` selector, then in case of a match, try to match the rest of the selector ignoring the `:has(...)` part. In other words, `.x:has(y)` is essentially treated as `x y` with `y` being matched first, then walking up the selector chain taking into account combinators.
This is a breaking change because people could've used `:has(.unknown)` with `.unknown` not appearing in the HTML, and so they need to do `:has(:global(.unknown))` instead
2 months ago
github-actions[bot]
a6c97b378f
Version Packages (next) ( #13545 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2 months ago
Dominic Gannaway
a2ece29b6e
fix: ensure proxied arrays correctly update their length upon deletions ( #13549 )
...
* fix: ensure proxied arrays correctly update their length upon deletions
* add test
2 months ago
Dominic Gannaway
4dcac41c10
fix: cleanup non-branch effects created inside block effects ( #13600 )
...
* fix: cleanup non-branch effects created inside block effects
* cleaner
2 months ago
Paolo Ricciuti
eafddf4358
fix: avoid assigning input.value if the value is the same to fix `minlength` ( #13574 )
...
* fix: avoid assigning input.value if the value is the same to fix `minlength`
* chore: changeset
2 months ago
Dominic Gannaway
7e6d93d1c3
fix: ensure effects destroy owned deriveds upon teardown ( #13563 )
...
* fix: ensure effects destroy owned deriveds upon teardown
* add test
* make old test work
* tune
* tune
* Update packages/svelte/src/internal/client/runtime.js
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2 months ago
Rich Harris
6534f507ce
docs: add/fix some more stuff ( #13585 )
2 months ago