UNPKG

workspace-tools

Version:

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

14 lines (13 loc) 676 B
import type { PackageInfo } from "./types/PackageInfo"; /** * Read package.json from the given path if it exists. * Logs a warning if it doesn't exist, or there's an error reading or parsing it. * @returns The package info, or undefined if it doesn't exist or can't be read */ export declare function getPackageInfo(cwd: string): PackageInfo | undefined; /** * Read package.json from the given path if it exists. * Logs a warning if it doesn't exist, or there's an error reading or parsing it. * @returns The package info, or undefined if it doesn't exist or can't be read */ export declare function getPackageInfoAsync(cwd: string): Promise<PackageInfo | undefined>;