Socket
Socket
Sign inDemoInstall

all-contributors-cli

Package Overview
Dependencies
Maintainers
2
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 4.0.1 to 4.1.0

12

lib/generate/format-contributor.js

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

var avatarTemplate = _.template('<img src="<%= contributor.avatar_url %>" width="<%= options.imageSize %>px;"/>');
var avatarBlockTemplate = _.template('[<%= avatar %><br /><sub><%= contributor.name %></sub>](<%= contributor.profile %>)');
var avatarBlockTemplate = _.template('[<%= avatar %><br /><sub><%= name %></sub>](<%= contributor.profile %>)');
var contributorTemplate = _.template('<%= avatarBlock %><br /><%= contributions %>');

@@ -15,6 +15,14 @@

var avatar = avatarTemplate(templateData);
var avatarBlock = avatarBlockTemplate(_.assign({avatar: avatar}, templateData));
var avatarBlock = avatarBlockTemplate(_.assign({
name: escapeName(templateData.contributor.name),
avatar: avatar
}, templateData));
return contributorTemplate(_.assign({avatarBlock: avatarBlock}, templateData));
}
function escapeName(name) {
return name.replace(new RegExp('\\|', 'g'), '&#124;');
}
module.exports = function formatContributor(options, contributor) {

@@ -21,0 +29,0 @@ var formatter = _.partial(formatContributionType, [options, contributor]);

@@ -52,1 +52,10 @@ import test from 'ava';

});
test('should format contributor with pipes in their name', t => {
const contributor = contributors.pipey;
const {options} = fixtures();
const expected = '[<img src="https://avatars1.githubusercontent.com/u/1500684" width="150px;"/><br /><sub>Who &#124; Needs &#124; Pipes?</sub>](http://github.com/chrisinajar)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=pipey)';
t.is(formatContributor(options, contributor), expected);
});

2

package.json
{
"name": "all-contributors-cli",
"version": "4.0.1",
"version": "4.1.0",
"description": "Tool to easily add recognition for new contributors",

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

# all-contributors-cli
[![version](https://img.shields.io/npm/v/all-contributors-cli.svg)](http://npm.im/all-contributors-cli)
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg)](#contributors)
[![All Contributors](https://img.shields.io/badge/all_contributors-6-orange.svg?style=flat-square)](#contributors)

@@ -62,3 +62,3 @@ This is a tool to help automate adding contributor acknowledgements according to the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.

- doc: 📖
- translate: 🌍
- translation: 🌍
- question: 💬

@@ -97,4 +97,4 @@ - test: ⚠️

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars.githubusercontent.com/u/3869412?v=3" width="100px;"/><br /><sub>Jeroen Engels</sub>](https://github.com/jfmengels)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=jfmengels) [📖](https://github.com/jfmengels/all-contributors-cli/commits?author=jfmengels) [⚠️](https://github.com/jfmengels/all-contributors-cli/commits?author=jfmengels) | [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](http://kentcdodds.com/)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds) [💻](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds) | [<img src="https://avatars.githubusercontent.com/u/14871650?v=3" width="100px;"/><br /><sub>João Guimarães</sub>](https://github.com/jccguimaraes)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=jccguimaraes) | [<img src="https://avatars.githubusercontent.com/u/1282980?v=3" width="100px;"/><br /><sub>Ben Briggs</sub>](http://beneb.info)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=ben-eb) | [<img src="https://avatars.githubusercontent.com/u/22768990?v=3" width="100px;"/><br /><sub>Itai Steinherz</sub>](https://github.com/itaisteinherz)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=itaisteinherz) [💻](https://github.com/jfmengels/all-contributors-cli/commits?author=itaisteinherz) |
| :---: | :---: | :---: | :---: | :---: |
| [<img src="https://avatars.githubusercontent.com/u/3869412?v=3" width="100px;"/><br /><sub>Jeroen Engels</sub>](https://github.com/jfmengels)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=jfmengels) [📖](https://github.com/jfmengels/all-contributors-cli/commits?author=jfmengels) [⚠️](https://github.com/jfmengels/all-contributors-cli/commits?author=jfmengels) | [<img src="https://avatars.githubusercontent.com/u/1500684?v=3" width="100px;"/><br /><sub>Kent C. Dodds</sub>](http://kentcdodds.com/)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds) [💻](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds) | [<img src="https://avatars.githubusercontent.com/u/14871650?v=3" width="100px;"/><br /><sub>João Guimarães</sub>](https://github.com/jccguimaraes)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=jccguimaraes) | [<img src="https://avatars.githubusercontent.com/u/1282980?v=3" width="100px;"/><br /><sub>Ben Briggs</sub>](http://beneb.info)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=ben-eb) | [<img src="https://avatars.githubusercontent.com/u/22768990?v=3" width="100px;"/><br /><sub>Itai Steinherz</sub>](https://github.com/itaisteinherz)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=itaisteinherz) [💻](https://github.com/jfmengels/all-contributors-cli/commits?author=itaisteinherz) | [<img src="https://avatars.githubusercontent.com/u/5701162?v=3" width="100px;"/><br /><sub>Alex Jover</sub>](https://github.com/alexjoverm)<br />[💻](https://github.com/jfmengels/all-contributors-cli/commits?author=alexjoverm) [📖](https://github.com/jfmengels/all-contributors-cli/commits?author=alexjoverm) |
| :---: | :---: | :---: | :---: | :---: | :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->

@@ -101,0 +101,0 @@

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