0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-22 03:47:27 +01:00
Commit Graph

9613 Commits

Author SHA1 Message Date
Paolo Ricciuti
438de04fb2
fix: add migration task when there's a variable named that would conflict with a rune (#14216)
Closes #14215
2024-11-08 11:18:50 +01:00
Simon H
870745fc53
fix: handle sibling combinators within :has (#14213)
We didn't collect sibling elements of a given element to then check the `:has` selectors. This adds the logic for that. Fixes #14072
2024-11-08 10:53:43 +01:00
Paolo Ricciuti
53af138d58
fix: read index as a source in legacy keyed each block (#14208)
Fixes #14203
2024-11-07 21:18:45 +01:00
Paolo Ricciuti
ea0d80e195
fix: consider variables with synthetic store sub as state (#14195)
Fixes #14183
2024-11-07 15:33:02 +01:00
Simon H
1eed645919
fix: ensure explicit nesting selector is always applied (#14193)
Previously, we were applying an explicit nesting selector to the start of a relative selector chain only when starting the traversal. Prepending the selector is important because it ensures we traverse upwards to the parent rule when the current selectors all matched and there's still more to do. But we forgot to do the prepend for parent rules, which meant that if we were nested two levels deep, we would stop too early. This fix ensures we prepend in that case, too.

Fixes #14178
2024-11-07 15:30:06 +01:00
github-actions[bot]
d7caf0833c
Version Packages (#14184)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-07 09:00:26 +00:00
Dominic Gannaway
7eb4cb91d7
chore: ensure binding events are without context (#14194)
* chore: ensure binding events are without context

* doh
2024-11-07 08:58:37 +00:00
Rich Harris
5ce1159ec3
Update 03-typescript.md (#14197) 2024-11-06 20:54:04 -05:00
Paolo Ricciuti
44a833fafe
fix: restore active reaction if then block throws (#14191) 2024-11-06 17:51:09 +00:00
Dominic Gannaway
f1aeaf19e5
feat: adds legacy mode flag (#14180)
* feat: adds legacy mode flag

* feedback

* feedback and tweaks

* feedback and tweaks

* tweaks

* tweaks

* tweaks

* tweaks
2024-11-06 16:41:17 +00:00
Scott
26d109cb11
docs: SvelteHTMLElements can be used for creating component wrapper (#14162) 2024-11-06 17:32:12 +01:00
Simon H
9b2a8f15fb
fix: ignore as type expressions on property definitions (#14181)
fixes #14179
2024-11-06 16:48:27 +01:00
github-actions[bot]
c49949621b
Version Packages (#14167)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-06 08:01:05 -05:00
Simon H
aa23415179
fix: remove scoping for most :not selectors (#14177)
fixes #14168

This reverts the whole "selectors inside `:not` are scoped" logic. Scoping is done so that styles don't bleed. But within `:not`,everything is reversed, which means scoping the selectors now means they are more likely to bleed. That is the opposite of what we want to achieve, therefore we should just leave those selectors alone.

The exception are `:not` selectors with descendant selectors, as that means "look up the tree" and we need to scope all ancestor elements in that case.
2024-11-06 13:49:37 +01:00
Rich Harris
d03337707f empty commit to trigger docs workflow 2024-11-05 14:48:58 -05:00
Rich Harris
8c549f78bc empty commit to trigger docs workflow 2024-11-05 14:31:24 -05:00
Caique Torres
5077061695
fix: issue with implicit public modifier causing undefined properties (#14153)
closes #14152
2024-11-05 20:29:38 +01:00
github-actions[bot]
ecc9b97a5b
Version Packages (#14097)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-05 13:54:18 -05:00
Rich Harris
927319c139
fix: update links in JSDoc (#14165) 2024-11-05 13:51:50 -05:00
Paolo Ricciuti
e786729555
fix: find the right sha for logging (#14159) 2024-11-05 17:05:21 +01:00
Paolo Ricciuti
0c853208ce
fix: we are getting there...this should be it (#14158) 2024-11-05 15:46:01 +01:00
Paolo Ricciuti
16a40a8bce
fix: use both correct paths (#14157)
* fix: try to read from right folder

* fix: use both correct paths
2024-11-05 15:30:04 +01:00
Paolo Ricciuti
f1f4c29a99
fix: pkg.pr.new comment workflow (#14156)
* fix: `pkg.pr.new` comment workflow

* chore: remove path from initial workflow and add ls

* chore: add path back since it's mandatory
2024-11-05 15:03:23 +01:00
Paolo Ricciuti
0ce4b559f2
chore: add custom comment with link to playground for pkg.pr.new (#14151)
* chore: add custom comment with link to playground for `pkg.pr.new`

* chore: small updates to the script output

* chore: refine comment a bit, include multiple packages

* tweak comment

* chore: two steps workflow

* chore: update workflow

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-11-05 08:07:54 -05:00
Pig Fang
3d67cd53db
docs: fix migration guide typo (#14155) 2024-11-05 10:13:46 +01:00
Gonzalo Ruiz
e6dd871819
fix: ensure migrate keeps inline/trailing comments in $props type definition and produces non-broken code (#14143)
* feat[sv migrate]: keep inline/trailing comments when migrating export let types to type definition

* test: add tests for inline comment migration

* chore: add changeset

* fix: migrate trailing multiline comment parsing no longer results in broken code, FIXES PR #14143#issuecomment-2455702689

* test: add migrate test with same-line trailing multiline comments and same-line leading multiline comments

* chore: add changeset

* fix: lint

---------

Co-authored-by: Gonzalo Ruiz <rgon@rgon.es>
Co-authored-by: paoloricciuti <ricciutipaolo@gmail.com>
2024-11-04 23:31:36 +01:00
Simon H
7dbe812fc9
fix: ensure non-matching elements are scoped for :not(...) selector (#13999)
If the contents of a `:not` selector don't match, then it's actually a match for `:not` because it's inverted. Therefore, we need to scope such elements. We're also making sure that contents of `:not` that never match actually count as a used (because the result is negated), and as such the contents of `:not` that always match are actually marked as unused.

Fixes #13974
2024-11-04 22:49:54 +01:00
wackbyte
57e27ae90e
fix: only output the key for each_key_duplicate (#14147)
Fixes #14146
2024-11-04 22:19:53 +01:00
Christoph Sanz
87d83ffa39
Add same note as in tutorial to doc. (#14136)
Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-11-04 16:09:09 -05:00
Rich Harris
c6904e892f
use pull_request_target (#14148) 2024-11-04 15:08:15 -05:00
Simon H
8731f4f780
docs: note what the value of this can be on svelte:element (#14117)
closes #7575
2024-11-04 17:32:50 +01:00
Simon H
551284ca22
fix: correctly infer <a> tag namespace (#14134)
`<a>` tags are valid in both the SVG and HTML namespace.  If there's no parent, we therefore have to look downwards to see if it's the parent of a SVG or HTML element.

fixes #7807
fixes #13793
2024-11-03 15:04:52 +01:00
Paolo Ricciuti
8de5605b6a
fix: prevent migrated snippet from shadow snippet prop (#14127) 2024-11-03 14:36:11 +01:00
Paolo Ricciuti
74a2c6b580
fix: migrate multiple declarations with only some exported correctly (#14126) 2024-11-03 14:31:54 +01:00
Simon H
a952860232
docs: more docs on TS types (#14065)
* docs: more docs on TS types

and a few related changes/enhancements
closes #13940

* Apply suggestions from code review

* adjust

* Apply suggestions from code review

* Update documentation/docs/07-misc/03-typescript.md

* Update documentation/docs/07-misc/03-typescript.md

* Update documentation/docs/07-misc/03-typescript.md

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-11-02 22:24:10 -04:00
Simon H
00f5b14d40
docs: fix description (#14109)
Since Svelte 5, comments are also preserved on the client
2024-11-02 22:23:32 -04:00
Rich Harris
4038b0cad6
chore: setup docs previews (#14128)
* chore: setup docs previews

* test

* delete
2024-11-02 22:19:48 -04:00
Tim Deschryver
8d0937a534
docs: fix compilation error (#14121) 2024-11-02 20:09:23 +01:00
Ahmad S.
304d88edd0
docs: fix $effect section examples (#13911)
closes #13912
2024-11-01 21:09:00 +01:00
Simon H
4ec9986cba
fix: check options namespace for top level svelte:elements (#14101)
We were checking it for nested elements, but not root elements

fixes #13875
2024-11-01 19:09:27 +01:00
Rich Harris
96c299afc6
differentiate between 'effect' and $effect (#14105) 2024-11-01 13:48:29 -04:00
Rich Harris
82b87b361e
docs: fix syntax error (#14106) 2024-11-01 12:48:04 -04:00
Simon H
aac4cbd1f1
docs: note browser condition earlier (#14096)
* docs: note browser condition earlier

The browser condition is also necessary to test runes, so it makes sense to add it to the first occurence to the vite config. Also add a note about more fine-grained alias conditions.

Closes #13961

* Update documentation/docs/07-misc/02-testing.md

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
2024-11-01 12:21:36 -04:00
Dominic Gannaway
9883e7078c
fix: ensure SvelteMap and SvelteSet work with generators in dev (#14103)
* fix: ensure SvelteMap and SvelteSet work with generators in dev

* add test

* better fix

* better fix

* better fix

* better fix
2024-11-01 16:08:45 +00:00
Conduitry
535ea44b9d
chore: replace non-breaking spaces (#14098)
* replace nbsp in docs

* replace nbsp in test

* replace nbsp in types

* regenerate types
2024-11-01 12:08:04 -04:00
Simon H
e7d68d8c10
fix: pass along anchor in legacy class wrappers (#14100)
fixes #13832
2024-11-01 14:22:24 +01:00
Dominic Gannaway
a315a14939
fix: ensure video elements autoplay in safari (#14095) 2024-11-01 12:52:32 +00:00
Simon H
7d11fa8da2
fix: recognize all custom element prop definitions (#14084)
We didn't account for the `$props` rune being writtin in a way that makes some props unknown, and they would only be visible through the `customElement.props` definition. This changes the iteration to account for that and also adds a note to the documentation that you need to list out the properties explicitly.

fixes #13785
2024-11-01 13:19:52 +01:00
Rich Harris
6a2c28c590
docs: tweak untrack description, provide an example of usage (#14085)
* docs: tweak untrack description, provide an example of usage

* link to untrack

* add derived docs too
2024-11-01 08:49:52 +01:00
Conduitry
2ab70041fd
chore: mark markdown output from process-messages as generated (#13913)
* chore: mark markdown output from process-messages as generated

* regenerate
2024-10-31 22:44:39 -04:00