(filePath: string)
| 453 | } |
| 454 | |
| 455 | function parsePackageJsonWorkspaces(filePath: string): string[] { |
| 456 | try { |
| 457 | const content = fs.readFileSync(filePath, 'utf-8') |
| 458 | const pkg = JSON.parse(content) |
| 459 | if (Array.isArray(pkg.workspaces)) { |
| 460 | return pkg.workspaces |
| 461 | } |
| 462 | if (pkg.workspaces?.packages && Array.isArray(pkg.workspaces.packages)) { |
| 463 | return pkg.workspaces.packages |
| 464 | } |
| 465 | return [] |
| 466 | } catch { |
| 467 | return [] |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | function parseLernaConfig(filePath: string): string[] { |
| 472 | try { |
no test coverage detected