import { FakeFS, Filename, PortablePath } from '@yarnpkg/fslib'; import { Resolution } from '@yarnpkg/parsers'; import { IdentHash } from './types'; import { Ident, Descriptor } from './types'; export declare type AllDependencies = 'dependencies' | 'devDependencies' | 'peerDependencies'; export declare type HardDependencies = 'dependencies' | 'devDependencies'; export interface WorkspaceDefinition { pattern: string; } export interface DependencyMeta { built?: boolean; optional?: boolean; unplugged?: boolean; } export interface PeerDependencyMeta { optional?: boolean; } export interface PublishConfig { access?: string; main?: PortablePath; module?: PortablePath; bin?: Map; registry?: string; } export declare class Manifest { indent: string; name: Ident | null; version: string | null; type: string | null; ["private"]: boolean; license: string | null; main: PortablePath | null; module: PortablePath | null; languageName: string | null; bin: Map; scripts: Map; dependencies: Map; devDependencies: Map; peerDependencies: Map; workspaceDefinitions: Array; dependenciesMeta: Map>; peerDependenciesMeta: Map; resolutions: Array<{ pattern: Resolution; reference: string; }>; files: Set | null; publishConfig: PublishConfig | null; preferUnplugged: boolean | null; raw: { [key: string]: any; }; /** * errors found in the raw manifest while loading */ errors: Array; static readonly fileName: Filename; static readonly allDependencies: Array; static readonly hardDependencies: Array; static tryFind(path: PortablePath, { baseFs }?: { baseFs?: FakeFS; }): Promise; static find(path: PortablePath, { baseFs }?: { baseFs?: FakeFS; }): Promise; static fromFile(path: PortablePath, { baseFs }?: { baseFs?: FakeFS; }): Promise; static fromText(text: string): Manifest; loadFromText(text: string): void; loadFile(path: PortablePath, { baseFs }: { baseFs?: FakeFS; }): Promise; load(data: any): void; getForScope(type: string): Map; hasConsumerDependency(ident: Ident): boolean; hasHardDependency(ident: Ident): boolean; hasSoftDependency(ident: Ident): boolean; hasDependency(ident: Ident): boolean; ensureDependencyMeta(descriptor: Descriptor): DependencyMeta; ensurePeerDependencyMeta(descriptor: Descriptor): PeerDependencyMeta; setRawField(name: string, value: any, { after }?: { after?: Array; }): void; exportTo(data: { [key: string]: any; }, { compatibilityMode }?: { compatibilityMode?: boolean; }): { [key: string]: any; }; }