export declare function nearestPackageJsonPath(): Promise; export declare function lookupPackageJsonFilesToFindDependency(name: string, options?: { checkDevDependency?: boolean; }): Promise; /** * Getting a package json and deserialize it to JS object. * * @param location it appends `package.json` if not exits in `location` string. */ export declare function readPackageJson(location: string): Record; export declare function updatePackageJson(location: string, data: Record): void; export declare function readAndValidatePackageJson(path: string): { [x: string]: unknown; name: string; version?: string; type?: "module"; dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; scripts?: Record; private?: boolean; }; export declare function findMissingDependencies(requiredDependencies: string[]): Promise; /** * Returns the full path of a package including the root path. * If no package location is provided, returns the root path. * * @param {string} [packageLocation=''] - The relative path to the package from root * @returns {string} The full path to the package directory * @example * // Returns root path * packagePath() * */ export declare function packagePath(packageLocation?: string): string; /** * Returns the full path to the package.json file of a package. * If no package location is provided, returns the root package.json path. * * // Returns './package.json' * packageJsonPath() * */ export declare function packageJsonPath(packageLocation?: string): string; export declare function packageNameWithoutScope(name: string): string; export interface Package { name: string; location: string; version: string; private: boolean; } export declare const rootPackageJson: () => { [x: string]: unknown; name: string; version?: string; type?: "module"; dependencies?: Record; devDependencies?: Record; peerDependencies?: Record; scripts?: Record; private?: boolean; }; /** * The `location` of the repository root, i.e. of a single-repo package or of * the root of a monorepo. Workspace packages always live somewhere below it. */ export declare const ROOT_LOCATION = "."; export declare const isRootPackage: (pkg: Pick) => boolean; /** The root `package.json` as a {@link Package}. */ export declare const rootPackage: () => Package; export declare function workspacePackages(): Promise<{ name: string; location: string; version: string; private: boolean; }[]>; //# sourceMappingURL=packageJson.d.ts.map