svelte 5.55.3 → 5.55.4
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.
- package/compiler/index.js +1 -1
- package/package.json +1 -1
- package/src/compiler/phases/2-analyze/visitors/ConstTag.js +2 -1
- package/src/compiler/phases/3-transform/client/visitors/ConstTag.js +3 -10
- package/src/compiler/phases/3-transform/server/visitors/ConstTag.js +3 -10
- package/src/internal/client/reactivity/batch.js +6 -8
- package/src/internal/client/reactivity/effects.js +16 -10
- package/src/version.js +1 -1
- package/types/index.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -61,7 +61,8 @@ export function ConstTag(node, context) {
|
|
|
61
61
|
// keep the counter in sync with the number of thunks pushed in ConstTag in transform
|
|
62
62
|
// TODO 6.0 once non-async and non-runes mode is gone investigate making this more robust
|
|
63
63
|
// via something like the approach in https://github.com/sveltejs/svelte/pull/18032
|
|
64
|
-
const length = run.declaration_count
|
|
64
|
+
const length = run.declaration_count + (blockers.length > 0 ? 1 : 0);
|
|
65
|
+
run.declaration_count += blockers.length > 0 ? 2 : 1;
|
|
65
66
|
const blocker = b.member(run.id, b.literal(length), true);
|
|
66
67
|
for (const binding of bindings) {
|
|
67
68
|
binding.blocker = blocker;
|
|
@@ -96,22 +96,15 @@ function add_const_declaration(state, id, expression, metadata) {
|
|
|
96
96
|
|
|
97
97
|
state.consts.push(b.let(id));
|
|
98
98
|
|
|
99
|
-
/** @type {Statement | undefined} */
|
|
100
|
-
let promise_stmt;
|
|
101
|
-
|
|
102
99
|
if (blockers.length === 1) {
|
|
103
|
-
|
|
100
|
+
run.thunks.push(b.thunk(b.member(/** @type {Expression} */ (blockers[0]), 'promise')));
|
|
104
101
|
} else if (blockers.length > 0) {
|
|
105
|
-
|
|
102
|
+
run.thunks.push(b.thunk(b.call('$.wait', b.array(blockers))));
|
|
106
103
|
}
|
|
107
104
|
|
|
108
105
|
// keep the number of thunks pushed in sync with ConstTag in analysis phase
|
|
109
106
|
const assignment = b.assignment('=', id, expression);
|
|
110
|
-
|
|
111
|
-
run.thunks.push(b.thunk(b.block([promise_stmt, b.stmt(assignment)]), true));
|
|
112
|
-
} else {
|
|
113
|
-
run.thunks.push(b.thunk(assignment, metadata.expression.has_await));
|
|
114
|
-
}
|
|
107
|
+
run.thunks.push(b.thunk(assignment, metadata.expression.has_await));
|
|
115
108
|
} else {
|
|
116
109
|
state.consts.push(b.const(id, expression));
|
|
117
110
|
state.consts.push(...after);
|
|
@@ -28,22 +28,15 @@ export function ConstTag(node, context) {
|
|
|
28
28
|
context.state.init.push(b.let(identifier.name));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/** @type {Statement | undefined} */
|
|
32
|
-
let promise_stmt;
|
|
33
|
-
|
|
34
31
|
if (blockers.length === 1) {
|
|
35
|
-
|
|
32
|
+
run.thunks.push(b.thunk(/** @type {Expression} */ (blockers[0])));
|
|
36
33
|
} else if (blockers.length > 0) {
|
|
37
|
-
|
|
34
|
+
run.thunks.push(b.thunk(b.call('Promise.all', b.array(blockers))));
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
// keep the number of thunks pushed in sync with ConstTag in analysis phase
|
|
41
38
|
const assignment = b.assignment('=', id, init);
|
|
42
|
-
|
|
43
|
-
run.thunks.push(b.thunk(b.block([promise_stmt, b.stmt(assignment)]), true));
|
|
44
|
-
} else {
|
|
45
|
-
run.thunks.push(b.thunk(assignment, node.metadata.expression.has_await));
|
|
46
|
-
}
|
|
39
|
+
run.thunks.push(b.thunk(assignment, node.metadata.expression.has_await));
|
|
47
40
|
} else {
|
|
48
41
|
context.state.init.push(b.const(id, init));
|
|
49
42
|
}
|
|
@@ -1074,15 +1074,13 @@ export function schedule_effect(effect) {
|
|
|
1074
1074
|
let eager_versions = [];
|
|
1075
1075
|
|
|
1076
1076
|
function eager_flush() {
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
for (const version of eager_versions) {
|
|
1080
|
-
update(version);
|
|
1081
|
-
}
|
|
1082
|
-
});
|
|
1083
|
-
} finally {
|
|
1077
|
+
flushSync(() => {
|
|
1078
|
+
const eager = eager_versions;
|
|
1084
1079
|
eager_versions = [];
|
|
1085
|
-
|
|
1080
|
+
for (const version of eager) {
|
|
1081
|
+
update(version);
|
|
1082
|
+
}
|
|
1083
|
+
});
|
|
1086
1084
|
}
|
|
1087
1085
|
|
|
1088
1086
|
/**
|
|
@@ -654,16 +654,22 @@ function pause_children(effect, transitions, local) {
|
|
|
654
654
|
|
|
655
655
|
while (child !== null) {
|
|
656
656
|
var sibling = child.next;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
657
|
+
|
|
658
|
+
// If this child is a root effect, then it will become an independent root when its parent
|
|
659
|
+
// is destroyed, it should therefore not become inert nor partake in transitions.
|
|
660
|
+
if ((child.f & ROOT_EFFECT) === 0) {
|
|
661
|
+
var transparent =
|
|
662
|
+
(child.f & EFFECT_TRANSPARENT) !== 0 ||
|
|
663
|
+
// If this is a branch effect without a block effect parent,
|
|
664
|
+
// it means the parent block effect was pruned. In that case,
|
|
665
|
+
// transparency information was transferred to the branch effect.
|
|
666
|
+
((child.f & BRANCH_EFFECT) !== 0 && (effect.f & BLOCK_EFFECT) !== 0);
|
|
667
|
+
// TODO we don't need to call pause_children recursively with a linked list in place
|
|
668
|
+
// it's slightly more involved though as we have to account for `transparent` changing
|
|
669
|
+
// through the tree.
|
|
670
|
+
pause_children(child, transitions, transparent ? local : false);
|
|
671
|
+
}
|
|
672
|
+
|
|
667
673
|
child = sibling;
|
|
668
674
|
}
|
|
669
675
|
}
|
package/src/version.js
CHANGED
package/types/index.d.ts.map
CHANGED
|
@@ -273,6 +273,6 @@
|
|
|
273
273
|
null,
|
|
274
274
|
null
|
|
275
275
|
],
|
|
276
|
-
"mappings": ";;;;;;;;;kBAUiBA,2BAA2BA;;;;;;;;;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