contributors
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -6,3 +6,3 @@ | ||
var exec = require('child_process').exec | ||
var _ = require('lodash') | ||
, util = require('util') | ||
@@ -12,2 +12,4 @@ , EventEmitter = require('events').EventEmitter | ||
var authors = require('./git').authors | ||
/** | ||
@@ -39,21 +41,12 @@ * Constructor | ||
// get git logs | ||
exec('git log --format="%ae"', { cwd: path }, function(err, stdout, stderr) { | ||
if (stderr) { | ||
var e = errorException(stderr, 'GITError') | ||
e.message = stderr | ||
return fn(e) | ||
} | ||
authors(path, function(err, list) { | ||
if (err) return fn(err) | ||
var emails = stdout.split("\n") | ||
, result = {} | ||
// TODO: 'name' will be used in next release | ||
list = _.pluck(list, 'email') | ||
// filter output. email is the unique key. | ||
for (var i = emails.length; i--; ) { | ||
if (emails[i]) result[emails[i]] = 1 | ||
} | ||
list = _.uniq(list) | ||
return fn(null, Object.keys(result)) | ||
return fn(null, list) | ||
}) | ||
@@ -60,0 +53,0 @@ |
{ | ||
"name": "contributors", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Generate a Markdown list of contributors to your GitHub repository.", | ||
@@ -29,3 +29,4 @@ "main": "index.js", | ||
"progress": ">=1.1.5", | ||
"urllib": ">=0.5.13" | ||
"urllib": ">=0.5.13", | ||
"lodash": ">=2.4.1" | ||
}, | ||
@@ -32,0 +33,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
16707
12
298
4
+ Addedlodash@>=2.4.1
+ Addedlodash@4.17.21(transitive)