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

Svelte 5 migration #145

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

Conversation

ampled
Copy link

@ampled ampled commented Nov 9, 2024

Description

This is my attempt to kickstart svelte 5 support. It's probably enough to just allow svelte 5 as a peerDependency considering svelte 5 has backwards compatibility, but I guess it's nice to have this as a starting point for a full migration for projects that use runes mode only.

All tests are passing, though I had to add a line to remove comments from rendered output before comparing it to expected output.

Changes

  • Migrated all Svelte components using 1st party migration script, then cleaning up by hand
  • Added recommended svelte testing plugin to vite-config following Testing Library setup guide
  • Updated packages required for svelte 5 and getting tests running

Solves #78 and #127 (make components optional)

Copy link

vercel bot commented Nov 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
svelte-portabletext ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 7:50pm

Copy link

socket-security bot commented Nov 9, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@sveltejs/[email protected] environment, eval Transitive: filesystem +18 1.65 MB svelte-admin
npm/@sveltejs/[email protected] Transitive: environment +8 848 kB svelte-admin
npm/@testing-library/[email protected] environment Transitive: eval +30 3.81 MB testing-library-bot
npm/[email protected] filesystem, unsafe Transitive: environment +26 3.71 MB ota-meshi
npm/[email protected] Transitive: environment, filesystem, network +37 10 MB domenic, joris-van-der-wel, sebmaster, ...3 more
npm/[email protected] environment 0 1.5 MB dummdidumm
npm/[email protected] Transitive: environment, filesystem +10 5.63 MB dummdidumm, orta, svelte-language-tools-deploy
npm/[email protected] None +17 4.75 MB conduitry, rich_harris, svelte-admin
npm/[email protected] None 0 22.4 MB typescript-bot
npm/[email protected] Transitive: environment, filesystem, network, shell +49 277 MB antfu, patak, soda, ...2 more
npm/[email protected] Transitive: environment, filesystem, shell, unsafe +32 4.25 MB antfu, oreanno, patak, ...1 more

🚮 Removed packages: npm/@sveltejs/[email protected], npm/@sveltejs/[email protected], npm/@testing-library/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@TheOnlyTails
Copy link

Would be amazing to see this merged!

@ampled
Copy link
Author

ampled commented Dec 10, 2024

@TheOnlyTails

Would be amazing to see this merged!

Until then, you can use this: https://www.npmjs.com/package/@eirikk/portabletext-2-svelte-5

Follow the instructions in the README to not have to rewrite any imports

@ampled
Copy link
Author

ampled commented Jan 2, 2025

@stipsan looks like the most recent official contributor. Hope it's okay that I tag you to get this looked at ☺️

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