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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inconsistency between type libraries for markdown-it and linkify-it #506

Merged
merged 2 commits into from
May 15, 2024

Conversation

nkohari
Copy link
Contributor

@nkohari nkohari commented May 15, 2024

Hey there! 馃槃

I was updating apocrypha to the latest version of Markdoc and started running into some type errors:

> @apocrypha/core@0.3.0 build:types
> tsc --emitDeclarationOnly --outDir dist

../../node_modules/@types/markdown-it/lib/index.d.ts:151:33 - error TS2694: Namespace '"/Users/nkohari/Work/apocrypha/node_modules/@types/linkify-it/index"' has no exported member 'LinkifyIt'.

151     readonly linkify: LinkifyIt.LinkifyIt;
                                    ~~~~~~~~~

Found 1 error in ../../node_modules/@types/markdown-it/lib/index.d.ts:151

Turns out, this is because @types/markdown-it depends on any version (*) of @types/linkify-it, but the latter wasn't reverse-compatible. This patch pins the version of @types/linkify-it to the one which is compatible with the the version of the actual markdown-it library that Markdoc uses.

Let me know if you have any questions or need more info!

@CLAassistant
Copy link

CLAassistant commented May 15, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@matv-stripe matv-stripe left a comment

Choose a reason for hiding this comment

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

Thanks!

@matv-stripe matv-stripe merged commit 6826deb into markdoc:main May 15, 2024
2 checks passed
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

3 participants