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 package.json to allow for Svelte 4 #373

Merged
merged 1 commit into from Jul 17, 2023
Merged

Conversation

labriola
Copy link
Contributor

Pull request type

Update dependency

What is the current behavior?

Peer dependency error when using svelte bindings in a Svelte 4 project

Adding an || to the package.json to allow svelte 4

What is the new behavior?

Svelte 4 is allowable with the current svelte bindings project

Only allowing Svelte 4 to fulfill a peer dependency

Does this introduce a breaking change?

  • Yes
  • No

All seems to work from my testing, which is admittedly, minimal

@vercel
Copy link

vercel bot commented Jun 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vime 🔄 Building (Inspect) Jun 27, 2023 2:29pm

@vercel
Copy link

vercel bot commented Jun 27, 2023

@labriola is attempting to deploy a commit to the Vidstack Team on Vercel.

A member of the Team first needs to authorize it.

@labriola
Copy link
Contributor Author

Address #371

@AidanG1
Copy link

AidanG1 commented Jul 16, 2023

When will this be added? It's a pretty simple change and Svelte 4 has been out for a while now.

@mihar-22 mihar-22 merged commit dc801c1 into vime-js:main Jul 17, 2023
1 of 2 checks passed
@baseplate-admin
Copy link

Typescript throws an error when using DefaultUi:

Argument of type 'typeof DefaultUi' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.
  Types of construct signatures are incompatible.
    Type 'new (options: any) => DefaultUi' is not assignable to type 'new (args: { target: any; props?: any; }) => ATypedSvelteComponent'.
      Construct signature return types 'DefaultUi' and 'ATypedSvelteComponent' are incompatible.
        The types of '$on' are incompatible between these types.
          Type '<K extends never>(type: K, callback: (e: VmDefaultUiEvents[K]) => any) => () => void' is not assignable to type '(event: string, handler: ((e: any) => any) | null | undefined) => () => void'.
            Types of parameters 'callback' and 'handler' are incompatible.
              Type '((e: any) => any) | null | undefined' is not assignable to type '(e: never) => any'.
                Type 'undefined' is not assignable to type '(e: never) => any'.

Possible causes:
- You use the instance type of a component where you should use the constructor type
- Type definitions are missing for this Svelte Component. If you are using Svelte 3.31+, use SvelteComponentTyped to add a definition:
  import type { SvelteComponentTyped } from "svelte";
  class ComponentName extends SvelteComponentTyped<{propertyName: string;}> {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants