(startPath: string)
| 80 | } |
| 81 | |
| 82 | function findProjectMemoryBoundary(startPath: string): string | null { |
| 83 | const fs = getFsImplementation() |
| 84 | let currentDir = safeResolvePath(fs, startPath).resolvedPath |
| 85 | |
| 86 | while (true) { |
| 87 | if ( |
| 88 | PROJECT_MEMORY_BOUNDARY_MARKERS.some(marker => |
| 89 | fs.existsSync(join(currentDir, marker)), |
| 90 | ) |
| 91 | ) { |
| 92 | return currentDir |
| 93 | } |
| 94 | |
| 95 | const parentDir = dirname(currentDir) |
| 96 | if (parentDir === currentDir) { |
| 97 | return null |
| 98 | } |
| 99 | currentDir = parentDir |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | function pathInWorkingPath(child: string, parent: string): boolean { |
| 104 | const relativePath = relativeSafe(parent, child) |
no test coverage detected