Skip to content

Commit 2407d96

Browse files
authored
Merge branch 'main' into fix-pending-ssr
2 parents 74eeb08 + 4f653dd commit 2407d96

File tree

40 files changed

+332
-175
lines changed

40 files changed

+332
-175
lines changed

.changeset/clever-turtles-wink.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/poor-flies-serve.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 await in svelte:boundary without pending

.changeset/slow-nails-push.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: update `bind:checked` error message to clarify usage with radio inputs

documentation/docs/03-template-syntax/12-bind.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Since 5.6.0, if an `<input>` has a `defaultValue` and is part of a form, it will
9595
9696
## `<input bind:checked>`
9797

98-
Checkbox and radio inputs can be bound with `bind:checked`:
98+
Checkbox inputs can be bound with `bind:checked`:
9999

100100
```svelte
101101
<label>
@@ -117,6 +117,8 @@ Since 5.6.0, if an `<input>` has a `defaultChecked` attribute and is part of a f
117117
</form>
118118
```
119119

120+
> [!NOTE] Use `bind:group` for radio inputs instead of `bind:checked`.
121+
120122
## `<input bind:indeterminate>`
121123

122124
Checkboxes can be in an [indeterminate](https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/indeterminate) state, independently of whether they are checked or unchecked:

documentation/docs/03-template-syntax/19-await-expressions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,6 @@ If a `<svelte:boundary>` with a `pending` snippet is encountered during SSR, tha
139139

140140
As an experimental feature, the details of how `await` is handled (and related APIs like `$effect.pending()`) are subject to breaking changes outside of a semver major release, though we intend to keep such changes to a bare minimum.
141141

142-
Currently, server-side rendering is synchronous. If a `<svelte:boundary>` with a `pending` snippet is encountered during SSR, only the `pending` snippet will be rendered.
143-
144142
## Breaking changes
145143

146144
Effects run in a slightly different order when the `experimental.async` option is `true`. Specifically, _block_ effects like `{#if ...}` and `{#each ...}` now run before an `$effect.pre` or `beforeUpdate` in the same component, which means that in [very rare situations](/playground/untitled?#H4sIAAAAAAAAE22R3VLDIBCFX2WLvUhnTHsf0zre-Q7WmfwtFV2BgU1rJ5N3F0jaOuoVcPbw7VkYhK4_URTiGYkMnIyjDjLsFGO3EvdCKkIvipdB8NlGXxSCPt96snbtj0gctab2-J_eGs2oOWBE6VunLO_2es-EDKZ5x5ZhC0vPNWM2gHXGouNzAex6hHH1cPHil_Lsb95YT9VQX6KUAbS2DrNsBdsdDFHe8_XSYjH1SrhELTe3MLpsemajweiWVPuxHSbKNd-8eQTdE0EBf4OOaSg2hwNhhE_ABB_ulJzjj9FULvIcqgm5vnAqUB7wWFMfhuugQWkcAr8hVD-mq8D12kOep24J_IszToOXdveGDsuNnZwbJUNlXsKnhJdhUcTo42s41YpOSneikDV5HL8BktM6yRcCAAA=) it is possible to update a block that should no longer exist, but only if you update state inside an effect, [which you should avoid]($effect#When-not-to-use-$effect).

documentation/docs/98-reference/.generated/compile-warnings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Coding for the keyboard is important for users with physical disabilities who ca
8181
### a11y_consider_explicit_label
8282

8383
```
84-
Buttons and links should either contain text or have an `aria-label` or `aria-labelledby` attribute
84+
Buttons and links should either contain text or have an `aria-label`, `aria-labelledby` or `title` attribute
8585
```
8686

8787
### a11y_distracting_elements

packages/svelte/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# svelte
22

3+
## 5.39.7
4+
5+
### Patch Changes
6+
7+
- chore: simplify batch logic ([#16847](https://github.com/sveltejs/svelte/pull/16847))
8+
9+
- fix: rebase pending batches when other batches are committed ([#16866](https://github.com/sveltejs/svelte/pull/16866))
10+
11+
- fix: wrap async `children` in `$$renderer.async` ([#16862](https://github.com/sveltejs/svelte/pull/16862))
12+
13+
- fix: silence label warning for buttons and anchor tags with title attributes ([#16872](https://github.com/sveltejs/svelte/pull/16872))
14+
15+
- fix: coerce nullish `<title>` to empty string ([#16863](https://github.com/sveltejs/svelte/pull/16863))
16+
317
## 5.39.6
418

519
### Patch Changes

packages/svelte/messages/compile-warnings/a11y.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Coding for the keyboard is important for users with physical disabilities who ca
6666

6767
## a11y_consider_explicit_label
6868

69-
> Buttons and links should either contain text or have an `aria-label` or `aria-labelledby` attribute
69+
> Buttons and links should either contain text or have an `aria-label`, `aria-labelledby` or `title` attribute
7070
7171
## a11y_distracting_elements
7272

packages/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "svelte",
33
"description": "Cybernetically enhanced web apps",
44
"license": "MIT",
5-
"version": "5.39.6",
5+
"version": "5.39.7",
66
"type": "module",
77
"types": "./types/index.d.ts",
88
"engines": {

packages/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function BindDirective(node, context) {
3333
e.bind_invalid_target(
3434
node,
3535
node.name,
36-
property.valid_elements.map((valid_element) => `<${valid_element}>`).join(', ')
36+
property.valid_elements.map((valid_element) => `\`<${valid_element}>\``).join(', ')
3737
);
3838
}
3939

@@ -67,11 +67,15 @@ export function BindDirective(node, context) {
6767
}
6868
} else {
6969
if (node.name === 'checked' && type?.value[0].data !== 'checkbox') {
70-
e.bind_invalid_target(node, node.name, '<input type="checkbox">');
70+
e.bind_invalid_target(
71+
node,
72+
node.name,
73+
`\`<input type="checkbox">\`${type?.value[0].data === 'radio' ? ` — for \`<input type="radio">\`, use \`bind:group\`` : ''}`
74+
);
7175
}
7276

7377
if (node.name === 'files' && type?.value[0].data !== 'file') {
74-
e.bind_invalid_target(node, node.name, '<input type="file">');
78+
e.bind_invalid_target(node, node.name, '`<input type="file">`');
7579
}
7680
}
7781
}
@@ -94,7 +98,7 @@ export function BindDirective(node, context) {
9498
e.bind_invalid_target(
9599
node,
96100
node.name,
97-
`non-<svg> elements. Use 'clientWidth' for <svg> instead`
101+
`non-\`<svg>\` elements. Use \`bind:clientWidth\` for \`<svg>\` instead`
98102
);
99103
}
100104

0 commit comments

Comments
 (0)