Rich Harris
a5de086f95
feat: turn `reactive_declaration_non_reactive_property` into a runtime warning ( #14192 )
...
* turn `reactive_declaration_non_reactive_property` into a runtime warning
* ignore warning
* Update packages/svelte/src/internal/client/reactivity/effects.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* Update packages/svelte/src/internal/client/runtime.js
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* fix
* test
* changeset
* Update .changeset/witty-turtles-bake.md
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
* add some details
* check
* regenerate
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 weeks ago
Rich Harris
87863da6ff
docs: how to javascript ( #14528 )
3 weeks ago
Rich Harris
8ad9295535
docs: hints on preserving reactivity ( #14514 )
3 weeks ago
Rich Harris
aac929d503
fix: leave update expressions untransformed unless a transformer is provided ( #14507 )
...
* fix: leave update expressions untransformed unless a transformer is provided
* fix more cases
3 weeks ago
Dominic Gannaway
94694a5e63
chore: add test for binding event reactive context ( #14522 )
...
* chore: add test for binding event reactive context
* revised
3 weeks ago
Simon H
3d36e15ddd
docs: add tsconfig.json info to TS docs ( #14519 )
...
Also fix adjacent code examples
closes #14187
3 weeks ago
Rich Harris
7142fa0b5c
docs: note requirement on 5.5.0 to export snippets ( #14523 )
3 weeks ago
github-actions[bot]
e722ef6b15
Version Packages ( #14510 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
3 weeks ago
Dominic Gannaway
4d2f2fb8e6
feat: allow snippets to be exported from module scripts ( #14315 )
...
* feat: allow snippets to be exported from module scripts
* tweak type
* fix issue + add test
* refactor
* refactor
* fix exports error
* fix lint
* fix lint
* error on undefined export
* hoisted snippets belong in transform state, not analysis
* put the code where it's used
* drop the local_. just binding. it's cleaner
* simplify
* simplify
* simplify
* simplify
* tidy up
* oops
* update message, add some details
* lint
* Apply suggestions from code review
* add some docs
* Update packages/svelte/src/compiler/phases/3-transform/utils.js
* Update .changeset/famous-parents-turn.md
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
3 weeks ago
Rich Harris
2e57612ef4
chore: fix typo ( #14513 )
3 weeks ago
Simon H
b72fd2b3cd
fix: ignore TypeScript generics on variables ( #14509 )
...
fixes #14505
3 weeks ago
Rich Harris
aaea254102
chore: serialize bigint AST, albeit incorrectly ( #14504 )
...
playgrounds/sandbox/run.js doesn't work for components containing bigints, because they can't be serialized to JSON. There isn't really a great fix for this issue but this at least allows the sandbox to run
3 weeks ago
SukeshP1995
abb90d8737
docs: fix grammatical error ( #14500 )
...
a instead of an before failed
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
83cec2f3d1
chore: better SSR output for <svelte:element> ( #14493 )
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>
4 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>
4 weeks ago
Rich Harris
fe15ad4ae8
fix: treat spread elements the same as call expressions ( #14488 )
4 weeks ago
Rich Harris
9fcfd7f0d1
docs: note when boundaries were added ( #14487 )
4 weeks ago
github-actions[bot]
f75a9a566e
Version Packages ( #14486 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4 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>
4 weeks ago
Romain l'Ourson
f2eed15c02
docs: fix scale description ( #14454 )
...
* Fix scale description
* regenerate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
4 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
Ben McCann
10a7729726
chore: bump jsdom to 25.0.1 ( #14473 )
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
Rich Harris
e9ff665bea
chore: minor css-prune.js tweaks ( #14457 )
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
Ben McCann
4f318e6ad6
chore: remove unused dep and upgrade another one ( #14449 )
4 weeks 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
4 weeks ago
Conduitry
610bc98f66
chore: remove obsolete site content ( #13818 )
4 weeks 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>
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
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