0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-24 00:07:30 +01:00
Commit Graph

9531 Commits

Author SHA1 Message Date
Conduitry
3fe278a8c3
chore: remove xml2js override (#14041) 2024-10-30 16:55:30 +01:00
Conduitry
6ad8240464
docs: fix various typos in reference docs (#14011)
* docs: fix note about $derived

* fix some other typos

* revert one change

* emdash tweak
2024-10-30 16:37:18 +01:00
Ben McCann
217e40998a
chore: add changeset and comment (#14040)
for #14026
2024-10-30 16:35:26 +01:00
Simon H
8a2c97a7b8
fix: extend derived/state validation error to indirect exports (#14039)
Closes #14029
2024-10-30 16:33:43 +01:00
Simon H
1434f48f7c
fix: make compiler error extend from Error (#14036)
We originally didn't extend from `Error` anymore because its fields are of no real value to us, and has problems with serialization in a worker context.

Turns out this was a mistake, because various build tools rely on errors being thrown as something that extends Error, else they try to wrap it in their own error.

We therefore revert that change while still trying to preserve most of the advantages of not extending `Error`, namely nuking the useless stack trace and making sure the message is enumerable.
2024-10-30 15:33:15 +01:00
Simon H
f52a30347f
fix: ensure comma is also pruned if necessary (#14032)
immediately after merging #14006 I noticed there's a bug when pruning one selector in a list of several; this fixes it

no changeset because not released yet
2024-10-30 12:09:47 +01:00
Dominic Gannaway
435a9c1cd0
fix: ensure toStore subscription correctly syncs latest value (#14015)
* fix: ensure toStore subscription correctly syncs latest value

* Update packages/svelte/src/store/index-client.js

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
2024-10-30 11:02:18 +00:00
Simon H
0106204982
fix: minify inject CSS in prod mode (#14006)
When CSS is externalized we rightfully rely on the following tooling chain to properly minify CSS. When we inject the CSS however, that tooling won't be able to do that, so we gotta do it ourselves.
This PR brings back most of that logic that existed in Svelte 4. Fixes #13716
2024-10-30 11:47:21 +01:00
Simon H
e487f61262
docs: mark deprecated options as such (#13989)
closes #13984
2024-10-30 11:33:32 +01:00
Simon H
2e9dab6a21
fix: more robust re-subscribe detection for fromStore (#13995)
Only count down after timeout, else we would reach 0 before our own render effect reruns, but reach 1 again when the tick callback of the prior teardown runs. That would mean we re-subcribe unnecessarily and create a memory leak because the old subscription is never cleaned up.
2024-10-30 11:31:59 +01:00
Simon H
cbc2ca36ce
fix: allow to pass in TS preference to migration (#13929)
First half of https://github.com/sveltejs/kit/issues/12880 - the idea is for the migration script to check for a tsconfig.json and then set it to `true` if one is found
2024-10-30 11:31:21 +01:00
Ben McCann
08bc37a374
fix: don't access requestAnimationFrame eagerly (#14026) 2024-10-30 09:23:49 +00:00
Simon H
b3437e6020
docs: note old site (#13996) 2024-10-29 23:27:56 +01:00
github-actions[bot]
4441952028
Version Packages (#13949)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-10-28 16:01:52 -07:00
Ben McCann
07219f1cbd
chore: update links that previously pointed to preview site (#14001) 2024-10-28 16:00:01 -07:00
Ben McCann
c93a645b68
docs: fix broken links (#13944) 2024-10-28 15:59:39 -07:00
Paolo Ricciuti
b6fccdb4f7
fix: properly migrate imports types prefixed with $ (#14007) 2024-10-28 23:17:02 +01:00
Dominic Gannaway
3876b302f3
fix: ensure effect_tracking correctly handles tracking reactions (#14005)
* fix: ensure effect_tracking correctly handles tracking reactions

* fix: ensure effect_tracking correctly handles tracking reactions
2024-10-28 22:03:59 +00:00
Rich Harris
777d059b10
docs: update heading level in 02-getting-started.md (#13997) 2024-10-28 10:28:21 -07:00
Richard Smith
e99e865291
docs: update links to point to new site (#13986)
Update (some) of the links pointing to the old preview site as mentioned in #13982.

This updates all the links in documentation/ and packages/svelte/messages, but doesn't touch others present in packages/svelte/ or fix the original link in that issue.
2024-10-28 13:05:24 +01:00
Tee Ming
430c2bb129
docs: use $effect.pre instead of beforeUpdate (#13955)
* Update 03-lifecycle-hooks.md

* Update documentation/docs/06-runtime/03-lifecycle-hooks.md

Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>

---------

Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com>
2024-10-28 08:38:58 +01:00
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