/** * Helper functions for JavaScript/TypeScript package managers. * * @module */ import { PackageManager } from "../enums/PackageManager.js"; /** * Helper function to get the add command for a package manager. For example, the command for npm * is: `npm install foo --save` */ export declare function getPackageManagerAddCommand(packageManager: PackageManager, dependency: string): string; /** * Helper function to get the add development command for a package manager. For example, the * command for npm is: `npm install foo --save-dev` */ export declare function getPackageManagerAddDevCommand(packageManager: PackageManager, dependency: string): string; /** * Helper function to get the exec command for a package manager. For example, the command for npm * is: `npx` */ export declare function getPackageManagerExecCommand(packageManager: PackageManager): string; /** * Helper function to look at the lock files in a given directory in order to infer the package * manager being used for the project. * * @throws If two or more lock files were found. */ export declare function getPackageManagerForProject(packageRoot: string): Promise; /** * Helper function to get the continuous integration install command for a package manager. For * example, the command for npm is: `npm ci` */ export declare function getPackageManagerInstallCICommand(packageManager: PackageManager): string; /** * Helper function to get the install command for a package manager. For example, the command for * npm is: `npm install` */ export declare function getPackageManagerInstallCommand(packageManager: PackageManager): string; /** * Helper function to get the corresponding lock file name for a package manager. For example, the * package lock file for npm is "package-lock.json". */ export declare function getPackageManagerLockFileName(packageManager: PackageManager): string; /** Helper function to get an array containing every package manager lock file name. */ export declare function getPackageManagerLockFileNames(): readonly string[]; /** * Helper function to look at the lock files in a given directory in order to detect the package * manager being used for the project. * * Since 2 or more different kinds of lock files can exist, this will return an array containing all * of the package managers found. If no lock files were found, this will return an empty array. */ export declare function getPackageManagersForProject(packageDir: string): Promise; //# sourceMappingURL=packageManager.d.ts.map