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

Svelte 5: reactive statements migration error #13723

Closed
Specy opened this issue Oct 20, 2024 · 0 comments · Fixed by #13729 or #13740
Closed

Svelte 5: reactive statements migration error #13723

Specy opened this issue Oct 20, 2024 · 0 comments · Fixed by #13729 or #13740
Labels

Comments

@Specy
Copy link

Specy commented Oct 20, 2024

Describe the bug

When using reactive statements in svelte 4, like: $: $store.count = count (i use this to keep synchronized the value of a store with a local variable), the svelte 5 migration script converts this as: let $store.count = $derived(count)

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAACmWQ3WrDMAyFX0WIQhMW2u42bQp7hl3Ou0hdBdwmcrCV_WD87sNukxZ2ZXx0dCR9ATvTk8f6IyC3A2GNb-OIFcrvmD7-i3ohrNDbyemkHLx2ZpSjYiVmGK0TCEN7pXexjiJ0zg6w3mx9-m4ufp182rIXyBI0sLiLMhV7EtB2YoEGdoqT1E2sxVgGw9rRQCxFCSFVUlayvjTwuk9CzB2sZFXD6jZ0Dsuv4sP2sTEfTpOIZbCse6OvTVgmxHxRVn0N4TkrppBb4xErHOzZdIbOWIubKFYLudzyYHfxz9xmVt_OSHvqZ1TqjvgGTOH-fg_TT_YvKJ6oZRKOZHIMc1wR8qo17GKpOP5f8zP-AbLDFqbsAQAA

Logs

No response

System Info

System:
    OS: Windows 11 10.0.27723
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 2.31 GB / 15.82 GB
  Binaries:
    Node: 22.2.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
    bun: 1.1.30 - ~\.bun\bin\bun.EXE
  Browsers:
    Edge: Chromium (130.0.2849.35), ChromiumDev (121.0.2277.4)
    Internet Explorer: 11.0.27723.1000

Severity

blocking an upgrade

@Conduitry Conduitry added the bug label Oct 20, 2024
@Specy Specy changed the title Migrate script wrong migration Svelte 5: reactive statements migration error Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants