You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because for some reason </string> is being added just before </script> when transforming the files:
This doesn't happen in sveltekit's route files (+layout and +page.svelte) files, however, it does in +error.svelte files.
Another thing is that for some reason it tries to "fix" self-closing elements.
If we have <div /> for example, it changes it to <div></div>, while it is true that <div /> is not valid HTML, this should not apply to components:
Why is Sentry changing my markup? Isn't it supposed to just change it's own stuff and only in <script> tags?
Another thing you can see in the screenshot is that Sentry added </svelte:window> to the bottom of the file:
<svelte:window/> does not accept children, so it must be always closed/self closed without anything as it's child
<svelte:window/> is already closed, why does Sentry think it's not?
This migrate command changed about 170 files (mostly .svelte files since I'm using shadcn svelte components) which makes it not worth going over the stuff that Sentry changed to actually migrate from v7 to v8 and to check if there are any todo's left.
Feel free to change the title of this issue to a more fitting one.
The text was updated successfully, but these errors were encountered:
Hey @DarthGigi thanks for writing in and apologies for the late reply!
Why is Sentry changing my markup? Isn't it supposed to just change it's own stuff and only in <script> tags?
Definitely not on purpose. Ideally, we change as little as possible. My best guess is that our parser has problems with svelte files and I'm actually considering excluding svelte files from the transformations for the moment. At least in basic svelte apps there shouldn't be too much need to use Sentry code in svelte components.
This is because for some reason is being added just before </script> when transforming the files
Hmm that's also a weird one. I'll check what's going wrong here.
Same here. Migration script deletes or rewrites random seeming sections of our codebase. I tried to figure out which option ("transformer") is responsible, but more than one seem to trigger this.
Even if you only Add migration comments, the script will rewrite over 400 files and break 150 of them.
Environment
Svelte/Kit
Steps to Reproduce
pnpx @sentry/migr8@latest
Apply all transformations
Expected Result
The migrate command changes the files that are actually necessary to be changed and in the right way
Actual Result
For each component I have in my
routes
folder, I get the following error:This is because for some reason
</string>
is being added just before</script>
when transforming the files:This doesn't happen in sveltekit's route files (+layout and +page.svelte) files, however, it does in
+error.svelte
files.Another thing is that for some reason it tries to "fix" self-closing elements.
If we have
<div />
for example, it changes it to<div></div>
, while it is true that<div />
is not valid HTML, this should not apply to components:Why is Sentry changing my markup? Isn't it supposed to just change it's own stuff and only in
<script>
tags?Another thing you can see in the screenshot is that Sentry added
</svelte:window>
to the bottom of the file:<svelte:window/>
does not accept children, so it must be always closed/self closed without anything as it's child<svelte:window/>
is already closed, why does Sentry think it's not?This migrate command changed about 170 files (mostly .svelte files since I'm using shadcn svelte components) which makes it not worth going over the stuff that Sentry changed to actually migrate from v7 to v8 and to check if there are any todo's left.
Feel free to change the title of this issue to a more fitting one.
The text was updated successfully, but these errors were encountered: