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 errors on new major version → 11.0.2 #228

Closed
4 tasks done
philcockfield opened this issue Aug 21, 2023 · 5 comments
Closed
4 tasks done

Type errors on new major version → 11.0.2 #228

philcockfield opened this issue Aug 21, 2023 · 5 comments
Labels
👯 no/duplicate Déjà vu 👎 phase/no Post cannot or will not be acted on

Comments

@philcockfield
Copy link

Initial checklist

Affected packages and versions

unified@11.0.2, remark-parse@10.0.2

Link to runnable example

https://github.com/philcockfield/unified-type-error

Steps to reproduce

The sample repo above is a vanilla typescript setup with unified@11.0.2 and remark-parse added to show typescript type error.

The first 2 lines of the "getting started" sample on the Unified README are used to demonstrate the type error below, although other plugins that were successfully being used with the prior major version of unified@10.1.2 also produce similar type errors:

import { unified } from "unified";
import remarkParse from "remark-parse";

unified().use(remarkParse);

producing type error:

src/index.ts:4:15 - error TS2769: No overload matches this call.
  Overload 1 of 3, '(preset?: Preset | null | undefined): Processor<undefined, undefined, undefined, undefined, undefined>', gave the following error.
    Type 'Plugin<[(Options | undefined)?], string, Root>' has no properties in common with type 'Preset'.

Expected behavior

Strongly typed as prior version (?? → I could not find any updated mentions in the unified README to setup types specially)

Actual behavior

The type error occurs at initial configuration of the pipeline:

image

Affected runtime and version

node@19

Affected package manager and version

npm@9.6.3

Affected OS and version

MacOS 13.4.1

Build and bundle tools

Vite

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 21, 2023
@ChristianMurphy
Copy link
Member

Duplicate of #227

@ChristianMurphy ChristianMurphy marked this as a duplicate of #227 Aug 21, 2023
@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2023
@github-actions

This comment has been minimized.

@github-actions
Copy link

Hi! Thanks for taking the time to contribute!

Because we treat issues as our backlog, we close duplicates to focus our work and not have to touch the same chunk of code for the same reason multiple times. This is also why we may mark something as duplicate that isn’t an exact duplicate but is closely related.

Thanks,
— bb

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Aug 21, 2023
@ChristianMurphy
Copy link
Member

The ecosystem is in the process of being updated.
Hold on unified version 10 major until remark is updated.

@philcockfield
Copy link
Author

Awesome - thanks guys. I'll sit tight!
Appreciate your beautiful work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👯 no/duplicate Déjà vu 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants