Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Handle .svelte files correctly #70

Closed
Lms24 opened this issue Jul 25, 2024 · 2 comments · Fixed by #71
Closed

Handle .svelte files correctly #70

Lms24 opened this issue Jul 25, 2024 · 2 comments · Fixed by #71

Comments

@Lms24
Copy link
Member

Lms24 commented Jul 25, 2024

Initially, we included .svelte files by default when running migr8. In #69 I disabled including Svelte files by default because we got the feedback that HTML inside svelte files was incorrectly transformed by jscodeshift (e.g. #68). Due to time reasons we opted to temporarily ignore svelte files by default but long-term, we should find a better way to leave HTML untouched and really only transform the script part of svelte files.

@fnimick
Copy link
Contributor

fnimick commented Jul 25, 2024

I've published a jscodeshift adapter package that supports svelte and vue files using language-specific parsing to preserve source formatting, rather than the blind HTML approach currently used by migr8. The above PR updates migr8 to use it. See here: https://www.npmjs.com/package/jscodeshift-adapters

@fnimick
Copy link
Contributor

fnimick commented Aug 3, 2024

Gentle bump on the above, is there anything I am missing to have this fix considered? I did have .svelte files in my project that were successfully migrated with my fix, so disabling them all isn't an ideal solution.

@Lms24 Lms24 closed this as completed in #71 Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants