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

Update to svelte 5 #12364

Merged
merged 19 commits into from
Nov 14, 2024
Merged

Update to svelte 5 #12364

merged 19 commits into from
Nov 14, 2024

Conversation

jdtjenkins
Copy link
Contributor

@jdtjenkins jdtjenkins commented Nov 2, 2024

Changes

Updates the @astrojs/svelte integration to use Svelte 5 by default. This change is necessary because the Svelte 5 Vite plugin only supports Svelte 5 and has dropped all v4 support. So it'd be really messy supporting both versions in one integration. We'd be better off cutting a new major and only supporting v5 on the new major and beyond.

Removes all Svelte 4 code and deps from the integration.

Fixes or updates all the tests to use Svelte 5 components.

Testing

All the unit tests have been updated to use the newer Svelte 5 syntax, all the fixtures have also been updated to use Svelte 5 as a dependency. Running the fixtures shows the integration works and loads up Svelte 5 components.

Docs

I... Should add some docs for this yes. This will be a pretty big change(? or a reasonably sized one I guess) as we'll now stick Svelte 4 on a certain major of the package, and carrying on will only be Svelte 5 support.

withastro/docs#10002

Copy link

changeset-bot bot commented Nov 2, 2024

🦋 Changeset detected

Latest commit: 732176f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: svelte Related to Svelte (scope) pkg: example Related to an example package (scope) pkg: integration Related to any renderer integration (scope) pkg: astro Related to the core `astro` package (scope) labels Nov 2, 2024
@bluwy
Copy link
Member

bluwy commented Nov 8, 2024

@jdtjenkins do you mind if I commit directly to bring it up to date? I'd like to get Svelte 5 support ready soon so it's easier to migrate later for the Astro beta.

@jdtjenkins
Copy link
Contributor Author

@bluwy yeah please do! Sorry I haven't had another chance to look at this yet. But I agree, getting this out asap is best.

If you need me to do anything, let me know and sorry this was more broken than intended!

@bluwy
Copy link
Member

bluwy commented Nov 8, 2024

No worries! It was already a headstart having the tests updated to Svelte 5. Thanks for the initial work!

Copy link

codspeed-hq bot commented Nov 8, 2024

CodSpeed Performance Report

Merging #12364 will not alter performance

Comparing update-to-svelte-5 (732176f) with main (3b3bc9b)

Summary

✅ 1 untouched benchmarks

@github-actions github-actions bot added the pkg: solid Related to Solid (scope) label Nov 12, 2024
@bluwy
Copy link
Member

bluwy commented Nov 12, 2024

Looks like it's passing now, however I still want to look into cleaning up createClassComponent and removing the custom svelte.config.js handling, which should drastically make the integration simpler.

@bluwy bluwy marked this pull request as ready for review November 13, 2024 06:17
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Thanks @jdtjenkins and @bluwy - just a quick clarifying question!

.changeset/five-dolls-smash.md Show resolved Hide resolved
Copy link
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Approving for docs! (Even if disapproving of the unfortunate numbering alignment. Boooo)

@bluwy bluwy merged commit 9fc2ab8 into main Nov 14, 2024
16 checks passed
@bluwy bluwy deleted the update-to-svelte-5 branch November 14, 2024 15:31
@astrobot-houston astrobot-houston mentioned this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope) pkg: integration Related to any renderer integration (scope) pkg: solid Related to Solid (scope) pkg: svelte Related to Svelte (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants