(path: string)
| 147 | * @returns The normalized path with consistent forward slashes |
| 148 | */ |
| 149 | export function normalizePathForConfigKey(path: string): string { |
| 150 | // First use Node's normalize to resolve . and .. segments |
| 151 | const normalized = normalize(path) |
| 152 | // Then convert all backslashes to forward slashes for consistent JSON keys |
| 153 | // This is safe because forward slashes work in Windows paths for most operations |
| 154 | return normalized.replace(/\\/g, '/') |
| 155 | } |
| 156 |
no test coverage detected