tiptap icon indicating copy to clipboard operation
tiptap copied to clipboard

Remove `@types/lowlight` from `@tiptap/extension-code-block-lowlight` dependencies

Open EvitanRelta opened this issue 2 years ago • 2 comments

What’s the bug you are facing?

Outdated type-declaration from @types/lowlight package, which is a dependency for @tiptap/extension-code-block-lowlight. The lowlight package already declares its own types, thus, the outdated @types/lowlight should be removed from the extension's dependencies.

image

Which browser was this experienced in? Are any special extensions installed?

How can we reproduce the bug on our side?

Install the @tiptap/extension-code-block-lowlight, which installs @types/lowlight as a dependency. Then do:

import { lowlight } from 'lowlight'

And you'll notice an error saying Module '"lowlight"' has no exported member 'lowlight'.

Can you provide a CodeSandbox?

Not my codesandbox, but taken from another issue: https://github.com/ueberdosis/tiptap/issues/2116#issuecomment-957797324 https://codesandbox.io/s/trusting-lake-22hls

Notice the error on the lowlight import: image

What did you expect to happen?

To import the updated type-declaration from lowlight package instead of the outdated @types/lowlight package.

Anything to add? (optional)

No response

Did you update your dependencies?

  • [X] Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • [ ] Yes, I’m a sponsor. 💖

EvitanRelta avatar Jun 14 '22 05:06 EvitanRelta

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

github-actions[bot] avatar Aug 01 '22 17:08 github-actions[bot]

I have same issue.

I have resolved this way.

import { lowlight } from 'lowlight/lib/common.js';

autumninflab avatar Aug 03 '22 05:08 autumninflab