Skip to content

Conversation

dummdidumm
Copy link
Member

Took the migration script for a test drive, good results.

First commit is for SvelteKit tutorial, second for Svelte (we'll likely rewrite parts of it, but I thought it doesn't hurt in case we keep some parts like transitions which don't change).

Copy link

vercel bot commented Sep 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 8:57pm

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it did a great job!!

@@ -1,11 +1,12 @@
<script>
import { self } from 'svelte/legacy';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should avoid this

$effect(() => {
if ($navigating) {
start = Date.now();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could some of these be set by a derived? or not possible since a store is being used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have $derived.by(prev => ...) then yes, but not like this (at least not in a straightforward way)

Copy link
Member

@benmccann benmccann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

80 additional lines. they pretty much all come from migrating slots. most places are smaller or the same on average. each slot instance adds 4 new lines though:

<script>
	let { children } = $props();
</script>

@dummdidumm
Copy link
Member Author

Reverted the changes to Svelte for now, finished the changes for the SvelteKit tutorial (adjusted the MD files and also migrated towards SvelteKit 2.0, i.e. throw error(..)/redirect(..) -> error(..)/redirect(..)). Self-merging because we can always fix an oversight later on (I did string searches to double-check I didn't leave anything from the old days)

@dummdidumm dummdidumm merged commit 1fc5055 into main Sep 30, 2024
2 of 3 checks passed
@dummdidumm dummdidumm deleted the migrate-tutorial branch September 30, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants