From bcd6bf23f8131ca1613fd8b0a1701d7961b9df87 Mon Sep 17 00:00:00 2001 From: Ming-jun Lu <40516784+mingjunlu@users.noreply.github.com> Date: Tue, 2 Apr 2024 20:46:39 +0800 Subject: [PATCH 1/3] fix(svelte): update import statements for v5 --- packages/integrations/svelte/client-v5.js | 2 +- packages/integrations/svelte/server-v5.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/integrations/svelte/client-v5.js b/packages/integrations/svelte/client-v5.js index 819363d5e0f1..755a6aa5381e 100644 --- a/packages/integrations/svelte/client-v5.js +++ b/packages/integrations/svelte/client-v5.js @@ -1,5 +1,5 @@ import { hydrate, mount, unmount } from 'svelte'; -import { add_snippet_symbol } from 'svelte/internal'; +import { add_snippet_symbol } from 'svelte/internal/client'; // Allow a slot to be rendered as a snippet (dev validation only) const tagSlotAsSnippet = import.meta.env.DEV ? add_snippet_symbol : (s) => s; diff --git a/packages/integrations/svelte/server-v5.js b/packages/integrations/svelte/server-v5.js index b4ef33824d96..04a24eff2474 100644 --- a/packages/integrations/svelte/server-v5.js +++ b/packages/integrations/svelte/server-v5.js @@ -1,4 +1,4 @@ -import { add_snippet_symbol } from 'svelte/internal'; +import { add_snippet_symbol } from 'svelte/internal/server'; import { render } from 'svelte/server'; // Allow a slot to be rendered as a snippet (dev validation only) From b84abcfad57435729ec26da5ff41b237362d2dc0 Mon Sep 17 00:00:00 2001 From: Ming-jun Lu <40516784+mingjunlu@users.noreply.github.com> Date: Tue, 2 Apr 2024 20:47:59 +0800 Subject: [PATCH 2/3] chore(svelte): bump peer dependency `svelte` to `5.0.0-next.90` --- packages/integrations/svelte/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index eef0b04fffd4..ce2f2f40108c 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -53,7 +53,7 @@ }, "peerDependencies": { "astro": "^4.0.0", - "svelte": "^4.0.0 || ^5.0.0-next.56", + "svelte": "^4.0.0 || ^5.0.0-next.90", "typescript": "^5.3.3" }, "engines": { From be367f8a56a35ec68363d1ec9b881a5e4cbdb463 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 2 Apr 2024 21:57:48 +0800 Subject: [PATCH 3/3] Create calm-spiders-listen.md --- .changeset/calm-spiders-listen.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/calm-spiders-listen.md diff --git a/.changeset/calm-spiders-listen.md b/.changeset/calm-spiders-listen.md new file mode 100644 index 000000000000..3503c5010314 --- /dev/null +++ b/.changeset/calm-spiders-listen.md @@ -0,0 +1,5 @@ +--- +"@astrojs/svelte": minor +--- + +Bumps Svelte 5 peer dependency to `^5.0.0-next.90` and support its latest breaking changes