Skip to content

Commit 565fc1f

Browse files
committed
fix: fix import update-notifier
Signed-off-by: dhmlau <dhmlau@ca.ibm.com>
1 parent 73a58da commit 565fc1f

2 files changed

Lines changed: 20 additions & 15 deletions

File tree

packages/cli/bin/cli-main.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,17 @@ if (tabCompletionCommands.includes(originalCommand)) {
5050
}
5151

5252
const main = require('../lib/cli');
53-
const updateNotifier = require('update-notifier');
53+
5454
// Force version check with `lb4 --version`
5555
const interval = opts.version ? 0 : undefined;
56-
updateNotifier({
57-
pkg: pkg,
58-
updateCheckInterval: interval,
59-
}).notify({isGlobal: true});
56+
57+
import('update-notifier')
58+
.then(({default: updateNotifier}) => {
59+
updateNotifier({
60+
pkg: pkg,
61+
updateCheckInterval: interval,
62+
}).notify({isGlobal: true});
63+
})
64+
.catch(() => {});
6065

6166
main(opts);

packages/cli/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@
106106
"config": {
107107
"templateDependencies": {
108108
"tslib": "^2.0.0",
109-
"@types/mocha": "^10.0.1",
110-
"@types/node": "^16.18.50",
109+
"@types/mocha": "^10.0.6",
110+
"@types/node": "^16.18.68",
111111
"cross-spawn": "^7.0.3",
112112
"debug": "^4.3.4",
113-
"fs-extra": "^11.1.1",
113+
"fs-extra": "^11.2.0",
114114
"mocha": "^10.2.0",
115115
"nyc": "^15.1.0",
116-
"prettier": "^3.0.2",
117-
"rimraf": "^5.0.1",
116+
"prettier": "^3.0.3",
117+
"rimraf": "^5.0.5",
118118
"source-map-support": "^0.5.21",
119119
"typescript": "~5.2.2",
120120
"@loopback/authentication": "^10.1.3",
@@ -131,7 +131,7 @@
131131
"@loopback/rest": "^13.1.3",
132132
"@loopback/testlab": "^6.1.3",
133133
"@loopback/docs": "^6.0.4",
134-
"glob": "^10.3.4",
134+
"glob": "^10.3.10",
135135
"@loopback/example-hello-world": "^6.1.3",
136136
"@loopback/example-log-extension": "^6.1.3",
137137
"@loopback/example-rpc-server": "^6.1.3",
@@ -149,12 +149,12 @@
149149
"@loopback/example-greeter-extension": "^6.1.3",
150150
"@loopback/booter-lb3app": "^5.1.3",
151151
"@loopback/example-lb3-application": "^6.1.3",
152-
"eslint": "^8.48.0",
153-
"eslint-plugin-mocha": "^10.1.0",
152+
"eslint": "^8.51.0",
153+
"eslint-plugin-mocha": "^10.2.0",
154154
"@loopback/example-greeting-app": "^6.1.3",
155155
"@loopback/example-context": "^6.1.3",
156-
"@typescript-eslint/eslint-plugin": "^6.4.1",
157-
"@typescript-eslint/parser": "^6.4.1",
156+
"@typescript-eslint/eslint-plugin": "^6.8.0",
157+
"@typescript-eslint/parser": "^6.8.0",
158158
"eslint-plugin-eslint-plugin": "^5.1.1",
159159
"eslint-config-prettier": "^9.0.0",
160160
"@loopback/repository-tests": "^0.23.3",

0 commit comments

Comments
 (0)