File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -112,14 +112,31 @@ function isPackageFolderPath(folderPath: string, packagesToIgnore: string[]): bo
112112 return result ;
113113}
114114
115+ function shouldProcessFolderPath ( folderPath : string , folderNamesToIgnore : string [ ] ) : boolean {
116+ if ( ! contains ( folderNamesToIgnore , getName ( folderPath ) ) ) {
117+ // If current path is not in folder to ignore list then process it.
118+ return true ;
119+ }
120+
121+ // if current folder name is in folder to ignore list then make sure this path is package root path
122+ // eventgrid service name and dataplane package name are same and it is added in ignore list
123+ // So this causes an issue to skip processing eventgrid service folder itself
124+ const packageJsonFilePath : string = joinPath ( folderPath , "package.json" ) ;
125+ if ( ! fileExistsSync ( packageJsonFilePath ) ) {
126+ return true ;
127+ }
128+
129+ // Skip current path since it is package root path and also added in ignore folder list
130+ return false ;
131+ }
132+
115133export const packagesToIgnore : string [ ] = generateDataplaneList ( ) . packageList ;
116134export var folderNamesToIgnore : string [ ] = generateDataplaneList ( ) . folderList ;
117135folderNamesToIgnore . push ( "node_modules" ) ;
118-
119136export function getPackageFolderPaths ( packagesFolderPath : string ) : string [ ] | undefined {
120137 return getChildFolderPaths ( packagesFolderPath , {
121138 recursive : true ,
122139 condition : ( folderPath : string ) => isPackageFolderPath ( folderPath , packagesToIgnore ) ,
123- folderCondition : ( folderPath : string ) => ! contains ( folderNamesToIgnore , getName ( folderPath ) )
140+ folderCondition : ( folderPath : string ) => shouldProcessFolderPath ( folderPath , folderNamesToIgnore )
124141 } ) ;
125142}
You can’t perform that action at this time.
0 commit comments