UNPKG

@better-builds/lets-version

Version:

A package that reads your conventional commits and git history and recommends (or applies) a SemVer version bump for you

9 lines (8 loc) 265 B
import path from 'node:path'; /** * Given a user-provided CWD, attempts to resolve * it if it's relative, or leaves it as-is if it's absolute */ export function fixCWD(cwd) { return path.isAbsolute(cwd) ? cwd : path.resolve(path.join(process.cwd(), cwd)); }