I am still a beginner at web development so need the exact steps spelled out. Here are the commands I actually ran to migrate my simple project:
Update to the version before the routing changes:
npm install @sveltejs/kit@1.0.0-next.405
Build your project and fix any issues until it works. My project was simple, so the only changes were to package.json and the project still built and ran fine. Commit those changes.
Run the migrate script:
npx svelte-migrate routes
That script will run and then print the following instructions:
1: git commit -m "svelte-migrate: renamed files"
2: Review the migration guide at https://github.com/sveltejs/kit/discussions/5774
3: Search codebase for "@migration" and manually complete migration tasks
4: git add -A
5: git commit -m "svelte-migrate: updated files"
After running that script my project would build but does not work. My project was too simple to have any "@migration" comments. Presumably, you need to make the migration changes following the guide without really knowing if they worked or not.
Finally, install the version with the new routing changes:
npm install @sveltejs/kit@1.0.0-next.406
Without any additional changes in my project, my project built and ran successfully. Again, only the package.json changed and I committed it.