Skip to content

Commit 9b01074

Browse files
committed
Merge branch 'main' into destructure-signal-await
2 parents 4b91b50 + 877ff1e commit 9b01074

File tree

113 files changed

+4554
-221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+4554
-221
lines changed

.changeset/bright-peas-juggle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
A transition's parameters are now evaluated when the transition is initialized.

.changeset/curvy-ties-shout.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: deeply unstate objects passed to inspect

.changeset/dirty-bats-punch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: handle delegated events of elements moved outside the container

.changeset/dry-clocks-grow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
feat: add `$state.frozen` rune

.changeset/hip-balloons-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: improve script `lang` attribute detection

.changeset/itchy-kings-deliver.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
Fix issue with assigning prop values as defaults of other props

.changeset/light-humans-hang.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: support TypeScript's `satisfies` operator

.changeset/long-buckets-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
Fix interopability between backticks and templates

.changeset/nasty-lions-double.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: improve pseudo class parsing

.changeset/old-houses-drum.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: provide `unstate` in server environment

.changeset/orange-dingos-poke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: add types for popover attributes and events

.changeset/pre.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"beige-flies-wash",
1414
"beige-rabbits-shave",
1515
"brave-walls-destroy",
16+
"bright-peas-juggle",
1617
"brown-spoons-boil",
1718
"chatty-cups-drop",
1819
"chatty-taxis-juggle",
@@ -24,8 +25,11 @@
2425
"cool-ants-leave",
2526
"cuddly-pianos-drop",
2627
"curly-lizards-dream",
28+
"curvy-ties-shout",
29+
"dirty-bats-punch",
2730
"dirty-garlics-design",
2831
"dirty-tips-add",
32+
"dry-clocks-grow",
2933
"dull-mangos-wave",
3034
"early-ads-tie",
3135
"eight-steaks-shout",
@@ -52,10 +56,12 @@
5256
"happy-suits-film",
5357
"healthy-planes-vanish",
5458
"heavy-ears-rule",
59+
"hip-balloons-begin",
5560
"honest-icons-change",
5661
"hungry-dots-fry",
5762
"hungry-tips-unite",
5863
"itchy-beans-melt",
64+
"itchy-kings-deliver",
5965
"itchy-lions-wash",
6066
"khaki-mails-draw",
6167
"khaki-moose-arrive",
@@ -69,13 +75,15 @@
6975
"lazy-spiders-think",
7076
"lemon-geese-drum",
7177
"light-pens-watch",
78+
"long-buckets-lay",
7279
"long-crews-return",
7380
"lovely-carpets-lick",
7481
"lovely-items-turn",
7582
"lovely-rules-eat",
7683
"lucky-schools-hang",
7784
"moody-frogs-exist",
7885
"moody-owls-cry",
86+
"nasty-lions-double",
7987
"neat-dingos-clap",
8088
"new-boats-wait",
8189
"ninety-dingos-walk",
@@ -84,12 +92,14 @@
8492
"odd-shoes-cheat",
8593
"old-flies-jog",
8694
"old-mails-sneeze",
95+
"orange-dingos-poke",
8796
"polite-dolphins-care",
8897
"polite-pumpkins-guess",
8998
"polite-ravens-study",
9099
"poor-eggs-enjoy",
91100
"poor-seahorses-flash",
92101
"popular-mangos-rest",
102+
"pretty-ties-help",
93103
"purple-dragons-peel",
94104
"quiet-camels-mate",
95105
"rare-pears-whisper",
@@ -111,6 +121,7 @@
111121
"slow-chefs-dream",
112122
"small-papayas-laugh",
113123
"smart-parents-swim",
124+
"smart-zebras-pay",
114125
"soft-clocks-remember",
115126
"soft-geese-learn",
116127
"sour-forks-stare",
@@ -120,10 +131,12 @@
120131
"strong-gifts-smoke",
121132
"strong-lemons-provide",
122133
"sweet-mangos-beg",
134+
"sweet-pens-sniff",
123135
"swift-donkeys-perform",
124136
"swift-ravens-hunt",
125137
"swift-seahorses-deliver",
126138
"tall-books-grin",
139+
"tall-garlics-try",
127140
"tall-shrimps-worry",
128141
"tall-tigers-wait",
129142
"tasty-numbers-perform",
@@ -135,12 +148,14 @@
135148
"thirty-ghosts-fix",
136149
"thirty-impalas-repair",
137150
"thirty-wombats-relax",
151+
"three-suits-grin",
138152
"tiny-kings-whisper",
139153
"twelve-dragons-join",
140154
"twelve-onions-juggle",
141155
"two-dragons-yell",
142156
"two-falcons-buy",
143157
"unlucky-boxes-obey",
158+
"unlucky-trees-lick",
144159
"wet-games-fly",
145160
"wicked-clouds-exercise",
146161
"wicked-doors-train",

