feat: added app-state
migration into svelte-5
migration
No description provided
Fixes #485
This is the simplest approach I could think of--I know it can get a little hairy with all the versions of Svelte and SvelteKit out there. Still, I believe most of the logic is already in place with the CLI to make sure the user has the right versioning heading into the migration.
This only runs the app-state migration script if the user has SvelteKit. It doesn't really log anything or add any error handling--I'll leave those up to you if desired.
Also, I know you guys have a contributing guide on the docket, but I was wondering how exactly you test this CLI on your own projects. I ask because I ended up using npm link
which is pretty standard, but I had to edit these lines of code to make sure that when I tested my fixes locally that it linked to my scripts instead of pulling @latest
from npx
🙏
Latest commit: 6c7d125
The changes in this PR will be included in the next version bump.
Name | Type |
---|---|
svelte-migrate | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
npm i https://pkg.pr.new/sveltejs/cli/sv@494
npm i https://pkg.pr.new/sveltejs/cli/svelte-migrate@494
commit: 6c7d125
You can actually just run node ./packages/migrate/bin.js
to just execute the migrate cli. The script you mentioned is basically doing the same thing. Really need to get that contributing guide out.
Thanks for the PR btw! I think this is the correct way to go forward, and I don't think a prompt or log is personally necessary. But i would love to get @benmccann feedback on this.
Bu I don't think we should merge this as long as #368 is still open, looks like it's only finding some of the occurrences and not all.
I think this is a good PR. I don't know if we need to block on that issue. It would be great to get it fixed, but migrating some stuff is better than migrating none.