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

Dependency error with marked #15020

Closed
brichet opened this issue Aug 25, 2023 · 3 comments
Closed

Dependency error with marked #15020

brichet opened this issue Aug 25, 2023 · 3 comments
Labels

Comments

@brichet
Copy link
Contributor

brichet commented Aug 25, 2023

Description

A fresh install of the npm packages resolves with marked=7.0.4 (when generating again the yarn.lock file)

├─ @jupyterlab/markedparser-extension@workspace:packages/markedparser-extension
│  └─ marked@npm:7.0.4 (via npm:^7.0.2)

It seems this patch release break the API, and the line


cannot be compiled:

Type '(token: Token) => Promise<void>' is not assignable to type '(token: Token) => void | unknown[]'.
  Type 'Promise<void>' is not assignable to type 'void | unknown[]'.ts(2322)
marked.d.ts(606, 9): The expected type comes from property 'walkTokens' which is declared here on type 'MarkedOptions'

Reproduce

Install the main branch of jupyterlab will download the latest release of marked.

Context

Adding a resolution to the main package.json file fixes the issue, but it should probably be fixed in jupyterlab.

  "resolutions": {
    "@jupyterlab/services/ws": "8.12.0",
    "@types/react": "^18.0.26",
    "marked": "7.0.2",
    "react": "^18.2.0",
    "yjs": "^13.5.40"
  },
@brichet brichet added bug status:Needs Triage Applied to new issues that need triage labels Aug 25, 2023
@krassowski
Copy link
Member

I think this is unintended bug on marked side, I left a comment on the PR - let's see if the author agrees.

@krassowski krassowski removed the status:Needs Triage Applied to new issues that need triage label Aug 25, 2023
@krassowski
Copy link
Member

The problematic unknown was removed in markedjs/marked#2955 which was included in v7.0.5 release.

Does it works all good now?

@brichet
Copy link
Contributor Author

brichet commented Aug 28, 2023

Yes, it's fixed now.
Thanks @krassowski for taking care of it.

@brichet brichet closed this as completed Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants