@@ -47,7 +47,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
47
47
isIncludeEntryExports,
48
48
} = unresolvedConfiguration ;
49
49
50
- debugLogObject ( 'Unresolved configuration (from CLI arguments)' , unresolvedConfiguration ) ;
50
+ debugLogObject ( '*' , ' Unresolved configuration (from CLI arguments)', unresolvedConfiguration ) ;
51
51
52
52
const chief = new ConfigurationChief ( { cwd, isProduction } ) ;
53
53
const deputy = new DependencyDeputy ( { isStrict } ) ;
@@ -75,14 +75,9 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
75
75
// TODO Organize better
76
76
deputy . addIgnored ( chief . config . ignoreBinaries , chief . config . ignoreDependencies ) ;
77
77
78
- debugLogObject (
79
- 'Included workspaces' ,
80
- workspaces . map ( w => w . pkgName )
81
- ) ;
82
- debugLogObject (
83
- 'Included workspace configs' ,
84
- workspaces . map ( w => ( { name : w . name , pkgName : w . pkgName , config : w . config , ancestors : w . ancestors } ) )
85
- ) ;
78
+ const o = ( ) => workspaces . map ( w => ( { pkgName : w . pkgName , name : w . name , config : w . config , ancestors : w . ancestors } ) ) ;
79
+ debugLogObject ( '*' , 'Included workspaces' , ( ) => workspaces . map ( w => w . pkgName ) ) ;
80
+ debugLogObject ( '*' , 'Included workspace configs' , o ) ;
86
81
87
82
const handleReferencedDependency = ( {
88
83
specifier,
@@ -133,7 +128,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
133
128
const { name, dir, config, ancestors, pkgName, manifestPath, manifest } = workspace ;
134
129
const { paths, ignoreDependencies, ignoreBinaries } = config ;
135
130
136
- streamer . cast ( `Analyzing workspace ( ${ name } ) ...` ) ;
131
+ streamer . cast ( `Analyzing workspace ${ name } ...` ) ;
137
132
138
133
deputy . addWorkspace ( { name, dir, manifestPath, manifest, ignoreDependencies, ignoreBinaries } ) ;
139
134
@@ -157,12 +152,12 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
157
152
await worker . init ( ) ;
158
153
159
154
principal . addEntryPaths ( definitionPaths ) ;
160
- debugLogArray ( `Found definition paths ( ${ name } ) `, definitionPaths ) ;
155
+ debugLogArray ( name , `Definition paths`, definitionPaths ) ;
161
156
162
157
const sharedGlobOptions = { cwd, workingDir : dir , gitignore, ignore : worker . getIgnorePatterns ( ) } ;
163
158
164
159
const entryPathsFromManifest = await getEntryPathFromManifest ( cwd , dir , manifest ) ;
165
- debugLogArray ( `Found entry paths in package.json ( ${ name } )` , entryPathsFromManifest ) ;
160
+ debugLogArray ( name , 'Entry paths in package.json' , entryPathsFromManifest ) ;
166
161
principal . addEntryPaths ( entryPathsFromManifest ) ;
167
162
168
163
// Get peerDependencies, installed binaries, entry files gathered through all plugins, and hand over
@@ -193,55 +188,55 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
193
188
{
194
189
const patterns = worker . getProductionEntryFilePatterns ( negatedEntryPatterns ) ;
195
190
const workspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
196
- debugLogArray ( `Found entry paths ( ${ name } ) `, workspaceEntryPaths ) ;
191
+ debugLogArray ( name , `Entry paths`, workspaceEntryPaths ) ;
197
192
principal . addEntryPaths ( workspaceEntryPaths ) ;
198
193
}
199
194
200
195
{
201
196
const pluginWorkspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns : productionEntryFilePatterns } ) ;
202
- debugLogArray ( `Found production plugin entry paths ( ${ name } ) `, pluginWorkspaceEntryPaths ) ;
197
+ debugLogArray ( name , `Production plugin entry paths`, pluginWorkspaceEntryPaths ) ;
203
198
principal . addEntryPaths ( pluginWorkspaceEntryPaths , { skipExportsAnalysis : true } ) ;
204
199
}
205
200
206
201
{
207
202
const patterns = worker . getProductionProjectFilePatterns ( negatedEntryPatterns ) ;
208
203
const workspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
209
- debugLogArray ( `Found project paths ( ${ name } ) `, workspaceProjectPaths ) ;
204
+ debugLogArray ( name , `Project paths`, workspaceProjectPaths ) ;
210
205
workspaceProjectPaths . forEach ( projectPath => principal . addProjectPath ( projectPath ) ) ;
211
206
}
212
207
} else {
213
208
{
214
209
const patterns = worker . getEntryFilePatterns ( ) ;
215
210
const workspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
216
- debugLogArray ( `Found entry paths ( ${ name } ) `, workspaceEntryPaths ) ;
211
+ debugLogArray ( name , `Entry paths`, workspaceEntryPaths ) ;
217
212
principal . addEntryPaths ( workspaceEntryPaths ) ;
218
213
}
219
214
220
215
{
221
216
const patterns = worker . getProjectFilePatterns ( [ ...productionEntryFilePatterns ] ) ;
222
217
const workspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
223
- debugLogArray ( `Found project paths ( ${ name } ) `, workspaceProjectPaths ) ;
218
+ debugLogArray ( name , `Project paths`, workspaceProjectPaths ) ;
224
219
workspaceProjectPaths . forEach ( projectPath => principal . addProjectPath ( projectPath ) ) ;
225
220
}
226
221
227
222
{
228
223
const patterns = [ ...entryFilePatterns , ...productionEntryFilePatterns ] ;
229
224
const pluginWorkspaceEntryPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
230
- debugLogArray ( `Found plugin entry paths ( ${ name } ) `, pluginWorkspaceEntryPaths ) ;
225
+ debugLogArray ( name , `Plugin entry paths`, pluginWorkspaceEntryPaths ) ;
231
226
principal . addEntryPaths ( pluginWorkspaceEntryPaths , { skipExportsAnalysis : true } ) ;
232
227
}
233
228
234
229
{
235
230
const patterns = worker . getPluginProjectFilePatterns ( ) ;
236
231
const pluginWorkspaceProjectPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
237
- debugLogArray ( `Found plugin project paths ( ${ name } ) `, pluginWorkspaceProjectPaths ) ;
232
+ debugLogArray ( name , `Plugin project paths`, pluginWorkspaceProjectPaths ) ;
238
233
pluginWorkspaceProjectPaths . forEach ( projectPath => principal . addProjectPath ( projectPath ) ) ;
239
234
}
240
235
241
236
{
242
237
const patterns = compact ( worker . getPluginConfigPatterns ( ) ) ;
243
238
const configurationEntryPaths = await _glob ( { ...sharedGlobOptions , patterns } ) ;
244
- debugLogArray ( `Found plugin configuration paths ( ${ name } ) `, configurationEntryPaths ) ;
239
+ debugLogArray ( name , `Plugin configuration paths`, configurationEntryPaths ) ;
245
240
principal . addEntryPaths ( configurationEntryPaths , { skipExportsAnalysis : true } ) ;
246
241
}
247
242
}
@@ -254,7 +249,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
254
249
255
250
const principals = factory . getPrincipals ( ) ;
256
251
257
- debugLog ( `Installed ${ principals . length } principals for ${ workspaces . length } workspaces` ) ;
252
+ debugLog ( '*' , `Installed ${ principals . length } principals for ${ workspaces . length } workspaces` ) ;
258
253
259
254
const analyzedFiles : Set < string > = new Set ( ) ;
260
255
const exportedSymbols : Exports = new Map ( ) ;
@@ -342,7 +337,7 @@ export const main = async (unresolvedConfiguration: CommandLineOptions) => {
342
337
const resolvedFiles = principal . getUsedResolvedFiles ( ) ;
343
338
const files = resolvedFiles . filter ( filePath => ! analyzedFiles . has ( filePath ) ) ;
344
339
345
- debugLogArray ( `Analyzing used resolved files [P${ principals . indexOf ( principal ) + 1 } /${ ++ round } ]` , files ) ;
340
+ debugLogArray ( '*' , `Analyzing used resolved files [P${ principals . indexOf ( principal ) + 1 } /${ ++ round } ]` , files ) ;
346
341
files . forEach ( filePath => {
347
342
analyzeSourceFile ( filePath ) ;
348
343
analyzedFiles . add ( filePath ) ;
0 commit comments