Open benmccann opened 1 week ago
This is a tough one to fix. The problem is that the analysis phase errors on $$Props
because it thinks this is an identifier. It does think that because it expects types to be stripped out before analyzing the AST (which is very sensible and more robust approach for the rest of the compiler). But for migration we can't strip out the types, because it means we wouldn't be able to properly modify the code afterwards.
The only solution I see right now is to do some kind of quick hack where $$Props
is replaced with something like _$$Props
so the analysis doesn't throw.
Describe the bug
The migration tool fails to migrate
$$Props
, which I didn't know existed until I tried to run it on some real-world projects and it bombed out upon encountering it 😆A description of
$$Props
is here: https://www.reddit.com/r/sveltejs/comments/1778zq4/interface_props_mentioned_in_the_svelte_5_post/migrate
lives in this repo: https://github.com/sveltejs/svelte/blob/4f10c83d32ba5d289866093b7d3b514f3c540a3f/packages/svelte/src/compiler/migrate/index.js#L24Reproduction
https://github.com/immich-app/immich/blob/8cf33690b8ddd8e36bdf5d968c3d5700bfcc2949/web/src/lib/components/shared-components/password-field.svelte#L7
Logs
No response
System Info
Severity
annoyance