Simon H
b72fd2b3cd
fix: ignore TypeScript generics on variables ( #14509 )
...
fixes #14505
3 weeks ago
github-actions[bot]
a091fb5ce6
Version Packages ( #14501 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 weeks ago
Simon H
a283083751
feat: each without as ( #14396 )
...
* feat: each without as
WIP
closes #8348
* properly
* docs
* changeset
* real world demo
* simplify
* typo
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 weeks ago
github-actions[bot]
a39605ec7a
Version Packages ( #14499 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 weeks ago
Rich Harris
ef640c3b46
fix: render attributes during SSR regardless of case ( #14492 )
...
fixes part of #14479
3 weeks ago
Rich Harris
1f25bd4f47
fix: correctly prune CSS for elements inside snippets ( #14494 )
...
fixes #14483
3 weeks ago
github-actions[bot]
99b4cfbb51
Version Packages ( #14489 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 weeks ago
ComputerGuy
945b625e95
fix: Prevent `$state` `bigint`s incrementing and decrementing from throwing ( #14485 )
...
* Fix `$.update` and `$.update_pre` for bigints
* resolve conflicts
* fix some things
* fix thing i definitely didn't just break
* hopefully this will fix it
* fix formatting
* simplify
* style consistency
* simplify
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 weeks ago
Rich Harris
fe15ad4ae8
fix: treat spread elements the same as call expressions ( #14488 )
3 weeks ago
github-actions[bot]
f75a9a566e
Version Packages ( #14486 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 weeks ago
Dominic Gannaway
ed7ebcde1e
feat: add error boundaries ( #14211 )
...
* feat: add error boundary support
tweak
tweak again
retry -> reset
tweaks
add tests
tweaks
tweaks
tweaks
more tests
more tests and tweaks
comments
tweak
tweak
tweak
tweak
tweak
* tweak
tweak
tweak
tweak
more fixes
tweak
tweak
more fixes
changeset
* Update packages/svelte/elements.d.ts
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update .changeset/polite-peaches-do.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix issue with rethrowing
* handle fallback error
* handle fallback error
* add more test coverage
* more tests
* more bug fixes
* guard against non-errors
* add component_stack to error
* alternative approach
* remove spread support
* lint
* add to legacy ast
* add to svelte-html
* disallow anything but attributes on the boundary element
* fix error
* more validation
* only create block when necessary
* swap argument order - results in nicer-looking code in many cases
* Update .changeset/polite-peaches-do.md
* simplify a bit
* simplify
* move declaration closer to usage
* push once
* unused
* tweaks
* consistent naming
* simplify
* add a couple newlines
* tweak comments
* simplify
* newlines
* placeholder documentation
* add some docs
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update packages/svelte/src/internal/client/dom/blocks/boundary.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix type
* fix link
* explain what happens if onerror throws
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
3 weeks ago
github-actions[bot]
6dd60b5685
Version Packages ( #14477 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 weeks ago
Ben McCann
4c88431228
fix: upgrade to esm-env 1.2.1 to fix issues with non-Vite setups ( #14470 )
...
* fix: upgrade to esm-env 1.2.1 to fix issues with non-Vite setups
* fix (albeit with annoying warnings)
* bundle with conditions to silence noise
* production is probably better
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 weeks ago
Rich Harris
00aaad16b2
fix: generate correct code when encountering object expression statement ( #14480 )
...
* bump esrap
* changeset
4 weeks ago
Rich Harris
a60e837e44
fix: prevent infinite loops when pruning CSS ( #14474 )
...
fixes #14472
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
4 weeks ago
github-actions[bot]
ca3690f7df
Version Packages ( #14464 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 weeks ago
Simon H
d62e7bdbe1
fix: ignore text and expressions outside the template when validating HTML ( #14468 )
...
fixes #14466
The logic introduced in #14395 was flawed - not every text or expression outside the template is the child of an attribute. This turns it around: We know that every child of a fragment is inside the template, so we ignore all text/expression tags that are not child of a fragment
4 weeks ago
Rich Harris
c4ac0e01e7
fix: better account for render tags when pruning CSS ( #14456 )
...
Fixes #14399
Add a mechanism to connect render tags to snippets to know where to walk when coming across render tags
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
4 weeks ago
github-actions[bot]
dcef8ff45a
Version Packages ( #14451 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 weeks ago
Simon H
d6fc176fcb
fix: strip exported TypeScript function overloads ( #14458 )
...
fixes #14455
4 weeks ago
Ben McCann
41e47a4c00
chore: upgrade esm-env for Vite 6 support ( #14460 )
...
* chore: upgrade esm-env for Vite 6 support
* dedupe
---------
Co-authored-by: Conduitry <git@chor.date>
4 weeks ago
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>
4 weeks ago
github-actions[bot]
3a6bf1041b
Version Packages ( #14444 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 weeks 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>
4 weeks 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
4 weeks 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
4 weeks 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
4 weeks 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
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
github-actions[bot]
6e391fce59
Version Packages ( #14380 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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
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
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
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
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