Skip to content
This repository was archived by the owner on Jan 3, 2024. It is now read-only.

Commit 55be2a9

Browse files
authored
fix: Update notifier #6 (#8)
1 parent 3f04be0 commit 55be2a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/cli/src/utils/updateNotifier.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import * as updateNotifier from 'update-notifier';
22
import chalk from 'chalk';
33
const pkg = require('../../package.json');
44

5-
const notifier = updateNotifier({
5+
const { update } = updateNotifier({
66
pkg,
77
shouldNotifyInNpmScript: true,
88
updateCheckInterval: 30 * 60 * 1000
99
});
1010

1111
export default () => {
12-
if (notifier.update) {
12+
if (update && update.latest !== pkg.version) {
1313
return `${chalk.yellowBright('Update available:')} ${chalk.greenBright(
14-
notifier.update.latest
14+
update.latest
1515
)}\n`;
1616
}
1717
return '';

0 commit comments

Comments
 (0)