File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change 1- const fs = require ( "fs" ) ;
2- const path = require ( "path" ) ;
1+ const fs = require ( "fs" )
2+ const path = require ( "path" )
33
4- const json = fs . readFileSync ( path . join ( __dirname , ".." , "package.json" ) ) ;
5- const package = JSON . parse ( json ) ;
4+ const json = fs . readFileSync ( path . join ( __dirname , ".." , "package.json" ) )
5+ const package = JSON . parse ( json )
66
77// https://stackoverflow.com/questions/175739/built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number
88function isAllowed ( version ) {
99 return version . startsWith ( "~" ) ||
1010 ! isNaN ( version [ 0 ] ) ||
11- version . startsWith ( "https://" ) ;
11+ version . startsWith ( "https://" )
1212}
1313
14- let failed = 0 ;
14+ let failed = 0
1515
1616for ( let name in package . dependencies ) {
1717 if ( ! isAllowed ( package . dependencies [ name ] ) ) {
18- console . error ( `package.json: The version number of ${ name } must start with ~ or a number` ) ;
19- failed ++ ;
18+ console . error ( `package.json: The version number of ${ name } must start with ~ or a number` )
19+ failed ++
2020 }
2121}
2222
2323if ( failed ) {
24- console . log ( "\nWe want to upgrade only patch versions of Uno, Fuselibs and other dependencies." ) ;
25- console . log ( "Minor version upgrades require a new Fuse SDK release to be made." ) ;
24+ console . log ( "\nWe want to upgrade only patch versions of Uno, Fuselibs and other dependencies." )
25+ console . log ( "Minor version upgrades require a new Fuse SDK release to be made." )
2626}
2727
28- process . exit ( failed ) ;
28+ process . exit ( failed )
You can’t perform that action at this time.
0 commit comments