fix: add migration task when there's a variable named that would conflict with a rune #14216
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #14215
As usual with the migration script you start simple and then you realise new edge cases. This started simply with a
state
variable erroring when migrating to$state
. Then i realised the same could be true for$derived
and$props
and$bindable
.There are some false negative here: technically this is migratable
because
is valid but while with props is probably fine trying to migrate when the binding is in the expression that we are migrating is a lot more complex for
derived
for example (because we create some new derived in some cases and we don't have a node for that. But i would say this is still good enough and better have some false negative for an edge case than migrate something that can break imho.There are a lot of tests but that's because i couldn't test multiple things in the same test :(
Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint