redbug312 / markdown-it-multimd-table

Multimarkdown table syntax plugin for markdown-it markdown parser
MIT License
146 stars 37 forks source link

Remove markdown-it as a dependency #45

Closed laurent22 closed 2 years ago

laurent22 commented 2 years ago

The markdown-it package is not actually a dependency but more like a related runtime, and having it there are a dependency means that a specific version of markdown-it is going to be installed even if it's not used by the project (which may use a different version of markdown-it).

See this commit for example, which adds markdown-it@12.3.2 via the multi-md plugin, even though we already have markdown-it and aren't going to use that specific version.

Other plugins either don't have the dependency or make it a peer dependency. Personally I feel peer dependencies add unnecessary restrictions by requiring a specific package version, when other versions might work just as well, and that cause issues when upgrading packages. So I feel it's better to simply remove the dependency

redbug312 commented 2 years ago

Thank you for the PR and clear explanation. I've found this but never looked into the reason. I will merge this PR into v4.1.3.