* Workspace root and a workspace-relative path, joined. * * `node:path` would be one import away and is the one import this file may not * have: everything here runs in a browser. The join is the whole of what was * used, and a POSIX-shaped one is correct for what it joins, since the paths * co
(root: string, relativePath: string)
| 2023 | * come from the index and the index writes them with forward slashes. |
| 2024 | */ |
| 2025 | function joinPath(root: string, relativePath: string): string { |
| 2026 | return `${normalizeRoot(root)}/${relativePath.replace(/^\/+/, '')}`; |
| 2027 | } |
| 2028 | |
| 2029 | function fileFromUri(uri: string): string | undefined { |
| 2030 | return uri.length > 0 ? uri : undefined; |
no test coverage detected