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

Type conflict / Update to unified v10 #62

Closed
4 tasks done
reckter opened this issue Aug 3, 2023 · 1 comment
Closed
4 tasks done

Type conflict / Update to unified v10 #62

reckter opened this issue Aug 3, 2023 · 1 comment
Labels

Comments

@reckter
Copy link

reckter commented Aug 3, 2023

Initial checklist

Affected packages and versions

[email protected]

Link to runnable example

No response

Steps to reproduce

I've tried to update @types/unist to v3 from v2, but that causes a type error when trying to give Remark a list of plugins:

Type '() => (tree: Node) => Node' is not assignable to type 'Pluggable<any[], Settings>'.
  Type '() => (tree: Node) => Node' is not assignable to type 'Plugin<any[], Settings>'.
    Type '(tree: Node) => Node' is not assignable to type 'void | Transformer'.
      Type '(tree: Node) => Node' is not assignable to type 'Transformer'.
        Type 'Node' is not assignable to type 'void | Error | Node<Data> | Promise<Node<Data>> | Promise<void>'.
          Type 'Node' is not assignable to type 'Node<Data>'.
            Types of property 'data' are incompatible.
              Type 'import("[...]/node_modules/.pnpm/@[email protected]/node_modules/@types/unist/index").Data | undefined' is not assignable to type 'import("[...]/node_modules/.pnpm/@[email protected]/node_modules/@types/unist/index").Data | undefined'.
                Type 'import("[...]/node_modules/.pnpm/@[email protected]/node_modules/@types/unist/index").Data' is not assignable to type 'import("[...]/node_modules/.pnpm/@[email protected]/node_modules/@types/unist/index").Data'.
                  Index signature for type 'string' is missing in type 'Data'.

178       remarkPlugins={[remarkEntityLinks]}
                          ~~~~~~~~~~~~~~~~~

This seems to be, because react-remark is still using [email protected], which intern is still depending on @types/[email protected].

Expected behavior

The types work with the most up to date versions of @types/unist

Actual behavior

There is a type conflict in the Node type between @types/unist@2 and @types/unist@3

Runtime

No response

Package manager

No response

OS

No response

Build and bundle tools

No response

@ChristianMurphy
Copy link
Member

Thanks for reaching out @reckter! 👋

This is a duplicate of #50

The next major release will support unified 11 and remark 15 (currently in the process of being released) based off the work in #39
As noted in #54 there are a few higher priority releases that need attention before I'll finish this.
If you are interested feel free to work on any of the checklist of planned changes in #39 to help accelerate that time-line.

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants