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

feat(svelte-5): move to svelte 5 runes #326

Closed
wants to merge 4 commits into from

Conversation

dvcol
Copy link

@dvcol dvcol commented Sep 2, 2024

Hello :)

I saw this issue, but when I tried to use the router with the latest version of svelte-5 it didn't seem to work.

It may be due to the changes in side effects and reactivity (even though it should be backwards compatible according to the official docs ?)

Anyway, I did a quick and dirty migration to serve my needs, and I thought it might be of help :)

I didn't test it thoroughly because my needs are quite basic (I'm especially doubting the reactivity of the scroll restore function),

@dvcol dvcol force-pushed the svelte-5 branch 3 times, most recently from 8deea2c to cee2ec2 Compare September 2, 2024 17:40
@dvcol
Copy link
Author

dvcol commented Sep 2, 2024

Seems the selenium tests are broken, but not sure why 🤔

I've deployed the test app from my fork here and it seems to work though 😕

Copy link
Owner

@ItalyPaleAle ItalyPaleAle left a comment

Choose a reason for hiding this comment

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

Thank you for getting started on this! Certainly something we need to do.

  1. Can you please do a separate PR first just for the linter? Otherwise it's impossible to review the changes.
  2. Until Svelte 5 is stable, we should probably have a separate branch for Svelte 5 support

@@ -0,0 +1,213 @@
<script>
import {onDestroy} from 'svelte'
Copy link
Owner

Choose a reason for hiding this comment

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

You probably have a linter installed that changed the formatting of this file entirely :( Because of that, it's pretty much impossible for us to review this...

Before this PR, could you open a separate one where you just run the linter (without any code changes)? Then we can at least see what's different.
(Feel free to include other changes such as the .gitignore ones if relevant)

Copy link
Author

Choose a reason for hiding this comment

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

I do use prettier, but most of the noise is because of a code split of the router in dedicated classes (to better understand the code structure) and the switch to vite instead of rollup (I had issues making it work with Svelte 5).

I've restructured the branch to isolate the commit with the pure svelte-5 migration here if that helps.

However, I've now opted to develop a custom router that is more suited to my needs, so I'm unsure if I'll be able to contribute much more to this PR.

Feel free to close it if you don't think it'll be helpful in the future :)

@oneezy
Copy link

oneezy commented Sep 13, 2024

any headway on this guys? safe to use? @dvcol @ItalyPaleAle

@dvcol dvcol closed this Nov 5, 2024
@dvcol
Copy link
Author

dvcol commented Nov 5, 2024

A propper migration work started from one of the maintainer, follow it here :)

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.

3 participants