diff --git a/packages/svelte/src/internal/client/reactivity/batch.js b/packages/svelte/src/internal/client/reactivity/batch.js index b92d827128..fc3eb25ca7 100644 --- a/packages/svelte/src/internal/client/reactivity/batch.js +++ b/packages/svelte/src/internal/client/reactivity/batch.js @@ -266,7 +266,7 @@ export class Batch { } #process() { - // console.group('process', this.id); + console.group('process', this.id); current_batch = this; @@ -332,7 +332,7 @@ export class Batch { legacy_updates = null; if (this.#is_deferred() || this.#is_blocked()) { - // console.log(this.#is_deferred() ? 'deferred' : 'blocked'); + console.log(this.#is_deferred() ? 'deferred' : 'blocked'); this.#defer_effects(render_effects); this.#defer_effects(effects); @@ -340,7 +340,7 @@ export class Batch { reset_branch(e, t); } } else { - // console.log('resolved'); + console.log('resolved'); if (this.#pending.size === 0) { batches.delete(this); } @@ -389,7 +389,7 @@ export class Batch { this.#commit(); } - // console.groupEnd(); + console.groupEnd(); } /** @@ -773,28 +773,28 @@ export class Batch { } } - // console.group('batch_values'); - // for (const [value, v] of batch_values) { - // console.log(this.current.has(value), value.label, v); - // } - // console.groupEnd(); - - // console.group('batch_cvs'); - // for (const [reaction, cv] of batch_cvs) { - // console.log( - // this.cvs.has(reaction), - // cv, - // reaction.deps?.map((d) => d.label), - // reaction.label ?? reaction.fn - // ); - // } - // console.groupEnd(); - - // console.group('batch_wvs'); - // for (const [value, wv] of batch_wvs) { - // console.log(this.wvs.has(value), wv, value.label); - // } - // console.groupEnd(); + console.group('batch_values'); + for (const [value, v] of batch_values) { + console.log(this.current.has(value), value.label, v); + } + console.groupEnd(); + + console.group('batch_cvs'); + for (const [reaction, cv] of batch_cvs) { + console.log( + this.cvs.has(reaction), + cv, + reaction.deps?.map((d) => d.label), + reaction.label ?? reaction.fn + ); + } + console.groupEnd(); + + console.group('batch_wvs'); + for (const [value, wv] of batch_wvs) { + console.log(this.wvs.has(value), wv, value.label); + } + console.groupEnd(); } /** @@ -1122,6 +1122,10 @@ export function eager(fn) { get(version); + if (DEV) { + version.label = ''; + } + eager_effect(() => { if (initial) { // the first time this runs, we create an eager effect diff --git a/packages/svelte/src/internal/client/reactivity/effects.js b/packages/svelte/src/internal/client/reactivity/effects.js index 970cc9a640..2019e610ad 100644 --- a/packages/svelte/src/internal/client/reactivity/effects.js +++ b/packages/svelte/src/internal/client/reactivity/effects.js @@ -374,7 +374,9 @@ export function render_effect(fn, flags = 0) { */ export function template_effect(fn, sync = [], async = [], blockers = []) { flatten(blockers, sync, async, (values) => { - create_effect(RENDER_EFFECT, () => fn(...values.map(get))); + create_effect(RENDER_EFFECT, () => { + fn(...values.map(get)); + }); }); }