Skip to content

Commit 2e518b6

Browse files
author
LHammer
committed
⚡improve checkversion
1 parent 70dfe2b commit 2e518b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/checkversion.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ module.exports = done => {
2727
const latestVersion = JSON.parse(body)['dist-tags'].latest
2828
const localVersion = packageConfig.version
2929
if (semver.lt(localVersion, latestVersion)) {
30-
// logger.warn('A newer version of ydt-cli is available.')
3130
updateNotifier({
3231
pkg: {
3332
name: 'ydt-cli',
3433
version: latestVersion
3534
},
36-
updateCheckInterval: 1000 * 60 * 60 * 12
35+
updateCheckInterval: 0
3736
}).notify({
37+
isGlobal: true,
38+
shouldNotifyInNpmScript: true,
3839
message: 'A newer version of ydt-cli is available.'
39-
})
40+
});
4041
}
4142
}
4243
done()

0 commit comments

Comments
 (0)