Rich Harris
1700e47858
chore: remove unneeded store_get_dev function ( #10507 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
10 months ago
Simon H
71601ba2e5
fix: warn against accidental global event referenced ( #10442 )
...
* fix: warn against accidental global event referenced
closes #10393
* remove list
* remove else
* tweak
* update test
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
10 months ago
Ben McCann
49ad7f9589
chore: upgrade xml2js and codemirror plugins ( #10463 )
...
* chore: upgrade xml2js
* deduplicate @codemirror/lang-html
* bump eslint-plugin to eliminate duplicate dependency
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
10 months ago
github-actions[bot]
2a5ca51594
Version Packages (next) ( #10499 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
10 months ago
Simon H
72ff5366de
feat: add hydrate method, make hydration treeshakeable ( #10497 )
...
* feat: add hydrate method, make hydration treeshakeable
Introduces a new `hydrate` method which does hydration. Refactors code so that hydration-related code is treeshaken out when not using that method.
closes #9533
part of #9827
* get docs building
* ugh
* one more
* Update packages/svelte/scripts/check-treeshakeability.js
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
* warn
* Update sites/svelte-5-preview/src/routes/docs/content/01-api/05-functions.md
---------
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Rich Harris <rich.harris@vercel.com>
10 months ago
Rich Harris
a2014809ec
chore: tidy up post-#10481 ( #10503 )
...
* simplify
* replace snapshot test with runtime test
* this is overkill
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
10 months ago
Dominic Gannaway
2c93c255f0
fix: makes keyed each blocks consistent between dev and prod ( #10500 )
10 months ago
Simon H
ba0bdc7aa1
chore: document and test signals edge case ( #10228 )
10 months ago
Ahmad
3f75ea64ca
fix: allow stores in `transition`,`animation`,`use` directives ( #10481 )
...
* fix: allow stores in `transition`,`animation`,`use` directives
* ssr
* naming
* linting is broken
* hope it works
* style
* desc
10 months ago
Gabriel Grinberg
9e98bb6d0f
fixes feature request issue creation template suffix ( #10487 )
10 months ago
github-actions[bot]
baf2b67f3f
Version Packages (next) ( #10479 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
10 months ago
Rich Harris
cec3540ac2
chore: use zimmerframe for CSS analysis/transformation ( #10482 )
...
* fix type
* parse selectors properly the first time
* partial fix
* fix
* start moving CSS validation into analysis phase
* finish moving validation
* fix tests
* regenerate types
* start porting scoping logic etc
* move Style to Css.StyleSheet
* some encouraging progress
* more progress
* more progress
* fix a bunch of cases
* more fixes
* tweak
* almost there
* keyframes
* fix
* all CSS tests passing
* legacy stuff
* all tests passing
* delete old code
* regenerate types
* defer analysis, address TODO
* unused
* tidy up
* rename stuff
* read selectors before combinators
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
10 months ago
Simon H
f8ff2b6ea3
chore: source maps for preprocessors + tests ( #10459 )
...
Add source map merging for preprocessors and get tests passing.
- fixed some issues around the `sources` array where they weren't calculated relative to the input correctly
- adjusted some CSS tests because due to our own CSS parser the AST is less granular, so there are less mappings now. Don't think this is a problem, but worth thinking about
- removed enableSourcemap but only log a warning, the reason this was introduced was to mitigate a bug in Vite which occured when having the source map inlined into the SSR'd output. Since SSR doesn't contain inlined CSS anymore (and if it did, we would omit the source map) the reason for which it was introduced no longer exists
- files without js mapping in it have no source mappings yet (originally added in Svelte 4 for #6092 )
11 months ago
Dominic Gannaway
4b274dd00d
feat: derive destructured derived objects values ( #10488 )
...
* feat: derive destructured derived objects values
* address feedback
* address feedback
11 months ago
Rich Harris
302c379e01
chore: CSS tidy up ( #10480 )
...
* move files
* move types
* rename Selector -> ComplexSelector
* ditto
* rename block -> relative_selector
* tidy
* tidy
* unused file
* tweak
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
Dominic Gannaway
cc273f7d53
fix: prevent infinite loop when writing to store using shorthand ( #10477 )
...
Fixes #10472
This PR ensures we untrack parts of the compiled output to a store write, such as that this no longer brings up an infinite updates error
11 months ago
Rich Harris
87d4b12620
chore: tidy up CSS stuff ( #10478 )
...
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
github-actions[bot]
643edc34db
Version Packages (next) ( #10470 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
11 months ago
Dominic Gannaway
74742d9233
fix: improve global transition outro handling ( #10474 )
11 months ago
Rich Harris
d41d0c26ad
chore: rename `$derived.call` to `$derived.by` ( #10445 )
...
* rename $derived.call to $derived.by
* more replacements, plus a compiler error
* regenerate types
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
github-actions[bot]
9cee83c864
Version Packages (next) ( #10457 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
11 months ago
Ben McCann
4942d6b9cc
docs: update routing FAQ with some more recent options ( #10452 )
...
* docs: update routing FAQ with some more recent options
* Update documentation/docs/05-misc/01-faq.md
Co-authored-by: Conduitry <git@chor.date>
* Update documentation/docs/05-misc/01-faq.md
---------
Co-authored-by: Conduitry <git@chor.date>
11 months ago
Dominic Gannaway
667ffb7a39
fix: improve global transition handling of effect cleardown ( #10469 )
...
* fix: improve global transition handling of effect cleardown
11 months ago
Dominic Gannaway
1b56a3219c
fix: ensure inspect fires on prop changes ( #10468 )
...
* fix: ensure inspect fires on prop changes
* fix: ensure inspect fires on prop changes
* fix: ensure inspect fires on prop changes
11 months ago
ikalachy
9129d2f138
fix: check that component wasn't instantiated ( #10458 )
...
#10454
11 months ago
Simon H
1a721e5916
fix: only throw bind error when not passing a value ( #10090 )
...
Relax the runtime error to only throw when you're passing a binding with an undefined value. This makes it possible to provide components in a way that can be used more flexibly while keeping the error to guard against the case that we want to avoid: a default value propagation up.
11 months ago
Dominic Gannaway
9161448ee5
fix: improve handling of object property deletions ( #10456 )
...
* fix: improve handling of object property deletions
* revert
* revert
* revert
11 months ago
Dominic Gannaway
1366932dc0
cleanup a bunch of internal runtime logic ( #10446 )
11 months ago
github-actions[bot]
89123a8117
Version Packages (next) ( #10434 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
11 months ago
Rich Harris
999fca97cf
fix: use hybrid scoping strategy for consistent specificity increase ( #10443 )
...
* end the specificity wars
* tweaks
* document breaking change
* blurgh
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
Simon H
5dd9951cb6
fix: handle sole empty expression tags ( #10433 )
...
* fix: handle sole empty expression tags
When there's only a single expression tag and its value evaluates to the empty string, special handling is needed to create and insert a text node
fixes #10426
* fix
* need this, too
* Update packages/svelte/src/internal/client/operations.js
---------
Co-authored-by: Rich Harris <richard.a.harris@gmail.com>
11 months ago
Simon H
456cf843d2
fix: throw validation error when binding to each argument in runes mode ( #10441 )
...
closes #10437
11 months ago
Ahmad
49bfb6b1d6
fix: improve animation name transformation ( #10432 )
...
* fix: improve animation name transformation
* oops
* s
* minor style tweaks
* expand changeset description
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
github-actions[bot]
2d032c733d
Version Packages (next) ( #10419 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
11 months ago
Dominic Gannaway
4fcd1cb1ed
fix: add compiler error for each block mutations in runes mode ( #10428 )
...
* fix: improve code generation for mutation to each block reference
* fix: add compiler error for each block mutations in runes mode
* lint
* lint
* lint
* use existing validate_assignment logic
* assignment, not mutation
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago
Chien Tran
976e807a3f
docs: rename svelte 5 discord channel ( #10431 )
...
* rename svelte 5 discord channel
* changeset
* Delete .changeset/stupid-insects-help.md
---------
Co-authored-by: Rich Harris <hello@rich-harris.dev>
11 months ago
Simon H
dab0a43693
fix: stricter validation for component exports ( #10430 )
...
disallow exporting props, derived and reassigned state from within components
closes #10310 , closes #10311 , closes #10293
11 months ago
Dominic Gannaway
0e011add4e
fix: improve indexed each array reconcilation ( #10422 )
...
* fix: improve indexed each array reconcilation
* simplify
11 months ago
Rich Harris
623340a1de
fix: make beforeUpdate/afterUpdate behave more like Svelte 4 ( #10408 )
...
Closes #9420 .
This PR creates an $effect.pre (before beforeUpdate and an $effect (for afterUpdate) and, inside those, listen for all locally declared signals plus reactive props. This does mean that we need to link the locally declared signals to the component context (the reverse of the current behaviour, wherein we link the component context to locally declared signals).
11 months ago
github-actions[bot]
983db98756
Version Packages (next) ( #10417 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
11 months ago
Ahmad
89c4cf393f
fix: set `open` binding value in `<details>` ( #10413 )
...
* fix: set initial value for `open` binding in `<details>`
* accurate desc
11 months ago
github-actions[bot]
76620e7d02
Version Packages (next) ( #10409 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
11 months ago
Dominic Gannaway
f9f5d3a1be
fix: only update lazy properties that have actually changed ( #10415 )
...
* fix: only update lazy properties that have actually changed
* code golf
* changeset
* Add test
11 months ago
Simon H
9aa0ed3eb6
fix: handle nested script tags ( #10416 )
...
fixes #9484
11 months ago
Rich Harris
90f8b63bee
fix: run `onDestroy` cleanup during SSR ( #10297 )
...
fixes #10296
Also make sure to use the server export conditions when resolving Svelte imports from inside the server compiler output
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
11 months ago
Simon H
268ac95fde
fix: properly analyze group expressions ( #10410 )
...
fixes #9947 for real
closes #10379
11 months ago
Daniel Imfeld
255693e78f
fix: correctly determine binding scope of `let:` directives ( #10395 )
...
Fixes #9797
Also added missing validation error around duplicate slots
---------
Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>
11 months ago
Rich Harris
34019b3ba2
typo
11 months ago
Rich Harris
b81c7966fa
typo
11 months ago
Rich Harris
a333d4bf12
Tidy up parser ( #10407 )
...
* tidy up parser a bit
* better
---------
Co-authored-by: Rich Harris <rich.harris@vercel.com>
11 months ago