import type { WorkspaceManager } from "./types/WorkspaceManager"; /** * Starting from `cwd`, searches up the directory hierarchy for `filePath`. * If multiple strings are given, searches each directory level for any of them. * @returns Full path to the item found, or undefined if not found. */ export declare function searchUp(filePath: string | string[], cwd: string): string | undefined; /** * Starting from `cwd`, uses `git rev-parse --show-toplevel` to find the root of the git repo. * Throws if `cwd` is not in a Git repository. */ export declare function findGitRoot(cwd: string): string; /** * Starting from `cwd`, searches up the directory hierarchy for `package.json`. */ export declare function findPackageRoot(cwd: string): string | undefined; /** * Starting from `cwd`, searches up the directory hierarchy for the project root (workspace/monorepo * manager root), falling back to the git root if no manager root is detected. Results are cached by * `cwd`, and an error is thrown if no project root is found and it's not a git repo. * * To skip the git root fallback, use `getWorkspaceManagerRoot`. Usually the monorepo manager root * is the same as the git root, but this may not be the case with multiple "monorepos" in a single * git repo, or in project structures with multiple languages where the JS is not at the root. * * @param manager Optional workspace/monorepo manager to look for specifically */ export declare function findProjectRoot(cwd: string, manager?: WorkspaceManager): string; /** * Determines if `child` path is a subdirectory of `parent` path. */ export declare function isChildOf(child: string, parent: string): boolean;