@monup/git
v0.2.2
Published
Git history, tag, and commit parsing utilities for Monup.
Readme
@monup/git
Git history, tag, and commit parsing utilities for Monup.
Workflow Role
@monup/git provides the commit ranges, tag history, tag formatting, and conventional commit parsing used by the version, changelog, and GitHub steps.
Main Exports
getCommits()andgetCommitsSinceLastTag(): read commits for workflow decisions.getCommitsForPackage(): select commits relevant to one package.getLastTag(),getLastPackageTag(),getGlobalTagHistory(), andgetPackageTagHistory(): work with tags.createCommit(),createTag(),pushToRemote(), andgetWorkingTreeStatus(): perform git operations.formatTag(),parseConventionalCommit(), andgetGitHubRepo(): shared helpers for higher-level packages.
Example
import { createTag, getCommits, getLastTag } from '@monup/git';
const lastTag = await getLastTag(undefined, 'v%s');
const commits = await getCommits(lastTag);
await createTag('v1.1.0', 'Release 1.1.0');Related Packages
@monup/version: uses tags and commits to determine bumps.@monup/changelog: uses git history to build changelog blocks.
