0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 09:21:21 +01:00
Commit Graph

9510 Commits

Author SHA1 Message Date
Max Duval
ac6d8c0bf4
docs: fix small typo (#13967)
A full stop or colon, we myst choose
2024-10-27 11:36:36 +01:00
Paolo Ricciuti
67cf3871b4
fix: more exhaustive check during SvelteMap.set in deriveds (#13951)
* fix: more exhaustive check during `SvelteMap.set` in deriveds

* chore: use set for version reactions

* chore: cleanup
2024-10-26 19:18:53 +02:00
george looshch
5ab65e3d59
docs: consistently capitalize DOM in the Svelte 5 migration guide (#13957) (#13958)
Make the casing of the word ‘DOM’ in the Svelte 5 migration guide
consistent.
2024-10-26 09:22:15 -07:00
Paolo Ricciuti
12fcc7a35a
fix: trim whitespace while migrating blocks (#13941)
Co-authored-by: Oscar Dominguez <dominguez.celada@gmail.com>
2024-10-26 18:20:37 +02:00
Paolo Ricciuti
7be3afb3a6
fix: add empty stack to CompileDiagnostic to show error on build (#13942)
* fix: add empty stack to `CompileDiagnostic` to show error on build

* chore: generate types

* chore: make stack optional to make TS happy

* chore: generate types -.-"

* chore: add comment
2024-10-26 09:20:06 +02:00
github-actions[bot]
da1fefcd45
Version Packages (#13920)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-25 22:13:06 +01:00
Dominic Gannaway
83a5eaac8e
fix: skip comment nodes in snippet validation logic (#13936) 2024-10-25 22:04:54 +01:00
Dominic Gannaway
37fa34c4ad
fix: ensure value is correctly set to zero on the progress element (#13924)
* fix: ensure value is correctly set to zero on the progress element

* fix: ensure value is correctly set to zero on the progress element

* fix: ensure value is correctly set to zero on the progress element
2024-10-25 22:04:36 +01:00
Dominic Gannaway
1e6cf1bb40
fix: ensure bind:group works as intended with proxied state objects (#13939) 2024-10-25 22:02:45 +01:00
Dominic Gannaway
7bbaedd6c7
fix: rethrow errors from await block if no catch block exists (#13819)
* chore: highlight swallowed errors from await blocks in DEV

* chore: highlight swallowed errors from await blocks in DEV

* chore: highlight swallowed errors from await blocks in DEV

* lint

* feedback

* feedback

* add test

* Update packages/svelte/tests/runtime-runes/samples/await-no-catch-error/main.svelte

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2024-10-25 20:38:25 +01:00
Simon H
81f9bdd376
fix: remove metadata from legacy AST (#13927)
Besides being private API that shouldn't be exposed, they caused our AST explorer on the Svelte site to traverse endlessly

fixes https://github.com/sveltejs/svelte.dev/issues/480
2024-10-25 20:30:15 +01:00
Dominic Gannaway
441124c5c7
fix: ensure SVG element attributes have case preserved (#13935)
* fix: ensure SVG element attributes have case preserved

* fix: ensure SVG element attributes have case preserved

* fix: ensure SVG element attributes have case preserved
2024-10-25 20:29:44 +01:00
Stephane
feb2d85f46
docs: clarify why we need to use the derived rune (#13919)
* clarify why we need to use the derived rune

* put clarification as note
2024-10-25 11:52:36 +02:00
Conduitry
107be28890
docs: fix outdated $effect.tracking() demo (#13906) 2024-10-25 10:49:08 +02:00
Matthew Carroll
1a6a3e7ebd
fix: typo in Action types (#13874)
* typo: HTMLDiveElement

* regenerate types

* add changeset

---------

Co-authored-by: Conduitry <git@chor.date>
2024-10-25 09:41:54 +02:00
plgingras88
18e2284e74
docs: fix setContext/getContext typo (#13901) 2024-10-24 21:56:44 -04:00
github-actions[bot]
1ee2ac4d05
Version Packages (#13888)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-25 00:30:46 +01:00
Paolo Ricciuti
b63fde3b75
fix: prevent migration script from adding props. to the export let identifier (#13899) 2024-10-25 00:54:22 +02:00
Paolo Ricciuti
3147287813
fix: prevent var name clashing for delegated events without params (#13896) 2024-10-25 00:04:34 +02:00
Dominic Gannaway
dee8db53df
chore: add missing changeset (#13895)
Adds a changeset for #13884
2024-10-24 23:32:54 +02:00
adiGuba
d0177711b1
fix : Rapidly toggling element with out: transition causes incorrect node removal (#13884)
* set onfinish to null to fix a rare bug

* replace null by noop
2024-10-24 22:24:29 +01:00
Dominic Gannaway
42ccdc1023
fix: ensure snippets after empty text correctly hydrate (#13870) 2024-10-24 17:21:01 -04:00
Paolo Ricciuti
b5750ac667
chore: setup pkg.pr.new (#13891)
* chore: setup `pkg.pr.new`

* chore: let's try with this
2024-10-24 23:18:15 +02:00
Dominic Gannaway
771b1e8905
fix: enable bound store props in runes mode components (#13887)
* fix: enable bound store props in runes mode components

* add some JSDoc, since it could be a headscratcher for future us

* make it clear that this is specifically about bindings

* skip intermediate value

* tweak other names too

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-10-24 22:12:48 +01:00
Dominic Gannaway
4cf2d4a904
fix: ensure each block references to imports are handled correctly (#13892) 2024-10-24 22:12:40 +01:00
adiGuba
59ff7f1e88
fix: date test fail for some timezone (#13889)
* fix test for some timezone

* lint
2024-10-24 22:04:50 +01:00
Dominic Gannaway
5a54ad9cc7
fix: ensure SvelteMap reactivity persists through deriveds (#13877)
* fix: ensure SvelteMap reactivity persists through deriveds

* fix: ensure SvelteMap reactivity persists through deriveds

* fix: ensure SvelteMap reactivity persists through deriveds
2024-10-24 21:03:04 +01:00
github-actions[bot]
041e563466
Version Packages (#13863)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-24 21:27:34 +02:00
adiGuba
7c7fd6518f
feat: Little improvement to set_style() (#13836)
* improvement to set_style()

* add __styles to Element prototype
2024-10-24 18:20:40 +01:00
Simon H
b979c291e2
fix: properly traverse children when checking matches for :has (#13866)
The previous algorithm didn't take control flow blocks etc into account, this fixes that. Fixes #13860
2024-10-24 14:23:58 +01:00
Paolo Ricciuti
04c38b089f
fix: allow binding to const with spread in legacy mode (#13849) 2024-10-24 13:21:27 +01:00
Dominic Gannaway
4fbd2a6f10
fix: ensure props internally untracks current_value on sets (#13859)
* fix: ensure props internally untracks current_value on sets

* Update packages/svelte/src/internal/client/reactivity/props.js

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2024-10-24 13:20:04 +01:00
Dominic Gannaway
60dcffb856
fix: internally wrap store subscribe in untrack (#13858)
* fix: internally wrap store subscribe in untrack

* lint

* Update packages/svelte/src/store/utils.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2024-10-24 11:03:32 +01:00
Harry Allen
86ef18165f
docs: fix code example (#13847) 2024-10-23 23:03:15 +02:00
Houssam Elbadissi
3d3c98f3b0
docs: cleanup some leftover > symbols (#13846)
I assume they were accidentally left there because they used to be separate lines each with their own `>` at the beginning of the line, but whoever collapsed them into one line forgot to remove the extra arrow.

Whatever the case is, this commit removes (probably) all of these leftover `>` symbols.
2024-10-23 22:24:52 +02:00
Simon H
594e3ab311
docs: note TS caveat about module exports (#13842)
closes #13554
2024-10-23 21:10:03 +02:00
github-actions[bot]
af4d105cd3
Version Packages (#13757)
* Version Packages

* Update packages/svelte/CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2024-10-23 21:04:18 +02:00
Simon H
44c8889291
chore: tweak MountOptions docs (#13841)
A few wording tweaks, and most importantly mark `events` as deprecated - we don't want to encourage its use.
2024-10-23 21:01:44 +02:00
Alex
134049f6d3
docs: clarifying wording in explanation of state rune in v5 migration guide. (#13839)
Co-authored-by: Bustos, Alex <alex.bustos@gtri.gatech.edu>
2024-10-23 20:39:29 +02:00
Dominic Gannaway
d621f59642
feat: allow usage of getContext() within $derived runes (#13830)
Closes #13493.

This PR allows the usage of getContext() inside $derived runes. Previously, you could use it, but only on init and not updates – and this inconsistency was unnecessary. We can make it work just like we do in other places.
2024-10-23 20:38:00 +02:00
Simon H
96e2d5a395
docs: provide info about wrapper components (#13826)
closes #13006
2024-10-23 19:20:37 +02:00
Simon H
5669b31fe6
fix: ensure :has selectors followed by other selectors match (#13824)
I resisted this previously because it felt a bit wasteful, but I now think that there's really no way around this: Instead of only going upwards the tree while matching, for `:has` we go _down_ the tree to see what matches. More specifically, we're collecting the children of the current element and then check if one of those does match the selectors inside `:has`.

This makes the way the code works easier to reason about and also removes some boolean tracking we had to add for the previous approach.

Fixes #13779
2024-10-23 18:01:07 +01:00
Simon H
c603553e89
docs: fix ComponentProps info (#13827)
* docs: fix ComponentProps info

closes #13770

* fix
2024-10-23 18:00:54 +01:00
Ben McCann
2d69a64e4e
chore: one of these is not like the others (#13834) 2024-10-23 18:00:40 +01:00
Dominic Gannaway
17cb462ca4
fix: ensure muted DOM property works correctly in FF (#13751)
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2024-10-23 09:35:26 -07:00
Francesco Zanini
185e112377
fix: property name conversion in custom transitions (#13820) 2024-10-23 17:02:58 +02:00
Ben McCann
0b178cecce
chore: update all learn.svelte.dev links and a couple of others (#13803) 2024-10-23 16:53:19 +02:00
brunnerh
69f6b58bd4
docs: Reference svelte/reactivity from $state. (#13571) 2024-10-23 16:50:43 +02:00
Emanuele Picchirallo
6257203c22
docs: specify script language and add npm install step to installation guide (#13804) 2024-10-23 16:48:59 +02:00
Simon H
7ecc6c076c
docs: fix code example (#13810)
backporting from https://github.com/sveltejs/svelte.dev/pull/546
2024-10-23 09:15:46 +01:00