mirror of https://github.com/sveltejs/svelte
commit
2b30affc22
@ -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: align list of passive events with browser defaults
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure assignments to state field inside constructor trigger effects
|
@ -1,5 +0,0 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: avoid extra work in mark_reactions
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: add `$state.link` rune
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure $inspect works with SvelteMap and SvelteSet
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
breaking: remove `$state.link` rune pending further design work
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: allow deleting non-existent `$$restProps` properties
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
chore: default options.filename to "(unknown)"
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure `$store` reads are properly transformed
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: properly transform destructured `$derived.by` declarations
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: ensure `{#await}` scope shadowing is computed in the correct order
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
breaking: deprecate `context="module"` in favor of `module`
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: only traverse trailing static nodes during hydration
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
chore: update client check for smaller bundle size
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: small legibility improvement in `Snippet` type hint
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
breaking: remove callback from `$state.link`
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: correctly hydrate empty raw blocks
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: more robust handling of var declarations
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
feat: allow non-synchronous legacy component instantiation
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: don't skip custom elements with attributes
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: remove buggy `validate_dynamic_component` check
|
@ -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,3 @@
|
||||
<script context="module">
|
||||
let foo = true;
|
||||
</script>
|
@ -0,0 +1,3 @@
|
||||
<script module>
|
||||
let foo = true;
|
||||
</script>
|
@ -0,0 +1,10 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: '<div>Loading...</div>',
|
||||
|
||||
async test({ assert, target }) {
|
||||
await Promise.resolve();
|
||||
assert.htmlEqual(target.innerHTML, '<div>10</div>');
|
||||
}
|
||||
});
|
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
const x = Promise.resolve(10);
|
||||
</script>
|
||||
|
||||
<div>
|
||||
{#await x}
|
||||
Loading...
|
||||
{:then x}
|
||||
{x}
|
||||
{/await}
|
||||
</div>
|
@ -1,5 +1,5 @@
|
||||
<script context="module">
|
||||
import Tooltip from './Tooltip.svelte';
|
||||
<script module>
|
||||
import Tooltip from './Tooltip.svelte';
|
||||
|
||||
export const Widget = { Tooltip };
|
||||
</script>
|
||||
export const Widget = { Tooltip };
|
||||
</script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script context="module">
|
||||
import Foo from './Foo.svelte';
|
||||
<script module>
|
||||
import Foo from './Foo.svelte';
|
||||
|
||||
export const Components = { Foo };
|
||||
</script>
|
||||
export const Components = { Foo };
|
||||
</script>
|
||||
|
@ -1,12 +0,0 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
mode: ['client'],
|
||||
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
|
||||
error:
|
||||
'svelte_component_invalid_this_value\nThe `this={...}` property of a `<svelte:component>` must be a Svelte component, if defined'
|
||||
});
|
@ -1,5 +0,0 @@
|
||||
<script>
|
||||
let banana = {};
|
||||
</script>
|
||||
|
||||
<svelte:component this={banana} />
|
@ -1 +0,0 @@
|
||||
<div>Sub</div>
|
@ -1,24 +0,0 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
get props() {
|
||||
return { componentName: 'Sub' };
|
||||
},
|
||||
html: '<div>Sub</div>',
|
||||
test({ assert, component, target }) {
|
||||
component.componentName = 'Proxy';
|
||||
assert.htmlEqual(target.innerHTML, '<div>Sub</div>');
|
||||
try {
|
||||
component.componentName = 'banana';
|
||||
throw new Error('Expected an error');
|
||||
} catch (err) {
|
||||
assert.include(
|
||||
/** @type {Error} */ (err).message,
|
||||
'svelte_component_invalid_this_value\nThe `this={...}` property of a `<svelte:component>` must be a Svelte component, if defined'
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
@ -1,14 +0,0 @@
|
||||
<script>
|
||||
import Sub from './Sub.svelte';
|
||||
export let componentName = 'Sub';
|
||||
let proxy = new Proxy(Sub, {});
|
||||
let banana = {};
|
||||
let component;
|
||||
$: {
|
||||
if (componentName === 'Sub') component = Sub;
|
||||
else if (componentName === 'Proxy') component = proxy;
|
||||
else component = banana;
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:component this={component} />
|
@ -1,23 +1,23 @@
|
||||
<script context="module">
|
||||
let value = 'Blub';
|
||||
let count = 0;
|
||||
const subscribers = new Set();
|
||||
export const model = {
|
||||
subscribe(fn) {
|
||||
subscribers.add(fn);
|
||||
count ++;
|
||||
fn(value);
|
||||
return () => {
|
||||
count--;
|
||||
subscribers.delete(fn);
|
||||
};
|
||||
},
|
||||
set(v) {
|
||||
value = v;
|
||||
subscribers.forEach(fn => fn(v));
|
||||
},
|
||||
getCount() {
|
||||
return count;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script module>
|
||||
let value = 'Blub';
|
||||
let count = 0;
|
||||
const subscribers = new Set();
|
||||
export const model = {
|
||||
subscribe(fn) {
|
||||
subscribers.add(fn);
|
||||
count++;
|
||||
fn(value);
|
||||
return () => {
|
||||
count--;
|
||||
subscribers.delete(fn);
|
||||
};
|
||||
},
|
||||
set(v) {
|
||||
value = v;
|
||||
subscribers.forEach((fn) => fn(v));
|
||||
},
|
||||
getCount() {
|
||||
return count;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script context="module">
|
||||
<script module>
|
||||
let set = new Set(['x']);
|
||||
</script>
|
||||
|
||||
<p>{set.has('x')}</p>
|
||||
<p>{set.has('x')}</p>
|
||||
|
@ -1,5 +1,7 @@
|
||||
<script context="module">
|
||||
export function foo() { return 42; };
|
||||
<script module>
|
||||
export function foo() {
|
||||
return 42;
|
||||
}
|
||||
</script>
|
||||
|
||||
<button on:click={foo}>foo</button>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue