-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
svelte-migrate breaks on local variable called state
#14215
Comments
You can still have a variable named state https://svelte.dev/playground/419dd3d00d3741828923bfa8f50562c1?version=5.1.12 try to migrate this and see that it still works. You can do this to reproduce for a migration error: paste the code in the playground and share the svelte 4 code (we can then click migrate to verify) |
You can have a variable named state, but only if you don't use a state rune in the same file (which was the result of my migration): |
Gotcha...will fix and by fix mean add a migration task in this case (this should probably be moved to the svelte repo) |
Describe the bug
Hi,
I have a Svelte 4 file containing a variable called
state
. When migrating to Svelte 5, this breaks as there is now the variable as well as the$state
rune...I think svelte-migrate should detect this and throw an error...
Reproduction
I don't know how to do repros for svelte-migrate
Logs
No response
System Info
Severity
annoyance
Additional Information
Probably holds for other rune names.
The text was updated successfully, but these errors were encountered: