getsentry / sentry-migr8

Migrate your Sentry SDK usage to v8.
MIT License
2 stars 0 forks source link

Handle `.svelte` files correctly #70

Closed Lms24 closed 3 months ago

Lms24 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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.