(path: string)
| 323 | } |
| 324 | |
| 325 | function normalizePath(path: string): string { |
| 326 | const parts = path.split("/"); |
| 327 | const stack: string[] = []; |
| 328 | for (const part of parts) { |
| 329 | if (part === "" || part === ".") continue; |
| 330 | if (part === "..") { |
| 331 | stack.pop(); |
| 332 | continue; |
| 333 | } |
| 334 | stack.push(part); |
| 335 | } |
| 336 | return `/${stack.join("/")}`; |
| 337 | } |
| 338 | |
| 339 | function createWorkspaceError( |
| 340 | code: string, |
no test coverage detected