From 9f964177eca671ca1e4fc62716f80cd2b2a4b35b Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 14 Dec 2024 09:15:40 -0500 Subject: [PATCH] note when features were added (#14709) * note when features were added * regenerate --- packages/svelte/src/compiler/index.js | 2 ++ packages/svelte/src/internal/client/render.js | 4 ++-- packages/svelte/types/index.d.ts | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/svelte/src/compiler/index.js b/packages/svelte/src/compiler/index.js index 74678f518daf..42427dd9c407 100644 --- a/packages/svelte/src/compiler/index.js +++ b/packages/svelte/src/compiler/index.js @@ -98,6 +98,8 @@ export function compileModule(source, options) { * The `modern` option (`false` by default in Svelte 5) makes the parser return a modern AST instead of the legacy AST. * `modern` will become `true` by default in Svelte 6, and the option will be removed in Svelte 7. * + * The `loose` option, available since 5.13.0, tries to always return an AST even if the input will not successfully compile. + * * @param {string} source * @param {{ filename?: string; rootDir?: string; modern?: boolean; loose?: boolean }} [options] * @returns {AST.Root | LegacyRoot} diff --git a/packages/svelte/src/internal/client/render.js b/packages/svelte/src/internal/client/render.js index f4b7944c14c5..767b23013169 100644 --- a/packages/svelte/src/internal/client/render.js +++ b/packages/svelte/src/internal/client/render.js @@ -272,9 +272,9 @@ let mounted_components = new WeakMap(); /** * Unmounts a component that was previously mounted using `mount` or `hydrate`. * - * If `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. + * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. * - * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise. + * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`). * * ```js * import { mount, unmount } from 'svelte'; diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index bafa7a2265e5..dca0fd99f0b7 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -449,9 +449,9 @@ declare module 'svelte' { /** * Unmounts a component that was previously mounted using `mount` or `hydrate`. * - * If `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. + * Since 5.13.0, if `options.outro` is `true`, [transitions](https://svelte.dev/docs/svelte/transition) will play before the component is removed from the DOM. * - * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise. + * Returns a `Promise` that resolves after transitions have completed if `options.outro` is true, or immediately otherwise (prior to 5.13.0, returns `void`). * * ```js * import { mount, unmount } from 'svelte';