( candidatePath: string, projects: Map<string, ProjectConfig> )
| 334 | } |
| 335 | |
| 336 | function findDeepestTopLevelParentProject( |
| 337 | candidatePath: string, |
| 338 | projects: Map<string, ProjectConfig> |
| 339 | ): string | null { |
| 340 | let parentPath: string | null = null; |
| 341 | for (const [projectPath, projectConfig] of projects) { |
| 342 | if (projectConfig.parentProjectPath || projectPath === candidatePath) { |
| 343 | continue; |
| 344 | } |
| 345 | if (!isPathDescendant(projectPath, candidatePath)) { |
| 346 | continue; |
| 347 | } |
| 348 | if (!parentPath || projectPath.length > parentPath.length) { |
| 349 | parentPath = projectPath; |
| 350 | } |
| 351 | } |
| 352 | return parentPath; |
| 353 | } |
| 354 | |
| 355 | function hasRegisteredSubProjectAncestor( |
| 356 | candidatePath: string, |
no test coverage detected