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

Commit

Permalink
fix: Update notifier #6 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielamaia authored Jul 28, 2020
1 parent 3f04be0 commit 55be2a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/cli/src/utils/updateNotifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import * as updateNotifier from 'update-notifier';
import chalk from 'chalk';
const pkg = require('../../package.json');

const notifier = updateNotifier({
const { update } = updateNotifier({
pkg,
shouldNotifyInNpmScript: true,
updateCheckInterval: 30 * 60 * 1000
});

export default () => {
if (notifier.update) {
if (update && update.latest !== pkg.version) {
return `${chalk.yellowBright('Update available:')} ${chalk.greenBright(
notifier.update.latest
update.latest
)}\n`;
}
return '';
Expand Down

0 comments on commit 55be2a9

Please sign in to comment.