import type { InstallOptions } from "./commands.ts"; import { JsrPackage } from "./utils.ts"; export interface PackageManager { cwd: string; install(packages: JsrPackage[], options: InstallOptions): Promise; remove(packages: JsrPackage[]): Promise; runScript(script: string): Promise; setConfigValue?(key: string, value: string): Promise; } declare class Yarn implements PackageManager { cwd: string; constructor(cwd: string); install(packages: JsrPackage[], options: InstallOptions): Promise; remove(packages: JsrPackage[]): Promise; runScript(script: string): Promise; } export declare class YarnBerry extends Yarn { install(packages: JsrPackage[], options: InstallOptions): Promise; /** * Calls the `yarn config set` command, https://yarnpkg.com/cli/config/set. */ setConfigValue(key: string, value: string): Promise; private toPackageArgs; } export declare class Bun implements PackageManager { cwd: string; constructor(cwd: string); install(packages: JsrPackage[], options: InstallOptions): Promise; remove(packages: JsrPackage[]): Promise; runScript(script: string): Promise; isNpmrcSupported(): Promise; } export type PkgManagerName = "npm" | "yarn" | "pnpm" | "bun"; export declare function getPkgManager(cwd: string, pkgManagerName: PkgManagerName | null): Promise<{ root: string; pkgManager: PackageManager; }>; export {};