Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

all-contributors-cli

Package Overview
Dependencies
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

all-contributors-cli - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

9

lib/generate/index.js

@@ -21,3 +21,3 @@ 'use strict';

return previousContent.slice(0, endOfOpeningTagIndex + closingTag.length) +
'\n' + newContent + '\n' +
newContent +
previousContent.slice(startOfClosingTagIndex);

@@ -47,3 +47,6 @@ };

},
_.join('\n')
_.join('\n'),
function (newContent) {
return '\n' + newContent + '\n';
}
)(contributors);

@@ -65,3 +68,3 @@ }

module.exports = function generate(options, contributors, fileContent) {
var contributorsList = generateContributorsList(options, contributors);
var contributorsList = contributors.length === 0 ? '\n' : generateContributorsList(options, contributors);
var badge = formatBadge(options, contributors);

@@ -68,0 +71,0 @@ return _.flow(

@@ -139,2 +139,23 @@ import test from 'ava';

test('should inject nothing if there are no contributors', t => {
const {options, content} = fixtures();
const contributorList = [];
const expected = [
'# project',
'',
'Description',
'',
'## Contributors',
'These people contributed to the project:',
'<!-- ALL-CONTRIBUTORS-LIST:START -->',
'<!-- ALL-CONTRIBUTORS-LIST:END -->',
'',
'Thanks a lot guys!'
].join('\n');
const result = generate(options, contributorList, content);
t.is(result, expected);
});
test('should replace all-contributors badge if present', t => {

@@ -141,0 +162,0 @@ const {kentcdodds} = contributors;

@@ -7,3 +7,3 @@ 'use strict';

var commitTemplate = '<%= (newContributor ? "Add" : "Update") %> <%= username %> as a contributor';
var commitTemplate = '<%= (newContributor ? "Add" : "Update") %> @<%= username %> as a contributor';

@@ -10,0 +10,0 @@ function getRemoteOriginData(cb) {

{
"name": "all-contributors-cli",
"version": "3.0.3",
"version": "3.0.4",
"description": "Tool to easily add recognition for new contributors",

@@ -5,0 +5,0 @@ "bin": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc