UNPKG

workspace-tools

Version:

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

27 lines (26 loc) 1.16 kB
import type { WorkspaceInfos } from "../types/WorkspaceInfo"; /** * Get an array with names, paths, and package.json contents for each of the given package paths * ("workspace" paths in npm/yarn/pnpm terms) within a monorepo. * * This is an internal helper used by `getWorkspaces` implementations for different managers. * * @param packagePaths Paths to packages within a monorepo * @returns Array of workspace package infos * @internal */ export declare function getWorkspacePackageInfo(packagePaths: string[]): WorkspaceInfos; /** * Get an array with names, paths, and package.json contents for each of the given package paths * ("workspace" paths in npm/yarn/pnpm terms) within a monorepo. * * NOTE: As of writing, this will start promises to read all package.json files in parallel, * without direct concurrency control. * * This is an internal helper used by `getWorkspaces` implementations for different managers. * * @param packagePaths Paths to packages within a monorepo * @returns Array of workspace package infos * @internal */ export declare function getWorkspacePackageInfoAsync(packagePaths: string[]): Promise<WorkspaceInfos>;