Simon H
dba4dfaff8
docs: add testing section ( #12600 )
...
* docs: add testing section
- explain component and rune testing using Vitest
- explain e2e testing using Playwright
closes #10244
closes #10650
* better examples
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* fix
* Update documentation/docs/05-misc/02-testing.md
* Update documentation/docs/05-misc/02-testing.md
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
* Update documentation/docs/05-misc/02-testing.md
* we normally use single quotes
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* more details on component testing
* extract component testing into its own sub section, reorder a bit
* fix code example
* Update documentation/docs/05-misc/02-testing.md
* Apply suggestions from code review
Co-authored-by: Rich Harris <rich.harris@vercel.com>
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
5 months ago
github-actions[bot]
1d17677131
Version Packages (next) ( #12613 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Simon H
c9e9e90659
fix: always close tags when namespace is foreign ( #12623 )
5 months ago
Simon H
32af9434bc
fix: never set custom element props as attributes ( #12622 )
...
* fix: never set custom element props as attributes
* changeset
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Simon H
0f41689916
chore: unskip more tests ( #12621 )
5 months ago
btea
e1728e5a0b
chore: remove unnecessary `\d` ( #12619 )
...
`\w` includes `\d`
5 months ago
Rich Harris
a212b0d2fe
chore: remove obsolete comment ( #12615 )
5 months ago
Rich Harris
97d5cf178f
chore: simplify assignments in server code ( #12614 )
...
Also fixes an uncovered bug where store `+=/-=` etc assignments were not serialized correctly on the server
5 months ago
Dominic Gannaway
993fff0045
fix: tune hydrate mismatch logic to catch more cases ( #12612 )
5 months ago
Rich Harris
c66d2cfcc1
feat: better code generation for `let:` directives in SSR mode ( #12611 )
...
* better code generation for slot props in SSR
* simplify
* remove getters mechanism from server compiler
* changeset
* no need to use getters in SSR mode
* fix comment
5 months ago
github-actions[bot]
beea5c3772
Version Packages (next) ( #12609 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
github-actions[bot]
ff27753742
Version Packages (next) ( #12583 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Rich Harris
ba5f5f38b1
chore: tweak event delegation docs ( #12607 )
5 months ago
Simon H
13d86e9019
feat: allow `:global` in more places (alternative) ( #12560 )
...
* `div { :global { &.x { ... } } }` is equivalent to `div:global.x { ... }`, so the latter should be allowed, too
* finalize
* replace obsolete breaking change (which turned out to be a wrong change and was since reverted), add new breaking change note
* changeset
* regenerate types
* Update sites/svelte-5-preview/src/routes/docs/content/03-appendix/02-breaking-changes.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* always remove descendant selector before global
* error on lone `:global` with nested `&`, revert "remove spaces" rule
* regenerate types
* documentation
* oops
* switch to removing descendant combinator
* fix
* revert combinator validation relaxation
* error on first global being modified
* tweak docs
* tweak error messages
* Update documentation/docs/02-template-syntax/05-styles-and-classes.md
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* clarify
* tweak messages
* update tests
* tweak docs
* tweak `:global(...)` docs
* tweak docs
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Rich Harris
e2f17c8a7b
chore: tweak xmlns docs ( #12606 )
5 months ago
Rich Harris
db7652116e
chore: tweak `$state.is` warning docs a bit more ( #12605 )
5 months ago
Dominic Gannaway
5a07219836
fix: add missing hydration mismatch call-site ( #12604 )
...
* fix: add missing hydration mismatch call-site
* add changeset
* Update playgrounds/demo/index.html
Co-authored-by: Conduitry <git@chor.date>
---------
Co-authored-by: Conduitry <git@chor.date>
5 months ago
Simon H
3515776009
docs: tweak `$state.is` warning ( #12599 )
...
Also add a detailed explanation which can later appear on the docs site
closes #11556
5 months ago
Dominic Gannaway
afa3128d2f
breaking: avoid flushing queued updates on mount/hydrate ( #12602 )
...
* Revert "Revert "breaking: avoid flushing queued updates on mount/hydrate" (#1…"
This reverts commit 8d139210b7
.
* fix legacy wrapper
* lint
* docs
* duplicate
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Rich Harris
75ea6da9cd
chore: modularize server code ( #12596 )
...
* start modularizing server code
* more
* more
* more
* more
* alphabetize
* start on JS visitors
* more
* more
* more
* more
* less
* more
* alphabetize
* lint
* combine into single visitors folder
* alphabetize
5 months ago
Simon H
6223a7e87e
docs: event delegation tweaks ( #12597 )
...
closes #11317
5 months ago
Simon H
bc78391bdc
docs: mention xmlns attribute for `<svelte:element>` ( #12598 )
...
closes #11993
5 months ago
Dominic Gannaway
7a8cf3a9a1
fix: ensure directives run in sequential order ( #12591 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Rich Harris
c173140969
chore: use JSDoc import ( #12595 )
...
* more
* more
* more
5 months ago
Rich Harris
8d139210b7
Revert "breaking: avoid flushing queued updates on mount/hydrate" ( #12593 )
...
* Revert "breaking: avoid flushing queued updates on mount/hydrate (#12587 )"
This reverts commit 20b879717a
.
* Update packages/svelte/src/internal/client/render.js
5 months ago
Rich Harris
c548932390
chore: use JSDoc imports ( #12592 )
...
* more
* more
* more
* more
* more
* more
* more
* regenerate types
5 months ago
Rich Harris
7a5c6b588f
chore: more JSDoc imports ( #12590 )
...
* more
* more
* more
* more
* fix
5 months ago
Dominic Gannaway
20b879717a
breaking: avoid flushing queued updates on mount/hydrate ( #12587 )
...
* breaking: avoid flushing queued updates on mount/hydrat
* Fix tests
* Update packages/svelte/src/internal/client/render.js
Co-authored-by: Rich Harris <rich.harris@vercel.com>
* tweak
* tweak
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Rich Harris
6037b961c0
chore: more JSDoc ( #12588 )
5 months ago
Dominic Gannaway
abaa4413df
fix: tweak element_invalid_self_closing_tag to exclude namespace ( #12585 )
5 months ago
Rich Harris
621eb76e1e
chore: use JSDoc `@import` ( #12581 )
...
* chore: use JSDoc @import
* regenerate types
5 months ago
Dominic Gannaway
37f58cf318
fix: apply dynamic event fixes to OnDirective ( #12582 )
...
* fix: apply dynamic event fixes to OnDirective
* build
5 months ago
Simon H
528d3468d0
docs: note hydration comments change ( #12580 )
...
closes #10375
5 months ago
github-actions[bot]
c18221dcc3
Version Packages (next) ( #12579 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Simon H
c0832fd85d
fix: exclude `bind:this` from reactive state validation ( #12566 )
5 months ago
Simon H
2ea2be3324
docs: explain `runes` compiler option behavior ( #12578 )
...
closes #11523
5 months ago
Rich Harris
cf8df0bacc
chore: remove `binding.expression` ( #12530 )
...
* add state.getters as alternative to binding.expression
* on second thoughts
* fix
* first of many
* couple more
* regenerate types
* more
* another
* more
* another
* another
* another
* remove binding.expression from client-side code
* tweak
* last one
* comment
* regenerate types
* add a changeset
* small tidy up
* simplify
* simplify
* simplify and fix
* simplify
5 months ago
Rich Harris
37782be9b1
chore: add <meta charset> to playground ( #12574 )
5 months ago
github-actions[bot]
9b512ca91d
Version Packages (next) ( #12576 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Rich Harris
9f3ed8968f
fix: correctly set anchor inside HMR block ( #12575 )
5 months ago
Rich Harris
642f5f4df8
chore: fix playground HMR ( #12572 )
5 months ago
github-actions[bot]
5669c7de4f
Version Packages (next) ( #12552 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago
Dominic Gannaway
64e9f0e5f6
fix: improve dynamic event handling ( #12570 )
5 months ago
Dominic Gannaway
d17755a8b5
fix: ensure dynamic event handlers are wrapped in a derived ( #12563 )
...
* fix: ensure dynamic event handlers are wrapped in a derived
* fix test
* feedback
* more feedback
* address feedback
* we have .svelte.js files
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
5 months ago
Dominic Gannaway
d73c5b8434
fix: ensure $state.snapshot correctly clones Date objects ( #12564 )
5 months ago
Rich Harris
7b2279d84c
chore: tidy up dynamic event handler generated code ( #12553 )
...
* chore: tidy up dynamic event handler generated code
* actually we need a proper function
5 months ago
Simon H
e2b75d1a6e
fix: properly update store values ( #12562 )
...
We need to extend the "don't use `set` on first run" logic to the falsy branch aswell
Fixes #12558
5 months ago
Rich Harris
72f5539f51
fix: remove runtime validation of components/snippets, rely on types instead ( #12507 )
...
closes #12446
5 months ago
Dominic Gannaway
90d6f573e3
fix: dynamic event delegation for stateful call expressions ( #12549 )
5 months ago
github-actions[bot]
55400fd16c
Version Packages (next) ( #12548 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
5 months ago