File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @codebolt/codeboltjs" ,
3- "version" : " 1.1.36 " ,
3+ "version" : " 1.1.37 " ,
44 "description" : " " ,
55 "keywords" : [],
66 "author" : " " ,
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ const cbcodeutils = {
3333 parser . setLanguage ( JavaScript ) ;
3434 const trees = [ ] ;
3535 const functionNodes = [ ] ;
36+
3637 const processDirectory = ( directory :any ) => {
3738 console . log ( "isdir" )
3839 // Read all files in the directory
@@ -46,7 +47,8 @@ const cbcodeutils = {
4647 } else if ( path . extname ( file . name ) === '.js' ) {
4748 const code = fs . readFileSync ( path . join ( directory , file . name ) , 'utf-8' ) ;
4849 console . log ( code ) ;
49- const tree = parser . parse ( code ) ;
50+ let tree :any = parser . parse ( code ) ;
51+ tree . rootNode . path = path . join ( directory , file . name ) ; // Set file path for t
5052 trees . push ( tree ) ;
5153 }
5254 } ) ;
@@ -57,7 +59,8 @@ const cbcodeutils = {
5759 } else if ( path . extname ( pathInput ) === '.js' ) {
5860 // Read a single JavaScript file
5961 const code = fs . readFileSync ( pathInput , 'utf-8' ) ;
60- let tree = parser . parse ( code ) ;
62+ let tree :any = parser . parse ( code ) ;
63+ tree . rootNode . path = pathInput ; // Set file path for t
6164
6265 trees . push ( tree ) ;
6366 }
You can’t perform that action at this time.
0 commit comments