(path: string)
| 172 | * @returns The normalized path with consistent forward slashes |
| 173 | */ |
| 174 | export function normalizePathForConfigKey(path: string): string { |
| 175 | // First use Node's normalize to resolve . and .. segments |
| 176 | const normalized = normalize(path) |
| 177 | // Then convert all backslashes to forward slashes for consistent JSON keys |
| 178 | // This is safe because forward slashes work in Windows paths for most operations |
| 179 | return normalized.replace(/\\/g, '/') |
| 180 | } |
no test coverage detected