Skip to content

Commit

Permalink
Upgrade update-notifier to latest (ESM).
Browse files Browse the repository at this point in the history
To load it from CJS we need to use a dynamic import.
  • Loading branch information
JoseGoncalves authored and rigwild committed Dec 22, 2023
1 parent 7f46790 commit 0cc2c48
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 240 deletions.
7 changes: 6 additions & 1 deletion bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ const argv = require('../dist/cli').default
require('../dist/index').generateMarkdownFileSystem(argv)

// Check for update
require('update-notifier')({ pkg: require('../package.json') }).notify()
async function checkUpdate() {
const { default: updateNotifier } = await import('update-notifier')
updateNotifier({ pkg: require('../package.json') }).notify()
}

checkUpdate()
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"apidoc-light": "^0.54.0",
"ejs": "^3.1.9",
"semver": "^7.5.4",
"update-notifier": "^5.1.0",
"update-notifier": "^7.0.0",
"yargs": "^17.7.2"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 0cc2c48

Please sign in to comment.