Skip to content

Conversation

@kabaww
Copy link

@kabaww kabaww commented Oct 19, 2025

#138

WARNING: This is a breaking change for the @number-flow/svelte package and it will make the package incompatible for those still in Svelte 4.


Svelte has deprecated a lot of methods used in the svelte package such as afterUpdate, beforeUpdate.
This PR will enable Svelte 5 users to make use of number-flow with Runes enabled.

I have not checked if there is a solution for backwards compatibility with Svelte 4, but I don't think it's possible.

@vercel
Copy link

vercel bot commented Oct 19, 2025

@kabaww is attempting to deploy a commit to the Barvian Team on Vercel.

A member of the Team first needs to authorize it.

set __svelte_batched(batched: boolean) {
this.batched = batched
}
override set data(data: Data | undefined) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not too sure about this omission of the override keyword. I know it's optional, but the updated vite-plugin-svelte throws a fit when this keyword is set.

I think this is because of the naming conflict of NumberFlowLite

const group = getGroupContext()
group?.register?.(elStore)
$effect(() => {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not completely sure if this is the correct way to update the writable when el updates.

I think we need to use writable.set()

@guid-ooo
Copy link

guid-ooo commented Nov 9, 2025

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants