feat: add app-state migration
#354A simple, string-based migration for sveltejs/kit#13140 (tested on that repo, zero false-positives, less than five false negatives)
We can switch to using the Svelte parser if people prefer that to get a bit better with regards to only actually transforming identifiers, but to me this seems to work fine.
Latest commit: 25a948b
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@354
npm i https://pkg.pr.new/sveltejs/cli/svelte-migrate@354
commit: 25a948b
preview: https://svelte-dev-git-preview-cli-354-svelte.vercel.app/
this is an automated message
Merged main here after merging #349 to have more sensible ordering of the migrations in the readme and website. Added the new migration to docs. Feel free to change the wording
Should we make this an app-state
migration and include navigating
and updated
?
This already contains migrations for navigating (though the one with current on it) and updated - page-state is a misnomer, you're right that we should rename it to app-state
Heads up that this only found 9 out of 22 occurrences of $app/stores
when I ran it on a real project. I filed an issue here: #368
A simple, string-based migration for https://github.com/sveltejs/kit/pull/13140 (tested on that repo, zero false-positives, less than five false negatives)