import type { ProjectManifest } from '@pnpm/types'; export interface WorkspaceProject { rootDir: string; manifest: ProjectManifest; } /** * Whether a package reference is a workspace-relative directory path rather * than a package name. Directory references are the additive extension to * the changesets format, needed only when workspace projects share a * published name. */ export declare function isDirRef(ref: string): boolean; /** * Resolves package references (bare names, or `./`-prefixed * workspace-relative directories) against the workspace. Names are aliases: * one that matches several projects cannot identify any of them and callers * must treat it as an error, never a silent pick. */ export interface ProjectRefIndex { /** The directories a reference resolves to: `[]` unknown, 2+ ambiguous. */ refToDirs: (ref: string) => string[]; nameToDirs: (name: string) => string[]; } export declare function indexProjectRefs(projects: ReadonlyArray<{ rootDir: string; manifest: { name?: string; }; }>, workspaceDir: string): ProjectRefIndex; /** The workspace-relative directory of a project, in canonical spelling. */ export declare function toProjectDir(workspaceDir: string, rootDir: string): string; /** * The workspace-relative dirs of the projects marked `"private": true`. * * A private project is never published, so a registry probe on its behalf is * futile and would read as "not published", and no tarball can ever carry its * changelog. */ export declare function privateProjectDirs(projects: WorkspaceProject[], workspaceDir: string): Set; /** * Resolves a package reference from `versioning` configuration. An unknown * reference is skipped (configuration may outlive a removed project), but an * ambiguous name is an error: it cannot be attributed, and silence here is * exactly the name-keying flaw this engine exists to fix. */ export declare function resolveConfigRef(refs: ProjectRefIndex, ref: string, settingName: string): string[];