(paths?: string[])
| 41 | } |
| 42 | |
| 43 | function normalizeWorkspaceRoots(paths?: string[]): string[] | undefined { |
| 44 | if (!paths?.length) { |
| 45 | return undefined |
| 46 | } |
| 47 | |
| 48 | const normalized = Array.from(new Set(paths.map((path) => { |
| 49 | try { |
| 50 | return realpathSync(path) |
| 51 | } catch { |
| 52 | return resolvePath(path) |
| 53 | } |
| 54 | }))) |
| 55 | |
| 56 | return normalized.length > 0 ? normalized : undefined |
| 57 | } |
| 58 | |
| 59 | function workspaceRootsEqual(left?: string[], right?: string[]): boolean { |
| 60 | const normalizedLeft = left ?? [] |