vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.75k stars 154 forks source link

Update package.json to allow for Svelte 4 #373

Closed labriola closed 1 year ago

labriola commented 1 year ago

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?

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

vercel[bot] commented 1 year ago

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[bot] commented 1 year ago

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

A member of the Team first needs to authorize it.

labriola commented 1 year ago

Address #371

AidanG1 commented 1 year ago

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

baseplate-admin commented 1 year ago

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;}> {}