From 70afafe18e48a9973c5f711d62d87d088234655e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 17:55:34 -0400 Subject: [PATCH 1/2] Version Packages (#18315) 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.0 ### Minor Changes - feat: allow declarations in the template ([#18282](https://github.com/sveltejs/svelte/pull/18282)) ### Patch Changes - perf: use `createElement` instead of `createElementNS` for HTML elements ([#18262](https://github.com/sveltejs/svelte/pull/18262)) - perf: store `current_sources` as a `Set` for O(1) membership checks ([#18278](https://github.com/sveltejs/svelte/pull/18278)) - perf: deduplicate identical hoisted templates within a component ([#18320](https://github.com/sveltejs/svelte/pull/18320)) - perf: hoist `rest_props` exclude list as a module-scope `Set` ([#18252](https://github.com/sveltejs/svelte/pull/18252)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/create-element-fast-path.md | 5 ----- .changeset/current-sources-set.md | 5 ----- .changeset/dedupe-hoisted-templates.md | 5 ----- .changeset/four-loops-agree.md | 5 ----- .changeset/hoist-rest-excludes.md | 5 ----- packages/svelte/CHANGELOG.md | 16 ++++++++++++++++ packages/svelte/package.json | 2 +- packages/svelte/src/version.js | 2 +- 8 files changed, 18 insertions(+), 27 deletions(-) delete mode 100644 .changeset/create-element-fast-path.md delete mode 100644 .changeset/current-sources-set.md delete mode 100644 .changeset/dedupe-hoisted-templates.md delete mode 100644 .changeset/four-loops-agree.md delete mode 100644 .changeset/hoist-rest-excludes.md diff --git a/.changeset/create-element-fast-path.md b/.changeset/create-element-fast-path.md deleted file mode 100644 index 8b88a14163..0000000000 --- a/.changeset/create-element-fast-path.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'svelte': patch ---- - -perf: use `createElement` instead of `createElementNS` for HTML elements diff --git a/.changeset/current-sources-set.md b/.changeset/current-sources-set.md deleted file mode 100644 index e1a4dc43b2..0000000000 --- a/.changeset/current-sources-set.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'svelte': patch ---- - -perf: store `current_sources` as a `Set` for O(1) membership checks diff --git a/.changeset/dedupe-hoisted-templates.md b/.changeset/dedupe-hoisted-templates.md deleted file mode 100644 index a91882f525..0000000000 --- a/.changeset/dedupe-hoisted-templates.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'svelte': patch ---- - -perf: deduplicate identical hoisted templates within a component diff --git a/.changeset/four-loops-agree.md b/.changeset/four-loops-agree.md deleted file mode 100644 index 46d30e8464..0000000000 --- a/.changeset/four-loops-agree.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'svelte': minor ---- - -feat: allow declarations in the template diff --git a/.changeset/hoist-rest-excludes.md b/.changeset/hoist-rest-excludes.md deleted file mode 100644 index 52efb06092..0000000000 --- a/.changeset/hoist-rest-excludes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'svelte': patch ---- - -perf: hoist `rest_props` exclude list as a module-scope `Set` diff --git a/packages/svelte/CHANGELOG.md b/packages/svelte/CHANGELOG.md index ef40c5d159..57725580e7 100644 --- a/packages/svelte/CHANGELOG.md +++ b/packages/svelte/CHANGELOG.md @@ -1,5 +1,21 @@ # svelte +## 5.56.0 + +### Minor Changes + +- feat: allow declarations in the template ([#18282](https://github.com/sveltejs/svelte/pull/18282)) + +### Patch Changes + +- perf: use `createElement` instead of `createElementNS` for HTML elements ([#18262](https://github.com/sveltejs/svelte/pull/18262)) + +- perf: store `current_sources` as a `Set` for O(1) membership checks ([#18278](https://github.com/sveltejs/svelte/pull/18278)) + +- perf: deduplicate identical hoisted templates within a component ([#18320](https://github.com/sveltejs/svelte/pull/18320)) + +- perf: hoist `rest_props` exclude list as a module-scope `Set` ([#18252](https://github.com/sveltejs/svelte/pull/18252)) + ## 5.55.10 ### Patch Changes diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 713c7c04c0..6e51dd9a93 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.55.10", + "version": "5.56.0", "type": "module", "types": "./types/index.d.ts", "engines": { diff --git a/packages/svelte/src/version.js b/packages/svelte/src/version.js index 638534d369..1b080d134a 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.55.10'; +export const VERSION = '5.56.0'; export const PUBLIC_VERSION = '5'; From e027d8bf224256714778b4fff41a926177a457f9 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Fri, 29 May 2026 17:55:55 -0400 Subject: [PATCH 2/2] chore: annotate `each_array` return value (#18325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tiny self-mergeable change extracted from #18035 — just turns `each_array` from a `Derived` to a `Derived` --- packages/svelte/src/internal/client/dom/blocks/each.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/each.js b/packages/svelte/src/internal/client/dom/blocks/each.js index 5f8adee1b5..2df1d6ffa1 100644 --- a/packages/svelte/src/internal/client/dom/blocks/each.js +++ b/packages/svelte/src/internal/client/dom/blocks/each.js @@ -203,7 +203,9 @@ export function each(node, flags, get_collection, get_key, render_fn, fallback_f var each_array = derived_safe_equal(() => { var collection = get_collection(); - return is_array(collection) ? collection : collection == null ? [] : array_from(collection); + return /** @type {V[]} */ ( + is_array(collection) ? collection : collection == null ? [] : array_from(collection) + ); }); if (DEV) {