git-conventional-commits
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -21,3 +21,3 @@ const execAsync = require('./execAsync'); | ||
// return undefined if no tag was found | ||
if (err.exitCode === 128) { | ||
if (err.code === 128) { | ||
return; | ||
@@ -35,3 +35,10 @@ } | ||
const gitLog = await execAsync(`git log --reverse --format=${gitLogFormat} ${from ? `${from}..` : ''}${to}`, {encoding: 'UTF-8'}) | ||
.then(result => result.split(LOG_COMMIT_DELIMITER + '\n').slice(0, -1)); | ||
.then(result => result.split(LOG_COMMIT_DELIMITER + '\n').slice(0, -1)) | ||
.catch(err => { | ||
// return empty log if no commits available | ||
if (err.code === 128) { | ||
return []; | ||
} | ||
throw err; | ||
}); | ||
@@ -38,0 +45,0 @@ return gitLog.map(commit => commit.split(LOG_FIELD_SEPARATOR)) |
@@ -23,3 +23,3 @@ const Git = require("./git"); | ||
major: 0, | ||
minor: 0, | ||
minor: 1, | ||
patch: 0 | ||
@@ -26,0 +26,0 @@ }; |
{ | ||
"name": "git-conventional-commits", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "git conventional commits util", | ||
@@ -5,0 +5,0 @@ "licence": "GPLv3", |
73304
749