UNPKG

workspace-tools

Version:

A collection of utilities that are useful in a git-controlled monorepo managed by one of these tools:

17 lines (16 loc) 801 B
import type { WorkspaceInfos } from "../types/WorkspaceInfo"; /** * Get an array with names, paths, and package.json contents for each package ("workspace" in * npm/yarn/pnpm terms) within a monorepo. The list of included packages is based on the workspace * manager's config file. */ export declare function getWorkspaces(cwd: string): WorkspaceInfos; /** * Get an array with names, paths, and package.json contents for each package ("workspace" in * npm/yarn/pnpm terms) within a monorepo. The list of included packages is based on the workspace * manager's config file. * * NOTE: As of writing, this will start promises to read all package.json files in parallel, * without direct concurrency control. */ export declare function getWorkspacesAsync(cwd: string): Promise<WorkspaceInfos>;