Upgrade to Svelte 5

Proprietary

Chains the earlier majors: a project several majors behind needs only this recipe, and upgrades the dependencies once, straight to 5.x, so no intermediate version has to resolve. Upgrade svelte to 5.x, svelte-check to 4.x, svelte-preprocess to 6.x, prettier-plugin-svelte to 4.x and eslint-plugin-svelte to 3.x in package.json. Not done by this recipe: moving components to runes ($state, $derived, $props), on: events to event attributes and slots to snippets, which npx sv migrate svelte-5 does, and @sveltejs/vite-plugin-svelte, which follows Vite and is upgraded by the Vite recipes.

org.openrewrite.nodejs.migrate.svelte.UpgradeToSvelte5
mod run . --recipe=org.openrewrite.nodejs.migrate.svelte.UpgradeToSvelte5

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.