svelte 5.43.7 → 5.43.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/compiler/index.js +1 -1
  2. package/package.json +1 -1
  3. package/src/compiler/phases/1-parse/utils/create.js +1 -2
  4. package/src/compiler/phases/2-analyze/index.js +269 -187
  5. package/src/compiler/phases/2-analyze/visitors/AwaitExpression.js +0 -4
  6. package/src/compiler/phases/3-transform/client/visitors/AwaitBlock.js +29 -15
  7. package/src/compiler/phases/3-transform/client/visitors/ConstTag.js +50 -14
  8. package/src/compiler/phases/3-transform/client/visitors/Fragment.js +5 -14
  9. package/src/compiler/phases/3-transform/client/visitors/SnippetBlock.js +2 -8
  10. package/src/compiler/phases/3-transform/client/visitors/SvelteBoundary.js +12 -2
  11. package/src/compiler/phases/3-transform/client/visitors/shared/fragment.js +1 -1
  12. package/src/compiler/phases/3-transform/server/visitors/ConstTag.js +25 -1
  13. package/src/compiler/phases/3-transform/server/visitors/EachBlock.js +2 -6
  14. package/src/compiler/phases/3-transform/server/visitors/Fragment.js +8 -1
  15. package/src/compiler/phases/3-transform/server/visitors/IfBlock.js +1 -5
  16. package/src/compiler/phases/3-transform/server/visitors/SnippetBlock.js +0 -5
  17. package/src/compiler/phases/3-transform/server/visitors/SvelteBoundary.js +3 -10
  18. package/src/compiler/phases/3-transform/server/visitors/shared/component.js +1 -6
  19. package/src/compiler/phases/nodes.js +4 -0
  20. package/src/compiler/phases/scope.js +8 -4
  21. package/src/compiler/utils/builders.js +1 -1
  22. package/src/internal/client/dom/blocks/each.js +156 -236
  23. package/src/internal/client/reactivity/deriveds.js +5 -2
  24. package/src/internal/client/reactivity/effects.js +33 -37
  25. package/src/internal/client/reactivity/sources.js +17 -9
  26. package/src/version.js +1 -1
@@ -14,7 +14,9 @@ import {
14
14
  is_dirty,
15
15
  untracking,
16
16
  is_destroying_effect,
17
- push_reaction_value
17
+ push_reaction_value,
18
+ set_is_updating_effect,
19
+ is_updating_effect
18
20
  } from '../runtime.js';
19
21
  import { equals, safe_equals } from './equality.js';
20
22
  import {
@@ -246,19 +248,25 @@ export function internal_set(source, value) {
246
248
 
247
249
  export function flush_eager_effects() {
248
250
  eager_effects_deferred = false;
251
+ var prev_is_updating_effect = is_updating_effect;
252
+ set_is_updating_effect(true);
249
253
 
250
254
  const inspects = Array.from(eager_effects);
251
255
 
252
- for (const effect of inspects) {
253
- // Mark clean inspect-effects as maybe dirty and then check their dirtiness
254
- // instead of just updating the effects - this way we avoid overfiring.
255
- if ((effect.f & CLEAN) !== 0) {
256
- set_signal_status(effect, MAYBE_DIRTY);
257
- }
256
+ try {
257
+ for (const effect of inspects) {
258
+ // Mark clean inspect-effects as maybe dirty and then check their dirtiness
259
+ // instead of just updating the effects - this way we avoid overfiring.
260
+ if ((effect.f & CLEAN) !== 0) {
261
+ set_signal_status(effect, MAYBE_DIRTY);
262
+ }
258
263
 
259
- if (is_dirty(effect)) {
260
- update_effect(effect);
264
+ if (is_dirty(effect)) {
265
+ update_effect(effect);
266
+ }
261
267
  }
268
+ } finally {
269
+ set_is_updating_effect(prev_is_updating_effect);
262
270
  }
263
271
 
264
272
  eager_effects.clear();
package/src/version.js CHANGED
@@ -4,5 +4,5 @@
4
4
  * The current version, as set in package.json.
5
5
  * @type {string}
6
6
  */
7
- export const VERSION = '5.43.7';
7
+ export const VERSION = '5.43.9';
8
8
  export const PUBLIC_VERSION = '5';