commitplease
Advanced tools
Comparing version 2.7.3-2 to 2.7.3-3
@@ -1,27 +0,5 @@ | ||
var process = require('child_process') | ||
var command = 'git config --get core.commentchar' | ||
var scissor = /# ------------------------ >8 ------------------------[\s\S]+/ | ||
var comment = null | ||
function initComment () { | ||
try { | ||
comment = process.execSync(command).toString().trim() | ||
} catch (error) { | ||
comment = '#' | ||
// console.log('Suppressing an error from ' + command) | ||
// console.log('Possible reasons for error:') | ||
// console.log(' 1. "core.commentchar" defaults to #') | ||
// console.log(' 2. This is *not* a git repository') | ||
// console.log(' 3. This is a git submodule') | ||
// console.log('Maybe something else, no reliable way to know') | ||
} | ||
} | ||
module.exports = function (value) { | ||
if (comment === null) initComment() | ||
var isComment = new RegExp('^' + comment) | ||
var isComment = new RegExp('^#') | ||
return value.replace(scissor, '').split(/\n/).filter(function (line) { | ||
@@ -28,0 +6,0 @@ return !isComment.test(line) |
{ | ||
"name": "commitplease", | ||
"version": "2.7.3-2", | ||
"version": "2.7.3-3", | ||
"description": "Validates strings as commit messages", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
0
44463
1165