import type { LockfilePackageInfo } from '@pnpm/lockfile.types'; export type PackagesMap = Map; export type PackageAttributes = LockfilePackageInfo & { component?: { scope: string; name: string; }; requiresBuild?: boolean; }; export type DependencyEdge = { id: string; neighbours: DependencyNeighbour[]; attr?: { pkgId?: string; transitivePeerDependencies?: string[]; }; }; export type DependencyNeighbour = { id: string; /** * This is true when the dependency is from optionalDependencies. */ optional?: boolean; name?: string; specifier?: string; lifecycle?: 'runtime' | 'dev'; }; export declare class DependenciesGraph { static ROOT_EDGE_ID: string; schemaVersion: string; packages: PackagesMap; edges: DependencyEdge[]; constructor({ packages, edges, schemaVersion, }: { packages: PackagesMap; edges: DependencyEdge[]; schemaVersion?: string; }); serialize(): string; static deserialize(data: string): DependenciesGraph | undefined; merge(graph: DependenciesGraph): void; isEmpty(): boolean; /** * Returns the edge related to the root component */ findRootEdge(): DependencyEdge | undefined; }