UNPKG

mkver

Version:

Node.js access to your app's version and release metadata

20 lines (19 loc) 664 B
#!/usr/bin/env node import type { ParsedPath } from "node:path"; export interface VersionInfo { path: ParsedPath; version: string; release: string; gitSha: string; gitDate: Date; } /** * Writes a file with version and release metadata to `outputFilePath` * * @param outputFilePath - The file to write to. Defaults to "./Version.ts" if * the parameter is not provided or "". The file format is determined by the * file extension. Supported extensions are ".ts", ".js", ".mjs", and ".cjs". * * @returns The version and release metadata written to the file. */ export declare function mkver(outputFilePath?: string): Promise<VersionInfo>;