diff --git a/packages/svelte/src/ambient.d.ts b/packages/svelte/src/ambient.d.ts index 6af8ca5156..88879394ed 100644 --- a/packages/svelte/src/ambient.d.ts +++ b/packages/svelte/src/ambient.d.ts @@ -24,7 +24,7 @@ declare module '*.svelte' { * let count = $state(0); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$state + * https://svelte.dev/docs/svelte/$state * * @param initial The initial value */ @@ -120,7 +120,7 @@ declare namespace $state { * * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$state-raw + * https://svelte.dev/docs/svelte/$state#$state.raw * * @param initial The initial value */ @@ -141,7 +141,7 @@ declare namespace $state { * * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$state.snapshot + * https://svelte.dev/docs/svelte/$state#$state.snapshot * * @param state The value to snapshot */ @@ -178,7 +178,7 @@ declare namespace $state { * let double = $derived(count * 2); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$derived + * https://svelte.dev/docs/svelte/$derived * * @param expression The derived state expression */ @@ -200,7 +200,7 @@ declare namespace $derived { * }); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$derived-by + * https://svelte.dev/docs/svelte/$derived#$derived.by */ export function by(fn: () => T): T; @@ -239,7 +239,7 @@ declare namespace $derived { * * Does not run during server side rendering. * - * https://svelte-5-preview.vercel.app/docs/runes#$effect + * https://svelte.dev/docs/svelte/$effect * @param fn The function to execute */ declare function $effect(fn: () => void | (() => void)): void; @@ -258,7 +258,7 @@ declare namespace $effect { * * Does not run during server side rendering. * - * https://svelte-5-preview.vercel.app/docs/runes#$effect-pre + * https://svelte.dev/docs/svelte/$effect#$effect.pre * @param fn The function to execute */ export function pre(fn: () => void | (() => void)): void; @@ -281,7 +281,7 @@ declare namespace $effect { * * This allows you to (for example) add things like subscriptions without causing memory leaks, by putting them in child effects. * - * https://svelte-5-preview.vercel.app/docs/runes#$effect-tracking + * https://svelte.dev/docs/svelte/$effect#$effect.tracking */ export function tracking(): boolean; @@ -309,7 +309,7 @@ declare namespace $effect { * * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$effect-root + * https://svelte.dev/docs/svelte/$effect#$effect.root */ export function root(fn: () => void | (() => void)): () => void; @@ -342,7 +342,7 @@ declare namespace $effect { * let { optionalProp = 42, requiredProp, bindableProp = $bindable() }: { optionalProp?: number; requiredProps: string; bindableProp: boolean } = $props(); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$props + * https://svelte.dev/docs/svelte/$props */ declare function $props(): any; @@ -353,7 +353,7 @@ declare function $props(): any; * let { propName = $bindable() }: { propName: boolean } = $props(); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$bindable + * https://svelte.dev/docs/svelte/$bindable */ declare function $bindable(fallback?: T): T; @@ -373,7 +373,7 @@ declare function $bindable(fallback?: T): T; * $inspect(x, y).with(() => { debugger; }); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$inspect + * https://svelte.dev/docs/svelte/$inspect */ declare function $inspect( ...values: T @@ -396,6 +396,6 @@ declare function $inspect( * * Only available inside custom element components, and only on the client-side. * - * https://svelte-5-preview.vercel.app/docs/runes#$host + * https://svelte.dev/docs/svelte/$host */ declare function $host(): El; diff --git a/packages/svelte/src/compiler/phases/3-transform/server/transform-server.js b/packages/svelte/src/compiler/phases/3-transform/server/transform-server.js index 5735e94ca4..c164aa4219 100644 --- a/packages/svelte/src/compiler/phases/3-transform/server/transform-server.js +++ b/packages/svelte/src/compiler/phases/3-transform/server/transform-server.js @@ -344,7 +344,7 @@ export function server_component(analysis, options) { b.block([ b.throw_error( `Component.render(...) is no longer valid in Svelte 5. ` + - 'See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information' + 'See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more information' ) ]) ) diff --git a/packages/svelte/src/index-client.js b/packages/svelte/src/index-client.js index 2916aaecb1..01f98927c8 100644 --- a/packages/svelte/src/index-client.js +++ b/packages/svelte/src/index-client.js @@ -82,7 +82,7 @@ function create_custom_event(type, detail, { bubbles = false, cancelable = false * }>(); * ``` * - * @deprecated Use callback props and/or the `$host()` rune instead — see https://svelte-5-preview.vercel.app/docs/deprecations#createeventdispatcher + * @deprecated Use callback props and/or the `$host()` rune instead — see https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events * @template {Record} [EventMap = any] * @returns {EventDispatcher} */ @@ -121,7 +121,7 @@ export function createEventDispatcher() { * * In runes mode use `$effect.pre` instead. * - * @deprecated Use `$effect.pre` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate + * @deprecated Use `$effect.pre` instead — see https://svelte.dev/docs/svelte/$effect#$effect.pre * @param {() => void} fn * @returns {void} */ @@ -144,7 +144,7 @@ export function beforeUpdate(fn) { * * In runes mode use `$effect` instead. * - * @deprecated Use `$effect` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate + * @deprecated Use `$effect` instead — see https://svelte.dev/docs/svelte/$effect * @param {() => void} fn * @returns {void} */ diff --git a/packages/svelte/src/internal/client/runtime.js b/packages/svelte/src/internal/client/runtime.js index 074c81588a..26c8d9adbb 100644 --- a/packages/svelte/src/internal/client/runtime.js +++ b/packages/svelte/src/internal/client/runtime.js @@ -832,8 +832,6 @@ export function invalidate_inner_signals(fn) { /** * Use `untrack` to prevent something from being treated as an `$effect`/`$derived` dependency. - * - * https://svelte-5-preview.vercel.app/docs/functions#untrack * @template T * @param {() => T} fn * @returns {T} diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index c7794d5b0e..1172763c69 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -385,7 +385,7 @@ declare module 'svelte' { * }>(); * ``` * - * @deprecated Use callback props and/or the `$host()` rune instead — see https://svelte-5-preview.vercel.app/docs/deprecations#createeventdispatcher + * @deprecated Use callback props and/or the `$host()` rune instead — see https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events * */ export function createEventDispatcher = any>(): EventDispatcher; /** @@ -395,7 +395,7 @@ declare module 'svelte' { * * In runes mode use `$effect.pre` instead. * - * @deprecated Use `$effect.pre` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate + * @deprecated Use `$effect.pre` instead — see https://svelte.dev/docs/svelte/$effect#$effect.pre * */ export function beforeUpdate(fn: () => void): void; /** @@ -405,7 +405,7 @@ declare module 'svelte' { * * In runes mode use `$effect` instead. * - * @deprecated Use `$effect` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate + * @deprecated Use `$effect` instead — see https://svelte.dev/docs/svelte/$effect * */ export function afterUpdate(fn: () => void): void; /** @@ -2322,7 +2322,7 @@ declare module 'svelte/types/compiler/interfaces' { * let count = $state(0); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$state + * https://svelte.dev/docs/svelte/$state * * @param initial The initial value */ @@ -2418,7 +2418,7 @@ declare namespace $state { * * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$state-raw + * https://svelte.dev/docs/svelte/$state#$state.raw * * @param initial The initial value */ @@ -2439,7 +2439,7 @@ declare namespace $state { * * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$state.snapshot + * https://svelte.dev/docs/svelte/$state#$state.snapshot * * @param state The value to snapshot */ @@ -2476,7 +2476,7 @@ declare namespace $state { * let double = $derived(count * 2); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$derived + * https://svelte.dev/docs/svelte/$derived * * @param expression The derived state expression */ @@ -2498,7 +2498,7 @@ declare namespace $derived { * }); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$derived-by + * https://svelte.dev/docs/svelte/$derived#$derived.by */ export function by(fn: () => T): T; @@ -2537,7 +2537,7 @@ declare namespace $derived { * * Does not run during server side rendering. * - * https://svelte-5-preview.vercel.app/docs/runes#$effect + * https://svelte.dev/docs/svelte/$effect * @param fn The function to execute */ declare function $effect(fn: () => void | (() => void)): void; @@ -2556,7 +2556,7 @@ declare namespace $effect { * * Does not run during server side rendering. * - * https://svelte-5-preview.vercel.app/docs/runes#$effect-pre + * https://svelte.dev/docs/svelte/$effect#$effect.pre * @param fn The function to execute */ export function pre(fn: () => void | (() => void)): void; @@ -2579,7 +2579,7 @@ declare namespace $effect { * * This allows you to (for example) add things like subscriptions without causing memory leaks, by putting them in child effects. * - * https://svelte-5-preview.vercel.app/docs/runes#$effect-tracking + * https://svelte.dev/docs/svelte/$effect#$effect.tracking */ export function tracking(): boolean; @@ -2607,7 +2607,7 @@ declare namespace $effect { * * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$effect-root + * https://svelte.dev/docs/svelte/$effect#$effect.root */ export function root(fn: () => void | (() => void)): () => void; @@ -2640,7 +2640,7 @@ declare namespace $effect { * let { optionalProp = 42, requiredProp, bindableProp = $bindable() }: { optionalProp?: number; requiredProps: string; bindableProp: boolean } = $props(); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$props + * https://svelte.dev/docs/svelte/$props */ declare function $props(): any; @@ -2651,7 +2651,7 @@ declare function $props(): any; * let { propName = $bindable() }: { propName: boolean } = $props(); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$bindable + * https://svelte.dev/docs/svelte/$bindable */ declare function $bindable(fallback?: T): T; @@ -2671,7 +2671,7 @@ declare function $bindable(fallback?: T): T; * $inspect(x, y).with(() => { debugger; }); * ``` * - * https://svelte-5-preview.vercel.app/docs/runes#$inspect + * https://svelte.dev/docs/svelte/$inspect */ declare function $inspect( ...values: T @@ -2694,7 +2694,7 @@ declare function $inspect( * * Only available inside custom element components, and only on the client-side. * - * https://svelte-5-preview.vercel.app/docs/runes#$host + * https://svelte.dev/docs/svelte/$host */ declare function $host(): El;