/** * Plain text VERSION file provider. * * @packageDocumentation */ import type { VersionSourceProvider } from './provider'; /** * Reads and writes version strings from a plain text VERSION file. * * @remarks * The file is expected to contain only the version string, optionally * followed by a trailing newline. Binary files and empty files are * rejected with a descriptive error. * * @public * @since 0.3.0 */ export declare class VersionFileSource implements VersionSourceProvider { /** Human-readable provider name. */ readonly name: string; /** Filename of the version file (e.g. `'VERSION'`). */ readonly manifestFile: string; /** * Creates a new plain text version file source. * * @param manifestFile - Version filename. */ constructor(manifestFile?: string); /** * Returns `true` when the version file exists in `cwd`. * * @param cwd - Project directory to check. * @returns Whether the version file exists. */ exists(cwd: string): boolean; /** * Reads the version string from the plain text version file. * * @param cwd - Project directory containing the version file. * @returns The version string from the first line of the file. */ getVersion(cwd: string): string; /** * Writes a version string to the plain text version file. * * @param version - Version string to write. * @param cwd - Project directory containing the version file. */ setVersion(version: string, cwd: string): void; } //# sourceMappingURL=version-file.d.ts.map