UNPKG

mkver

Version:

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

24 lines (23 loc) 719 B
#!/usr/bin/env node /// <reference types="node" /> import type { ParsedPath } from "node:path"; export interface VersionInfo { path: ParsedPath; version: string; release: string; gitSha: string; gitDate: Date; } /** * Appropriate for filenames: yMMddHHmmss */ export declare function fmtYMDHMS(d: Date): string; /** * Writes a file with version and release metadata to `output` * * @param output - The file to write to. Defaults to "./Version.ts". File format * is determined by the file extension. Supported extensions are ".ts", ".js", * and ".mjs". * @returns The version and release metadata written to the file. */ export declare function mkver(output?: string): Promise<VersionInfo>;