import { type PackageSnapshots } from '@pnpm/lockfile.fs'; import { type DepTypes } from '@pnpm/lockfile.detect-dep-types'; import { type DependencyManifest, type Registries } from '@pnpm/types'; export interface GetPkgInfoOpts { readonly alias: string; readonly ref: string; readonly currentPackages: PackageSnapshots; readonly peers?: Set; readonly registries: Registries; readonly skipped: Set; readonly storeDir?: string; readonly wantedPackages: PackageSnapshots; readonly virtualStoreDir?: string; readonly virtualStoreDirMaxLength: number; readonly depTypes: DepTypes; /** * The base dir if the `ref` argument is a `"link:"` relative path. */ readonly linkedPathBaseDir: string; /** * If the `ref` argument is a `"link:"` relative path, the ref is reused for * the version field. (Since the true semver may not be known.) * * Optionally rewrite this relative path to a base dir before writing it to * version. */ readonly rewriteLinkVersionDir?: string; /** * The node_modules directory to resolve symlinks from when using global virtual store. * This is used for top-level dependencies. */ readonly modulesDir?: string; /** * The resolved path of the parent package. When provided, the symlink resolution * will use the parent's node_modules directory instead of the top-level modulesDir. * This is needed for subdependencies when using global virtual store. */ readonly parentDir?: string; } export declare function getPkgInfo(opts: GetPkgInfoOpts): { pkgInfo: PackageInfo; readManifest: () => DependencyManifest; }; interface PackageInfo { alias: string; isMissing: boolean; isPeer: boolean; isSkipped: boolean; name: string; path: string; version: string; resolved?: string; optional?: true; dev?: boolean; } export {};