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