export type PackageManager = "npm" | "pnpm" | "yarn" | "bun"; /** * Options for `detectPackageManager`. */ export interface DetectPackageManagerOptions { /** * Stop walking up the directory tree at this path (inclusive). Useful in * tests or isolated environments where walking above the project root would * accidentally find a lockfile in an unrelated ancestor directory (e.g. a * stale `/tmp/package-lock.json` on a shared CI machine). * * If omitted the walk continues all the way to the filesystem root. */ stopAt?: string; } /** * Detect the package manager in use by looking for the lockfile closest to * `dir`. Walks up to the filesystem root (or `options.stopAt`, if supplied). * Returns "bun" as the default when no lockfile is found. */ export declare function detectPackageManager(dir: string, options?: DetectPackageManagerOptions): Promise; /** * Returns the install command for a missing package, using the detected PM. */ export declare function installCommand(pkg: string, dir: string): Promise; //# sourceMappingURL=pm-detect.d.ts.map