Update lucide-svelte for compatibility with Svelte 5 runes mode #2727
+1,368
−555
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.
closes #2312
closes #2565
closes #2716
What is the purpose of this pull request?
Description
Adds Svelte 5 runes mode compatibility to
lucide-svelte
package.This involved updating the following dependencies:
@sveltejs/vite-plugin-svelte
,@testing-library/svelte
,svelte
,vite
pnpm-lock.yaml
is updated to reflect the above.The following files have been updated with the new Svelte 5 runes syntax and types:
Icon.svelte
exportTemplate.mjs
types.ts
This includes support for the new built-in class syntax.
The test snapshots had to be updated for the tests to pass. This is because the HTML generated by Svelte 5 is slightly different from that generated by Svelte 4.
vitest.config.ts
:Updated to reflect the version bump of the svelte plugin (
hot: false
is now deprecated).Running the tests was throwing an error about
onMount
being called on the server. Following these steps from the testing library docs fixed it.There is a type error that I couldn't seem to solve so it's under
@ts-expect-error
for now.Before Submitting