-
Notifications
You must be signed in to change notification settings - Fork 123
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
Creating vs forking vs duplicating markdown-it plugins #1707
Comments
Hi @tlylt, I believed we used to fork some of the packages and maintain them separately such as htmlparser2 and vue-strap but decided to shift all of them to one repository at some point. I think this was to make it easier to maintain and track? Not entirely familiar with this as it happened quite some time ago, perhaps @ang-zeyu can chip in on this?
I'm open to discussion on this and I feel this will be a good idea if we can come up with a proper workflow :) |
Tldr I don't have a clear conclusion on this unfortunately, I think its very much a case-by-case basis for each. 🙁 On fork vs patchhtmlparser2 was moved over to ensure cheerio uses receives our patched updates (see #606) I suppose one reason we would want to maintain a patch as such is to ensure the changes propagate to other dependencies. Agreed on the p.s., we could add a simple comment linking to this PR / other related issues in the patch file! As for vue-strap, its essentially the pros (and cons) of a monorepo (also see #411) Since the discussion is well documented around the web, we could link the mention of monorepo here in the dev guide to an article explaining this. More generally I can think / summarise these reasons:
My opinion is also that forking (to patch some behaviours) does not make maintaining patches/etc. any easier than "patching" (by overriding exports), it is a difficult task to maintain the patched implementation against the upstream in either case. Other than that, I can think of: Pros of a fork:
Pros of patching:
Another example are the nunjucks patches here which are the most extensive. At the time of those patches nunjucks had been dormant for quite a while (still quite is https://github.com/mozilla/nunjucks/commits/master); maintaining a fork seemed pointless hence. On the other hand I had to replicate the patched changes on the nunjucks repo to utilise its automated testing procedures to ensure default behaviours weren't changed, which was rather painful for development. |
As a separate npm package?
Same as the first point, I think its very much a case-by-case basis for each. 🙁 |
More generally on this, I think it would definitely be great to briefly list in the dev guide:
|
Hi @ang-zeyu @jonahtanjz, thank you for your kind input! |
Hi guys,
I am working on a version update for the markdown-it package and am curious what were the thoughts behind our approach in maintaining markdown-it packages. At the moment, it seems like there are three types of markdown-it plugins:
Not too sure if there are any discussions on this before, but curious what were the considerations when deciding which approach to go for (maybe also in general)?
Some questions I have:
Any discussions or thoughts on this would be appreciated!
p.s If this is a useful topic, perhaps I can help write it up in our documentation with some guidelines so that we can have a standardized approach to package management and allow future devs to know what to do when faced with such a choice:)
The text was updated successfully, but these errors were encountered: