Upgrade to Svelte 4

Proprietary

Upgrade svelte to 4.x, svelte-check to 3.x and svelte-preprocess to 5.x in package.json. Svelte 4 requires Node.js 16 or later. Not done by this recipe: the changes in the Svelte 4 migration guide, and @sveltejs/vite-plugin-svelte, which follows Vite and is upgraded by the Vite recipes.

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

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