-
Couldn't load subscription status.
- Fork 179
Update dependency svelte to v4 [SECURITY] #381
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
Open
renovate
wants to merge
1
commit into
master
Choose a base branch
from
renovate/npm-svelte-vulnerability
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+108
−8
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
✓ Approve the security fix, but verify build compatibility.
The version bump addresses CVE-2024-45047, a critical XSS vulnerability in Svelte's SSR that affects attribute escaping in
<noscript>tags. The ^4.0.0 constraint ensures v4.2.19+ (which includes the fix) will be installed.However, this is a major version change. Verify that:
🏁 Script executed:
Length of output: 292
🌐 Web query:
💡 Result:
Yes — rollup-plugin-svelte v7.2.3 is compatible with Svelte 4. The Svelte v4 migration docs require rollup-plugin-svelte >= 7.1.5 for Rollup users, and v7.2.3 is a current 7.x release. [1][2]
Sources:
[1] rollup-plugin-svelte on npm (v7.2.3).
[2] Svelte v4 migration guide — "If you are using Rollup, upgrade to rollup-plugin-svelte 7.1.5 or higher."
🌐 Web query:
💡 Result:
Yes — svelte-check 3.8.6 lists Svelte v4 in its peerDependencies and its 3.8.6 release notes show Svelte v4/5-related fixes, so v3.8.6 supports Svelte 4. [1][2]
Sources:
🌐 Web query:
💡 Result:
Here are the essential steps and breaking changes to handle when migrating to Svelte v4 — run the automatic migrator first, then address the manual items below.
Quick steps
Top breaking changes to check and fix
If you want, I can:
🏁 Script executed:
Length of output: 730
🌐 Web query:
💡 Result:
Yes — svelte-preprocess v5.1.4 is compatible with Svelte v4. The package README documents using svelte-preprocess for Svelte (and notes Svelte 4 users still need a preprocessor for TypeScript and common CSS preprocessors), and the v5.1.4 npm release is available. [1][2]
Sources:
🏁 Script executed:
Length of output: 500
🏁 Script executed:
Length of output: 3433
Critical issue: SvelteComponentTyped is deprecated in Svelte v4—migration incomplete.
The version upgrade is valid and addresses CVE-2024-45047 (XSS in SSR). All dependencies (rollup-plugin-svelte v7.2.3, svelte-check v3.8.6, svelte-preprocess v5.1.4) are compatible with Svelte v4, and the rollup configuration is properly set up.
However,
packages/ui/src/common/Wiz.svelte(lines 2, 25–26) usesSvelteComponentTyped, which is deprecated and removed in Svelte v4. This must be updated to the new component typing pattern before the upgrade can proceed. Run the migration tool—npx svelte-migrate@latest svelte-4—to help identify and fix all breaking changes, particularly in this file and any TypeScript type usage (createEventDispatcher, Action generics).🤖 Prompt for AI Agents