Skip to content

Commit

Permalink
upgrade xo
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestalmage committed Jul 17, 2019
1 parent 1ed3d1f commit 90bcfe7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function parseVersion(versionString) {
patch: parseInt(m[2], 10)
};
}

const versions = (versionString || '').split('.').map(n => parseInt(n, 10));
return {
major: versions[0],
Expand All @@ -21,7 +22,7 @@ function parseVersion(versionString) {
}

function supportsHyperlink(stream) {
const env = process.env;
const {env} = process;

if ('FORCE_HYPERLINK' in env) {
return !(env.FORCE_HYPERLINK.length > 0 && parseInt(env.FORCE_HYPERLINK, 10) === 0);
Expand Down Expand Up @@ -64,6 +65,7 @@ function supportsHyperlink(stream) {
if (version.major === 3) {
return version.minor >= 1;
}

return version.major > 3;
// No default
}
Expand All @@ -74,6 +76,7 @@ function supportsHyperlink(stream) {
if (env.VTE_VERSION === '0.50.0') {
return false;
}

const version = parseVersion(env.VTE_VERSION);
return version.major > 0 || version.minor >= 50;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"ava": "^2.2.0",
"codecov": "^3.5.0",
"nyc": "^14.1.1",
"xo": "^0.18.2"
"xo": "^0.24.0"
},
"nyc": {
"reporter": [
Expand Down

0 comments on commit 90bcfe7

Please sign in to comment.