(projectRoot: string, filePath: string)
| 122 | * contents get served — those must keep the symlink-aware check (#527). |
| 123 | */ |
| 124 | export function lexicalPathWithinRoot(projectRoot: string, filePath: string): string | null { |
| 125 | const resolved = path.resolve(projectRoot, filePath); |
| 126 | return isWithinDir(resolved, path.resolve(projectRoot)) ? resolved : null; |
| 127 | } |
| 128 | |
| 129 | /** |
| 130 | * Whether a path made relative to a root (`path.relative(root, p)`, or a |
no test coverage detected