From d0dbe1a48013b9c405b518511f8330baf3a27bc9 Mon Sep 17 00:00:00 2001
From: Joe Schafer
Date: Thu, 16 Jul 2026 04:35:37 -0700
Subject: [PATCH 3/7] perf: skip quadratic blocker analysis when no top-level
await (#18548)
Skip function reference tracing in `calculate_blockers` when a component
has no top-level `await`.
Blockers only represent dependencies on top-level async statements.
Without a top-level `await`, no binding can have a blocker, so tracing
every top-level function cannot affect the generated output. In large
components with many functions and transitive assignments, that
unnecessary work can become quadratic.
---
.changeset/fast-cats-compile.md | 5 +++++
packages/svelte/src/compiler/phases/2-analyze/index.js | 4 ++++
2 files changed, 9 insertions(+)
create mode 100644 .changeset/fast-cats-compile.md
diff --git a/.changeset/fast-cats-compile.md b/.changeset/fast-cats-compile.md
new file mode 100644
index 0000000000..585ce0ed1d
--- /dev/null
+++ b/.changeset/fast-cats-compile.md
@@ -0,0 +1,5 @@
+---
+'svelte': patch
+---
+
+perf: skip unnecessary blocker analysis when compiling components without top-level await
diff --git a/packages/svelte/src/compiler/phases/2-analyze/index.js b/packages/svelte/src/compiler/phases/2-analyze/index.js
index ef20049697..67e9030188 100644
--- a/packages/svelte/src/compiler/phases/2-analyze/index.js
+++ b/packages/svelte/src/compiler/phases/2-analyze/index.js
@@ -1221,6 +1221,10 @@ function calculate_blockers(instance, analysis) {
}
}
+ // With no top-level await, no binding can have a blocker and function tracing
+ // cannot affect the output.
+ if (!awaited) return;
+
flush_sync_group();
for (const fn of functions) {
From 4a6a85b5f149cc96514ed3bf5e59083b9246d394 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Fri, 17 Jul 2026 00:21:52 +0200
Subject: [PATCH 4/7] Version Packages (#18552)
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.6
### Patch Changes
- perf: skip unnecessary blocker analysis when compiling components
without top-level await
([#18548](https://github.com/sveltejs/svelte/pull/18548))
- fix: rerun derived that had an abort controller on reconnection
([#18551](https://github.com/sveltejs/svelte/pull/18551))
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
.changeset/fast-cats-compile.md | 5 -----
.changeset/lucky-dolls-yell.md | 5 -----
packages/svelte/CHANGELOG.md | 8 ++++++++
packages/svelte/package.json | 2 +-
packages/svelte/src/version.js | 2 +-
5 files changed, 10 insertions(+), 12 deletions(-)
delete mode 100644 .changeset/fast-cats-compile.md
delete mode 100644 .changeset/lucky-dolls-yell.md
diff --git a/.changeset/fast-cats-compile.md b/.changeset/fast-cats-compile.md
deleted file mode 100644
index 585ce0ed1d..0000000000
--- a/.changeset/fast-cats-compile.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'svelte': patch
----
-
-perf: skip unnecessary blocker analysis when compiling components without top-level await
diff --git a/.changeset/lucky-dolls-yell.md b/.changeset/lucky-dolls-yell.md
deleted file mode 100644
index d158f376d1..0000000000
--- a/.changeset/lucky-dolls-yell.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'svelte': patch
----
-
-fix: rerun derived that had an abort controller on reconnection
diff --git a/packages/svelte/CHANGELOG.md b/packages/svelte/CHANGELOG.md
index d80da025c9..0f26b571d3 100644
--- a/packages/svelte/CHANGELOG.md
+++ b/packages/svelte/CHANGELOG.md
@@ -1,5 +1,13 @@
# svelte
+## 5.56.6
+
+### Patch Changes
+
+- perf: skip unnecessary blocker analysis when compiling components without top-level await ([#18548](https://github.com/sveltejs/svelte/pull/18548))
+
+- fix: rerun derived that had an abort controller on reconnection ([#18551](https://github.com/sveltejs/svelte/pull/18551))
+
## 5.56.5
### Patch Changes
diff --git a/packages/svelte/package.json b/packages/svelte/package.json
index a26a3e4a76..855ba92a8d 100644
--- a/packages/svelte/package.json
+++ b/packages/svelte/package.json
@@ -2,7 +2,7 @@
"name": "svelte",
"description": "Cybernetically enhanced web apps",
"license": "MIT",
- "version": "5.56.5",
+ "version": "5.56.6",
"type": "module",
"types": "./types/index.d.ts",
"engines": {
diff --git a/packages/svelte/src/version.js b/packages/svelte/src/version.js
index 80b38c225a..05d88ef904 100644
--- a/packages/svelte/src/version.js
+++ b/packages/svelte/src/version.js
@@ -4,5 +4,5 @@
* The current version, as set in package.json.
* @type {string}
*/
-export const VERSION = '5.56.5';
+export const VERSION = '5.56.6';
export const PUBLIC_VERSION = '5';
From b791cac54e2db43317f2bc6c8e41e694245c551e Mon Sep 17 00:00:00 2001
From: Manuel <30698007+manuel3108@users.noreply.github.com>
Date: Sat, 18 Jul 2026 14:47:30 +0200
Subject: [PATCH 5/7] chore: provide `indent` option for `print` (#18474)
Relevant for https://github.com/sveltejs/cli/pull/1138.
This is basically just an option from `esrap` that we pass through. That
will allow tools like `sv migrate` to provide a guessed indent based on
the other file contents and therefore allow us to produce way smaller
diffs. Since we are just passing an option, there is no need for a test
here.
Technically a `feat:` but i dont think this is relevant enough.
### Before submitting the PR, please make sure you do the following
- [x] It's really useful if your PR references an issue where it is
discussed ahead of time. In many cases, features are absent for a
reason. For large changes, please create an RFC:
https://github.com/sveltejs/rfcs
- [x] Prefix your PR title with `feat:`, `fix:`, `chore:`, or `docs:`.
- [x] This message body should clearly illustrate what problems it
solves.
- [ ] Ideally, include a test that fails without this PR but passes with
it.
- [x] If this PR changes code within `packages/svelte/src`, add a
changeset (`npx changeset`).
### Tests and linting
- [x] Run the tests with `pnpm test` and lint the project with `pnpm
lint`
---
.changeset/short-otters-find.md | 5 +++++
packages/svelte/src/compiler/print/index.js | 5 ++++-
packages/svelte/src/compiler/print/types.d.ts | 1 +
packages/svelte/types/index.d.ts | 1 +
4 files changed, 11 insertions(+), 1 deletion(-)
create mode 100644 .changeset/short-otters-find.md
diff --git a/.changeset/short-otters-find.md b/.changeset/short-otters-find.md
new file mode 100644
index 0000000000..57194653b6
--- /dev/null
+++ b/.changeset/short-otters-find.md
@@ -0,0 +1,5 @@
+---
+'svelte': patch
+---
+
+chore: provide `indent` option for `print`
diff --git a/packages/svelte/src/compiler/print/index.js b/packages/svelte/src/compiler/print/index.js
index fbd7e86f12..a5fbc96fc8 100644
--- a/packages/svelte/src/compiler/print/index.js
+++ b/packages/svelte/src/compiler/print/index.js
@@ -30,7 +30,10 @@ export function print(ast, options = undefined) {
}),
...svelte_visitors(comments),
...css_visitors
- })
+ }),
+ {
+ indent: options?.indent
+ }
);
}
diff --git a/packages/svelte/src/compiler/print/types.d.ts b/packages/svelte/src/compiler/print/types.d.ts
index d0ff909525..9eccebb6f3 100644
--- a/packages/svelte/src/compiler/print/types.d.ts
+++ b/packages/svelte/src/compiler/print/types.d.ts
@@ -4,4 +4,5 @@ import type ts from 'esrap/languages/ts';
export type Options = {
getLeadingComments?: NonNullable[0]>['getLeadingComments'] | undefined;
getTrailingComments?: NonNullable[0]>['getTrailingComments'] | undefined;
+ indent?: string; // default tab
};
diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts
index 5f41fabf60..d758022ae4 100644
--- a/packages/svelte/types/index.d.ts
+++ b/packages/svelte/types/index.d.ts
@@ -1854,6 +1854,7 @@ declare module 'svelte/compiler' {
type Options = {
getLeadingComments?: NonNullable[0]>['getLeadingComments'] | undefined;
getTrailingComments?: NonNullable[0]>['getTrailingComments'] | undefined;
+ indent?: string; // default tab
};
export {};
From d9e40d17cf751e22dbc3ec42b9cb50920e2d1229 Mon Sep 17 00:00:00 2001
From: Rich Harris
Date: Sat, 18 Jul 2026 21:00:02 -0400
Subject: [PATCH 6/7] docs: update link on hooks page (#18564)
this docs page updated recently and broke everything
---
documentation/docs/05-special-elements/01-svelte-boundary.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/documentation/docs/05-special-elements/01-svelte-boundary.md b/documentation/docs/05-special-elements/01-svelte-boundary.md
index e1ad00a50b..41ebee1564 100644
--- a/documentation/docs/05-special-elements/01-svelte-boundary.md
+++ b/documentation/docs/05-special-elements/01-svelte-boundary.md
@@ -109,7 +109,7 @@ By default, error boundaries have no effect on the server — if an error occurs
Since 5.51 you can control this behaviour for boundaries with a `failed` snippet, by calling [`render(...)`](imperative-component-api#render) with a `transformError` function.
-> [!NOTE] If you're using Svelte via a framework such as SvelteKit, you most likely don't have direct access to the `render(...)` call — the framework must configure `transformError` on your behalf. SvelteKit will add support for this in the near future, via the [`handleError`](../kit/hooks#Shared-hooks-handleError) hook.
+> [!NOTE] If you're using Svelte via a framework such as SvelteKit, you most likely don't have direct access to the `render(...)` call — the framework must configure `transformError` on your behalf. SvelteKit will add support for this in the near future, via the [`handleError`](../kit/hooks#handleError) hook.
The `transformError` function must return a JSON-stringifiable object which will be used to render the `failed` snippet. This object will be serialized and used to hydrate the snippet in the browser:
From b29d7002ecf9bc0036b18647c0b7677a7cb0a914 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 20 Jul 2026 15:23:49 -0400
Subject: [PATCH 7/7] Version Packages (#18560)
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.7
### Patch Changes
- chore: provide `indent` option for `print`
([#18474](https://github.com/sveltejs/svelte/pull/18474))
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
---
.changeset/short-otters-find.md | 5 -----
packages/svelte/CHANGELOG.md | 6 ++++++
packages/svelte/package.json | 2 +-
packages/svelte/src/version.js | 2 +-
4 files changed, 8 insertions(+), 7 deletions(-)
delete mode 100644 .changeset/short-otters-find.md
diff --git a/.changeset/short-otters-find.md b/.changeset/short-otters-find.md
deleted file mode 100644
index 57194653b6..0000000000
--- a/.changeset/short-otters-find.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-'svelte': patch
----
-
-chore: provide `indent` option for `print`
diff --git a/packages/svelte/CHANGELOG.md b/packages/svelte/CHANGELOG.md
index 0f26b571d3..a9b93f5341 100644
--- a/packages/svelte/CHANGELOG.md
+++ b/packages/svelte/CHANGELOG.md
@@ -1,5 +1,11 @@
# svelte
+## 5.56.7
+
+### Patch Changes
+
+- chore: provide `indent` option for `print` ([#18474](https://github.com/sveltejs/svelte/pull/18474))
+
## 5.56.6
### Patch Changes
diff --git a/packages/svelte/package.json b/packages/svelte/package.json
index 855ba92a8d..67f349be71 100644
--- a/packages/svelte/package.json
+++ b/packages/svelte/package.json
@@ -2,7 +2,7 @@
"name": "svelte",
"description": "Cybernetically enhanced web apps",
"license": "MIT",
- "version": "5.56.6",
+ "version": "5.56.7",
"type": "module",
"types": "./types/index.d.ts",
"engines": {
diff --git a/packages/svelte/src/version.js b/packages/svelte/src/version.js
index 05d88ef904..e9737ec13c 100644
--- a/packages/svelte/src/version.js
+++ b/packages/svelte/src/version.js
@@ -4,5 +4,5 @@
* The current version, as set in package.json.
* @type {string}
*/
-export const VERSION = '5.56.6';
+export const VERSION = '5.56.7';
export const PUBLIC_VERSION = '5';