.changeset/pretty-ties-help.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: skip generating $.proxy() calls for unary and binary expressions

.changeset/smart-zebras-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: support hydrating around `<noscript>`

.changeset/sweet-pens-sniff.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: allow pseudo classes after `:global(..)`

.changeset/tall-garlics-try.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: bail-out event handler referencing each index

.changeset/three-suits-grin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: parse `:nth-of-type(xn+y)` correctly

.changeset/unlucky-trees-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: ensure if block is executed in correct order

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,11 @@ jobs:
5050
with:
5151
node-version: 18
5252
cache: pnpm
53-
- run: 'pnpm i && pnpm check && pnpm lint'
53+
- name: install
54+
run: pnpm install --frozen-lockfile
55+
- name: type check
56+
run: pnpm check
57+
- name: lint
58+
run: pnpm lint
59+
- name: build and check generated types
60+
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally and commit the changes after you have reviewed them"; git diff; exit 1); }

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ jobs:
2828
node-version: 18.x
2929
cache: pnpm
3030

31-
- run: pnpm install --frozen-lockfile
31+
- name: Install
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Build
35+
run: pnpm build && { [ "`git status --porcelain=v1`" == "" ] || (echo "Generated types have changed — please regenerate types locally and commit the changes after you have reviewed them"; git diff; exit 1); }
3236

3337
- name: Create Release Pull Request or Publish to npm
3438
id: changesets

CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ To typecheck the codebase, run `pnpm check` inside `packages/svelte`. To typeche
133133
- `snake_case` for internal variable names and methods.
134134
- `camelCase` for public variable names and methods.
135135

136+
### Generating types
137+
138+
Types are auto-generated from the source, but the result is checked in to ensure no accidental changes slip through. Run `pnpm generate:types` to regenerate the types.
139+
136140
### Sending your pull request
137141

138142
Please make sure the following is done when submitting a pull request:
@@ -141,7 +145,7 @@ Please make sure the following is done when submitting a pull request:
141145
1. Make sure your code lints (`pnpm lint`).
142146
1. Make sure your tests pass (`pnpm test`).
143147

144-
All pull requests should be opened against the `main` branch. Make sure the PR does only one thing, otherwise please split it.
148+
All pull requests should be opened against the `main` branch. Make sure the PR does only one thing, otherwise please split it. If this change should contribute to a version bump, run `npx changeset` at the root of the repository after a code change and select the appropriate packages.
145149

