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

refactor(svelte): migrate to svelte 5 #391

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

moonlitgrace
Copy link
Contributor

@moonlitgrace moonlitgrace commented Nov 2, 2024

Description

🚧 WIP: Migrating to Svelte 5, it is stable now.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • This is something we need to do.

Copy link

changeset-bot bot commented Nov 2, 2024

⚠️ No Changeset found

Latest commit: 04873b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@moonlitgrace moonlitgrace changed the title WIP: refactor(svelte): migrate to svelte 5 refactor(svelte): migrate to svelte 5 Nov 5, 2024
@@ -98,14 +98,13 @@
});

$effect(() => {
console.log(speed);
if (dotLottie && dotLottie.isLoaded && typeof speed == 'number') {
if (dotLottie && typeof speed == 'number' && dotLottie.isLoaded) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed order of conditions, cause isLoaded is not reactive which blocking svelte from getting to next reactive object which is speed.

thanks to sveltejs/svelte#14517 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @theashraf, can i get a review on this?

Copy link
Member

Choose a reason for hiding this comment

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

@moonlitgrace Sorry for the late reply. Is the PR ready for review?

Before that, I'm not sure if Svelte 5 is backward compatible with Svelte 4. Is that the case? If it is, we’ll also need to update the peer dependencies of the dotlottie-svelte package to include both v4 and v5 of Svelte.

@moonlitgrace moonlitgrace marked this pull request as ready for review December 3, 2024 12:14
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