From 5d04b3bc2ca254a9bd6499ae4c84ca16fff8de55 Mon Sep 17 00:00:00 2001 From: "S. Elliott Johnson" Date: Tue, 9 Sep 2025 10:04:17 -0600 Subject: [PATCH] snapshots --- packages/svelte/src/internal/client/dom/blocks/boundary.js | 7 +------ .../_expected/client/index.svelte.js | 4 ++-- .../async-each-hoisting/_expected/client/index.svelte.js | 2 +- .../_expected/client/index.svelte.js | 4 ++-- .../async-if-hoisting/_expected/client/index.svelte.js | 4 ++-- 5 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/svelte/src/internal/client/dom/blocks/boundary.js b/packages/svelte/src/internal/client/dom/blocks/boundary.js index fbfb69ffaf..5cc9c40793 100644 --- a/packages/svelte/src/internal/client/dom/blocks/boundary.js +++ b/packages/svelte/src/internal/client/dom/blocks/boundary.js @@ -154,7 +154,7 @@ export class Boundary { } } else { try { - this.#main_effect = branch(() => this.#children(this.#anchor)); + this.#main_effect = branch(() => children(this.#anchor)); } catch (error) { this.error(error); } @@ -184,7 +184,6 @@ export class Boundary { } #hydrate_resolved_content() { - // Server already rendered resolved content, so hydrate it directly try { this.#main_effect = branch(() => this.#children(this.#anchor)); } catch (error) { @@ -203,10 +202,6 @@ export class Boundary { } this.#pending_effect = branch(() => pending(this.#anchor)); - // future work: when we have some form of async SSR, we will - // need to use hydration boundary comments to report whether - // the pending or main block was rendered for a given - // boundary, and hydrate accordingly Batch.enqueue(() => { this.#main_effect = this.#run(() => { Batch.ensure(); diff --git a/packages/svelte/tests/snapshot/samples/async-each-fallback-hoisting/_expected/client/index.svelte.js b/packages/svelte/tests/snapshot/samples/async-each-fallback-hoisting/_expected/client/index.svelte.js index c4316aad79..cf667e1624 100644 --- a/packages/svelte/tests/snapshot/samples/async-each-fallback-hoisting/_expected/client/index.svelte.js +++ b/packages/svelte/tests/snapshot/samples/async-each-fallback-hoisting/_expected/client/index.svelte.js @@ -17,7 +17,7 @@ export default function Async_each_fallback_hoisting($$anchor) { var text = $.text(); - $.template_effect(($0) => $.set_text(text, $0), undefined, [() => Promise.reject('This should never be reached')]); + $.template_effect(($0) => $.set_text(text, $0), void 0, [() => Promise.reject('This should never be reached')]); $.append($$anchor, text); }, ($$anchor) => { @@ -25,7 +25,7 @@ export default function Async_each_fallback_hoisting($$anchor) { var text_1 = $.text(); - $.template_effect(($0) => $.set_text(text_1, $0), undefined, [() => Promise.resolve(4)]); + $.template_effect(($0) => $.set_text(text_1, $0), void 0, [() => Promise.resolve(4)]); $.append($$anchor, text_1); } ); diff --git a/packages/svelte/tests/snapshot/samples/async-each-hoisting/_expected/client/index.svelte.js b/packages/svelte/tests/snapshot/samples/async-each-hoisting/_expected/client/index.svelte.js index aa848cc704..a1535d6886 100644 --- a/packages/svelte/tests/snapshot/samples/async-each-hoisting/_expected/client/index.svelte.js +++ b/packages/svelte/tests/snapshot/samples/async-each-hoisting/_expected/client/index.svelte.js @@ -15,7 +15,7 @@ export default function Async_each_hoisting($$anchor) { var text = $.text(); - $.template_effect(($0) => $.set_text(text, $0), undefined, [() => $.get(item)]); + $.template_effect(($0) => $.set_text(text, $0), void 0, [() => $.get(item)]); $.append($$anchor, text); }); }); diff --git a/packages/svelte/tests/snapshot/samples/async-if-alternate-hoisting/_expected/client/index.svelte.js b/packages/svelte/tests/snapshot/samples/async-if-alternate-hoisting/_expected/client/index.svelte.js index 684e67e737..e385f5d234 100644 --- a/packages/svelte/tests/snapshot/samples/async-if-alternate-hoisting/_expected/client/index.svelte.js +++ b/packages/svelte/tests/snapshot/samples/async-if-alternate-hoisting/_expected/client/index.svelte.js @@ -10,14 +10,14 @@ export default function Async_if_alternate_hoisting($$anchor) { var consequent = ($$anchor) => { var text = $.text(); - $.template_effect(($0) => $.set_text(text, $0), undefined, [() => Promise.reject('no no no')]); + $.template_effect(($0) => $.set_text(text, $0), void 0, [() => Promise.reject('no no no')]); $.append($$anchor, text); }; var alternate = ($$anchor) => { var text_1 = $.text(); - $.template_effect(($0) => $.set_text(text_1, $0), undefined, [() => Promise.resolve('yes yes yes')]); + $.template_effect(($0) => $.set_text(text_1, $0), void 0, [() => Promise.resolve('yes yes yes')]); $.append($$anchor, text_1); }; diff --git a/packages/svelte/tests/snapshot/samples/async-if-hoisting/_expected/client/index.svelte.js b/packages/svelte/tests/snapshot/samples/async-if-hoisting/_expected/client/index.svelte.js index dee33e852d..356e8e9607 100644 --- a/packages/svelte/tests/snapshot/samples/async-if-hoisting/_expected/client/index.svelte.js +++ b/packages/svelte/tests/snapshot/samples/async-if-hoisting/_expected/client/index.svelte.js @@ -10,14 +10,14 @@ export default function Async_if_hoisting($$anchor) { var consequent = ($$anchor) => { var text = $.text(); - $.template_effect(($0) => $.set_text(text, $0), undefined, [() => Promise.resolve('yes yes yes')]); + $.template_effect(($0) => $.set_text(text, $0), void 0, [() => Promise.resolve('yes yes yes')]); $.append($$anchor, text); }; var alternate = ($$anchor) => { var text_1 = $.text(); - $.template_effect(($0) => $.set_text(text_1, $0), undefined, [() => Promise.reject('no no no')]); + $.template_effect(($0) => $.set_text(text_1, $0), void 0, [() => Promise.reject('no no no')]); $.append($$anchor, text_1); };