146150
#### Breaking changes
147151

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016-23 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
1+
Copyright (c) 2016-24 [these people](https://github.com/sveltejs/svelte/graphs/contributors)
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

packages/svelte/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
/types
1+
/types/*.map
2+
/types/compiler
23
/compiler.cjs
34

45
/action.d.ts

packages/svelte/CHANGELOG.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# svelte
22

3+
## 5.0.0-next.28
4+
5+
### Patch Changes
6+
7+
- fix: deeply unstate objects passed to inspect ([#10056](https://github.com/sveltejs/svelte/pull/10056))
8+
9+
- fix: handle delegated events of elements moved outside the container ([#10060](https://github.com/sveltejs/svelte/pull/10060))
10+
11+
- fix: improve script `lang` attribute detection ([#10046](https://github.com/sveltejs/svelte/pull/10046))
12+
13+
- fix: improve pseudo class parsing ([#10055](https://github.com/sveltejs/svelte/pull/10055))
14+
15+
- fix: add types for popover attributes and events ([#10041](https://github.com/sveltejs/svelte/pull/10041))
16+
17+
- fix: skip generating $.proxy() calls for unary and binary expressions ([#9979](https://github.com/sveltejs/svelte/pull/9979))
18+
19+
- fix: allow pseudo classes after `:global(..)` ([#10055](https://github.com/sveltejs/svelte/pull/10055))
20+
21+
- fix: bail-out event handler referencing each index ([#10063](https://github.com/sveltejs/svelte/pull/10063))
22+
23+
- fix: parse `:nth-of-type(xn+y)` correctly ([#9970](https://github.com/sveltejs/svelte/pull/9970))
24+
25+
- fix: ensure if block is executed in correct order ([#10053](https://github.com/sveltejs/svelte/pull/10053))
26+
27+
## 5.0.0-next.27
28+
29+
### Patch Changes
30+
31+
- fix: evaluate transition parameters when the transition runs ([#9836](https://github.com/sveltejs/svelte/pull/9836))
32+
33+
- feat: add `$state.frozen` rune ([#9851](https://github.com/sveltejs/svelte/pull/9851))
34+
35+
- fix: correctly transform prop fallback values that use other props ([#9985](https://github.com/sveltejs/svelte/pull/9985))
36+
37+
- fix: escape template literal characters in text sequences ([#9973](https://github.com/sveltejs/svelte/pull/9973))
38+
39+
- fix: inject comment in place of `<noscript>` in client output ([#9953](https://github.com/sveltejs/svelte/pull/9953))
40+
341
## 5.0.0-next.26
442

543
### Patch Changes
@@ -132,7 +170,7 @@
132170

133171
### Patch Changes
134172

135-
- feat: proxied staet ([#9739](https://github.com/sveltejs/svelte/pull/9739))
173+
- feat: proxied state ([#9739](https://github.com/sveltejs/svelte/pull/9739))
136174

137175
- chore: more validation errors ([#9723](https://github.com/sveltejs/svelte/pull/9723))
138176

packages/svelte/elements.d.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export type WheelEventHandler<T extends EventTarget> = EventHandler<WheelEvent,
5959
export type AnimationEventHandler<T extends EventTarget> = EventHandler<AnimationEvent, T>;
6060
export type TransitionEventHandler<T extends EventTarget> = EventHandler<TransitionEvent, T>;
6161
export type MessageEventHandler<T extends EventTarget> = EventHandler<MessageEvent, T>;
62+
export type ToggleEventHandler<T extends EventTarget> = EventHandler<ToggleEvent, T>;
6263

6364
//
6465
// DOM Attributes
@@ -136,10 +137,13 @@ export interface DOMAttributes<T extends EventTarget> {
136137
onerror?: EventHandler | undefined | null; // also a Media Event
137138
onerrorcapture?: EventHandler | undefined | null; // also a Media Event
138139

139-
// Detail Events
140-
'on:toggle'?: EventHandler<Event, T> | undefined | null;
141-
ontoggle?: EventHandler<Event, T> | undefined | null;
142-
ontogglecapture?: EventHandler<Event, T> | undefined | null;
140+
// Popover Events
141+
'on:beforetoggle'?: ToggleEventHandler<T> | undefined | null;
142+
onbeforetoggle?: ToggleEventHandler<T> | undefined | null;
143+
onbeforetogglecapture?: ToggleEventHandler<T> | undefined | null;
144+
'on:toggle'?: ToggleEventHandler<T> | undefined | null;
145+
ontoggle?: ToggleEventHandler<T> | undefined | null;
146+
ontogglecapture?: ToggleEventHandler<T> | undefined | null;
143147

144148
// Keyboard Events
145149
'on:keydown'?: KeyboardEventHandler<T> | undefined | null;
@@ -727,6 +731,7 @@ export interface HTMLAttributes<T extends EventTarget> extends AriaAttributes, D
727731
title?: string | undefined | null;
728732
translate?: 'yes' | 'no' | '' | undefined | null;
729733
inert?: boolean | undefined | null;
734+
popover?: 'auto' | 'manual' | '' | undefined | null;
730735

731736
// Unknown
732737
radiogroup?: string | undefined | null; // <command>, <menuitem>
@@ -873,6 +878,8 @@ export interface HTMLButtonAttributes extends HTMLAttributes<HTMLButtonElement>
873878
name?: string | undefined | null;
874879
type?: 'submit' | 'reset' | 'button' | undefined | null;
875880
value?: string | string[] | number | undefined | null;
881+
popovertarget?: string | undefined | null;
882+
popovertargetaction?: 'toggle' | 'show' | 'hide' | undefined | null;
876883
}
877884

878885
export interface HTMLCanvasAttributes extends HTMLAttributes<HTMLCanvasElement> {
@@ -897,6 +904,10 @@ export interface HTMLDetailsAttributes extends HTMLAttributes<HTMLDetailsElement
897904
open?: boolean | undefined | null;
898905

899906
'bind:open'?: boolean | undefined | null;
907+
908+
'on:toggle'?: EventHandler<Event, HTMLDetailsElement> | undefined | null;
909+
ontoggle?: EventHandler<Event, HTMLDetailsElement> | undefined | null;
910+
ontogglecapture?: EventHandler<Event, HTMLDetailsElement> | undefined | null;
900911
}
901912

902913
export interface HTMLDelAttributes extends HTMLAttributes<HTMLModElement> {

0 commit comments

Comments
 (0)