Skip to content

Commit

Permalink
fix(svelte): update import statements and bump peer dependency for v5 (
Browse files Browse the repository at this point in the history
  • Loading branch information
mingjunlu committed Apr 2, 2024
1 parent f7d6254 commit 51112ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-spiders-listen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/svelte": minor
---

Bumps Svelte 5 peer dependency to `^5.0.0-next.90` and support its latest breaking changes
2 changes: 1 addition & 1 deletion packages/integrations/svelte/client-v5.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/svelte/server-v5.js
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 51112ab

Please sign in to comment.