From 4b73226a283caccf11d426d7f33ede145f24804f Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2019 04:22:50 +0000 Subject: [PATCH] chore(package): update xo to version 0.25.2 --- package.json | 2 +- test/helpers/git-utils.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 837e241d..9b3a3205 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "semantic-release": "^15.0.0", "sinon": "^7.1.1", "tempy": "^0.3.0", - "xo": "^0.24.0" + "xo": "^0.25.2" }, "engines": { "node": ">=8.3" diff --git a/test/helpers/git-utils.js b/test/helpers/git-utils.js index 8ff03eb4..bc06b373 100644 --- a/test/helpers/git-utils.js +++ b/test/helpers/git-utils.js @@ -91,10 +91,10 @@ export async function gitGetCommits(from, execaOpts) { * Checkout a branch on the current git repository. * * @param {String} branch Branch name. - * @param {Boolean} create `true` to create the branch, `false` to checkout an existing branch. + * @param {Boolean} create to create the branch, `false` to checkout an existing branch. * @param {Object} [execaOpts] Options to pass to `execa`. */ -export async function gitCheckout(branch, create = true, execaOpts) { +export async function gitCheckout(branch, create, execaOpts) { await execa('git', create ? ['checkout', '-b', branch] : ['checkout', branch], execaOpts); } @@ -176,12 +176,12 @@ export async function gitStaged(execaOpts) { /** * Get the list of files included in a commit. * - * @param {String} [ref='HEAD'] The git reference for which to retrieve the files. + * @param {String} ref The git reference for which to retrieve the files. * @param {Object} [execaOpts] Options to pass to `execa`. * * @return {Array} The list of files path included in the commit. */ -export async function gitCommitedFiles(ref = 'HEAD', execaOpts) { +export async function gitCommitedFiles(ref, execaOpts) { return (await execa('git', ['diff-tree', '-r', '--name-only', '--no-commit-id', '-r', ref], execaOpts)).stdout .split('\n') .filter(file => Boolean(file));