* 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>
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
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
* 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>
* docs: generate pages for compiler/runtime warnings/errors
Ideally each warning has accompanying details so that it doesn't look so empty on the final site, but that can happen separately
* fix
* sort alphabetically, code ticks for headings
* only uppercase first word
* regenerate
* generate codes using [!NOTE], remove any backticks and escape `<` characters
* some prose preceeding the list of compiler warnings
* bring over prose from Svelte 4 a11y warnings
* fix
* lint
* remove backticks from headers, now that they are getting rendered
* Revert "remove backticks from headers, now that they are getting rendered"
This reverts commit c295281848.
* back to normal headers/code blocks
* fix
* separate authored from generated stuff
* newlines
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* do no rerun the each block when array change from empty to empty
* rename empty yo was_empty
* add test
* fix nullable array on SSR
* format
* rewrite
* chore: add changeset
---------
Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>