Skip to content

Commit 523af1a

Browse files
authored
Merge branch 'main' into trojan-source-warnings
2 parents 2c28094 + 895337c commit 523af1a

File tree

19 files changed

+234
-164
lines changed

19 files changed

+234
-164
lines changed

.changeset/blue-badgers-play.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: treat nullish expression as empty string

.changeset/little-worms-wonder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: prevent invalid BigInt calls from blowing up at compile time

.changeset/strong-coins-peel.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/tall-cherries-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: emit right error for a shadowed invalid rune

.changeset/wild-bulldogs-move.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

benchmarking/compare/index.js

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,37 @@ for (let i = 0; i < results[0].length; i += 1) {
6767
for (const metric of ['time', 'gc_time']) {
6868
const times = results.map((result) => +result[i][metric]);
6969
let min = Infinity;
70+
let max = -Infinity;
7071
let min_index = -1;
7172

7273
for (let b = 0; b < times.length; b += 1) {
73-
if (times[b] < min) {
74-
min = times[b];
74+
const time = times[b];
75+
76+
if (time < min) {
77+
min = time;
7578
min_index = b;
7679
}
80+
81+
if (time > max) {
82+
max = time;
83+
}
7784
}
7885

7986
if (min !== 0) {
80-
console.group(`${metric}: fastest is ${branches[min_index]}`);
87+
console.group(`${metric}: fastest is ${char(min_index)} (${branches[min_index]})`);
8188
times.forEach((time, b) => {
82-
console.log(`${branches[b]}: ${time.toFixed(2)}ms (${((time / min) * 100).toFixed(2)}%)`);
89+
const SIZE = 20;
90+
const n = Math.round(SIZE * (time / max));
91+
92+
console.log(`${char(b)}: ${'◼'.repeat(n)}${' '.repeat(SIZE - n)} ${time.toFixed(2)}ms`);
8393
});
8494
console.groupEnd();
8595
}
8696
}
8797

8898
console.groupEnd();
8999
}
100+
101+
function char(i) {
102+
return String.fromCharCode(97 + i);
103+
}

packages/svelte/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# svelte
22

3+
## 5.28.3
4+
5+
### Patch Changes
6+
7+
- chore: avoid microtasks when flushing sync ([#15895](https://github.com/sveltejs/svelte/pull/15895))
8+
9+
- fix: improve error message for migration errors when slot would be renamed ([#15841](https://github.com/sveltejs/svelte/pull/15841))
10+
11+
- fix: allow characters in the supplementary special-purpose plane ([#15823](https://github.com/sveltejs/svelte/pull/15823))
12+
313
## 5.28.2
414

515
### Patch Changes

packages/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "svelte",
33
"description": "Cybernetically enhanced web apps",
44
"license": "MIT",
5-
"version": "5.28.2",
5+
"version": "5.28.3",
66
"type": "module",
77
"types": "./types/index.d.ts",
88
"engines": {

packages/svelte/src/compiler/phases/2-analyze/visitors/Identifier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function Identifier(node, context) {
3939
if (
4040
is_rune(node.name) &&
4141
context.state.scope.get(node.name) === null &&
42-
context.state.scope.get(node.name.slice(1)) === null
42+
context.state.scope.get(node.name.slice(1))?.kind !== 'store_sub'
4343
) {
4444
/** @type {Expression} */
4545
let current = node;

packages/svelte/src/internal/client/runtime.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -823,18 +823,21 @@ export function flushSync(fn) {
823823
if (fn) {
824824
is_flushing = true;
825825
flush_queued_root_effects();
826+
827+
is_flushing = true;
826828
result = fn();
827829
}
828830

829-
flush_tasks();
831+
while (true) {
832+
flush_tasks();
833+
834+
if (queued_root_effects.length === 0) {
835+
return /** @type {T} */ (result);
836+
}
830837

831-
while (queued_root_effects.length > 0) {
832838
is_flushing = true;
833839
flush_queued_root_effects();
834-
flush_tasks();
835840
}
836-
837-
return /** @type {T} */ (result);
838841
}
839842

840843
/**

0 commit comments

Comments
 (0)