-
Notifications
You must be signed in to change notification settings - Fork 346
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
feat: Migrate Svelte package to Svelte 5 #1049
base: main
Are you sure you want to change the base?
Changes from all commits
274632b
599c80a
2513c1b
61e1767
87ba342
1b20793
7bb86ff
7236c31
045a86d
b41092e
a9f0495
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,15 +13,15 @@ | |
}, | ||
"dependencies": { | ||
"@fontsource-variable/inter": "^5.0.17", | ||
"@uploadthing/svelte": "7.1.1", | ||
"@uploadthing/svelte": "7.2.0", | ||
"uploadthing": "7.3.0" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^3.1.1", | ||
"@sveltejs/kit": "^2.5.4", | ||
"@sveltejs/vite-plugin-svelte": "^3.1.0", | ||
"svelte": "^4.2.12", | ||
"svelte-check": "^3.6.7", | ||
"@sveltejs/adapter-auto": "^3.3.1", | ||
"@sveltejs/kit": "^2.8.0", | ||
"@sveltejs/vite-plugin-svelte": "^4.0.0", | ||
"svelte": "^5.1.15", | ||
"svelte-check": "^4.0.7", | ||
Comment on lines
+20
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Known Issues with Current Svelte 5 Versions Several open bug reports exist for Svelte 5.0, indicating potential instability. Thorough testing is recommended before proceeding. 🔗 Analysis chainReview Svelte 5 ecosystem version compatibility The updates to Svelte ecosystem packages represent a major version jump:
These versions align with the Svelte 5 migration objective, but there are some considerations:
Consider adding a note in the project documentation about:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify compatibility between selected versions
# Check if these specific versions are recommended together
curl -s https://api.github.com/repos/sveltejs/svelte/releases | \
jq -r '.[] | select(.tag_name | contains("5.1.15")) | .body' | \
grep -i "compatibility"
# Check for known issues with this version combination
gh api graphql -f query='
{
repository(owner: "sveltejs", name: "svelte") {
issues(first: 5, states: OPEN, labels: ["5.0", "bug"]) {
nodes {
title
url
labels(first: 5) {
nodes {
name
}
}
}
}
}
}'
Length of output: 1441 |
||
"tslib": "^2.6.2", | ||
"typescript": "^5.5.2", | ||
"vite": "^5.4.8" | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,6 +1,6 @@ | ||||||
{ | ||||||
"name": "@uploadthing/svelte", | ||||||
"version": "7.1.1", | ||||||
"version": "7.2.0", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider a major version bump due to breaking changes The PR introduces breaking changes (rune usage requirements, snippet props instead of slots), but the version is only bumped from 7.1.1 to 7.2.0. According to semver, breaking changes should trigger a major version bump. - "version": "7.2.0",
+ "version": "8.0.0", 📝 Committable suggestion
Suggested change
|
||||||
"license": "MIT", | ||||||
"scripts": { | ||||||
"dev": "vite dev", | ||||||
|
@@ -29,23 +29,23 @@ | |||||
"!dist/**/*.spec.*" | ||||||
], | ||||||
"peerDependencies": { | ||||||
"svelte": "^4.0.0 || ^5.0.0", | ||||||
"svelte": "^5.0.0", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Breaking change for Svelte 5 upgrade is not documented in the changelog Please ensure that the migration to Svelte 5 and the dropping of Svelte 4 support are clearly documented in the changelog or release notes. 🔗 Analysis chainVerify breaking change documentation for Svelte 5 requirement The package now requires Svelte 5 and drops support for Svelte 4. This is a breaking change that needs to be clearly documented in the changelog/release notes. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check if breaking change is documented in changelog
# Look for CHANGELOG.md in the repository
if [[ -f CHANGELOG.md ]]; then
echo "Checking CHANGELOG.md for Svelte 5 migration notes..."
rg -i "svelte.*5|breaking.*change" CHANGELOG.md
fi
# Check if there's any migration guide
fd -g "*MIGRATION*.md"
Length of output: 4687 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rabbit is correct - this PR would require a major bump to follow semver. are the gains here worth it? my immediate thought is this would limit adoption as I assume not a whole lot of users are using Svelte 5 yet? I guess uploadthing users are more of the bleeding-edge type of users so they're more likely to upgrade sooner, but still a question worth asking. cc @markflorkowski There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is tough because it also implies that Svelte package is ahead of other frameworks, where functionally it is not. Is it possible to add support for svelte 5 while maintaining back compat? I assume not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand the concerns, and while I do believe many svelte users have adopted v5, I have no idea how big the adoption might truly be. 🤔 maybe create a new package, something like "svelte-next"? That would keep back compat and make a smoother transition There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, I don’t love the idea of introducing a new package for this. I’ll take a look at other packages tomorrow to see how others are handling this. Might be best to just bite the bullet and do the major… really not sure. |
||||||
"uploadthing": "^7.2.0" | ||||||
}, | ||||||
"dependencies": { | ||||||
"@uploadthing/shared": "workspace:*", | ||||||
"file-selector": "0.6.0" | ||||||
}, | ||||||
"devDependencies": { | ||||||
"@sveltejs/adapter-auto": "^3.1.1", | ||||||
"@sveltejs/kit": "^2.5.4", | ||||||
"@sveltejs/package": "^2.3.0", | ||||||
"@sveltejs/vite-plugin-svelte": "^3.1.0", | ||||||
"@sveltejs/adapter-auto": "^3.3.1", | ||||||
"@sveltejs/kit": "^2.8.0", | ||||||
"@sveltejs/package": "^2.3.7", | ||||||
"@sveltejs/vite-plugin-svelte": "^4.0.0", | ||||||
"postcss": "8.4.38", | ||||||
"postcss-load-config": "^5.0.3", | ||||||
"publint": "^0.2.7", | ||||||
"svelte": "^4.2.12", | ||||||
"svelte-check": "^3.6.7", | ||||||
"svelte": "^5.1.15", | ||||||
"svelte-check": "^4.0.7", | ||||||
"tailwindcss": "^3.4.1", | ||||||
"tslib": "^2.6.2", | ||||||
"typescript": "^5.5.2", | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add migration guidance to the warning
The warning about slots to snippets transition could be more helpful with migration examples: