ProseMirror / prosemirror-markdown

ProseMirror Markdown integration
https://prosemirror.net
MIT License
342 stars 81 forks source link

Punycode is now a hard-dependency? #111

Closed WofWca closed 1 year ago

WofWca commented 1 year ago

We have a Vite project and it warns about punycode: https://codeberg.org/webxdc/editor/issues/47

Should it be upgraded from a dev dependency to a regular one?

https://github.com/ProseMirror/prosemirror-markdown/blob/c7210d0e55c82bfb0b2f7cba5dffe804575fafb3/package.json#L30-L34

WofWca commented 1 year ago

Actually this could be an even more upstream issue https://github.com/markdown-it/markdown-it/issues/230

marijnh commented 1 year ago

Yeah, unfortunately, markdown-it seems to be largely unmaintained and somewhat stuck in the past. There's not much I can do about this issue on my side, though.

WofWca commented 1 year ago

There's not much I can do about this issue on my side, though

Wouldn't moving "punycode" do "dependencies" help? It would make npm automatically install it on each project that depends on prosemirror-markdown, so the bundler wouldn't complain that it's missing. Or am I wrong here?

marijnh commented 1 year ago

That seems messy, and not really the correct solution (strict bundlers that require all dependencies to be properly declared, rather than just present in the node_modules dir, will still not accept it).

I'm hoping markdown-it gets a new maintainer, or a solid fork, at some point. If not, we'll have to make the move to another parser, which is going to be disruptive.