/** * Package Manager Command Utilities * * Provides package-manager-agnostic command generation for all supported package managers: * npm, pnpm, yarn, bun * * @packageDocumentation */ /** * Supported package managers */ export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun'; /** * Get install command for package manager (for CI/production) * Uses frozen lockfile modes to ensure reproducible installs */ export declare function getInstallCommand(packageManager: PackageManager): string; /** * Get basic install command without frozen lockfile (for local development) */ export declare function getInstallCommandUnfrozen(packageManager: PackageManager): string; /** * Get command to install dev dependencies * @param packages - Space-separated list of packages to install */ export declare function getDevInstallCommand(packageManager: PackageManager, packages: string): string; /** * Get command to install global packages * @param packages - Space-separated list of packages to install */ export declare function getGlobalInstallCommand(packageManager: PackageManager, packages: string): string; /** * Get command to install regular dependencies * @param packages - Space-separated list of packages to install */ export declare function getAddCommand(packageManager: PackageManager, packages: string): string; /** * Get upgrade command for a package * @param packageName - Name of package to upgrade * @param scope - 'local' for dev dependency, 'global' for global install */ export declare function getUpgradeCommand(packageManager: PackageManager, packageName: string, scope?: 'local' | 'global'): string; /** * Get build command for package manager */ export declare function getBuildCommand(packageManager: PackageManager): string; /** * Get validate command for package manager */ export declare function getValidateCommand(packageManager: PackageManager): string; /** * Get coverage command for package manager */ export declare function getCoverageCommand(packageManager: PackageManager): string; /** * Get run command prefix for package manager */ export declare function getRunCommand(packageManager: PackageManager, script: string): string; /** * Detect package manager from package.json and lockfiles * Priority: * 1. package.json packageManager field (official spec) * 2. Lockfile detection (priority: bun > yarn > npm > pnpm) * Note: npm preferred over pnpm when both exist (more conservative default) */ export declare function detectPackageManager(cwd?: string): PackageManager; /** * Get formatted list of upgrade commands for all package managers * Useful for help text where we want to show all options */ export declare function getAllUpgradeCommands(packageName: string, scope?: 'local' | 'global'): string; //# sourceMappingURL=package-manager-commands.d.ts.map