UNPKG

pnpm

Version:

A fast implementation of npm install

31 lines (30 loc) 961 B
import { PnpmOptions, Dependencies } from '../types'; import { InstalledPackage } from '../install'; import { Got } from '../network/got'; import { StoreJson } from '../fs/storeJsonController'; export declare type PackageInstallationResult = { path: string; pkgId: string; }; export declare type CachedPromises = { [name: string]: Promise<void>; }; export declare type InstalledPackages = { [name: string]: InstalledPackage; }; export declare type InstallContext = { installs: InstalledPackages; piq?: PackageInstallationResult[]; got: Got; builds: CachedPromises; fetches: CachedPromises; storeJson: StoreJson; }; export declare function install(maybeOpts?: PnpmOptions): Promise<void>; /** * Perform installation. * * @example * install({'lodash': '1.0.0', 'foo': '^2.1.0' }, { silent: true }) */ export declare function installPkgs(fuzzyDeps: string[] | Dependencies, maybeOpts?: PnpmOptions): Promise<void>;