changed-log
Advanced tools
Comparing version 0.7.0 to 0.7.1
{ | ||
"name": "changed-log", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "Returns all commit messages between 2 versions of an NPM module", | ||
@@ -5,0 +5,0 @@ "main": "src/changed-log.js", |
@@ -21,2 +21,4 @@ require('lazy-ass'); | ||
debug('getting package repo for "%s"', name); | ||
var checkRepo = utils.verifyGithub(name); | ||
return Promise.resolve(packageField(name)) | ||
@@ -27,3 +29,3 @@ .then(R.tap(debug)) | ||
}) | ||
.then(R.tap(utils.verifyGithub)) | ||
.then(R.tap(checkRepo)) | ||
.then(R.prop('url')) | ||
@@ -30,0 +32,0 @@ .then(utils.parseGithubUrl); |
@@ -8,2 +8,25 @@ /* global describe, it */ | ||
describe('verifyGithub', function () { | ||
var verifyGh = utils.verifyGithub; | ||
var repo = { | ||
type: 'git', | ||
url: 'https://github.com/foo/bar.git' | ||
}; | ||
it('works with 2 args', function () { | ||
la(check.fn(verifyGh)); | ||
verifyGh('foo', repo); | ||
}); | ||
it('works curried', function () { | ||
verifyGh('foo')(repo); | ||
}); | ||
it('throws', function () { | ||
la(check.raises(function () { | ||
verifyGh('foo', null); | ||
}), 'threw an error'); | ||
}); | ||
}); | ||
describe('first line', function () { | ||
@@ -10,0 +33,0 @@ var firstLine = utils.firstLine; |
@@ -20,7 +20,13 @@ require('lazy-ass'); | ||
function verifyGithub(repo) { | ||
function verifyGithub(message, repo) { | ||
if (typeof message !== 'string') { | ||
repo = message; | ||
/* eslint no-undefined:0 */ | ||
message = undefined; | ||
} | ||
la(check.object(repo) && | ||
repo.type === 'git' && | ||
isGithubUrl(repo.url), | ||
'not a github repo', repo); | ||
'not a github repo', repo, message); | ||
} | ||
@@ -92,3 +98,3 @@ | ||
github: github, | ||
verifyGithub: verifyGithub, | ||
verifyGithub: R.curry(verifyGithub), | ||
parseGithubUrl: parseGithubUrl, | ||
@@ -95,0 +101,0 @@ trimVersion: trimVersion, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
425904
786