mirror of https://github.com/sveltejs/svelte
commit
91563f0b04
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: unlink errored and otherwise finished batch
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
perf: walk composedPath() directly in delegated event propagation
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: transfer effects when merging batches
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: allow `$derived(await ...)` in disconnected effect roots
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: remove temporary raw-text hydration markers
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: propagate async `@const` blockers through closure references so template expressions like `{(() => host)()}` correctly wait for the awaited value
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: properly unlink batches
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: settle discarded batch
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: declare `let:` directives before `{@const}` declarations on slotted elements
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: resume outro-ed branches if they were kept around
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: avoid waterfall-warning when async resolves to same value
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: correctly coordinate component-level effects inside async blocks
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: make unnecessary commit work less likely
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
chore: add tag name to `a11y_click_events_have_key_events` warning
|
||||
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: catch rejected promises while merging/committing
|
||||
@ -0,0 +1,12 @@
|
||||
import { tick } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, logs }) {
|
||||
await tick();
|
||||
|
||||
assert.deepEqual(logs, [
|
||||
`effect_orphan\n\`$effect\` can only be used inside an effect (e.g. during component initialisation)\nhttps://svelte.dev/e/effect_orphan`
|
||||
]);
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,14 @@
|
||||
<script>
|
||||
async function foo() {
|
||||
await 0;
|
||||
$effect(() => {
|
||||
console.log('this effect is orphaned');
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
await foo();
|
||||
} catch (e) {
|
||||
console.log(e.message)
|
||||
}
|
||||
</script>
|
||||
@ -1,14 +0,0 @@
|
||||
import { tick } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
async test({ assert, logs }) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 10));
|
||||
assert.deepEqual(logs, [1, 1]);
|
||||
const [button] = document.querySelectorAll('button');
|
||||
|
||||
button.click();
|
||||
await tick();
|
||||
assert.deepEqual(logs, [1, 1, 2]);
|
||||
}
|
||||
});
|
||||
@ -1,15 +0,0 @@
|
||||
<script>
|
||||
let increment;
|
||||
|
||||
async function fn() {
|
||||
let count = $state(1);
|
||||
increment = () => { count++; };
|
||||
const value = $derived(await count);
|
||||
$effect.pre(() => console.log(value))
|
||||
return { get value() { return value } };
|
||||
}
|
||||
fn().then(r => console.log(r.value));
|
||||
|
||||
</script>
|
||||
|
||||
<button onclick={() => increment()}>increment</button>
|
||||
Loading…
Reference in new issue