Skip to content

Commit

Permalink
add update-notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeseda committed Apr 16, 2024
1 parent 32ee163 commit 7ab7d08
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"strip-ansi": "6.0.1",
"tiny-json-http": "7.5.1",
"tmp": "0.2.3",
"update-notifier-cjs": "5.1.6",
"ws": "8.16.0"
},
"devDependencies": {
Expand Down
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ let { existsSync, readFileSync } = require('fs')
let { join } = require('path')
let { homedir } = require('os')
let minimist = require('minimist')
let update = require('update-notifier-cjs')
let commands = require('./commands')
let _printer = require('./printer')
let telemetry = require('./lib/telemetry')
Expand Down Expand Up @@ -44,6 +45,10 @@ async function begin (params = {}) {

// Invoke to start if not running in module (test) mode
if (require.main === module) {
let pkg = require('../package.json')
let boxenOpts = { padding: 1, margin: 1, align: 'center', borderColor: 'green', borderStyle: 'round', dimBorder: true }
update({ pkg, shouldNotifyInNpmScript: true }).notify({ boxenOpts })

begin()
}

Expand Down

0 comments on commit 7ab7d08

Please sign in to comment.