File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import * as path from 'path';
66import printTableFromInp from './src/service' ;
77
88// Read package.json to get version
9- let packageVersion = '0.0.0' ;
9+ let packageVersion = '0.0.0-dev' ; // More descriptive default version
1010try {
1111 // Try to read from dist's parent directory first (for global installs)
1212 const packagePath = path . join ( __dirname , '..' , 'package.json' ) ;
1919 const packageJson = JSON . parse ( fs . readFileSync ( packagePath , 'utf8' ) ) ;
2020 packageVersion = packageJson . version ;
2121 } catch ( error ) {
22- // Use default version if package.json cannot be found
23- console . warn ( 'Warning: Could not read package.json, using default version' ) ;
22+ // More descriptive warning message
23+ console . warn ( 'Warning: Could not find package.json in either dist parent directory or current directory. Using default version. ' ) ;
2424 }
2525}
2626
You can’t perform that action at this time.
0 commit comments