/// <reference types="node" />
import * as childProcess from 'child_process';
export declare class SpawnError extends Error {
    stdout: string;
    stderr: string;
    constructor(message: string, stdout: string, stderr: string);
    toString(): string;
}
/**
 * Executes a child process without limitations on stdout and stderr.
 * On error (exit code is not 0), it rejects with a SpawnProcessError that contains the stdout and stderr streams,
 * on success it returns the streams in an object.
 * @param {string} command - Command
 * @param {string[]} [args] - Arguments
 * @param {Object} [options] - Options for child_process.spawn
 */
export declare function spawnProcess(command: string, args: string[], options: childProcess.SpawnOptionsWithoutStdio): {
    stdout: string;
    stderr: string;
};
export declare function safeJsonParse(str: string): any;
export declare function splitLines(str: string): string[];
/**
 * Extracts the file name from handler string.
 */
export declare function extractFileName(cwd: string, handler: string): string;
/**
 * Find a file by walking up parent directories
 */
export declare function findUp(name: string, directory?: string): string | undefined;
/**
 * Forwards `rootDir` or finds project root folder.
 */
export declare function findProjectRoot(rootDir?: string): string | undefined;
/**
 * Returns the major version of node installation
 */
export declare function nodeMajorVersion(): number;
/**
 * Returns the package manager currently active if the program is executed
 * through an npm or yarn script like:
 * ```bash
 * yarn run example
 * npm run example
 * ```
 */
export declare function getCurrentPackager(): "npm" | "yarn" | null;
/**
 * Checks for the presence of package-lock.json or yarn.lock to determine which package manager is being used
 */
export declare function getPackagerFromLockfile(cwd: string): "npm" | "yarn" | null;
