Open Foorack opened 1 year ago
Working with svelte 4 would be very useful. Last commit was 8 months ago. Is the project still active?
That's a good question, I already schedule a change to sveltekit after see this issue.
Be sides exists the roadmap https://github.com/mefechoel/svelte-navigator/issues/19
I have forked the project (norricorp/svelte4-navigator), downloaded it and made changes. It compiles and I have used it in my project (which is also upgraded to svelte 4) and it all appears to work. I have no pushed the changes yet. So after the changes have been pushed, I open a PR to go from norricorp/svelte4-navigator to mefechoel/svelte-navigator? But that depends if mefechoel is still updating it. Is there a test suite I can run against my change?
I have commited to the forked repo and created a pull request to the part repo. I guess it is up to mefechoel now?
Hello there ans thanks for the pr! Unfortunately i don't have a lot of time to work on the project, but i'll try to review your pr soon. There are quite extensive tests, you can run using the npm test
command. I'll also run them in the github actions pipeline of you pr, so you'll see the results there too.
Hey guys, which other libraries for routing can you recommend?
I migrated my app to SvelteKit and used its routing instead. Pain-free transition but took some time. Did it all in one big go. -------- Original Message -------- On Aug 28, 2023, 12:19, Visual-Dawg wrote:
Hey guys, which other libraries for routing can you recommend?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
I agree that svelte kit is the answer but I would like to get svelte navigator working with svelte 4 just because ....
any solution?
Unfortunately not. I think override is the short term answer and sveltekit is the long term answer. With regard to testing, the test app definitely behaves differently in the svelte 3 and 4 versions, with chunks of code not called in history.js. It may possibly the test app that is the problem.
While SvelteKit seems to be the more future proof approach, svelte-navigator is just a nice library to implement on an existing Svelte project. Is there any perpective of updating it's Svelte dependency to version 4?
Hi @pndiogo, basically I am stuck so any help would be great. I have run the svelte 4 migration (which updated svelteinternal.d.ts) and package.json. The changes pass unit tests and it works fine in my app. But the integration tests fail. I have added console.logging to both my changes and the original svelte3 code and can see where functions are not called in the former but no idea why this is happening. Could even be the test app.
I completely agree with your comment that svelte-navigator is just easier to use for an existing project. Certainly moving to sveltekit is a lot of work.
If you would like to discuss further than am more than happy to email you directly.
I think this project is died. owner should archive this repo so that everyone can understand.
I already fork the project and try to learn more about it. anyone here already tried the project that's was forked?
https://github.com/EmilTholin/svelte-routing
This project seems continue be maintained
UPDATE: Nevermind, I see in your commit you've just updated the dependencies list which I can do myself locally. Good luck on the testing.
@norricorp
I think override is the short term answer ...
I realize your fork and PR solves this issue and your now just waiting on help from the current maintainer to get the integration tests to pass. In theory tho, is it possible to go ahead and use your override for those of us that don't want to wait on the PR merge (assuming our own risk of course). If so, do you have a commit hash you would recommend using with just the override and not all the testing mumble jumble?
I used npm install svelte-navigator --force
seems to work also, but you'll never feel clean again.
Any progress here on this issue? We struggle with the same problem
This is what I'm using in our production app:
"overrides": {
"svelte-navigator": {
"svelte": ">=4.x"
}
}
I've started working on a branch to migrate this package to Svelte 4+. It's partially done, but a decent amount to go.
Unfortunately, it seems that svelte-navigator may be abandoned. I am currently switching to SvelteKit (with adapter-static) due to this... :(
That was the conclusion I came to as well. Just to add that restructuring for sveltekit is a lot of work and it did make me realise how convienient svelte-navigator is so a great shame that it is no more.
Did you consider use the original https://github.com/EmilTholin/svelte-routing? This project is a fork from svelte-routing, may it's more easy to migrate.
Sadly I didn't tried yet, but I'll pretty soon
Unfortunately, it seems that svelte-navigator may be abandoned. I am currently switching to SvelteKit (with adapter-static) due to this... :(
I decided eventually to use Sveltekit but I do like the idea of navigator which does one thing. Anyway, I had another attempt and the problem was with the test app rather than the actual library and I now have the tests passing. And eventually got lint passing I have now hit problems with husky when it comes to commiting. But I think the underlying problem is with prettier where I get "No parser could be inferred for file ...." Using prettier 3.3.3 and prettier-plugin-svelte3.2.6
Currently svelte-navigator has a dependency on Svelte 3.x, which causes issues for projects wanting to upgrade to Svelte 4.