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) 283 B
import { detect } from 'package-manager-detector'; export async function getPackageManager(cwd) { const result = await detect({ cwd }); if (!result?.name) { throw new Error(`failed to detect the package manager being used in ${cwd}`); } return result.name; }