mirror of https://github.com/sveltejs/svelte
commit
6e08f0cb53
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: always return true from `deleteProperty` trap
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
breaking: throw error if derived creates state and then depends on it
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure assignments to state field inside constructor trigger effects
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure $inspect works with SvelteMap and SvelteSet
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: handle deletions of previously-unread state proxy properties
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: properly handle proxied array length mutations
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
chore: default options.filename to "(unknown)"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: properly transform destructured `$derived.by` declarations
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: correctly hydrate empty raw blocks
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: make internal sources ownerless
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: repair `href` attribute mismatches
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: join text nodes separated by comments
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: allow non-synchronous legacy component instantiation
|
@ -1,7 +1,6 @@
|
||||
|
||||
export function busy() {
|
||||
let a = 0;
|
||||
for (let i = 0; i < 1_00; i++) {
|
||||
a++;
|
||||
}
|
||||
let a = 0;
|
||||
for (let i = 0; i < 1_00; i++) {
|
||||
a++;
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +0,0 @@
|
||||
dist/*.js
|
||||
build/*.js
|
||||
npm/**/*
|
||||
config/*.js
|
||||
messages/**/*.md
|
||||
src/compiler/errors.js
|
||||
src/compiler/warnings.js
|
||||
src/internal/client/errors.js
|
||||
src/internal/client/warnings.js
|
||||
src/internal/shared/errors.js
|
||||
src/internal/shared/warnings.js
|
||||
src/internal/server/errors.js
|
||||
tests/**/*.svelte
|
||||
tests/**/_expected*
|
||||
tests/**/_actual*
|
||||
tests/**/expected*
|
||||
tests/**/_output
|
||||
tests/**/shards/*.test.js
|
||||
tests/hydration/samples/*/_expected.html
|
||||
tests/hydration/samples/*/_override.html
|
||||
types
|
||||
compiler/index.js
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "https://unpkg.com/knip@5/schema.json",
|
||||
"entry": [
|
||||
"src/*/index.js",
|
||||
"src/index-client.ts",
|
||||
"src/index-server.ts",
|
||||
"src/index.d.ts",
|
||||
"tests/**/*.js",
|
||||
"tests/**/*.ts",
|
||||
"!tests/**/*.svelte",
|
||||
"!tests/**/*.svelte.js",
|
||||
"!tests/**/_output",
|
||||
"!tests/runtime-browser/driver.js",
|
||||
"!tests/runtime-browser/driver-ssr.js",
|
||||
"!tests/types/component.ts"
|
||||
],
|
||||
"project": ["src/**"]
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
server_props: {
|
||||
html: '<div></div>'
|
||||
},
|
||||
|
||||
props: {
|
||||
html: '<div></div>'
|
||||
},
|
||||
|
||||
test(assert, target) {
|
||||
assert.htmlEqual(target.innerHTML, '<div></div>');
|
||||
}
|
||||
});
|
@ -0,0 +1 @@
|
||||
<div>{@html ''}</div>
|
@ -0,0 +1,11 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
server_props: {
|
||||
browser: false
|
||||
},
|
||||
|
||||
props: {
|
||||
browser: true
|
||||
}
|
||||
});
|
@ -0,0 +1 @@
|
||||
<!--[--><a href="/foo">foo</a><!--]-->
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { browser } = $props();
|
||||
</script>
|
||||
|
||||
<a href={browser ? '/foo' : '/bar'}>foo</a>
|
@ -0,0 +1,20 @@
|
||||
import { flushSync } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<button>10</button>`,
|
||||
|
||||
test({ assert, target, logs }) {
|
||||
const btn = target.querySelector('button');
|
||||
|
||||
btn?.click();
|
||||
flushSync();
|
||||
assert.htmlEqual(target.innerHTML, `<button>11</button>`);
|
||||
|
||||
btn?.click();
|
||||
flushSync();
|
||||
assert.htmlEqual(target.innerHTML, `<button>12</button>`);
|
||||
|
||||
assert.deepEqual(logs, [0, 10, 11, 12]);
|
||||
}
|
||||
});
|
@ -0,0 +1,16 @@
|
||||
<script>
|
||||
class Counter {
|
||||
count = $state(0);
|
||||
constructor(initial) {
|
||||
$effect.pre(() => {
|
||||
console.log(this.count);
|
||||
});
|
||||
this.count = initial;
|
||||
}
|
||||
}
|
||||
const counter = $derived(new Counter(10));
|
||||
|
||||
counter;
|
||||
</script>
|
||||
|
||||
<button onclick={() => counter.count++}>{counter.count}</button>
|
@ -0,0 +1,20 @@
|
||||
import { flushSync } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<button>10</button>`,
|
||||
|
||||
test({ assert, target, logs }) {
|
||||
const btn = target.querySelector('button');
|
||||
|
||||
btn?.click();
|
||||
flushSync();
|
||||
assert.htmlEqual(target.innerHTML, `<button>11</button>`);
|
||||
|
||||
btn?.click();
|
||||
flushSync();
|
||||
assert.htmlEqual(target.innerHTML, `<button>12</button>`);
|
||||
|
||||
assert.deepEqual(logs, [0, 10, 11, 12]);
|
||||
}
|
||||
});
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue