UNPKG

@code-pushup/cli

Version:

A CLI to run all kinds of code quality measurements to align your team with company goals

27 lines 897 B
import { getHashFromTag, isSemver } from '@code-pushup/utils'; export async function normalizeHashOptions(processArgs) { const { onlySemverTags, // overwritten maxCount, ...opt } = processArgs; // eslint-disable-next-line functional/no-let, prefer-const let { from, to, ...processOptions } = opt; // if no semver filter is used resolve hash of tags, as hashes are used to collect history if (!onlySemverTags) { if (from && isSemver(from)) { const { hash } = await getHashFromTag(from); from = hash; } if (to && isSemver(to)) { const { hash } = await getHashFromTag(to); to = hash; } } return { ...processOptions, onlySemverTags, maxCount: maxCount && maxCount > 0 ? maxCount : undefined, from, to, }; } //# sourceMappingURL=utils.js.map