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

add update-contributors script; closes #3289 #3290

Merged
merged 2 commits into from
Apr 4, 2018
Merged

add update-contributors script; closes #3289 #3290

merged 2 commits into from
Apr 4, 2018

Conversation

boneskull
Copy link
Contributor

This updates the contributors prop of package.json and adds tooling to help.

This grabs information from Git only. I am working on a better way to ensure more people are recognized, but this is what I have for now. On the plus side, it's very fast.

We lose the GitHub user URLs, but not a big deal IMO.

@boneskull boneskull added type: chore generally involving deps, tooling, configuration, etc. semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Mar 22, 2018
@coveralls
Copy link

coveralls commented Mar 22, 2018

Coverage Status

Coverage remained the same at 89.955% when pulling 261cac9 on issue/3289 into 35dac3e on master.

.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
const newCount = contributors.length;
const pkgFilepath = path.join(ROOT, 'package.json');
const pkg = JSON.parse(fs.readFileSync(pkgFilepath, 'utf8'));
Copy link
Contributor

Choose a reason for hiding this comment

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

How about you just do require(pkgFilepath);?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case, it’s mainly semantic. If I don’t need nor want the caching which require() provides, then I shouldn’t use it. In this script it doesn’t really matter since we don’t use the result elsewhere, but I feel it better illustrates the intent.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understood what you mean. :)

Copy link
Contributor

@markowsiak markowsiak left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
@boneskull boneskull merged commit f2560e7 into master Apr 4, 2018
@boneskull boneskull deleted the issue/3289 branch April 4, 2018 05:28
@boneskull boneskull added this to the v5.1.0 milestone Apr 7, 2018
sgilroy pushed a commit to TwineHealth/mocha that referenced this pull request Feb 27, 2019
* add update-contributors script; closes mochajs#3289
* attempt to fix cache issue with npm@2.x

Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch implementation requires increase of "patch" version number; "bug fixes" type: chore generally involving deps, tooling, configuration, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants