Skip to content

Commit

Permalink
feat: require Node.js >=10.13
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Require Node.js >= 10.13
  • Loading branch information
pvdlg committed Dec 5, 2019
1 parent 7aaeb0f commit bd4322d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion lib/get-client.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const {URL} = require('url');
const {memoize, get} = require('lodash');
const Octokit = require('@octokit/rest');
const pRetry = require('p-retry');
Expand Down
6 changes: 2 additions & 4 deletions lib/parse-github-url.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const {URL} = require('url');

module.exports = repositoryUrl => {
const [match, auth, host, path] = /^(?!.+:\/\/)(?:(.*)@)?(.*?):(.*?)$/.exec(repositoryUrl) || [];
const [match, auth, host, path] = /^(?!.+:\/\/)(?:(?<auth>.*)@)?(?<host>.*?):(?<path>.*)$/.exec(repositoryUrl) || [];
try {
const [, owner, repo] = /^\/([^/]+)?\/?(.+?)(?:\.git)?$/.exec(
const [, owner, repo] = /^\/(?<owner>[^/]+)?\/?(?<repo>.+?)(?:\.git)?$/.exec(
new URL(match ? `ssh://${auth ? `${auth}@` : ''}${host}/${path}` : repositoryUrl).pathname
);
return {owner, repo};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"xo": "^0.25.2"
},
"engines": {
"node": ">=8.16"
"node": ">=10.13"
},
"files": [
"lib",
Expand Down

0 comments on commit bd4322d

Please sign in to comment.