Repository navigation
Add missing contributors to package.json? #17
Description
Activity
I had the same thought. It could live behind a flag so that it's op-in. Would you like to look into this?
I'm kind of unsure whether I'd like to keep the contributors in the
package.jsonor rather create a separate file for it, like most projects seem to do it 🤔Reacted by jlcaSure, I can look into this soon.
A few questions / remarks before doing so:
- a flag sounds good, probably
--contributors? How would this work for--init?--init --contributors? - regarding if this should go into
package.jsonorCONTRIBUTORS.md: I'd say both if it's automated anyways. It looks like npm robots take thecontributorsfield pretty serious, but I think a document kind of like this would be more friendly for humans. - Should there be an additional
--contributors-fileoption then? Or could a non-default location then be passed to--contributors?
Reacted by jlca- a flag sounds good, probably
I think
--contributorsis a good option name. I'd say the presence of the option means "enabled with defaults" and--contributors AUTHORS.mdwould set the filename. I like your suggested human friendly markdown example. Otherwise the feature could check for the existence of thecontibutorsfield inpackage.json– Would it even make sense to add contributors to both, a markdown file and thepackage.json?Adding this to
--initsound like a good idea, but it might be more challenging. Maybe we go for the flag first and then see how it could work in the context of--init?Reacted by Frederik RingAnyone with a bit of git skills should be able to find the contributors of a project just fine, even when maintainers are forgetful, make mistakes or use imperfect tools.
Alternatively, if a project is hosted on GitHub, one can visit the github home, and see the list of contributors:
https://github.com/facebook/jest/graphs/contributors
I am trying to understand if this feature is necessary.
What value does adding contributors to
package.jsonorCONTRIBUTORS.mdbring?I realise this is a very broad question, and not necessarily related to
@studio/changes.The value in adding contributors to
package.jsonis that it honors the contributors in the distributed package. I thought npm might do something interesting with this information on their website, but it doesn't look like it.I used to maintain the list manually in some packages, but I'm loosing interest in doing so. I'm not sure anymore that I actually need / want this feature. Why do we maintain the
AUTHORSfile in Sinon btw?@m90 What do you think?
I don't have any strong feelings about this, but I'd also say it is an adequate way of honoring the contributions you have received over time when distributing your package - in case this is what you want to do.
package.jsondoes spec people fields, so if you want to include your contributors, it makes it an appropriate tool to express it IMO.If a maintainer prefers to omit this info entirely, use an
AUTHORSfile (apparently npm does read these too), rely on the GitHub contribution graph, or do something completely different is their choice and likely to be nothing that will make or break a project.
If this is a feature that should go into this repo is another question. Seeing this issue is almost 2 years old, maybe it's something that should rather be handled by dedicated tools instead, which can then be consumed by anyone that prefers to have the info in
package.jsonI also wonder if there are certain licensing scenarios that would mandate including this information in your distribution(s).
maybe it's something that should rather be handled by dedicated tools instead, which can then be consumed by anyone that prefers to have the info in
package.jsonIn Sinon we're using the
authorscommand fromgit-extrasto maintain theAUTHORSfile.To be honest, I'd rather remove that dependency in favour of something that is managed with
npm, so we're closer to being able to automate releases on any old CI platform.I think a dedicated tool that can update either
AUTHORSorpackage.jsonwould be great!

When releasing the last mochify version I forgot to add a new contributor to
package.jsonand had to do that manually afterwards.Should
changesdo that (which probably wouldn't be too hard to do as everything is already there)? Or should its scope stay limited to the CHANGELOG?