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

feat: update MultiSelect.svelte for Svelte5 compatibility #293

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

dedo1911
Copy link
Contributor

Closes #281

Summary of major changes

  1. fixes Svelte 5 compatibility issues

Todos

  1. Change events to new Svelte 5 format

@janosh
Copy link
Owner

janosh commented Oct 22, 2024

ideally, i'd prefer to update package deps and unit tests to Svelte 5 in one go. that requires an update to mdsvexamples and fixing how unit tests create component instances

const select = new MultiSelect({
  target: document.body,
  props: { options },
})

Attempted to instantiate src/lib/MultiSelect.svelte with new MultiSelect, which is no longer valid in Svelte 5. If this component is not under your control, set the compatibility.componentApi compiler option to 4 to keep it working. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more information

@janosh janosh added awaiting upstream Needs new release from an upstream dependency pkg Package deps Dependency version bumps labels Oct 22, 2024
bump unit tests to svelte 5 later
Copy link
Owner

@janosh janosh left a comment

Choose a reason for hiding this comment

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

svelte 5 compatibility is time sensitive so merging as is since upstream blockers could take months to resolve or might even require a docs rework since mdsvexamples looks to be unmaintained

@janosh janosh merged commit 14ba447 into janosh:main Oct 24, 2024
5 checks passed
@dedo1911
Copy link
Contributor Author

In fact my idea was not to update deps to Svelte 5 already, but just make it work for people who can't wait, solving the build issues. I'm already using it in production and works just fine.
That was the reason of the smallest fix possible. This PR was not yet intended to provide full support to Svelte 5 features.
We'll dig into what's needed for the rework in another pr.

@janosh
Copy link
Owner

janosh commented Oct 24, 2024

that would be great, looking forward to that PR! 👍

could you give v11.0.0-rc.1 a try and let me know how it goes?

@dedo1911
Copy link
Contributor Author

could you give v11.0.0-rc.1 a try and let me know how it goes?

Looks good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting upstream Needs new release from an upstream dependency deps Dependency version bumps pkg Package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte 5 support?
2 participants