1 | 'use strict';
|
2 |
|
3 | const notifier = require('update-notifier');
|
4 | const pkg = require('../package.json');
|
5 | const FUN_DISABLE_VERSION_CHECK = 'FUN_DISABLE_VERSION_CHECK';
|
6 |
|
7 | function notify(updateCheckInterval = 1000 * 60 * 30) {
|
8 | const disableVersionCheck = process.env[FUN_DISABLE_VERSION_CHECK];
|
9 | if (
|
10 | disableVersionCheck !== undefined &&
|
11 | disableVersionCheck !== '0' &&
|
12 | disableVersionCheck !== 'false'
|
13 | ) {
|
14 | return;
|
15 | }
|
16 | notifier({
|
17 | pkg,
|
18 | updateCheckInterval
|
19 | }).notify();
|
20 | }
|
21 |
|
22 | module.exports = { notify }; |
\ | No newline at end of file |