From 81955b823432c80cec0645dd331b30cb0974ba23 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Thu, 5 Dec 2019 12:04:43 -0500 Subject: [PATCH] feat: require Node.js >=10.13 BREAKING CHANGE: Require Node.js >= 10.13 --- .travis.yml | 3 +-- package.json | 2 +- test/helpers/git-utils.js | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index a766af48..5e95e3ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,7 @@ language: node_js node_js: - 12 - - 10 - - 8.16 + - 10.13 # Trigger a push build on release and greenkeeper branches + PRs build on every branches # Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) diff --git a/package.json b/package.json index 0fe75260..753513c5 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "xo": "^0.25.2" }, "engines": { - "node": ">=8.16" + "node": ">=10.13" }, "files": [ "lib", diff --git a/test/helpers/git-utils.js b/test/helpers/git-utils.js index 3902549a..c4ace2d3 100644 --- a/test/helpers/git-utils.js +++ b/test/helpers/git-utils.js @@ -158,7 +158,7 @@ export async function gitRemoteHead(repositoryUrl, execaOpts) { return (await execa('git', ['ls-remote', repositoryUrl, 'HEAD'], execaOpts)).stdout .split('\n') .filter(head => Boolean(head)) - .map(head => head.match(/^(\S+)/)[1])[0]; + .map(head => head.match(/^(?\S+)/)[1])[0]; } /** @@ -172,7 +172,7 @@ export async function gitStaged(execaOpts) { return (await execa('git', ['status', '--porcelain'], execaOpts)).stdout .split('\n') .filter(status => status.startsWith('A ')) - .map(status => status.match(/^A\s+(.+)$/)[1]); + .map(status => status.match(/^A\s+(?.+)$/)[1]); } /**