-
Notifications
You must be signed in to change notification settings - Fork 51
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
add support for svelte 5 #93
base: main
Are you sure you want to change the base?
Conversation
To really support svelte 5 a refactor of the code should be done I think. I think that svelte 5 components now are classes and not functions. So if for instance rendering special parts of the markdown to SvelteComponents (which I think is brilliant) using tokenizers and renderers, we will need svelte 3 or 4 components, otherwise it will not work. |
Thanks @RonB I will try it out |
I think you can still use the old class syntax though, right? Just being able to try out Svelte 5 without removing this component would have great value. |
Hi @RonB @memark I got back to finally trying this out on Svelte 5 app, and I can confirm even with Svelte 5, this pkg works. If we wanted a completely svelte 5 project, then there are some changes which need to be done, explicitly old deps need to be updated, and usage of But for now, merging this change to be svelte 5 compatible should be good ? |
cc @pablo-abc I would like to try out svelte 5 for my app, but this dependency is currently blocking. It would be great if we can get this merged. Thanks. |
Sorry for bugging again @pablo-abc but this is a blocker for us to try out svelte 5 for our app, would you be able to take a look ? Thanks |
Easiest way to Svelte 5 is adding this to your
|
Thanks for the tip. Svelte 5.0.0 is released so we can use that for now. |
I'm only upgrading an existing application for a client. I don't know much about this component to be honest. But as far as I've understood it there are very few breaking changes in Svelte 5. There are some deprecations, but they won't be removed until Svelte 6 (at the earliest). If you want to upgrade preemptively, here is a guide |
Yep, you be nice to have a release with svelte 5 as valid peer. |
Type checking doesn't work for me on Svelte 5:
My code: <SvelteMarkdown source={message.text} renderers={{ code: CodeRender }} /> where Any ideas? |
@amosjyng Did this not have any effect for you? |
@memark I'm using yarn, so I didn't get any conflicts with peer dependencies that required overrides in the first place. My
|
Hey @pablo-abc would you be willing to add someone else as a maintainer? Really appreciate the work you put into this package but it looks like you no longer have time for it - given the last contribution & release in December 2023 and all of the unanswered Issues. Totally understand, life and all. I'm sure there are several of us who would be happy to help keep it going though, as it seems like a lot of us value it and depend on it. Otherwise unfortunately I think we need to fork this repo to keep it moving forward, folks. |
@amosjyng Creating a new project with |
I can confirm as well that I have a sveltekit app on which I have the latest version of svelte 5 and the latest version of svelte-markdown installed with But this also makes sense if the authors want to adapt it once and for all. Isn't it possible to just run the migration tool?
I have used it and it does a pretty good job adapting the code. |
You mean the |
@mig-hub Yes, my bad, definately the |
For pnpm:
|
We can always find ways. |
@pablo-abc please answer |
Hello! I've read through this thread and you're right. This year I've barely had time to open my computer after work and when I have some time I'm focusing mostly on Felte since that's what I'm still using, and I've not been able to use Svelte personally anymore... I'd be fully willing to add someone as a maintainer to this project. Apologies since on my mind I'd eventually have some time for this, but time flies it seems 🥲 |
add support for svelte 5 by updating peer dependencies