File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ function getAllNodeAddons(dirPath: string) {
1717 const addonExt = "node" ;
1818 let dir = fs . readdirSync ( dirPath ) ;
1919 return dir
20- . filter ( ( elm ) => elm . match ( new RegExp ( `.*\.(${ addonExt } )` , "ig" ) ) )
20+ . filter ( ( elm ) => elm . match ( new RegExp ( `.*\.(${ addonExt } $ )` , "ig" ) ) )
2121 . map ( ( eachElement ) => path . resolve ( dirPath , eachElement ) ) ;
2222}
2323
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function getAllNodeAddons(dirPath: string) {
2626 const addonExt = "node" ;
2727 let dir = fs . readdirSync ( dirPath ) ;
2828 return dir
29- . filter ( elm => elm . match ( new RegExp ( `.*\.(${ addonExt } )` , "ig" ) ) )
29+ . filter ( elm => elm . match ( new RegExp ( `.*\.(${ addonExt } $ )` , "ig" ) ) )
3030 . map ( eachElement => path . resolve ( dirPath , eachElement ) ) ;
3131}
3232
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ function getAllNodeAddons(dirPath: string) {
2828 const addonExt = "node" ;
2929 let dir = fs . readdirSync ( dirPath ) ;
3030 return dir
31- . filter ( elm => elm . match ( new RegExp ( `.*\.(${ addonExt } )` , "ig" ) ) )
31+ . filter ( elm => elm . match ( new RegExp ( `.*\.(${ addonExt } $ )` , "ig" ) ) )
3232 . map ( eachElement => path . resolve ( dirPath , eachElement ) ) ;
3333}
3434
You can’t perform that action at this time.
0 commit comments