changed-log
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -5,3 +5,3 @@ { | ||
"main": "src/changed-log.js", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"bin": { | ||
@@ -21,3 +21,4 @@ "changed-log": "bin/changed-log.js" | ||
"issues": "git-issues", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post" | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"test-angular": "DEBUG=changed node bin/changed-log.js https://github.com/angular/angular.js.git 1.4.0 1.4.1" | ||
}, | ||
@@ -54,2 +55,3 @@ "repository": { | ||
"package-json": "2.2.1", | ||
"parse-github-repo-url": "git+https://github.com/bahmutov/parse-github-repo-url.git#655d7b60c265335c117a9e0ab764a6f483e173bb", | ||
"ramda": "0.15.1", | ||
@@ -56,0 +58,0 @@ "update-notifier": "0.5.0" |
@@ -92,2 +92,9 @@ # changed-log | ||
## Debug | ||
If something is not working, you can see verbose log output, just run the program | ||
with `DEBUG=changed` environment variable set | ||
DEBUG=changed changed-log ... | ||
### Small print | ||
@@ -94,0 +101,0 @@ |
@@ -0,4 +1,6 @@ | ||
var log = require('debug')('changed'); | ||
require('lazy-ass'); | ||
var check = require('check-more-types'); | ||
var R = require('ramda'); | ||
var parseGh = require('parse-github-repo-url'); | ||
@@ -37,2 +39,4 @@ var repoSchema = { | ||
la(isGithubUrl(url), 'not a github url', url); | ||
log('parsing github url', url); | ||
var githubUrlRegex = /github\.com[\/:]([a-zA-Z-]+?)\/([a-zA-Z-\.0-9]+?)(\.git)?$/; | ||
@@ -73,6 +77,8 @@ var matches = githubUrlRegex.exec(url); | ||
// returns true if the package name is really github username/reponame | ||
var userRepo = /^([\w-]+)?\/([\w-\.]+)?$/; | ||
function isGithubName(str) { | ||
return check.unemptyString(str) && | ||
userRepo.test(str); | ||
if (check.not.unemptyString(str)) { | ||
return false; | ||
} | ||
var parsed = parseGh(str); | ||
return check.array(parsed); | ||
} | ||
@@ -82,6 +88,7 @@ | ||
la(isGithubName(str), 'not a github name', str); | ||
var matches = userRepo.exec(str); | ||
log('parsing github name', str); | ||
var matches = parseGh(str); | ||
return { | ||
user: matches[1], | ||
repo: matches[2] | ||
user: matches[0], | ||
repo: matches[1] | ||
}; | ||
@@ -88,0 +95,0 @@ } |
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
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
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
442927
1212
147
12
1