Skip to content

Svelte 5: reactive statements migration error #13723

@Specy

Description

@Specy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions