/** * @file `parseLockfile(content, ecosystem, format?)` — dispatches to the right * per-PM lockfile parser. When `format` is omitted, the content is sniffed * (npm `lockfileVersion`, yarn `__metadata:` or `yarn lockfile`, pnpm * `lockfileVersion:`). On socket-btm's smol Node binary this routes to * `node:smol-manifest`'s native `parseLockfile`; on stock Node it dispatches * to one of the `src/eco/npm//lockfile/parse.ts` leaves. Throws * `ManifestError(ERR_UNSUPPORTED)` for unrecognized ecosystems, and * `ManifestError(ERR_UNKNOWN_FORMAT)` when content can't be sniffed. */ import type { ParsedLockfile } from './types.js'; import type { EcosystemString } from '../purl.js'; export type LockfileFormat = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'vlt' | 'composer' | 'cargo'; export declare function jsParseLockfile(content: string, ecosystem: EcosystemString, format?: LockfileFormat | undefined): ParsedLockfile; export declare function sniffLockfileFormat(content: string): LockfileFormat | undefined; export declare const parseLockfile: (content: string, ecosystem: EcosystemString, format?: LockfileFormat | undefined) => ParsedLockfile;