import { SpawnOptions } from '@expo/spawn-async'; import { Logger, PackageManager } from './PackageManager'; import { PnpmPackageManager } from './PnpmPackageManager'; export declare type NodePackageManager = 'yarn' | 'npm' | 'pnpm'; /** * Disable various postinstall scripts * - https://github.com/opencollective/opencollective-postinstall/pull/9 */ export declare const DISABLE_ADS_ENV: { DISABLE_OPENCOLLECTIVE: string; ADBLOCK: string; }; export declare class NpmPackageManager implements PackageManager { options: SpawnOptions; private log; constructor({ cwd, log, silent }: { cwd: string; log?: Logger; silent?: boolean; }); get name(): string; installAsync(parameters?: string[]): Promise; addGlobalAsync(...names: string[]): Promise; addWithParametersAsync(names: string[], parameters?: string[]): Promise; addAsync(...names: string[]): Promise; addDevAsync(...names: string[]): Promise; removeAsync(...names: string[]): Promise; versionAsync(): Promise; getConfigAsync(key: string): Promise; removeLockfileAsync(): Promise; cleanAsync(): Promise; private _runAsync; private _parseSpecs; private _patchAsync; } export declare class YarnPackageManager implements PackageManager { options: SpawnOptions; private log; constructor({ cwd, log, silent }: { cwd: string; log?: Logger; silent?: boolean; }); get name(): string; private withOfflineSupportAsync; installAsync(): Promise; addGlobalAsync(...names: string[]): Promise; addWithParametersAsync(names: string[], parameters?: string[]): Promise; addAsync(...names: string[]): Promise; addDevAsync(...names: string[]): Promise; removeAsync(...names: string[]): Promise; versionAsync(): Promise; getConfigAsync(key: string): Promise; removeLockfileAsync(): Promise; cleanAsync(): Promise; private _runAsync; } export declare type CreateForProjectOptions = Partial> & { log?: Logger; silent?: boolean; }; export declare function createForProject(projectRoot: string, options?: CreateForProjectOptions): NpmPackageManager | YarnPackageManager | PnpmPackageManager; export declare function getModulesPath(projectRoot: string): string;