Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ac47d69
commit fda96b6
Showing
7 changed files
with
174 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
* text=auto | ||
*.js text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- '5' | ||
- '6' | ||
- '4' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
/* eslint-disable unicorn/no-process-exit */ | ||
'use strict'; | ||
var updateNotifier = require('./'); | ||
let updateNotifier = require('.'); | ||
|
||
var options = JSON.parse(process.argv[2]); | ||
const options = JSON.parse(process.argv[2]); | ||
|
||
updateNotifier = new updateNotifier.UpdateNotifier(options); | ||
|
||
updateNotifier.checkNpm().then(function (update) { | ||
// only update the last update check time on success | ||
updateNotifier.checkNpm().then(update => { | ||
// Only update the last update check time on success | ||
updateNotifier.config.set('lastUpdateCheck', Date.now()); | ||
|
||
if (update.type && update.type !== 'latest') { | ||
updateNotifier.config.set('update', update); | ||
} | ||
|
||
// Call process exit explicitly to terminate the child process | ||
// Otherwise the child process will run forever (according to nodejs docs) | ||
// Otherwise the child process will run forever, according to the Node.js docs | ||
process.exit(); | ||
}).catch(function () { | ||
}).catch(() => { | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,6 @@ | |
"fixture-stdout": "^0.2.1", | ||
"mocha": "*", | ||
"strip-ansi": "^3.0.1", | ||
"xo": "*" | ||
"xo": "^0.17.0" | ||
} | ||
} |
Oops, something went wrong.
fda96b6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015'fying projects is always fun 👍