Skip to content
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

sv migrate svelte-5 drops comments #14140

Closed
twm opened this issue Nov 4, 2024 · 1 comment · Fixed by #14143
Closed

sv migrate svelte-5 drops comments #14140

twm opened this issue Nov 4, 2024 · 1 comment · Fixed by #14143

Comments

@twm
Copy link

twm commented Nov 4, 2024

Describe the bug

I ran npx sv migrate svelte-5 and noticed that it dropped some comments when rewriting export let to an interface and let { ... } = $props():

https://github.com/twm/halo/pull/15/files#diff-cf3bf5049b1517a4c3a95040b9beebd97024d0d808c5f6aac6b5e1f2555b3c69L30-R33

Reproduction

Run npx sv migrate svelte-5 on twm/halo@e26f3e6

When I did so I got sv@0.6.1

Logs

No response

System Info

I ran this command but the output was garbage — it thought there was a container (nope!) and failed to identify the installed browsers correctly. I'm on Ubuntu 24.04 x86-64.

Severity

annoyance

@twm twm mentioned this issue Nov 4, 2024
@rgon
Copy link
Contributor

rgon commented Nov 4, 2024

It sems that previous-line comments are kept, while same-line comments are not:

	export let step: number | null = null // In-line comments are not kept
	// Previous-line comments are kept
	export let required: boolean = false

Click on Migrate in the component in: REPL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants