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

notifier and tooltip, fix closes #2591, #2390, #2462 #2842

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

Sozialarchiv
Copy link
Contributor

This fix moves the packages codex-notifier and codex-tooltip from devDependencies to dependencies.

Both packages are not only used as type imports:

import notifier from 'codex-notifier';

import CodeXTooltips from 'codex-tooltip';

The patch fixes the following types errors:

node_modules/.pnpm/@[email protected]/node_modules/@editorjs/editorjs/types/api/notifier.d.ts:1:78 - error TS2307: Cannot find module 'codex-notifier' or its corresponding type declarations.

1 import {ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions} from 'codex-notifier';
                                                                               ~~~~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]/node_modules/@editorjs/editorjs/types/api/tooltip.d.ts:4:46 - error TS2307: Cannot find module 'codex-tooltip' or its corresponding type declarations.

4 import {TooltipContent, TooltipOptions} from 'codex-tooltip';

@Sozialarchiv
Copy link
Contributor Author

@neSpecc Do I also have to modify the version number in pacakge.json?

Copy link
Member

@neSpecc neSpecc left a comment

Choose a reason for hiding this comment

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

please, update a changelog

@Sozialarchiv
Copy link
Contributor Author

Sozialarchiv commented Oct 12, 2024

please, update a changelog

Done

@neSpecc
Copy link
Member

neSpecc commented Oct 12, 2024

@Sozialarchiv how are you reproducing such errors? I don't see it in my builds

@Sozialarchiv
Copy link
Contributor Author

@Sozialarchiv how are you reproducing such errors? I don't see it in my builds

I couldn't reproduce the problem at first either. However, since it was mentioned in various issues, I looked into it a little.

You need a typescript project in which @editorjs/editorjs is a dependency. In addition, “skipLibCheck” in tsconfig.json must be true. Normally I have not activated this either, as it has no added value and costs performance. It is also false by default. However, there seem to be some users who have set the value to true.

@neSpecc
Copy link
Member

neSpecc commented Oct 12, 2024

I have skipLibCheck: true, but don't see that error.

@neSpecc
Copy link
Member

neSpecc commented Oct 17, 2024

Hey, @Sozialarchiv. Have you managed to reproduce these errors? Maybe you can provide a demo?

@Sozialarchiv
Copy link
Contributor Author

Sozialarchiv commented Oct 18, 2024

Hey, @Sozialarchiv. Have you managed to reproduce these errors? Maybe you can provide a demo?

https://github.com/Sozialarchiv/editorjs-notifier-tooltip-error-demo

@neSpecc neSpecc merged commit b20c891 into codex-team:next Nov 6, 2024
4 checks passed
@neSpecc
Copy link
Member

neSpecc commented Nov 6, 2024

Thanks, @Sozialarchiv. Demo works fine with 2.31.0-rc.4

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.

2 participants