File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 88
99const checkNodeVersion = require ( '@loopback/dist-util' ) . checkNodeVersion ;
1010
11+ const pkg = require ( '../package.json' ) ;
1112try {
12- const range = require ( '../package.json' ) . engines . node ;
13+ const range = pkg . engines . node ;
1314 checkNodeVersion ( range ) ;
1415} catch ( e ) {
1516 console . error ( e . message ) ;
@@ -26,4 +27,13 @@ const opts = minimist(process.argv.slice(2), {
2627 commands : 'l' , // --commands or -l: print commands
2728 } ,
2829} ) ;
30+
31+ const updateNotifier = require ( 'update-notifier' ) ;
32+ // Force version check with `lb4 --version`
33+ const interval = opts . version ? 0 : undefined ;
34+ updateNotifier ( {
35+ pkg : pkg ,
36+ updateCheckInterval : interval ,
37+ } ) . notify ( { isGlobal : true } ) ;
38+
2939main ( opts ) ;
Original file line number Diff line number Diff line change 5858 "swagger-parser" : " ^5.0.0" ,
5959 "swagger2openapi" : " ^2.11.16" ,
6060 "unicode-10.0.0" : " ^0.7.4" ,
61+ "update-notifier" : " ^2.5.0" ,
6162 "url-slug" : " ^2.0.0" ,
6263 "validate-npm-package-name" : " ^3.0.0" ,
6364 "yeoman-generator" : " ^3.1.1"
You can’t perform that action at this time.
0 commit comments