mirror of https://github.com/sveltejs/svelte
feat: add `migration-task` for impossible to migrate slots (#13658)
* feat: add `migration-task` for impossible to migrate slots * Update packages/svelte/src/compiler/migrate/index.js Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com> * Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com> * Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com> * Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com> * Update packages/svelte/tests/migrate/samples/slot-non-identifier/output.svelte Co-authored-by: Paolo Ricciuti <ricciutipaolo@gmail.com> --------- Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>pull/13668/head
parent
0dcd4f6c6e
commit
969e6aa750
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
feat: add `migration-task` for impossible to migrate slots
|
@ -0,0 +1,39 @@
|
|||||||
|
<script>
|
||||||
|
import Comp from "./Component.svelte";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<div slot="cool:stuff">
|
||||||
|
cool
|
||||||
|
</div>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<div slot="cool stuff">
|
||||||
|
cool
|
||||||
|
</div>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<div slot="stuff">
|
||||||
|
cool
|
||||||
|
</div>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<svelte:fragment slot="cool:stuff">
|
||||||
|
cool
|
||||||
|
</svelte:fragment>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<svelte:fragment slot="cool stuff">
|
||||||
|
cool
|
||||||
|
</svelte:fragment>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<svelte:fragment slot="stuff">
|
||||||
|
cool
|
||||||
|
</svelte:fragment>
|
||||||
|
</Comp>
|
@ -0,0 +1,47 @@
|
|||||||
|
<script>
|
||||||
|
import Comp from "./Component.svelte";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<!-- @migration-task: migrate this slot by hand, `cool:stuff` is an invalid identifier -->
|
||||||
|
<div slot="cool:stuff">
|
||||||
|
cool
|
||||||
|
</div>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<!-- @migration-task: migrate this slot by hand, `cool stuff` is an invalid identifier -->
|
||||||
|
<div slot="cool stuff">
|
||||||
|
cool
|
||||||
|
</div>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
{#snippet stuff()}
|
||||||
|
<div >
|
||||||
|
cool
|
||||||
|
</div>
|
||||||
|
{/snippet}
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<!-- @migration-task: migrate this slot by hand, `cool:stuff` is an invalid identifier -->
|
||||||
|
<svelte:fragment slot="cool:stuff">
|
||||||
|
cool
|
||||||
|
</svelte:fragment>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
<!-- @migration-task: migrate this slot by hand, `cool stuff` is an invalid identifier -->
|
||||||
|
<svelte:fragment slot="cool stuff">
|
||||||
|
cool
|
||||||
|
</svelte:fragment>
|
||||||
|
</Comp>
|
||||||
|
|
||||||
|
<Comp>
|
||||||
|
{#snippet stuff()}
|
||||||
|
|
||||||
|
cool
|
||||||
|
|
||||||
|
{/snippet}
|
||||||
|
</Comp>
|
Loading…
Reference in new issue