Skip to content

Commit 0d83e49

Browse files
feat: update notify period
set interval to be 1 week
1 parent bf7a7f7 commit 0d83e49

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cli.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ process.cliLogger = require('webpack-log')({
1818
const updateNotifier = require('update-notifier');
1919
const packageJson = require('./package.json');
2020

21-
updateNotifier({ pkg: packageJson }).notify();
21+
const notifier = updateNotifier({
22+
pkg,
23+
updateCheckInterval: 1000 * 60 * 60 * 24 * 7, // 1 week
24+
});
25+
26+
if (notifier.update) {
27+
console.log(`Update available: ${notifier.update.latest}`);
28+
}
2229

2330
const semver = require('semver');
2431

0 commit comments

Comments
 (0)