0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

fix(svelte): update import statements and bump peer dependency for v5 (#10645)

This commit is contained in:
Ming-jun Lu 2024-04-02 21:58:39 +08:00 committed by GitHub
parent f7d6254f8f
commit 51112ab3f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
"@astrojs/svelte": minor
---
Bumps Svelte 5 peer dependency to `^5.0.0-next.90` and support its latest breaking changes

View file

@ -1,5 +1,5 @@
import { hydrate, mount, unmount } from 'svelte'; 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) // Allow a slot to be rendered as a snippet (dev validation only)
const tagSlotAsSnippet = import.meta.env.DEV ? add_snippet_symbol : (s) => s; const tagSlotAsSnippet = import.meta.env.DEV ? add_snippet_symbol : (s) => s;

View file

@ -53,7 +53,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"astro": "^4.0.0", "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" "typescript": "^5.3.3"
}, },
"engines": { "engines": {

View file

@ -1,4 +1,4 @@
import { add_snippet_symbol } from 'svelte/internal'; import { add_snippet_symbol } from 'svelte/internal/server';
import { render } from 'svelte/server'; import { render } from 'svelte/server';
// Allow a slot to be rendered as a snippet (dev validation only) // Allow a slot to be rendered as a snippet (dev validation only)