chore(package): update xo to version 0.23.0

This commit is contained in:
greenkeeper[bot]
2018-09-03 16:54:31 -04:00
committed by Pierre Vanduynslager
parent 42e9d1192f
commit fa62d427b6
11 changed files with 52 additions and 52 deletions
+19 -19
View File
@@ -12,8 +12,8 @@ const debug = require('debug')('semantic-release:git');
async function gitTagHead(tagName, execaOpts) {
try {
return await execa.stdout('git', ['rev-list', '-1', tagName], execaOpts);
} catch (err) {
debug(err);
} catch (error) {
debug(error);
}
}
@@ -44,13 +44,13 @@ async function isRefInHistory(ref, execaOpts) {
try {
await execa('git', ['merge-base', '--is-ancestor', ref, 'HEAD'], execaOpts);
return true;
} catch (err) {
if (err.code === 1) {
} catch (error) {
if (error.code === 1) {
return false;
}
debug(err);
throw err;
debug(error);
throw error;
}
}
@@ -63,7 +63,7 @@ async function isRefInHistory(ref, execaOpts) {
async function fetch(repositoryUrl, execaOpts) {
try {
await execa('git', ['fetch', '--unshallow', '--tags', repositoryUrl], execaOpts);
} catch (err) {
} catch (error) {
await execa('git', ['fetch', '--tags', repositoryUrl], execaOpts);
}
}
@@ -75,7 +75,7 @@ async function fetch(repositoryUrl, execaOpts) {
*
* @return {string} the sha of the HEAD commit.
*/
async function gitHead(execaOpts) {
function gitHead(execaOpts) {
return execa.stdout('git', ['rev-parse', 'HEAD'], execaOpts);
}
@@ -89,8 +89,8 @@ async function gitHead(execaOpts) {
async function repoUrl(execaOpts) {
try {
return await execa.stdout('git', ['config', '--get', 'remote.origin.url'], execaOpts);
} catch (err) {
debug(err);
} catch (error) {
debug(error);
}
}
@@ -104,8 +104,8 @@ async function repoUrl(execaOpts) {
async function isGitRepo(execaOpts) {
try {
return (await execa('git', ['rev-parse', '--git-dir'], execaOpts)).code === 0;
} catch (err) {
debug(err);
} catch (error) {
debug(error);
}
}
@@ -121,9 +121,9 @@ async function isGitRepo(execaOpts) {
async function verifyAuth(repositoryUrl, branch, execaOpts) {
try {
await execa('git', ['push', '--dry-run', repositoryUrl, `HEAD:${branch}`], execaOpts);
} catch (err) {
debug(err);
throw err;
} catch (error) {
debug(error);
throw error;
}
}
@@ -163,8 +163,8 @@ async function push(repositoryUrl, branch, execaOpts) {
async function verifyTagName(tagName, execaOpts) {
try {
return (await execa('git', ['check-ref-format', `refs/tags/${tagName}`], execaOpts)).code === 0;
} catch (err) {
debug(err);
} catch (error) {
debug(error);
}
}
@@ -182,8 +182,8 @@ async function isBranchUpToDate(branch, execaOpts) {
(await execa.stdout('git', ['ls-remote', '--heads', 'origin', branch], execaOpts)).match(/^(\w+)?/)[1],
execaOpts
);
} catch (err) {
debug(err);
} catch (error) {
debug(error);
}
}