@@ -162,8 +162,10 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
162162
163163 const deps = new Set < Input > ( ) ;
164164
165- debugLogArray ( name , 'Definition paths' , definitionPaths ) ;
166- for ( const id of definitionPaths ) deps . add ( toProductionEntry ( id , { containingFilePath : tsConfigFilePath } ) ) ;
165+ if ( definitionPaths . length > 0 ) {
166+ debugLogArray ( name , 'Definition paths' , definitionPaths ) ;
167+ for ( const id of definitionPaths ) deps . add ( toProductionEntry ( id , { containingFilePath : tsConfigFilePath } ) ) ;
168+ }
167169
168170 const ignore = worker . getIgnorePatterns ( ) ;
169171 const sharedGlobOptions = { cwd, dir, gitignore } ;
@@ -172,7 +174,6 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
172174
173175 // Add entry paths from package.json#main, #bin, #exports
174176 const entryPathsFromManifest = await getEntryPathsFromManifest ( manifest , { ...sharedGlobOptions , ignore } ) ;
175- debugLogArray ( name , 'Entry paths in package.json' , entryPathsFromManifest ) ;
176177 for ( const id of entryPathsFromManifest . map ( id => toProductionEntry ( id ) ) ) deps . add ( id ) ;
177178
178179 // Get dependencies from plugins
@@ -218,58 +219,58 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
218219 const negatedEntryPatterns : string [ ] = Array . from ( entryFilePatterns ) . map ( negate ) ;
219220
220221 {
222+ const label = 'entry' ;
221223 const patterns = worker . getProductionEntryFilePatterns ( negatedEntryPatterns ) ;
222- const workspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns, gitignore : false } ) ;
223- debugLogArray ( name , 'Entry paths' , workspaceEntryPaths ) ;
224+ const workspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns, gitignore : false , label } ) ;
224225 principal . addEntryPaths ( workspaceEntryPaths ) ;
225226 }
226227
227228 {
229+ const label = 'production plugin entry' ;
228230 const patterns = Array . from ( productionEntryFilePatterns ) ;
229- const pluginWorkspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
230- debugLogArray ( name , 'Production plugin entry paths' , pluginWorkspaceEntryPaths ) ;
231+ const pluginWorkspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns, label } ) ;
231232 principal . addEntryPaths ( pluginWorkspaceEntryPaths , { skipExportsAnalysis : true } ) ;
232233 }
233234
234235 {
236+ const label = 'project' ;
235237 const patterns = worker . getProductionProjectFilePatterns ( negatedEntryPatterns ) ;
236- const workspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
237- debugLogArray ( name , 'Project paths' , workspaceProjectPaths ) ;
238+ const workspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns, label } ) ;
238239 for ( const projectPath of workspaceProjectPaths ) principal . addProjectPath ( projectPath ) ;
239240 }
240241 } else {
241242 {
243+ const label = 'entry' ;
242244 const patterns = worker . getEntryFilePatterns ( ) ;
243- const workspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns, gitignore : false } ) ;
244- debugLogArray ( name , 'Entry paths' , workspaceEntryPaths ) ;
245+ const workspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns, gitignore : false , label } ) ;
245246 principal . addEntryPaths ( workspaceEntryPaths ) ;
246247 }
247248
248249 {
250+ const label = 'project' ;
249251 const patterns = worker . getProjectFilePatterns ( [ ...productionEntryFilePatterns ] ) ;
250- const workspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
251- debugLogArray ( name , 'Project paths' , workspaceProjectPaths ) ;
252+ const workspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns, label } ) ;
252253 for ( const projectPath of workspaceProjectPaths ) principal . addProjectPath ( projectPath ) ;
253254 }
254255
255256 {
257+ const label = 'plugin entry' ;
256258 const patterns = worker . getPluginEntryFilePatterns ( [ ...entryFilePatterns , ...productionEntryFilePatterns ] ) ;
257- const pluginWorkspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
258- debugLogArray ( name , 'Plugin entry paths' , pluginWorkspaceEntryPaths ) ;
259+ const pluginWorkspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns, label } ) ;
259260 principal . addEntryPaths ( pluginWorkspaceEntryPaths , { skipExportsAnalysis : true } ) ;
260261 }
261262
262263 {
264+ const label = 'plugin project' ;
263265 const patterns = worker . getPluginProjectFilePatterns ( ) ;
264- const pluginWorkspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
265- debugLogArray ( name , 'Plugin project paths' , pluginWorkspaceProjectPaths ) ;
266+ const pluginWorkspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns, label } ) ;
266267 for ( const projectPath of pluginWorkspaceProjectPaths ) principal . addProjectPath ( projectPath ) ;
267268 }
268269
269270 {
271+ const label = 'plugin configuration' ;
270272 const patterns = worker . getPluginConfigPatterns ( ) ;
271- const configurationEntryPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
272- debugLogArray ( name , 'Plugin configuration paths' , configurationEntryPaths ) ;
273+ const configurationEntryPaths = await _glob ( { ...sharedGlobOptions , patterns, label } ) ;
273274 principal . addEntryPaths ( configurationEntryPaths , { skipExportsAnalysis : true } ) ;
274275 }
275276 }
0 commit comments