Paolo Ricciuti
19d80ad63c
fix: css pruning producing invalid css ( #14448 )
...
* fix: css pruning producing invalid css
* Update .changeset/big-hats-wonder.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Ben McCann
4f318e6ad6
chore: remove unused dep and upgrade another one ( #14449 )
1 month ago
Rich Harris
1a8aab0e38
chore: remove `node.parent` and `node.prev` ( #14447 )
...
* make get_possible_element_siblings non-recursive
* treat slots as blocks
* simplify
* simplify
* add test
* changeset
* chore: remove node.parent and node.prev
* simplify
1 month ago
Conduitry
610bc98f66
chore: remove obsolete site content ( #13818 )
1 month ago
dependabot[bot]
6ff1d0aa1b
chore(deps-dev): bump @sveltejs/kit from 2.5.24 to 2.8.3 ( #14427 )
...
Bumps [@sveltejs/kit](https://github.com/sveltejs/kit/tree/HEAD/packages/kit ) from 2.5.24 to 2.8.3.
- [Release notes](https://github.com/sveltejs/kit/releases )
- [Changelog](https://github.com/sveltejs/kit/blob/main/packages/kit/CHANGELOG.md )
- [Commits](https://github.com/sveltejs/kit/commits/@sveltejs/kit@2.8.3/packages/kit )
---
updated-dependencies:
- dependency-name: "@sveltejs/kit"
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 month ago
github-actions[bot]
3a6bf1041b
Version Packages ( #14444 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Dominic Gannaway
45417a36ce
fix: addresses memory leak when creating deriveds inside untrack ( #14443 )
...
* fix: addresses memory leak when creating deriveds inside untrack
* fix: addresses memory leak when creating deriveds inside untrack
* changeset
* Update packages/svelte/src/internal/client/reactivity/deriveds.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix
* fix
* fix
* comment
* Update packages/svelte/tests/signals/test.ts
* Update packages/svelte/src/internal/client/reactivity/deriveds.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update .changeset/great-crabs-rhyme.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Rich Harris
a6ad5af0bb
fix: disregard TypeScript nodes when pruning CSS ( #14446 )
...
* make get_possible_element_siblings non-recursive
* treat slots as blocks
* simplify
* simplify
* add test
* changeset
1 month ago
Simon H
3fa08d565c
fix: show `:then` block for `null` value ( #14440 )
...
fixes #14439
This bug was introduced in #13642 because setting the input to null means the equality check ("is the input different") fails if you set the value to null
Also fixes #14441 - this bug was present for a long time, and the reason is the same as for the other bug: The equality check always returns "yes this is the same" if the value is undefined initially. The fix is similar; we need to initialize the input to something that can never be equal to whatever value is passed
1 month ago
Simon H
9e9fb2463c
fix: relax parent validation ( #14442 )
...
This reverts #13255 / #13158 , and helps with the validation error part of #14120
If you would have a component like this...
```svelte
<td>hi there</td>
```
...and then render it on the server via our `render` function like this:
```js
const result = render(Main);
```
...then right now you get an error saying that `td` is not valid at this position. But that doesn't seem right, because we should give people the benefit of the doubt: It may very well be that someone renders such a component and then correctly puts it into a `tr` tag themselves on the server (another example is rendering a full html document like in #14120 ).
All the other validation where there's a known parent (X not valid inside Y) is untouched by this.
Doing this as cleanup prior to tackling #13331
1 month ago
Rich Harris
4f0dde5207
chore: simplify css pruning slightly ( #14432 )
1 month ago
Rich Harris
1912459308
chore: initialize snippet binding correctly ( #14430 )
1 month ago
Rich Harris
d2ce0a79ae
remove stylesheet property from state ( #14429 )
1 month ago
github-actions[bot]
2b5c0e791e
Version Packages ( #14383 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Dominic Gannaway
63484aff9b
fix: ensure last empty text node correctly hydrates ( #14425 )
...
* fix: ensure last empty text node correctly hydrates
* fix: ensure last empty text node correctly hydrates
1 month ago
Rich Harris
37e6c7f26b
fix: correctly prune key/each blocks ( #14403 )
...
* fix: correctly prune key blocks
* fix pruning of each blocks
* simplify
* make more explicit
* changeset
* helperise/robustify
1 month ago
Theodor Steiner
e721d96d32
fix: export temporary LegacyComponentType ( #14256 ) ( #14257 )
...
closes #14256
helps TypeScript when generating dts files to not fail
1 month ago
Rich Harris
046900876f
chore: remove references to node.parent ( #14395 )
...
* chore: remove references to node.parent
* types
* add ElementWithPath interface
* put path on analysis.elements instead of metadata
* Revert "put path on analysis.elements instead of metadata"
This reverts commit c0c7ab8bd1
.
* use node.metadata.path
* remove a node.parent usage
* another
* and another, albeit by replacing some bewildering code with some more bewildering code
* make loop idiomatic
* replace some more weirdo code
* simplify
1 month ago
Dominic Gannaway
dd9abea2a1
fix: ensure spread attribute events are attached synchronously ( #14387 )
...
* fix: ensure spread attribute events are attached synchronously
* fix: ensure spread attribute events are attached synchronously
* Update .changeset/rich-worms-burn.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* simplify
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Simon H
6a5f30b290
chore: add changeset checkbox to PR template ( #14388 )
...
too many people forget it
1 month ago
github-actions[bot]
6e391fce59
Version Packages ( #14380 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Rob B
97185eb3d5
docs Update 03-typescript.md ( #14382 )
...
* Update 03-typescript.md
Fix TS error: Cannot invoke an object which is possibly 'undefined'.
* Update 03-typescript.md
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 month ago
Paolo Ricciuti
520055cf5c
fix: always use set for private identifiers ( #14378 )
...
* fix: always use set for private identifiers
* we can simplify this further - no need to check the value was transformed, since the outcome of not returning immediately is the same but with extra steps
* add explanatory note
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
github-actions[bot]
85ec6fa276
Version Packages ( #14377 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Dominic Gannaway
9d12fd1a01
chore: remove template expression inlining ( #14374 )
...
* chore: remove template expression inlining
* missed some
* fix
* feedback
* feedback
* Update packages/svelte/src/compiler/phases/3-transform/client/utils.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/RegularElement.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/utils.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/utils.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/utils.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix
* Update .changeset/calm-mice-perform.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
github-actions[bot]
f616c22053
Version Packages ( #14366 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Dominic Gannaway
811c8d32eb
fix: correctly handle srcObject attribute on video elements ( #14369 )
...
* fix: correctly handle srcObject attribute on video elements
* remove side-effect
* side-effects agin
* side-effects agin
* better fix
1 month ago
Frédéric Crozatier
7bd1cdf427
feat: add content-visibility: auto state change event ( #14373 )
...
* add contentvisibilityautostatechange event
* changeset
* Update .changeset/kind-horses-lay.md
* Update .changeset/kind-horses-lay.md
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 month ago
Simon H
4dfa0e31fe
fix: tighten up `export default` validation ( #14368 )
...
through #14363 I noticed our `export default` validation wasn't quite right:
- missed checking for derived/state exports
- the "cannot have a default export" error was only thrown if you did `export default` from the instance script, but it shouldn't matter from which component part you export it; it's never ok
1 month ago
Simon H
4c98c2e4a6
chore: consolidate checks for never-static attributes ( #14372 )
...
We're using string checks in various places, better to have it encapsulated in one function
1 month ago
Paolo Ricciuti
32a1453805
fix: include method definitions in class private fields ( #14365 )
...
* fix: include method definitions in class private fields
* Update packages/svelte/tests/runtime-runes/samples/class-disabinguate-private-method-definition/_config.js
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Rich Harris
ce471310c4
chore: remove some unused code ( #14363 )
1 month ago
github-actions[bot]
53cc60085e
Version Packages ( #14362 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Dominic Gannaway
747d40833b
fix: ensure is_pure takes into account runes ( #14333 )
...
* fix: ensure is_pure takes into account runes
* feedback
1 month ago
Dominic Gannaway
741106879b
fix: ensure internal cloning can work circular values ( #14347 )
...
* fix: ensure internal cloning can work circular values
* better fixc
* 'original' feels slightly clearer than 'json_instance'
* use an optional parameter, so we can omit it in most cases
* Update packages/svelte/src/internal/shared/clone.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Dominic Gannaway
f6117bb328
chore: add ssr benchmark suite ( #14361 )
...
* chore: add ssr benchmark suite
* lint
* Update benchmarking/run.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Dominic Gannaway
6e8267f462
fix: correctly update dynamic member expressions ( #14359 )
...
* fix: output template effect for svg xlink attribute
* mark subtree dynamic in MemberExpression visitor
* don't treat attributes and text nodes differently
* Update .changeset/serious-spiders-bake.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
Santiago Cézar
012166ec3c
fix: convert input value to number on hydration ( #14349 )
...
* convert input value to number on hydration
* add test
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
github-actions[bot]
b145035a00
Version Packages ( #14348 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Dominic Gannaway
1c454c236e
fix: ensure dynamic call expressions correctly generate output ( #14345 )
1 month ago
Gwen Le Bihan
24ebbcbbc1
docs: use e.detail instead of e.details in migration examples ( #14340 )
1 month ago
github-actions[bot]
396ea2ef37
Version Packages ( #14328 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Dominic Gannaway
3a69b4c415
fix: ensure inline object literals are correctly serialised ( #14325 )
...
* fix: ensure inline object literals are correctly serialised
* Apply suggestions from code review
* address feedback
* address feedback
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
1 month ago
github-actions[bot]
95ab85fad7
Version Packages ( #14304 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 month ago
Simon H
94471ca38e
fix: avoid relying on Node specifics within compiler ( #14314 )
...
fixes #14294
1 month ago
Paolo Ricciuti
1f0700f5c5
fix: mark subtree dynamic for img with loading attribute ( #14317 )
...
* fix: mark subtree dynamic for img with loading attribute
* chore: unify conditions
* chore: change conditions
1 month ago
Simon H
efc65d4e0c
fix: mark pseudo classes nested inside `:not` as used ( #14303 )
...
fixes the css bug part of #14299
1 month ago
Simon H
6373641045
docs: add example to "state instead of stores" ( #14310 )
...
closes #13879
1 month ago
Simon H
e379319626
fix: ensure props passed to components via mount are updateable ( #14210 )
...
The detection whether or not props are writable is buggy; it doesn't take into account the case when instantiating components via `mount` or legacy-`new`
Fixes #14161
This posed an interesting question: What to do about (non-)`bind:`able properties? The answer I arrived on was: Treat it as if everything that _can_ be bound _is_ treated as bound, and everything else as readonly. In other words, if you're reassigning a prop, it will diverge from the passed in props if it's not bindable or not set in the parent, otherwise it will mutate the passed in props. I think that makes the most sense, given that you can't control this behavior from the outside.
1 month ago
Dominic Gannaway
7fd3774015
fix: disallow invalid attributes for `<svelte:window>` and `<svelte:document>` ( #14228 )
1 month ago