0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

Merge branch 'main' into next

This commit is contained in:
bluwy 2024-11-15 19:37:28 +08:00
commit 671f50c7d3
85 changed files with 556 additions and 695 deletions

View file

@ -2,7 +2,6 @@ import path from 'node:path';
import { withCodSpeed } from '@codspeed/tinybench-plugin'; import { withCodSpeed } from '@codspeed/tinybench-plugin';
import { Bench } from 'tinybench'; import { Bench } from 'tinybench';
import { exec } from 'tinyexec'; import { exec } from 'tinyexec';
import { renderPages } from '../make-project/render-default.js';
import { astroBin } from './_util.js'; import { astroBin } from './_util.js';
export async function run({ memory: _memory, render, stress: _stress }) { export async function run({ memory: _memory, render, stress: _stress }) {
@ -10,40 +9,55 @@ export async function run({ memory: _memory, render, stress: _stress }) {
iterations: 10, iterations: 10,
}; };
const bench = process.env.CODSPEED ? withCodSpeed(new Bench(options)) : new Bench(options); const bench = process.env.CODSPEED ? withCodSpeed(new Bench(options)) : new Bench(options);
let app; await exec(astroBin, ['build'], {
bench.add( nodeOptions: {
'Rendering', cwd: render.root,
async () => { stdio: 'inherit',
console.info('Start task.');
const result = {};
for (const fileName of renderPages) {
const pathname = '/' + fileName.slice(0, -path.extname(fileName).length);
const request = new Request(new URL(pathname, 'http://exmpale.com'));
const response = await app.render(request);
const html = await response.text();
if (!result[pathname]) result[pathname] = [];
result[pathname].push(html);
}
console.info('Finish task.');
return result;
}, },
{ });
async beforeAll() {
// build for rendering
await exec(astroBin, ['build'], {
nodeOptions: {
cwd: render.root,
stdio: 'inherit',
},
});
const entry = new URL('./dist/server/entry.mjs', `file://${render.root}`); const entry = new URL('./dist/server/entry.mjs', `file://${render.root}`);
const { manifest, createApp } = await import(entry); const { manifest, createApp } = await import(entry);
app = createApp(manifest); const streamingApp = createApp(manifest, true);
app.manifest = manifest; const nonStreamingApp = createApp(manifest, false);
}, bench
}, .add('Rendering: streaming [true], .astro file', async () => {
); console.info('Start task.');
const request = new Request(new URL('http://exmpale.com/astro'));
await streamingApp.render(request);
console.info('Finish task.');
})
.add('Rendering: streaming [true], .md file', async () => {
console.info('Start task.');
const request = new Request(new URL('http://exmpale.com/md'));
await streamingApp.render(request);
console.info('Finish task.');
})
.add('Rendering: streaming [true], .mdx file', async () => {
console.info('Start task.');
const request = new Request(new URL('http://exmpale.com/mdx'));
await streamingApp.render(request);
console.info('Finish task.');
})
.add('Rendering: streaming [false], .astro file', async () => {
console.info('Start task.');
const request = new Request(new URL('http://exmpale.com/astro'));
await nonStreamingApp.render(request);
console.info('Finish task.');
})
.add('Rendering: streaming [false], .md file', async () => {
console.info('Start task.');
const request = new Request(new URL('http://exmpale.com/md'));
await nonStreamingApp.render(request);
console.info('Finish task.');
})
.add('Rendering: streaming [false], .mdx file', async () => {
console.info('Start task.');
const request = new Request(new URL('http://exmpale.com/mdx'));
await nonStreamingApp.render(request);
console.info('Finish task.');
});
await bench.run(); await bench.run();
console.table(bench.table()); console.table(bench.table());

View file

@ -7,11 +7,9 @@ applyPolyfills();
class MyApp extends App { class MyApp extends App {
#manifest: SSRManifest | undefined; #manifest: SSRManifest | undefined;
#streaming: boolean;
constructor(manifest: SSRManifest, streaming = false) { constructor(manifest: SSRManifest, streaming = false) {
super(manifest, streaming); super(manifest, streaming);
this.#manifest = manifest; this.#manifest = manifest;
this.#streaming = streaming;
} }
async render(request: Request) { async render(request: Request) {

View file

@ -12,7 +12,7 @@
"dependencies": { "dependencies": {
"@astrojs/preact": "^3.5.3", "@astrojs/preact": "^3.5.3",
"@astrojs/react": "^3.6.2", "@astrojs/react": "^3.6.2",
"@astrojs/solid-js": "^4.4.2", "@astrojs/solid-js": "^4.4.3",
"@astrojs/svelte": "^6.0.0-beta.2", "@astrojs/svelte": "^6.0.0-beta.2",
"@astrojs/vue": "^5.0.0-beta.1", "@astrojs/vue": "^5.0.0-beta.1",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
@ -22,7 +22,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -2,7 +2,14 @@
A counter written with Svelte A counter written with Svelte
--> -->
<script lang="ts"> <script lang="ts">
let count = 0; import type { Snippet } from 'svelte';
interface Props {
children?: Snippet
}
let { children }: Props = $props();
let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -14,10 +21,10 @@ A counter written with Svelte
</script> </script>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{count}</pre> <pre>{count}</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>
<div class="counter-message"> <div class="counter-message">
<slot /> {@render children?.()}
</div> </div>

View file

@ -10,7 +10,7 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/solid-js": "^4.4.2", "@astrojs/solid-js": "^4.4.3",
"astro": "^5.0.0-beta.8", "astro": "^5.0.0-beta.8",
"solid-js": "^1.9.2" "solid-js": "^1.9.2"
} }

View file

@ -10,8 +10,8 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/svelte": "^6.0.0-beta.2", "@astrojs/svelte": "^6.0.0",
"astro": "^5.0.0-beta.8", "astro": "^5.0.0-beta.8",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -1,5 +1,12 @@
<script lang="ts"> <script lang="ts">
let count = 0; import type { Snippet } from 'svelte';
interface Props {
children?: Snippet
}
let { children }: Props = $props();
let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -11,12 +18,12 @@
</script> </script>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{count}</pre> <pre>{count}</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>
<div class="message"> <div class="message">
<slot /> {@render children?.()}
</div> </div>
<style> <style>

View file

@ -12,8 +12,8 @@
}, },
"dependencies": { "dependencies": {
"@astrojs/node": "^9.0.0-alpha.1", "@astrojs/node": "^9.0.0-alpha.1",
"@astrojs/svelte": "^6.0.0-beta.2", "@astrojs/svelte": "^6.0.0",
"astro": "^5.0.0-beta.8", "astro": "^5.0.0-beta.8",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -1,7 +1,6 @@
<script> <script>
import { addToUserCart } from '../api'; import { addToUserCart } from '../api';
export let id = 0; let { id, name } = $props()
export let name = '';
function notifyCartItem(id) { function notifyCartItem(id) {
window.dispatchEvent(new CustomEvent('add-to-cart', { window.dispatchEvent(new CustomEvent('add-to-cart', {
@ -49,6 +48,6 @@ button:hover {
text-transform: uppercase; text-transform: uppercase;
} }
</style> </style>
<button on:click={addToCart}> <button click={addToCart}>
<span class="pretext">Add to cart</span> <span class="pretext">Add to cart</span>
</button> </button>

View file

@ -1,5 +1,5 @@
<script> <script>
export let count = 0; let { count } = $props()
let items = new Set(); let items = new Set();
function onAddToCart(ev) { function onAddToCart(ev) {
@ -27,7 +27,7 @@
font-size: 24px; font-size: 24px;
} }
</style> </style>
<svelte:window on:add-to-cart={onAddToCart}/> <svelte:window onadd-to-cart={onAddToCart}/>
<a href="/cart" class="cart"> <a href="/cart" class="cart">
<span class="material-icons cart-icon">shopping_cart</span> <span class="material-icons cart-icon">shopping_cart</span>
<span class="count">{count}</span> <span class="count">{count}</span>

View file

@ -1195,6 +1195,14 @@
- Updated dependencies [[`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e)]: - Updated dependencies [[`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e)]:
- @astrojs/markdown-remark@6.0.0-alpha.0 - @astrojs/markdown-remark@6.0.0-alpha.0
## 4.16.13
### Patch Changes
- [#12436](https://github.com/withastro/astro/pull/12436) [`453ec6b`](https://github.com/withastro/astro/commit/453ec6b12f8c021e0bd0fd0ea9f71c8fc280f4b1) Thanks [@martrapp](https://github.com/martrapp)! - Fixes a potential null access in the clientside router
- [#12392](https://github.com/withastro/astro/pull/12392) [`0462219`](https://github.com/withastro/astro/commit/0462219612183b65867aaaef9fa538d89f201999) Thanks [@apatel369](https://github.com/apatel369)! - Fixes an issue where scripts were not correctly injected during the build. The issue was triggered when there were injected routes with the same `entrypoint` and different `pattern`
## 4.16.12 ## 4.16.12
### Patch Changes ### Patch Changes

View file

@ -15,7 +15,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,8 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let children; let count = $state(0);
let count = 0;
function add() { function add() {
count += 1; count += 1;
@ -14,11 +13,11 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button class="increment" on:click={add}>+</button> <button class="increment" onclick={add}>+</button>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>
</div> </div>

View file

@ -14,7 +14,7 @@
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"sass": "^1.80.6", "sass": "^1.80.6",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,5 +1,5 @@
<script> <script>
export let shouldThrow = true; let { shouldThrow } = $props();
if (shouldThrow) { if (shouldThrow) {
throw new Error('SvelteRuntimeError'); throw new Error('SvelteRuntimeError');

View file

@ -17,7 +17,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,7 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let count = 0; let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -13,12 +13,12 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button class="increment" on:click={add}>+</button> <button class="increment" onclick={add}>+</button>
</div> </div>
<div class="counter-message"> <div class="counter-message">
<slot /> {@render children?.()}
</div> </div>
<style> <style>

View file

@ -15,7 +15,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,8 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let children; let count = $state(0);
let count = 0;
function add() { function add() {
count += 1; count += 1;
@ -14,11 +13,11 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre id={`${id}-count`}>{ count }</pre> <pre id={`${id}-count`}>{ count }</pre>
<button id={`${id}-increment`} class="increment" on:click={add}>+</button> <button id={`${id}-increment`} class="increment" onclick={add}>+</button>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>
</div> </div>

View file

@ -15,7 +15,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,8 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let children; let count = $state(0);
let count = 0;
function add() { function add() {
count += 1; count += 1;
@ -14,11 +13,11 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre id={`${id}-count`}>{ count }</pre> <pre id={`${id}-count`}>{ count }</pre>
<button id={`${id}-increment`} class="increment" on:click={add}>+</button> <button id={`${id}-increment`} class="increment" onclick={add}>+</button>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>
</div> </div>

View file

@ -15,7 +15,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,8 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let children; let count = $state(0);
let count = 0;
function add() { function add() {
count += 1; count += 1;
@ -14,11 +13,11 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre id={`${id}-count`}>{ count }</pre> <pre id={`${id}-count`}>{ count }</pre>
<button id={`${id}-increment`} class="increment" on:click={add}>+</button> <button id={`${id}-increment`} class="increment" onclick={add}>+</button>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>
</div> </div>

View file

@ -15,7 +15,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,8 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let children; let count = $state(0);
let count = 0;
function add() { function add() {
count += 1; count += 1;
@ -14,11 +13,11 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre id={`${id}-count`}>{ count }</pre> <pre id={`${id}-count`}>{ count }</pre>
<button id={`${id}-increment`} class="increment" on:click={add}>+</button> <button id={`${id}-increment`} class="increment" onclick={add}>+</button>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>
</div> </div>

View file

@ -15,7 +15,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,8 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let children; let count = $state(0);
let count = 0;
function add() { function add() {
count += 1; count += 1;
@ -14,11 +13,11 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre id={`${id}-count`}>{ count }</pre> <pre id={`${id}-count`}>{ count }</pre>
<button id={`${id}-increment`} class="increment" on:click={add}>+</button> <button id={`${id}-increment`} class="increment" onclick={add}>+</button>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>
</div> </div>

View file

@ -15,7 +15,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
}, },
"scripts": { "scripts": {

View file

@ -1,8 +1,7 @@
<script> <script>
export let id; let { id, children } = $props();
let children; let count = $state(0);
let count = 0;
function add() { function add() {
count += 1; count += 1;
@ -14,11 +13,11 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre id={`${id}-count`}>{ count }</pre> <pre id={`${id}-count`}>{ count }</pre>
<button id={`${id}-increment`} class="increment" on:click={add}>+</button> <button id={`${id}-increment`} class="increment" onclick={add}>+</button>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>
</div> </div>

View file

@ -6,6 +6,6 @@
"@astrojs/mdx": "workspace:*", "@astrojs/mdx": "workspace:*",
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -1,6 +1,13 @@
<script lang="ts"> <script lang="ts">
export let id: string; import type { Snippet } from 'svelte';
export let count: number = 0;
interface Props {
id: number;
count: number;
children?: Snippet
}
let { id, count, children }: Props = $props();
function add() { function add() {
count += 1; count += 1;
@ -12,12 +19,12 @@
</script> </script>
<div {id} class="counter"> <div {id} class="counter">
<button class="decrement" on:click={subtract}>-</button> <button class="decrement" onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button class="increment" on:click={add}>+</button> <button class="increment" onclick={add}>+</button>
</div> </div>
<div id={`${id}-message`} class="message"> <div id={`${id}-message`} class="message">
<slot /> {@render children?.()}
</div> </div>
<style> <style>

View file

@ -1,4 +1,4 @@
<script> <script>
export let id; let { id, children } = $props();
</script> </script>
<div {id}>Slot goes here:<slot /></div> <div {id}>Slot goes here:{@render children?.()}</div>

View file

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
export let id: string; let { id } = $props<{ id: string }>();
</script> </script>
<div {id}>Framework client:only component</div> <div {id}>Framework client:only component</div>

View file

@ -1,9 +1,9 @@
<script> <script>
let isNavOpen = false; let isNavOpen = $state(false);
const toggleNav = () => (isNavOpen = !isNavOpen); const toggleNav = () => (isNavOpen = !isNavOpen);
</script> </script>
<button id="toggle" on:click={toggleNav}> <button id="toggle" onclick={toggleNav}>
{#if isNavOpen} {#if isNavOpen}
<slot name="open" /> <slot name="open" />
{:else} {:else}

View file

@ -5,14 +5,14 @@
"dependencies": { "dependencies": {
"@astrojs/node": "^8.3.4", "@astrojs/node": "^8.3.4",
"@astrojs/react": "workspace:*", "@astrojs/react": "workspace:*",
"@astrojs/solid-js": "workspace:*",
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"@astrojs/vue": "workspace:*", "@astrojs/vue": "workspace:*",
"@astrojs/solid-js": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"svelte": "^4.2.19", "solid-js": "^1.9.3",
"vue": "^3.5.12", "svelte": "^5.1.16",
"solid-js": "^1.9.3" "vue": "^3.5.12"
} }
} }

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
let count = 0; let { prefix, children } = $props()
export let prefix = ""; let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -12,12 +12,12 @@
</script> </script>
<div class="counter"> <div class="counter">
<button on:click={subtract} class="decrement">-</button> <button onclick={subtract} class="decrement">-</button>
<pre>{prefix}{count}</pre> <pre>{prefix}{count}</pre>
<button on:click={add} class="increment">+</button> <button onclick={add} class="increment">+</button>
</div> </div>
<div class="message"> <div class="message">
<slot /> {@render children?.()}
</div> </div>
<style> <style>

View file

@ -636,7 +636,7 @@ if (inBrowser) {
'scroll', 'scroll',
() => { () => {
if (intervalId !== undefined) return; if (intervalId !== undefined) return;
(lastIndex = history.state.index), (lastY = scrollY), (lastX = scrollX); (lastIndex = history.state?.index), (lastY = scrollY), (lastX = scrollX);
intervalId = window.setInterval(scrollInterval, 50); intervalId = window.setInterval(scrollInterval, 50);
}, },
{ passive: true }, { passive: true },

View file

@ -9,7 +9,7 @@
"astro": "workspace:*", "astro": "workspace:*",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -0,0 +1,5 @@
import { vitePreprocess } from '@astrojs/svelte';
export default {
preprocess: vitePreprocess(),
};

View file

@ -5,6 +5,6 @@
"dependencies": { "dependencies": {
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -6,6 +6,6 @@
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"@test/namespace-package": "workspace:*", "@test/namespace-package": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -5,6 +5,6 @@
"dependencies": { "dependencies": {
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -8,7 +8,7 @@
"@astrojs/vue": "workspace:*", "@astrojs/vue": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"preact": "^10.24.3", "preact": "^10.24.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,3 +1,7 @@
<script>
let { children } = $props();
</script>
<div id="svelte"> <div id="svelte">
<slot /> {@render children?.()}
</div> </div>

View file

@ -9,6 +9,6 @@
"astro": "workspace:*", "astro": "workspace:*",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -1,8 +1,8 @@
<script> <script>
import './logResize'; import './logResize';
let count = parseInt(localStorage.getItem('test:count')) || 0; let count = $state(parseInt(localStorage.getItem('test:count')) || 0)
$: localStorage.setItem('test:count', count); $effect(() => localStorage.setItem('test:count', count));
function add() { function add() {
count += 1; count += 1;
@ -18,7 +18,7 @@
} }
</style> </style>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>

View file

@ -1,8 +1,8 @@
<script> <script>
import './logResize'; import './logResize';
let count = parseInt(localStorage.getItem('test:count')) || 0; let count = $state(parseInt(localStorage.getItem('test:count')) || 0)
$: localStorage.setItem('test:count', count); $effect(() => localStorage.setItem('test:count', count));
function add() { function add() {
count += 1; count += 1;
@ -18,7 +18,7 @@
} }
</style> </style>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>

View file

@ -8,6 +8,6 @@
"astro": "workspace:*", "astro": "workspace:*",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -2,8 +2,8 @@
<script> <script>
import './logResize'; import './logResize';
let count = parseInt(localStorage.getItem('test:count')) || 0; let count = $state(parseInt(localStorage.getItem('test:count')) || 0)
$: localStorage.setItem('test:count', count); $effect(() => localStorage.setItem('test:count', count));
function add() { function add() {
count += 1; count += 1;
@ -15,8 +15,8 @@
</script> </script>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>

View file

@ -1,7 +1,7 @@
<script> <script>
let children; let { children } = $props();
let count = 0; let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -13,10 +13,10 @@
</script> </script>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>
<div class="children"> <div class="children">
<slot /> {@render children?.()}
</div> </div>

View file

@ -1,8 +1,6 @@
import svelte from "@astrojs/svelte"; import { defineConfig } from "astro/config";
import { defineConfig } from 'astro/config';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
integrations: [svelte()], site: "https://astro.build/",
site: 'https://astro.build/',
}); });

View file

@ -3,7 +3,6 @@
"version": "0.0.0", "version": "0.0.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@astrojs/svelte": "workspace:*",
"astro": "workspace:*" "astro": "workspace:*"
} }
} }

View file

@ -1,5 +0,0 @@
<script>
export let count = 0;
</script>
<button onClick={() => count += 1}>{count}</button>

View file

@ -13,7 +13,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,5 +1,6 @@
<script> <script>
let count = 0; let { children } = $props();
let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -11,12 +12,12 @@
</script> </script>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>
<div class="message"> <div class="message">
<slot /> {@render children?.()}
</div> </div>
<style> <style>

View file

@ -11,6 +11,6 @@
"preact": "^10.24.3", "preact": "^10.24.3",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -5,6 +5,6 @@
"dependencies": { "dependencies": {
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -1,6 +1,5 @@
<script> <script>
let { path } = $props();
export let path
const allAppModules = import.meta.glob('./*.svelte') const allAppModules = import.meta.glob('./*.svelte')

View file

@ -8,7 +8,7 @@
"@astrojs/vue": "workspace:*", "@astrojs/vue": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"preact": "^10.24.3", "preact": "^10.24.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -16,7 +16,7 @@
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -1,6 +1,6 @@
<script> <script>
let count = 0; let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -13,9 +13,9 @@
<div id="svelte"> <div id="svelte">
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{count}</pre> <pre>{count}</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>
<div class="children">Svelte</div> <div class="children">Svelte</div>
</div> </div>

View file

@ -10,7 +10,7 @@
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"postcss": "^8.4.47", "postcss": "^8.4.47",
"solid-js": "^1.9.3", "solid-js": "^1.9.3",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
}, },
"devDependencies": { "devDependencies": {

View file

@ -1,12 +1,6 @@
--- ---
--- ---
<html lang="en"> <h1>to-inject.astro</h1>
<head> <script>
<meta charset="utf-8" /> console.log('to-inject.astro');
<meta name="viewport" content="width=device-width" /> </script>
<title>Routing</title>
</head>
<body>
<h1>to-inject.astro</h1>
</body>
</html>

View file

@ -5,6 +5,6 @@
"dependencies": { "dependencies": {
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -5,6 +5,6 @@
"dependencies": { "dependencies": {
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -6,6 +6,6 @@
"@astrojs/mdx": "workspace:*", "@astrojs/mdx": "workspace:*",
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -1,6 +1,6 @@
<script> <script>
let count = 0; let { id } = $props();
export let id; let count = $state(0);
function add() { function add() {
count += 1; count += 1;
@ -12,9 +12,9 @@
</script> </script>
<div class="counter"> <div class="counter">
<button on:click={subtract}>-</button> <button onclick={subtract}>-</button>
<pre>{ count }</pre> <pre>{ count }</pre>
<button on:click={add}>+</button> <button onclick={add}>+</button>
</div> </div>
<div id={id}> <div id={id}>
<slot><h1 id="fallback">Fallback</h1></slot><slot name="named" /><slot name="dash-case" /> <slot><h1 id="fallback">Fallback</h1></slot><slot name="named" /><slot name="dash-case" />

View file

@ -5,6 +5,6 @@
"dependencies": { "dependencies": {
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19" "svelte": "^5.1.16"
} }
} }

View file

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
export let message: string; let { message } = $props();
</script> </script>
<div id="svelte-ts">{ message }</div> <div id="svelte-ts">{ message }</div>

View file

@ -6,7 +6,7 @@
"@astrojs/svelte": "workspace:*", "@astrojs/svelte": "workspace:*",
"@astrojs/vue": "workspace:*", "@astrojs/vue": "workspace:*",
"astro": "workspace:*", "astro": "workspace:*",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vue": "^3.5.12" "vue": "^3.5.12"
} }
} }

View file

@ -37,15 +37,15 @@ describe('PostCSS', () => {
}); });
it('works in JSX', () => { it('works in JSX', () => {
assert.match(bundledCSS, /\.solid(\.(w|-)*)*\.nested/); assert.match(bundledCSS, /\.solid(\.[\w-]+)?\.nested/);
}); });
it('works in Vue', () => { it('works in Vue', () => {
assert.match(bundledCSS, /\.vue(\.(w|-)*)*\.nested/); assert.match(bundledCSS, /\.vue(\.[\w-]+)?\.nested/);
}); });
it('works in Svelte', () => { it('works in Svelte', () => {
assert.match(bundledCSS, /\.svelte(\.(w|-)*)*\.nested/); assert.match(bundledCSS, /\.svelte(\.[\w-]+)?\.nested/);
}); });
it('ignores CSS in public/', async () => { it('ignores CSS in public/', async () => {

View file

@ -13,11 +13,13 @@ const routes = [
description: 'matches /injected-a to to-inject.astro', description: 'matches /injected-a to to-inject.astro',
url: '/injected-a', url: '/injected-a',
h1: 'to-inject.astro', h1: 'to-inject.astro',
scriptContent: 'console.log("to-inject.astro");',
}, },
{ {
description: 'matches /injected-b to to-inject.astro', description: 'matches /injected-b to to-inject.astro',
url: '/injected-b', url: '/injected-b',
h1: 'to-inject.astro', h1: 'to-inject.astro',
scriptContent: 'console.log("to-inject.astro");',
}, },
{ {
description: 'matches /dynamic-a/id-1 to [id].astro', description: 'matches /dynamic-a/id-1 to [id].astro',
@ -66,7 +68,7 @@ describe('Reuse injected entrypoint', () => {
await fixture.build(); await fixture.build();
}); });
routes.forEach(({ description, url, fourOhFour, h1, p, htmlMatch }) => { routes.forEach(({ description, url, fourOhFour, h1, p, htmlMatch, scriptContent }) => {
const isEndpoint = htmlMatch && !h1 && !p; const isEndpoint = htmlMatch && !h1 && !p;
it(description, async () => { it(description, async () => {
@ -91,6 +93,15 @@ describe('Reuse injected entrypoint', () => {
if (htmlMatch) { if (htmlMatch) {
assert.equal(html, htmlMatch); assert.equal(html, htmlMatch);
} }
if (scriptContent) {
const scriptTags = $('script[type="module"]').toArray();
const scriptFound = scriptTags.some((script) => {
const scriptText = $(script).text();
return scriptText.includes(scriptContent.trim());
});
assert(scriptFound, `Expected script content to be injected in SSG ${url}`);
}
}); });
}); });
}); });
@ -111,7 +122,7 @@ describe('Reuse injected entrypoint', () => {
await devServer.stop(); await devServer.stop();
}); });
routes.forEach(({ description, url, fourOhFour, h1, p, htmlMatch }) => { routes.forEach(({ description, url, fourOhFour, h1, p, htmlMatch, scriptContent }) => {
// checks URLs as written above // checks URLs as written above
it(description, async () => { it(description, async () => {
const html = await fixture.fetch(url).then((res) => res.text()); const html = await fixture.fetch(url).then((res) => res.text());
@ -133,6 +144,17 @@ describe('Reuse injected entrypoint', () => {
if (htmlMatch) { if (htmlMatch) {
assert.equal(html, htmlMatch); assert.equal(html, htmlMatch);
} }
if (scriptContent) {
const scriptTags = $('script[type="module"]').toArray();
const scriptFound = scriptTags.some((script) => {
const scriptSrc = $(script).attr('src');
return (
scriptSrc && scriptSrc.includes('/to-inject.astro?astro&type=script&index=0&lang.ts')
);
});
assert(scriptFound, `Expected script content to be injected in dev ${url}`);
}
}); });
}); });
}); });

View file

@ -1,5 +1,11 @@
# @astrojs/solid-js # @astrojs/solid-js
## 4.4.3
### Patch Changes
- [#12364](https://github.com/withastro/astro/pull/12364) [`9fc2ab8`](https://github.com/withastro/astro/commit/9fc2ab8cc848739a21bfa3f754e9bec4926dc034) Thanks [@jdtjenkins](https://github.com/jdtjenkins)! - Handles checking Svelte 5 component functions to avoid processing them as Solid components
## 4.4.2 ## 4.4.2
### Patch Changes ### Patch Changes

View file

@ -1,6 +1,6 @@
{ {
"name": "@astrojs/solid-js", "name": "@astrojs/solid-js",
"version": "4.4.2", "version": "4.4.3",
"description": "Use Solid components within Astro", "description": "Use Solid components within Astro",
"type": "module", "type": "module",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",

View file

@ -23,6 +23,10 @@ async function check(
) { ) {
if (typeof Component !== 'function') return false; if (typeof Component !== 'function') return false;
if (Component.name === 'QwikComponent') return false; if (Component.name === 'QwikComponent') return false;
// Svelte component renders fine by Solid as an empty string. The only way to detect
// if this isn't a Solid but Svelte component is to unfortunately copy the check
// implementation of the Svelte renderer.
if (Component.toString().includes('$$payload')) return false;
// There is nothing particularly special about Solid components. Basically they are just functions. // There is nothing particularly special about Solid components. Basically they are just functions.
// In general, components from other frameworks (eg, MDX, React, etc.) tend to render as "undefined", // In general, components from other frameworks (eg, MDX, React, etc.) tend to render as "undefined",

View file

@ -1,5 +1,26 @@
# @astrojs/svelte # @astrojs/svelte
## 6.0.0
### Major Changes
- [#12364](https://github.com/withastro/astro/pull/12364) [`9fc2ab8`](https://github.com/withastro/astro/commit/9fc2ab8cc848739a21bfa3f754e9bec4926dc034) Thanks [@jdtjenkins](https://github.com/jdtjenkins)! - Adds support for Svelte 5. Svelte 3 and 4 are no longer supported.
The integration will now also no longer add `vitePreprocess()` by default if a preprocessor is not set up in `svelte.config.js`. It is recommended to set up the Svelte config manually so that features like IDE completion and syntax highlighting work properly.
If you're using SCSS, Stylus, etc in your Svelte component style tags, make sure that the preprocessor is also set up in `svelte.config.js`. For example:
```js
// svelte.config.js
import { vitePreprocess } from '@astrojs/svelte';
export default {
preprocess: vitePreprocess(),
};
```
Refer to the [Svelte 5 migration guide](https://svelte.dev/docs/svelte/v5-migration-guide) and [`@sveltejs/vite-plugin-svelte` changelog](https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/CHANGELOG.md#400) for details of their respective breaking changes.
## 6.0.0-beta.2 ## 6.0.0-beta.2
### Patch Changes ### Patch Changes

View file

@ -1,60 +0,0 @@
import { createRawSnippet, hydrate, mount, unmount } from 'svelte';
const existingApplications = new WeakMap();
export default (element) => {
return async (Component, props, slotted, { client }) => {
if (!element.hasAttribute('ssr')) return;
let children = undefined;
let $$slots = undefined;
let renderFns = {};
for (const [key, value] of Object.entries(slotted)) {
// Legacy slot support
$$slots ??= {};
if (key === 'default') {
$$slots.default = true;
children = createRawSnippet(() => ({
render: () => `<astro-slot>${value}</astro-slot>`,
}));
} else {
$$slots[key] = createRawSnippet(() => ({
render: () => `<astro-slot name="${key}">${value}</astro-slot>`,
}));
}
// @render support for Svelte ^5.0
if (key === 'default') {
renderFns.children = createRawSnippet(() => ({
render: () => `<astro-slot>${value}</astro-slot>`,
}));
} else {
renderFns[key] = createRawSnippet(() => ({
render: () => `<astro-slot name="${key}">${value}</astro-slot>`,
}));
}
}
const bootstrap = client !== 'only' ? hydrate : mount;
if (existingApplications.has(element)) {
existingApplications.get(element).$set({
...props,
children,
$$slots,
...renderFns,
});
} else {
const component = bootstrap(Component, {
target: element,
props: {
...props,
children,
$$slots,
...renderFns,
},
});
existingApplications.set(element, component);
element.addEventListener('astro:unmount', () => unmount(component), { once: true });
}
};
};

View file

@ -1,125 +0,0 @@
const noop = () => {};
let originalConsoleWarning;
let consoleFilterRefs = 0;
const existingApplications = new WeakMap();
export default (element) => {
return (Component, props, slotted, { client }) => {
if (!element.hasAttribute('ssr')) return;
const slots = {};
for (const [key, value] of Object.entries(slotted)) {
slots[key] = createSlotDefinition(key, value);
}
try {
if (import.meta.env.DEV) useConsoleFilter();
if (existingApplications.has(element)) {
existingApplications.get(element).$set({ ...props, $$slots: slots, $$scope: { ctx: [] } });
} else {
const component = new Component({
target: element,
props: {
...props,
$$slots: slots,
$$scope: { ctx: [] },
},
hydrate: client !== 'only',
$$inline: true,
});
existingApplications.set(element, component);
element.addEventListener('astro:unmount', () => component.$destroy(), { once: true });
}
} finally {
if (import.meta.env.DEV) finishUsingConsoleFilter();
}
};
};
function createSlotDefinition(key, children) {
let parent;
return [
() => ({
// mount
m(target) {
parent = target;
target.insertAdjacentHTML(
'beforeend',
`<astro-slot${key === 'default' ? '' : ` name="${key}"`}>${children}</astro-slot>`,
);
},
// create
c: noop,
// hydrate
l: noop,
// destroy
d() {
if (!parent) return;
const slot = parent.querySelector(
`astro-slot${key === 'default' ? ':not([name])' : `[name="${key}"]`}`,
);
if (slot) slot.remove();
},
}),
noop,
noop,
];
}
/**
* Reduces console noise by filtering known non-problematic warnings.
*
* Performs reference counting to allow parallel usage from async code.
*
* To stop filtering, please ensure that there always is a matching call
* to `finishUsingConsoleFilter` afterwards.
*/
function useConsoleFilter() {
consoleFilterRefs++;
if (!originalConsoleWarning) {
originalConsoleWarning = console.warn;
try {
console.warn = filteredConsoleWarning;
} catch {
// If we're unable to hook `console.warn`, just accept it
}
}
}
/**
* Indicates that the filter installed by `useConsoleFilter`
* is no longer needed by the calling code.
*/
function finishUsingConsoleFilter() {
consoleFilterRefs--;
// Note: Instead of reverting `console.warning` back to the original
// when the reference counter reaches 0, we leave our hook installed
// to prevent potential race conditions once `check` is made async
}
/**
* Hook/wrapper function for the global `console.warning` function.
*
* Ignores known non-problematic errors while any code is using the console filter.
* Otherwise, simply forwards all arguments to the original function.
*/
function filteredConsoleWarning(msg, ...rest) {
if (consoleFilterRefs > 0 && typeof msg === 'string') {
// Astro passes `class` and `data-astro-cid` props to the Svelte component, which
// outputs the following warning, which we can safely filter out.
// NOTE: In practice data-astro-cid props have a hash suffix. Hence the use of a
// quoted prop name string without a closing quote.
const isKnownSvelteError =
msg.endsWith("was created with unknown prop 'class'") ||
msg.includes("was created with unknown prop 'data-astro-cid");
if (isKnownSvelteError) return;
}
originalConsoleWarning(msg, ...rest);
}

View file

@ -0,0 +1,79 @@
import { createRawSnippet, hydrate, mount, unmount } from 'svelte';
/** @type {WrakMap<any, ReturnType<typeof createComponent>} */
const existingApplications = new WeakMap();
export default (element) => {
return async (Component, props, slotted, { client }) => {
if (!element.hasAttribute('ssr')) return;
let children = undefined;
let _$$slots = undefined;
let renderFns = {};
for (const [key, value] of Object.entries(slotted)) {
// Legacy slot support
_$$slots ??= {};
if (key === 'default') {
_$$slots.default = true;
children = createRawSnippet(() => ({
render: () => `<astro-slot>${value}</astro-slot>`,
}));
} else {
_$$slots[key] = createRawSnippet(() => ({
render: () => `<astro-slot name="${key}">${value}</astro-slot>`,
}));
}
// @render support for Svelte ^5.0
if (key === 'default') {
renderFns.children = createRawSnippet(() => ({
render: () => `<astro-slot>${value}</astro-slot>`,
}));
} else {
renderFns[key] = createRawSnippet(() => ({
render: () => `<astro-slot name="${key}">${value}</astro-slot>`,
}));
}
}
const resolvedProps = {
...props,
children,
$$slots: _$$slots,
...renderFns,
};
if (existingApplications.has(element)) {
existingApplications.get(element).setProps(resolvedProps);
} else {
const component = createComponent(Component, element, resolvedProps, client !== 'only');
existingApplications.set(element, component);
element.addEventListener('astro:unmount', () => component.destroy(), { once: true });
}
};
};
/**
* @param {any} Component
* @param {HTMLElement} target
* @param {Record<string, any>} props
* @param {boolean} shouldHydrate
*/
function createComponent(Component, target, props, shouldHydrate) {
let propsState = $state(props);
const bootstrap = shouldHydrate ? hydrate : mount;
const component = bootstrap(Component, { target, props: propsState });
return {
setProps(newProps) {
Object.assign(propsState, newProps);
// Remove props in `propsState` but not in `newProps`
for (const key in propsState) {
if (!(key in newProps)) {
delete propsState[key];
}
}
},
destroy() {
unmount(component);
},
};
}

View file

@ -1,6 +1,6 @@
{ {
"name": "@astrojs/svelte", "name": "@astrojs/svelte",
"version": "6.0.0-beta.2", "version": "6.0.0",
"description": "Use Svelte components within Astro", "description": "Use Svelte components within Astro",
"type": "module", "type": "module",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
@ -23,26 +23,18 @@
".": "./dist/index.js", ".": "./dist/index.js",
"./editor": "./dist/editor.cjs", "./editor": "./dist/editor.cjs",
"./*": "./*", "./*": "./*",
"./client.js": "./client.js", "./client.js": "./client.svelte.js",
"./client-v5.js": "./client-v5.js",
"./server.js": { "./server.js": {
"default": "./server.js", "default": "./server.js",
"types": "./server.d.ts" "types": "./server.d.ts"
}, },
"./server-v5.js": {
"default": "./server-v5.js",
"types": "./server-v5.d.ts"
},
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
"files": [ "files": [
"dist", "dist",
"client.js", "client.js",
"client-v5.js",
"server.js", "server.js",
"server.d.ts", "server.d.ts"
"server-v5.js",
"server-v5.d.ts"
], ],
"scripts": { "scripts": {
"build": "astro-scripts build \"src/index.ts\" && astro-scripts build \"src/editor.cts\" --force-cjs --no-clean-dist && tsc", "build": "astro-scripts build \"src/index.ts\" && astro-scripts build \"src/editor.cts\" --force-cjs --no-clean-dist && tsc",
@ -50,18 +42,18 @@
"dev": "astro-scripts dev \"src/**/*.ts\"" "dev": "astro-scripts dev \"src/**/*.ts\""
}, },
"dependencies": { "dependencies": {
"@sveltejs/vite-plugin-svelte": "^3.1.2", "@sveltejs/vite-plugin-svelte": "^4.0.0",
"svelte2tsx": "^0.7.22" "svelte2tsx": "^0.7.22"
}, },
"devDependencies": { "devDependencies": {
"astro": "workspace:*", "astro": "workspace:*",
"astro-scripts": "workspace:*", "astro-scripts": "workspace:*",
"svelte": "^4.2.19", "svelte": "^5.1.16",
"vite": "6.0.0-beta.6" "vite": "6.0.0-beta.6"
}, },
"peerDependencies": { "peerDependencies": {
"astro": "^5.0.0-alpha.0", "astro": "^4.0.0",
"svelte": "^4.0.0 || ^5.0.0-next.190", "svelte": "^5.1.16",
"typescript": "^5.3.3" "typescript": "^5.3.3"
}, },
"engines": { "engines": {

View file

@ -1,2 +0,0 @@
import type { NamedSSRLoadedRendererValue } from 'astro';
export default NamedSSRLoadedRendererValue;

View file

@ -1,57 +0,0 @@
import { createRawSnippet } from 'svelte';
import { render } from 'svelte/server';
function check(Component) {
// Svelte 5 generated components always accept these two props
const str = Component.toString();
return str.includes('$$payload') && str.includes('$$props');
}
function needsHydration(metadata) {
// Adjust how this is hydrated only when the version of Astro supports `astroStaticSlot`
return metadata.astroStaticSlot ? !!metadata.hydrate : true;
}
async function renderToStaticMarkup(Component, props, slotted, metadata) {
const tagName = needsHydration(metadata) ? 'astro-slot' : 'astro-static-slot';
let children = undefined;
let $$slots = undefined;
const renderProps = {};
for (const [key, value] of Object.entries(slotted)) {
// Legacy slot support
$$slots ??= {};
if (key === 'default') {
$$slots.default = true;
children = createRawSnippet(() => ({
render: () => `<${tagName}>${value}</${tagName}>`,
}));
} else {
$$slots[key] = createRawSnippet(() => ({
render: () => `<${tagName} name="${key}">${value}</${tagName}>`,
}));
}
// @render support for Svelte ^5.0
const slotName = key === 'default' ? 'children' : key;
renderProps[slotName] = createRawSnippet(() => ({
render: () => `<${tagName}${key !== 'default' ? ` name="${key}"` : ''}>${value}</${tagName}>`,
}));
}
const result = render(Component, {
props: {
...props,
children,
$$slots,
...renderProps,
},
});
return { html: result.body };
}
export default {
check,
renderToStaticMarkup,
supportsAstroStaticSlot: true,
};

View file

@ -1,5 +1,13 @@
import { createRawSnippet } from 'svelte';
import { render } from 'svelte/server';
function check(Component) { function check(Component) {
return Component['render'] && Component['$$render']; if (typeof Component !== 'function') return false;
// Svelte 5 generated components always accept a `$$payload` prop.
// This assumes that the SSR build does not minify it (which Astro enforces by default).
// This isn't the best check, but the only other option otherwise is to try to render the
// component, which is taxing. We'll leave it as a last resort for the future for now.
return Component.toString().includes('$$payload');
} }
function needsHydration(metadata) { function needsHydration(metadata) {
@ -9,16 +17,44 @@ function needsHydration(metadata) {
async function renderToStaticMarkup(Component, props, slotted, metadata) { async function renderToStaticMarkup(Component, props, slotted, metadata) {
const tagName = needsHydration(metadata) ? 'astro-slot' : 'astro-static-slot'; const tagName = needsHydration(metadata) ? 'astro-slot' : 'astro-static-slot';
const slots = {};
let children = undefined;
let $$slots = undefined;
const renderProps = {};
for (const [key, value] of Object.entries(slotted)) { for (const [key, value] of Object.entries(slotted)) {
slots[key] = () => // Legacy slot support
`<${tagName}${key === 'default' ? '' : ` name="${key}"`}>${value}</${tagName}>`; $$slots ??= {};
if (key === 'default') {
$$slots.default = true;
children = createRawSnippet(() => ({
render: () => `<${tagName}>${value}</${tagName}>`,
}));
} else {
$$slots[key] = createRawSnippet(() => ({
render: () => `<${tagName} name="${key}">${value}</${tagName}>`,
}));
}
// @render support for Svelte ^5.0
const slotName = key === 'default' ? 'children' : key;
renderProps[slotName] = createRawSnippet(() => ({
render: () => `<${tagName}${key !== 'default' ? ` name="${key}"` : ''}>${value}</${tagName}>`,
}));
} }
const { html } = Component.render(props, { $$slots: slots });
return { html }; const result = render(Component, {
props: {
...props,
children,
$$slots,
...renderProps,
},
});
return { html: result.body };
} }
export default { export default {
name: '@astrojs/svelte',
check, check,
renderToStaticMarkup, renderToStaticMarkup,
supportsAstroStaticSlot: true, supportsAstroStaticSlot: true,

View file

@ -1,111 +1,36 @@
import { fileURLToPath } from 'node:url';
import type { Options } from '@sveltejs/vite-plugin-svelte'; import type { Options } from '@sveltejs/vite-plugin-svelte';
import { svelte, vitePreprocess } from '@sveltejs/vite-plugin-svelte'; import { svelte, vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import type { AstroIntegration, AstroRenderer, ContainerRenderer } from 'astro'; import type { AstroIntegration, AstroRenderer, ContainerRenderer } from 'astro';
import { VERSION } from 'svelte/compiler';
import type { UserConfig } from 'vite';
const isSvelte5 = Number.parseInt(VERSION.split('.').at(0)!) >= 5;
function getRenderer(): AstroRenderer { function getRenderer(): AstroRenderer {
return { return {
name: '@astrojs/svelte', name: '@astrojs/svelte',
clientEntrypoint: isSvelte5 ? '@astrojs/svelte/client-v5.js' : '@astrojs/svelte/client.js', clientEntrypoint: '@astrojs/svelte/client.js',
serverEntrypoint: isSvelte5 ? '@astrojs/svelte/server-v5.js' : '@astrojs/svelte/server.js', serverEntrypoint: '@astrojs/svelte/server.js',
}; };
} }
export function getContainerRenderer(): ContainerRenderer { export function getContainerRenderer(): ContainerRenderer {
return { return {
name: '@astrojs/svelte', name: '@astrojs/svelte',
serverEntrypoint: isSvelte5 ? '@astrojs/svelte/server-v5.js' : '@astrojs/svelte/server.js', serverEntrypoint: '@astrojs/svelte/server.js',
}; };
} }
async function svelteConfigHasPreprocess(root: URL) { export default function svelteIntegration(options?: Options): AstroIntegration {
const svelteConfigFiles = ['./svelte.config.js', './svelte.config.cjs', './svelte.config.mjs'];
for (const file of svelteConfigFiles) {
const filePath = fileURLToPath(new URL(file, root));
try {
// Suppress warnings by vite: "The above dynamic import cannot be analyzed by Vite."
const config = (await import(/* @vite-ignore */ filePath)).default;
return !!config.preprocess;
} catch {}
}
}
type ViteConfigurationArgs = {
isDev: boolean;
options?: Options | OptionsCallback;
root: URL;
};
async function getViteConfiguration({
options,
isDev,
root,
}: ViteConfigurationArgs): Promise<UserConfig> {
const defaultOptions: Partial<Options> = {
emitCss: true,
compilerOptions: { dev: isDev },
};
// `hydratable` does not need to be set in Svelte 5 as it's always hydratable by default
if (!isSvelte5) {
// @ts-ignore ignore Partial type above
defaultOptions.compilerOptions.hydratable = true;
}
// Disable hot mode during the build
if (!isDev) {
defaultOptions.hot = false;
}
let resolvedOptions: Partial<Options>;
if (!options) {
resolvedOptions = defaultOptions;
} else if (typeof options === 'function') {
resolvedOptions = options(defaultOptions);
} else {
resolvedOptions = {
...options,
...defaultOptions,
compilerOptions: {
...options.compilerOptions,
// Always use dev and hydratable from defaults
...defaultOptions.compilerOptions,
},
};
}
if (!resolvedOptions.preprocess && !(await svelteConfigHasPreprocess(root))) {
resolvedOptions.preprocess = vitePreprocess();
}
return {
optimizeDeps: {
include: [isSvelte5 ? '@astrojs/svelte/client-v5.js' : '@astrojs/svelte/client.js'],
exclude: [isSvelte5 ? '@astrojs/svelte/server-v5.js' : '@astrojs/svelte/server.js'],
},
plugins: [svelte(resolvedOptions)],
};
}
type OptionsCallback = (defaultOptions: Options) => Options;
export default function (options?: Options | OptionsCallback): AstroIntegration {
return { return {
name: '@astrojs/svelte', name: '@astrojs/svelte',
hooks: { hooks: {
// Anything that gets returned here is merged into Astro Config 'astro:config:setup': async ({ updateConfig, addRenderer }) => {
'astro:config:setup': async ({ command, updateConfig, addRenderer, config }) => {
addRenderer(getRenderer()); addRenderer(getRenderer());
updateConfig({ updateConfig({
vite: await getViteConfiguration({ vite: {
options, optimizeDeps: {
isDev: command === 'dev', include: ['@astrojs/svelte/client.js'],
root: config.root, exclude: ['@astrojs/svelte/server.js'],
}), },
plugins: [svelte(options)],
},
}); });
}, },
}, },

View file

@ -216,7 +216,7 @@ importers:
specifier: ^3.6.2 specifier: ^3.6.2
version: link:../../packages/integrations/react version: link:../../packages/integrations/react
'@astrojs/solid-js': '@astrojs/solid-js':
specifier: ^4.4.2 specifier: ^4.4.3
version: link:../../packages/integrations/solid version: link:../../packages/integrations/solid
'@astrojs/svelte': '@astrojs/svelte':
specifier: ^6.0.0-beta.2 specifier: ^6.0.0-beta.2
@ -246,8 +246,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -291,7 +291,7 @@ importers:
examples/framework-solid: examples/framework-solid:
dependencies: dependencies:
'@astrojs/solid-js': '@astrojs/solid-js':
specifier: ^4.4.2 specifier: ^4.4.3
version: link:../../packages/integrations/solid version: link:../../packages/integrations/solid
astro: astro:
specifier: ^5.0.0-beta.8 specifier: ^5.0.0-beta.8
@ -303,14 +303,14 @@ importers:
examples/framework-svelte: examples/framework-svelte:
dependencies: dependencies:
'@astrojs/svelte': '@astrojs/svelte':
specifier: ^6.0.0-beta.2 specifier: ^6.0.0
version: link:../../packages/integrations/svelte version: link:../../packages/integrations/svelte
astro: astro:
specifier: ^5.0.0-beta.8 specifier: ^5.0.0-beta.8
version: link:../../packages/astro version: link:../../packages/astro
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
examples/framework-vue: examples/framework-vue:
dependencies: dependencies:
@ -357,14 +357,14 @@ importers:
specifier: ^9.0.0-alpha.1 specifier: ^9.0.0-alpha.1
version: 9.0.0-alpha.1(astro@packages+astro) version: 9.0.0-alpha.1(astro@packages+astro)
'@astrojs/svelte': '@astrojs/svelte':
specifier: ^6.0.0-beta.2 specifier: ^6.0.0
version: link:../../packages/integrations/svelte version: link:../../packages/integrations/svelte
astro: astro:
specifier: ^5.0.0-beta.8 specifier: ^5.0.0-beta.8
version: link:../../packages/astro version: link:../../packages/astro
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
examples/starlog: examples/starlog:
dependencies: dependencies:
@ -911,8 +911,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1035,8 +1035,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1092,8 +1092,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1148,8 +1148,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1188,8 +1188,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1228,8 +1228,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1268,8 +1268,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1308,8 +1308,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1348,8 +1348,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1544,8 +1544,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/e2e/fixtures/tailwindcss: packages/astro/e2e/fixtures/tailwindcss:
dependencies: dependencies:
@ -1610,8 +1610,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1748,8 +1748,8 @@ importers:
specifier: ^18.3.1 specifier: ^18.3.1
version: 18.3.1(react@18.3.1) version: 18.3.1(react@18.3.1)
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1769,8 +1769,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/alias-tsconfig: packages/astro/test/fixtures/alias-tsconfig:
dependencies: dependencies:
@ -1784,8 +1784,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/alias-tsconfig-baseurl-only: packages/astro/test/fixtures/alias-tsconfig-baseurl-only:
dependencies: dependencies:
@ -1796,8 +1796,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/alias-tsconfig/deps/namespace-package: {} packages/astro/test/fixtures/alias-tsconfig/deps/namespace-package: {}
@ -1921,8 +1921,8 @@ importers:
specifier: ^10.24.3 specifier: ^10.24.3
version: 10.24.3 version: 10.24.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -1954,8 +1954,8 @@ importers:
specifier: ^18.3.1 specifier: ^18.3.1
version: 18.3.1(react@18.3.1) version: 18.3.1(react@18.3.1)
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/astro-client-only/pkg: {} packages/astro/test/fixtures/astro-client-only/pkg: {}
@ -2046,8 +2046,8 @@ importers:
specifier: ^18.3.1 specifier: ^18.3.1
version: 18.3.1(react@18.3.1) version: 18.3.1(react@18.3.1)
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/astro-env: packages/astro/test/fixtures/astro-env:
dependencies: dependencies:
@ -2153,9 +2153,6 @@ importers:
packages/astro/test/fixtures/astro-markdown: packages/astro/test/fixtures/astro-markdown:
dependencies: dependencies:
'@astrojs/svelte':
specifier: workspace:*
version: link:../../../../integrations/svelte
astro: astro:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
@ -2382,8 +2379,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -2466,8 +2463,8 @@ importers:
specifier: ^18.3.1 specifier: ^18.3.1
version: 18.3.1(react@18.3.1) version: 18.3.1(react@18.3.1)
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/component-library-shared: packages/astro/test/fixtures/component-library-shared:
dependencies: dependencies:
@ -2772,8 +2769,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/css-import-as-inline: packages/astro/test/fixtures/css-import-as-inline:
dependencies: dependencies:
@ -3024,8 +3021,8 @@ importers:
specifier: ^10.24.3 specifier: ^10.24.3
version: 10.24.3 version: 10.24.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -3228,8 +3225,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -3416,8 +3413,8 @@ importers:
specifier: ^1.9.3 specifier: ^1.9.3
version: 1.9.3 version: 1.9.3
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -3610,8 +3607,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../../.. version: link:../../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/server-islands/ssr: packages/astro/test/fixtures/server-islands/ssr:
dependencies: dependencies:
@ -3622,8 +3619,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../../.. version: link:../../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/set-html: packages/astro/test/fixtures/set-html:
dependencies: dependencies:
@ -3691,8 +3688,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/slots-vue: packages/astro/test/fixtures/slots-vue:
dependencies: dependencies:
@ -4016,8 +4013,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
packages/astro/test/fixtures/tailwindcss: packages/astro/test/fixtures/tailwindcss:
dependencies: dependencies:
@ -4148,8 +4145,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../.. version: link:../../..
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vue: vue:
specifier: ^3.5.12 specifier: ^3.5.12
version: 3.5.12(typescript@5.6.3) version: 3.5.12(typescript@5.6.3)
@ -5110,11 +5107,11 @@ importers:
packages/integrations/svelte: packages/integrations/svelte:
dependencies: dependencies:
'@sveltejs/vite-plugin-svelte': '@sveltejs/vite-plugin-svelte':
specifier: ^3.1.2 specifier: ^4.0.0
version: 3.1.2(svelte@4.2.19)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)) version: 4.0.0(svelte@5.1.16)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))
svelte2tsx: svelte2tsx:
specifier: ^0.7.22 specifier: ^0.7.22
version: 0.7.22(svelte@4.2.19)(typescript@5.6.3) version: 0.7.22(svelte@5.1.16)(typescript@5.6.3)
devDependencies: devDependencies:
astro: astro:
specifier: workspace:* specifier: workspace:*
@ -5123,8 +5120,8 @@ importers:
specifier: workspace:* specifier: workspace:*
version: link:../../../scripts version: link:../../../scripts
svelte: svelte:
specifier: ^4.2.19 specifier: ^5.1.16
version: 4.2.19 version: 5.1.16
vite: vite:
specifier: 6.0.0-beta.6 specifier: 6.0.0-beta.6
version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1) version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)
@ -7021,19 +7018,19 @@ packages:
peerDependencies: peerDependencies:
solid-js: ^1.8.6 solid-js: ^1.8.6
'@sveltejs/vite-plugin-svelte-inspector@2.1.0': '@sveltejs/vite-plugin-svelte-inspector@3.0.1':
resolution: {integrity: sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==} resolution: {integrity: sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==}
engines: {node: ^18.0.0 || >=20} engines: {node: ^18.0.0 || ^20.0.0 || >=22}
peerDependencies: peerDependencies:
'@sveltejs/vite-plugin-svelte': ^3.0.0 '@sveltejs/vite-plugin-svelte': ^4.0.0-next.0||^4.0.0
svelte: ^4.0.0 || ^5.0.0-next.0 svelte: ^5.0.0-next.96 || ^5.0.0
vite: ^5.0.0 vite: ^5.0.0
'@sveltejs/vite-plugin-svelte@3.1.2': '@sveltejs/vite-plugin-svelte@4.0.0':
resolution: {integrity: sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA==} resolution: {integrity: sha512-kpVJwF+gNiMEsoHaw+FJL76IYiwBikkxYU83+BpqQLdVMff19KeRKLd2wisS8niNBMJ2omv5gG+iGDDwd8jzag==}
engines: {node: ^18.0.0 || >=20} engines: {node: ^18.0.0 || ^20.0.0 || >=22}
peerDependencies: peerDependencies:
svelte: ^4.0.0 || ^5.0.0-next.0 svelte: ^5.0.0-next.96 || ^5.0.0
vite: ^5.0.0 vite: ^5.0.0
'@trysound/sax@0.2.0': '@trysound/sax@0.2.0':
@ -7417,6 +7414,11 @@ packages:
peerDependencies: peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
acorn-typescript@1.4.13:
resolution: {integrity: sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==}
peerDependencies:
acorn: '>=8.9.0'
acorn@8.14.0: acorn@8.14.0:
resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}
engines: {node: '>=0.4.0'} engines: {node: '>=0.4.0'}
@ -7716,9 +7718,6 @@ packages:
resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==}
engines: {node: '>=6'} engines: {node: '>=6'}
code-red@1.0.4:
resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==}
collapse-white-space@2.1.0: collapse-white-space@2.1.0:
resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==}
@ -8206,6 +8205,9 @@ packages:
jiti: jiti:
optional: true optional: true
esm-env@1.1.4:
resolution: {integrity: sha512-oO82nKPHKkzIj/hbtuDYy/JHqBHFlMIW36SDiPCVsj87ntDLcWN+sJ1erdVryd4NxODacFTsdrIE3b7IamqbOg==}
esm@3.2.25: esm@3.2.25:
resolution: {integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==} resolution: {integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==}
engines: {node: '>=6'} engines: {node: '>=6'}
@ -8223,6 +8225,9 @@ packages:
resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==}
engines: {node: '>=0.10'} engines: {node: '>=0.10'}
esrap@1.2.2:
resolution: {integrity: sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==}
esrecurse@4.3.0: esrecurse@4.3.0:
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
engines: {node: '>=4.0'} engines: {node: '>=4.0'}
@ -9501,9 +9506,6 @@ packages:
perfect-debounce@1.0.0: perfect-debounce@1.0.0:
resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
periscopic@3.1.0:
resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==}
picocolors@1.1.0: picocolors@1.1.0:
resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==}
@ -10310,21 +10312,15 @@ packages:
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==}
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
svelte-hmr@0.16.0:
resolution: {integrity: sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==}
engines: {node: ^12.20 || ^14.13.1 || >= 16}
peerDependencies:
svelte: ^3.19.0 || ^4.0.0
svelte2tsx@0.7.22: svelte2tsx@0.7.22:
resolution: {integrity: sha512-hf55ujq17ufVpDQlJzaQfRr9EjlLIwGmFlpKq4uYrQAQFw/99q1OcVYyBT6568iJySgBUY9PdccURrORmfetmQ==} resolution: {integrity: sha512-hf55ujq17ufVpDQlJzaQfRr9EjlLIwGmFlpKq4uYrQAQFw/99q1OcVYyBT6568iJySgBUY9PdccURrORmfetmQ==}
peerDependencies: peerDependencies:
svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0
typescript: ^4.9.4 || ^5.0.0 typescript: ^4.9.4 || ^5.0.0
svelte@4.2.19: svelte@5.1.16:
resolution: {integrity: sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==} resolution: {integrity: sha512-QcY+om9r8+uTcSfeFuv8++ExdfwVCKeT+Y7GPSZ6rQPczvy62BMtvMoi0rScabgv+upGE5jxKjd7M4u23+AjGA==}
engines: {node: '>=16'} engines: {node: '>=18'}
svg-tags@1.0.0: svg-tags@1.0.0:
resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==} resolution: {integrity: sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==}
@ -11055,6 +11051,9 @@ packages:
resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==} resolution: {integrity: sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==}
engines: {node: '>=18'} engines: {node: '>=18'}
zimmerframe@1.1.2:
resolution: {integrity: sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==}
zod-to-json-schema@3.23.5: zod-to-json-schema@3.23.5:
resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==} resolution: {integrity: sha512-5wlSS0bXfF/BrL4jPAbz9da5hDlDptdEppYfe+x4eIJ7jioqKG9uUxOwPzqof09u/XeVdrgFu29lZi+8XNDJtA==}
peerDependencies: peerDependencies:
@ -12563,26 +12562,25 @@ snapshots:
dependencies: dependencies:
solid-js: 1.9.3 solid-js: 1.9.3
'@sveltejs/vite-plugin-svelte-inspector@2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)))(svelte@4.2.19)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))': '@sveltejs/vite-plugin-svelte-inspector@3.0.1(@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.1.16)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)))(svelte@5.1.16)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))':
dependencies: dependencies:
'@sveltejs/vite-plugin-svelte': 3.1.2(svelte@4.2.19)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)) '@sveltejs/vite-plugin-svelte': 4.0.0(svelte@5.1.16)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))
debug: 4.3.7 debug: 4.3.7
svelte: 4.2.19 svelte: 5.1.16
vite: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1) vite: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))': '@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.1.16)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))':
dependencies: dependencies:
'@sveltejs/vite-plugin-svelte-inspector': 2.1.0(@sveltejs/vite-plugin-svelte@3.1.2(svelte@4.2.19)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)))(svelte@4.2.19)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)) '@sveltejs/vite-plugin-svelte-inspector': 3.0.1(@sveltejs/vite-plugin-svelte@4.0.0(svelte@5.1.16)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)))(svelte@5.1.16)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))
debug: 4.3.7 debug: 4.3.7
deepmerge: 4.3.1 deepmerge: 4.3.1
kleur: 4.1.5 kleur: 4.1.5
magic-string: 0.30.12 magic-string: 0.30.12
svelte: 4.2.19 svelte: 5.1.16
svelte-hmr: 0.16.0(svelte@4.2.19)
vite: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1) vite: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)
vitefu: 0.2.5(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1)) vitefu: 1.0.3(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.80.6)(yaml@2.5.1))
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -13092,6 +13090,10 @@ snapshots:
dependencies: dependencies:
acorn: 8.14.0 acorn: 8.14.0
acorn-typescript@1.4.13(acorn@8.14.0):
dependencies:
acorn: 8.14.0
acorn@8.14.0: {} acorn@8.14.0: {}
agent-base@7.1.1: agent-base@7.1.1:
@ -13427,14 +13429,6 @@ snapshots:
clsx@2.1.1: {} clsx@2.1.1: {}
code-red@1.0.4:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
'@types/estree': 1.0.6
acorn: 8.14.0
estree-walker: 3.0.3
periscopic: 3.1.0
collapse-white-space@2.1.0: {} collapse-white-space@2.1.0: {}
color-convert@2.0.1: color-convert@2.0.1:
@ -13850,6 +13844,8 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
esm-env@1.1.4: {}
esm@3.2.25: {} esm@3.2.25: {}
espree@10.3.0: espree@10.3.0:
@ -13864,6 +13860,11 @@ snapshots:
dependencies: dependencies:
estraverse: 5.3.0 estraverse: 5.3.0
esrap@1.2.2:
dependencies:
'@jridgewell/sourcemap-codec': 1.5.0
'@types/estree': 1.0.6
esrecurse@4.3.0: esrecurse@4.3.0:
dependencies: dependencies:
estraverse: 5.3.0 estraverse: 5.3.0
@ -15502,12 +15503,6 @@ snapshots:
perfect-debounce@1.0.0: {} perfect-debounce@1.0.0: {}
periscopic@3.1.0:
dependencies:
'@types/estree': 1.0.6
estree-walker: 3.0.3
is-reference: 3.0.2
picocolors@1.1.0: {} picocolors@1.1.0: {}
picomatch@2.3.1: {} picomatch@2.3.1: {}
@ -16506,33 +16501,28 @@ snapshots:
supports-preserve-symlinks-flag@1.0.0: {} supports-preserve-symlinks-flag@1.0.0: {}
svelte-hmr@0.16.0(svelte@4.2.19): svelte2tsx@0.7.22(svelte@5.1.16)(typescript@5.6.3):
dependencies:
svelte: 4.2.19
svelte2tsx@0.7.22(svelte@4.2.19)(typescript@5.6.3):
dependencies: dependencies:
dedent-js: 1.0.1 dedent-js: 1.0.1
pascal-case: 3.1.2 pascal-case: 3.1.2
svelte: 4.2.19 svelte: 5.1.16
typescript: 5.6.3 typescript: 5.6.3
svelte@4.2.19: svelte@5.1.16:
dependencies: dependencies:
'@ampproject/remapping': 2.3.0 '@ampproject/remapping': 2.3.0
'@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/sourcemap-codec': 1.5.0
'@jridgewell/trace-mapping': 0.3.25
'@types/estree': 1.0.6 '@types/estree': 1.0.6
acorn: 8.14.0 acorn: 8.14.0
acorn-typescript: 1.4.13(acorn@8.14.0)
aria-query: 5.3.2 aria-query: 5.3.2
axobject-query: 4.1.0 axobject-query: 4.1.0
code-red: 1.0.4 esm-env: 1.1.4
css-tree: 2.3.1 esrap: 1.2.2
estree-walker: 3.0.3
is-reference: 3.0.2 is-reference: 3.0.2
locate-character: 3.0.0 locate-character: 3.0.0
magic-string: 0.30.12 magic-string: 0.30.12
periscopic: 3.1.0 zimmerframe: 1.1.2
svg-tags@1.0.0: {} svg-tags@1.0.0: {}
@ -17280,6 +17270,8 @@ snapshots:
yoctocolors@2.1.1: {} yoctocolors@2.1.1: {}
zimmerframe@1.1.2: {}
zod-to-json-schema@3.23.5(zod@3.23.8): zod-to-json-schema@3.23.5(zod@3.23.8):
dependencies: dependencies:
zod: 3.23.8 zod: 3.23.8