UNPKG

detect-package-manager

Version:

Detect which package manager you're using (yarn or npm)

11 lines (8 loc) 344 B
declare type PM = "npm" | "yarn" | "pnpm" | "bun"; declare const detect: ({ cwd, includeGlobalBun, }?: { cwd?: string | undefined; includeGlobalBun?: boolean | undefined; }) => Promise<PM>; declare function getNpmVersion(pm: PM): Promise<string>; declare function clearCache(): void; export { PM, clearCache, detect, getNpmVersion };