Repository navigation
fix: print a space before the catch binding in {#await ... catch x} - #18645
Merged
dummdidumm merged 3 commits intoAug 19, 2026
Merged
Conversation
The AwaitBlock printer gated the space after `catch` on `node.value`,
which is the then binding, rather than `node.error`. With no then
clause `node.value` is null, so `{#await promise catch error}` printed
as `{#await promise catcherror}`, which no longer parses. The same line
also broke `{:then}` followed by `{:catch error}`, printing `{:catcherror}`.
|
Install the latest version of pnpm add https://pkg.svelte.dev/svelte/c/44fa982be27d4abdf0575d1ac684dc5a6db183a8Open in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
🦋 Changeset detectedLatest commit: 44fa982 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
dummdidumm
reviewed
Aug 19, 2026
Merged
Rich-Harris
pushed a commit
that referenced
this pull request
Aug 20, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## svelte@5.56.10 ### Patch Changes - fix: preserve CSS escape sequences when printing selectors ([#18667](#18667)) - fix: parse `:nth-child(2n of.foo)` where `of` is not followed by whitespace ([#18611](#18611)) - fix: transform expressions inside labeled statements during server compilation ([#18617](#18617)) - docs: clarify that context lookup includes the current component and all ancestors ([#18581](#18581)) - fix: apply CSS custom properties with falsy values on components ([#18634](#18634)) - fix: correctly print `{#await ... catch x}` et al ([#18645](#18645)) - fix: ignore comments of Program node during migration script ([#18656](#18656)) - fix: reliably resolve append_style to its correct root ([#18614](#18614)) - fix: clean up removed capture event handlers from spread attributes ([#18618](#18618)) - fix: don't corrupt renderer type during SSR's legacy `bind:` retry loop ([#18616](#18616)) - fix: treat concise arrow function bodies as implicit returns when calculating blockers ([#18613](#18613)) - fix: give effect teardowns the value from before the first write in a flush ([#18620](#18620)) - fix: avoid double-calling a derived reference when destructuring `$derived` of another `$derived` during server-side rendering ([#18668](#18668)) - fix: preserve namespaces in CSS type selectors ([#18678](#18678)) - fix: increment private state fields through a non-`this` receiver ([#18622](#18622)) - chore: deduplicate client and server context helpers ([#18580](#18580)) - fix: release `last_propagated_event` after event propagation settles so it no longer retains the last event's target subtree ([#18569](#18569)) - fix: allow custom elements to receive async values as props ([#18661](#18661)) - fix: strip comments from inline `style` values in linear time ([#18553](#18553)) - fix: prevent declaration comments from breaking server derived references ([#18641](#18641)) - perf: make async blocker analysis scale linearly with the number of top-level references ([#18549](#18549)) - fix: preserve short-circuiting for logical assignments to private state fields ([#18594](#18594)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
dadezzz
pushed a commit
to dadezzz/events-cash-register
that referenced
this pull request
Aug 25, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [svelte](https://svelte.dev) ([source](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte)) | [`5.56.9` → `5.56.10`](https://renovatebot.com/diffs/npm/svelte/5.56.9/5.56.10) |  |  | --- ### Release Notes <details> <summary>sveltejs/svelte (svelte)</summary> ### [`v5.56.10`](https://github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#55610) [Compare Source](https://github.com/sveltejs/svelte/compare/svelte@5.56.9...svelte@5.56.10) ##### Patch Changes - fix: preserve CSS escape sequences when printing selectors ([#​18667](sveltejs/svelte#18667)) - fix: parse `:nth-child(2n of.foo)` where `of` is not followed by whitespace ([#​18611](sveltejs/svelte#18611)) - fix: transform expressions inside labeled statements during server compilation ([#​18617](sveltejs/svelte#18617)) - docs: clarify that context lookup includes the current component and all ancestors ([#​18581](sveltejs/svelte#18581)) - fix: apply CSS custom properties with falsy values on components ([#​18634](sveltejs/svelte#18634)) - fix: correctly print `{#await ... catch x}` et al ([#​18645](sveltejs/svelte#18645)) - fix: ignore comments of Program node during migration script ([#​18656](sveltejs/svelte#18656)) - fix: reliably resolve append\_style to its correct root ([#​18614](sveltejs/svelte#18614)) - fix: clean up removed capture event handlers from spread attributes ([#​18618](sveltejs/svelte#18618)) - fix: don't corrupt renderer type during SSR's legacy `bind:` retry loop ([#​18616](sveltejs/svelte#18616)) - fix: treat concise arrow function bodies as implicit returns when calculating blockers ([#​18613](sveltejs/svelte#18613)) - fix: give effect teardowns the value from before the first write in a flush ([#​18620](sveltejs/svelte#18620)) - fix: avoid double-calling a derived reference when destructuring `$derived` of another `$derived` during server-side rendering ([#​18668](sveltejs/svelte#18668)) - fix: preserve namespaces in CSS type selectors ([#​18678](sveltejs/svelte#18678)) - fix: increment private state fields through a non-`this` receiver ([#​18622](sveltejs/svelte#18622)) - chore: deduplicate client and server context helpers ([#​18580](sveltejs/svelte#18580)) - fix: release `last_propagated_event` after event propagation settles so it no longer retains the last event's target subtree ([#​18569](sveltejs/svelte#18569)) - fix: allow custom elements to receive async values as props ([#​18661](sveltejs/svelte#18661)) - fix: strip comments from inline `style` values in linear time ([#​18553](sveltejs/svelte#18553)) - fix: prevent declaration comments from breaking server derived references ([#​18641](sveltejs/svelte#18641)) - perf: make async blocker analysis scale linearly with the number of top-level references ([#​18549](sveltejs/svelte#18549)) - fix: preserve short-circuiting for logical assignments to private state fields ([#​18594](sveltejs/svelte#18594)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4zMS4wIiwidXBkYXRlZEluVmVyIjoiNDQuMzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
renovate Bot
added a commit
to cigaleapp/cigale
that referenced
this pull request
Aug 30, 2026
##### [v5.56.10](https://github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#55610) ##### Patch Changes - fix: preserve CSS escape sequences when printing selectors ([#18667](sveltejs/svelte#18667)) - fix: parse `:nth-child(2n of.foo)` where `of` is not followed by whitespace ([#18611](sveltejs/svelte#18611)) - fix: transform expressions inside labeled statements during server compilation ([#18617](sveltejs/svelte#18617)) - docs: clarify that context lookup includes the current component and all ancestors ([#18581](sveltejs/svelte#18581)) - fix: apply CSS custom properties with falsy values on components ([#18634](sveltejs/svelte#18634)) - fix: correctly print `{#await ... catch x}` et al ([#18645](sveltejs/svelte#18645)) - fix: ignore comments of Program node during migration script ([#18656](sveltejs/svelte#18656)) - fix: reliably resolve append\_style to its correct root ([#18614](sveltejs/svelte#18614)) - fix: clean up removed capture event handlers from spread attributes ([#18618](sveltejs/svelte#18618)) - fix: don't corrupt renderer type during SSR's legacy `bind:` retry loop ([#18616](sveltejs/svelte#18616)) - fix: treat concise arrow function bodies as implicit returns when calculating blockers ([#18613](sveltejs/svelte#18613)) - fix: give effect teardowns the value from before the first write in a flush ([#18620](sveltejs/svelte#18620)) - fix: avoid double-calling a derived reference when destructuring `$derived` of another `$derived` during server-side rendering ([#18668](sveltejs/svelte#18668)) - fix: preserve namespaces in CSS type selectors ([#18678](sveltejs/svelte#18678)) - fix: increment private state fields through a non-`this` receiver ([#18622](sveltejs/svelte#18622)) - chore: deduplicate client and server context helpers ([#18580](sveltejs/svelte#18580)) - fix: release `last_propagated_event` after event propagation settles so it no longer retains the last event's target subtree ([#18569](sveltejs/svelte#18569)) - fix: allow custom elements to receive async values as props ([#18661](sveltejs/svelte#18661)) - fix: strip comments from inline `style` values in linear time ([#18553](sveltejs/svelte#18553)) - fix: prevent declaration comments from breaking server derived references ([#18641](sveltejs/svelte#18641)) - perf: make async blocker analysis scale linearly with the number of top-level references ([#18549](sveltejs/svelte#18549)) - fix: preserve short-circuiting for logical assignments to private state fields ([#18594](sveltejs/svelte#18594))
renovate Bot
added a commit
to cigaleapp/cigale
that referenced
this pull request
Aug 30, 2026
##### [v5.56.10](https://github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#55610) ##### Patch Changes - fix: preserve CSS escape sequences when printing selectors ([#18667](sveltejs/svelte#18667)) - fix: parse `:nth-child(2n of.foo)` where `of` is not followed by whitespace ([#18611](sveltejs/svelte#18611)) - fix: transform expressions inside labeled statements during server compilation ([#18617](sveltejs/svelte#18617)) - docs: clarify that context lookup includes the current component and all ancestors ([#18581](sveltejs/svelte#18581)) - fix: apply CSS custom properties with falsy values on components ([#18634](sveltejs/svelte#18634)) - fix: correctly print `{#await ... catch x}` et al ([#18645](sveltejs/svelte#18645)) - fix: ignore comments of Program node during migration script ([#18656](sveltejs/svelte#18656)) - fix: reliably resolve append\_style to its correct root ([#18614](sveltejs/svelte#18614)) - fix: clean up removed capture event handlers from spread attributes ([#18618](sveltejs/svelte#18618)) - fix: don't corrupt renderer type during SSR's legacy `bind:` retry loop ([#18616](sveltejs/svelte#18616)) - fix: treat concise arrow function bodies as implicit returns when calculating blockers ([#18613](sveltejs/svelte#18613)) - fix: give effect teardowns the value from before the first write in a flush ([#18620](sveltejs/svelte#18620)) - fix: avoid double-calling a derived reference when destructuring `$derived` of another `$derived` during server-side rendering ([#18668](sveltejs/svelte#18668)) - fix: preserve namespaces in CSS type selectors ([#18678](sveltejs/svelte#18678)) - fix: increment private state fields through a non-`this` receiver ([#18622](sveltejs/svelte#18622)) - chore: deduplicate client and server context helpers ([#18580](sveltejs/svelte#18580)) - fix: release `last_propagated_event` after event propagation settles so it no longer retains the last event's target subtree ([#18569](sveltejs/svelte#18569)) - fix: allow custom elements to receive async values as props ([#18661](sveltejs/svelte#18661)) - fix: strip comments from inline `style` values in linear time ([#18553](sveltejs/svelte#18553)) - fix: prevent declaration comments from breaking server derived references ([#18641](sveltejs/svelte#18641)) - perf: make async blocker analysis scale linearly with the number of top-level references ([#18549](sveltejs/svelte#18549)) - fix: preserve short-circuiting for logical assignments to private state fields ([#18594](sveltejs/svelte#18594))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
print()emits unparseable output for the shorthand{#await ... catch x}form. Round-tripping the example straight out of the await docs:The catch clause gates its trailing space on
node.value— the then binding — instead ofnode.error:if (node.catch) { - context.write(node.value ? 'catch ' : 'catch'); + context.write(node.error ? 'catch ' : 'catch'); if (node.error) context.visit(node.error);The
thenclause immediately above is correct (node.value ? 'then ' : 'then', paired withcontext.visit(node.value)), so this looks like it was copied down without swapping the property.It also affects the long form whenever
{:then}has no binding, sincenode.valueis null there too:{#await p}{:then v}{:catch e}round-trips today only incidentally, becausenode.valuehappens to be truthy.node.errorappears exactly once in the printer, and there are only two space-gating ternaries of this shape — line 692 (then, correct) and this one — so this is the whole class.Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.tests/print/samples/await-block-shorthand. Onmainit fails withexpected '{#await promise catcherror}…' to deeply equal '{#await promise catch error}…'. The sample also covers{:catch}and{#await p then v}with no binding, which must keep emitting a barecatch/then— so the fix can't over-correct.packages/svelte/src, add a changeset (npx changeset).Tests and linting
pnpm testand lint the project withpnpm lintpnpm test: 33 files, 7687 passed, 69 skipped, 0 failed.pnpm lint: eslint clean, prettier clean.