import { PackageInfos } from "./types/PackageInfo"; import type { WorkspaceManager } from "./types/WorkspaceManager"; /** * Read all the package.json files in a monorepo and return a mapping from package name to info. * Only works for monorepos which use a supported workspace/monorepo manager. * * Notes: * - The workspace manager, root, and list of package paths for `cwd` are cached internally, * but the package contents are not. * - To get an array listing package names, paths, and contents, use `getWorkspaceInfos` instead. * * @param cwd Start looking for the manager config from here * @param managerOverride Workspace/monorepo manager to use instead of auto-detecting * * @returns Mapping from package name to package info. * If no workspace config is found, it will return info for the root package.json if one exists. * Will be empty on error (it logs verbose warnings instead of throwing). */ export declare function getPackageInfos(cwd: string, managerOverride?: WorkspaceManager): PackageInfos; /** * Read all the package.json files in a monorepo and return a mapping from package name to info. * Only works for monorepos which use a supported workspace/monorepo manager. * * Notes: * - **WARNING**: As of writing, this will start promises to read all package.json files in * parallel, without direct concurrency control. * - The workspace manager, root, and list of package paths for `cwd` are cached internally, * but the package contents are not. * - To get an array listing package names, paths, and contents, use `getWorkspaceInfos` instead. * * @param cwd Start looking for the manager config from here * @param managerOverride Workspace/monorepo manager to use instead of auto-detecting * * @returns Mapping from package name to package info. * If no workspace config is found, it will return info for the root package.json if one exists. * Will be empty on error (it logs verbose warnings instead of throwing). */ export declare function getPackageInfosAsync(cwd: string, managerOverride?: WorkspaceManager): Promise;