(cwd: string = process.cwd())
| 7 | const require = createRequire(import.meta.url); |
| 8 | |
| 9 | export function detectPackageManager(cwd: string = process.cwd()): 'npm' | 'yarn' | 'pnpm' { |
| 10 | if (fs.existsSync(path.join(cwd, 'pnpm-lock.yaml'))) return 'pnpm'; |
| 11 | if (fs.existsSync(path.join(cwd, 'yarn.lock'))) return 'yarn'; |
| 12 | return 'npm'; |
| 13 | } |
| 14 | |
| 15 | export function isPackageInstalled(packageName: string): boolean { |
| 16 | try { |
no outgoing calls
no test coverage detected