import { PackageJson } from 'type-fest'; declare type PackageJsonUpdater = (packageJson: Record) => Record; /** * Read and validate the package.json from CWD. */ export declare function getPackageJson(): Promise; /** * Read and validate the package.json from CWD. */ export declare function getPackageJsonSync(): ValidatedPackageJson; declare type ValidatedPackageJson = PackageJson & { name: string; }; /** * Read the package.json file. */ export declare function read(cwd: string): Promise; /** * Read the package.json file synchronously. */ export declare function readSync(cwd: string): undefined | PackageJson; /** * Write the package.json file. */ export declare function write(cwd: string, object: object): Promise; /** * Update the package.json located at cwd. The given updater function will * receive the parsed package contents and whatever is returned will be written * to disk. */ export declare function update(cwd: string, updater: PackageJsonUpdater): Promise; export declare function create(cwd?: string): { read: () => Promise; readSync: () => PackageJson | undefined; write: (object: object) => Promise; update: (updater: PackageJsonUpdater) => Promise; }; export declare type PJ = ReturnType; export {}; //# sourceMappingURL=package-json.d.ts.map