declare module "proper-lockfile" {
	export interface RetryOptions {
		retries?: number;
		factor?: number;
		minTimeout?: number;
		maxTimeout?: number;
		randomize?: boolean;
	}

	export interface LockOptions {
		realpath?: boolean;
		retries?: number | RetryOptions;
		stale?: number;
		onCompromised?: (err: Error) => void;
	}

	export type ReleaseSync = () => void;
	export type ReleaseAsync = () => Promise<void>;

	export interface ProperLockfileApi {
		lockSync(path: string, options?: LockOptions): ReleaseSync;
		lock(path: string, options?: LockOptions): Promise<ReleaseAsync>;
	}

	const lockfile: ProperLockfileApi;
	export default lockfile;
}

declare module "hosted-git-info" {
	export interface HostedGitInfo {
		domain?: string;
		user?: string;
		project?: string;
		committish?: string;
	}

	export interface HostedGitInfoApi {
		fromUrl(url: string): HostedGitInfo | undefined;
	}

	const hostedGitInfo: HostedGitInfoApi;
	export default hostedGitInfo;
}
