-
Notifications
You must be signed in to change notification settings - Fork 6
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
[WIP] V3 #12
base: master
Are you sure you want to change the base?
[WIP] V3 #12
Conversation
Absolutely not an important complaint, but: Could this please not clobber the EOF newline if the input file has one? |
Good point — done |
I'm experimenting with running a few components I've written through this, and I just realized two things. 1) I apparently wrote a component with a method and a data item of the same name (!), and 2) this does not handle them well. Things could be renamed if they were only used internally, but if both are exported, this is impossible to resolve automatically, as both get squished into one namespace. Perhaps another kind of warning or error message, indicating that manual edits are required? |
This also does not update |
Yeah, it's not quite up to date — it's not fixing directives per the latest in the RFC. I was waiting to see if anyone strongly disagreed about that first. Same for Just realised I have some commits locally as well, will push those now |
It might throw an error now if you have conflicting methods/data, I can't remember if I did that already |
Just pulled and built and re-ran and it looks like no, it does not complain about conflicting data and methods yet. |
Any plans to continue work on this? Got a large v2 code base and wanted to avoid a large refactor |
We're in the process of doing a gradual port to v3 using @Rich-Harris or @Conduitry given that it's been almost a year since the last commit should we assume this is dead? |
I think it's safe to assume the priority of the team has shifted abandoning v2 altogether. |
the interesting new stuff is in https://github.com/sveltejs/svelte-upgrade/tree/v3/test/v3/samples
Some TODOs:
bind:
/class:
/etc directives to use braces for argument (bind:foo='bar'
->bind:foo={bar}
)import
s in components are often dropped; haven't dug into when this is triggered. try e.g.:<script>import foo from 'foo'; export default { helpers: { foo } };</script>
onprops
from'svelte'
is generated, which is not exported by Svelte (could be a Svelte problem; not sure what the intention is here)<script>
are not moved into the separate 'static' script tag; they are left in the default per-instance script