File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed
Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " react-native-update-cli" ,
3- "version" : " 2.1.0 " ,
3+ "version" : " 2.1.1 " ,
44 "description" : " command line tool for react-native-update (remote updates for react native)" ,
55 "main" : " index.js" ,
66 "bin" : {
Original file line number Diff line number Diff line change 1- const currentPackage = require ( `${ process . cwd ( ) } /package.json` ) ;
1+ let currentPackage = null ;
2+ try {
3+ currentPackage = require ( `${ process . cwd ( ) } /package.json` ) ;
4+ } catch ( e ) {
5+ // console.warn('No package.json file were found');
6+ }
27
38const _depVersions : Record < string , string > = { } ;
49
@@ -24,12 +29,9 @@ if (currentPackage) {
2429
2530export const depVersions = Object . keys ( _depVersions )
2631 . sort ( ) // Sort the keys alphabetically
27- . reduce (
28- ( obj , key ) => {
29- obj [ key ] = _depVersions [ key ] ; // Rebuild the object with sorted keys
30- return obj ;
31- } ,
32- { } as Record < string , string > ,
33- ) ;
32+ . reduce ( ( obj , key ) => {
33+ obj [ key ] = _depVersions [ key ] ; // Rebuild the object with sorted keys
34+ return obj ;
35+ } , { } as Record < string , string > ) ;
3436
3537// console.log({ depVersions });
You can’t perform that action at this time.
0 commit comments