/** * Detects which package manager owns a project so commands install with the * same tool the project was set up with. */ export declare const PACKAGE_MANAGERS: readonly ["pnpm", "npm", "yarn", "bun"]; export type PackageManager = typeof PACKAGE_MANAGERS[number]; export declare const DEFAULT_PACKAGE_MANAGER: PackageManager; export declare function isPackageManager(value: string): value is PackageManager; /** * Detects the package manager for a project, walking up from the given * directory so this works from a subfolder of the project. * * A `packageManager` field wins over a lockfile in the same directory, and the * nearest directory with either wins over anything further up. Falls back to * pnpm: Nevermore projects are pnpm projects — the templates pin it and gate it * behind `only-allow pnpm` — so pnpm is the right guess for a directory that * hasn't declared anything yet. */ export declare function detectPackageManagerAsync(startDirectory: string): Promise; /** * Builds the command that adds dependencies to a project. Only npm spells this * `install`; the rest treat a bare `install` as "install the lockfile" and need * `add` to record new dependencies. */ export declare function buildAddPackagesCommand(packageManager: PackageManager, packages: string[]): { command: string; args: string[]; }; //# sourceMappingURL=package-manager-utils.d.ts.map