Gibbu / svoast

A simple toast component for Svelte.
https://svoast.vercel.app
MIT License
73 stars 5 forks source link

Upgrade to Svelte 5 #11

Open jimmy121192 opened 4 days ago

jimmy121192 commented 4 days ago

Svelte 5 has been released, but Svoast is currently using Svelte 4, which is not compatible with the latest version. Screenshot 2024-11-18 092626

Gibbu commented 3 days ago

Hey sorry about that mate, I've finally converted it to Svelte 5!

Install using: svoast@3.0.1. Everything should still work the exact same, but let me know if you find anything!

jimmy121192 commented 3 days ago

Thanks @Gibbu for the quick response. After I installed the new version ( 3.0.1) , I got an issue: [plugin:vite:import-analysis] Failed to resolve entry for package "svoast". The package may have incorrect main/module/exports specified in its package.json.

Terminal log:

Screenshot 2024-11-19 at 10 27 00 AM

Screenshot 2024-11-19 at 10 23 52 AM

I checked the svoast packages.json file and I saw this: Screenshot 2024-11-19 at 10 32 23 AM

Screenshot 2024-11-19 at 10 35 31 AM

I changed the paths to ./package/ so it could work for now. Can you please update the fix? Thanks :)

Gibbu commented 2 days ago

Whoops, yeah I forgot to change that while copy/pasting it over.

svoast@3.0.2 should fix this.

jimmy121192 commented 2 days ago

Hi @Gibbu . Thanks for the fix. However, there is still an error on the page where I use import { toast } from 'svoast'; :

Screen Shot 2024-11-20 at 10 19 38 AM

I checked the /node_modules/.vite/deps/svoast.js :

Screen Shot 2024-11-20 at 10 24 59 AM

So, I need to change to import { toaster } from 'svoast'; to fix the problem. Could you release a new version with this fix ? (either by updating the documentation or changing the export name. I prefer the second one to avoid an extra migration guide ). Thanks.

Gibbu commented 1 day ago

Yeah wowee again, another thing I forgot to change...

Third time is a charm: svoast@3.0.3

jimmy121192 commented 23 hours ago

Thanks @Gibbu . It's all good now 🍾