JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 12
  • Score
    100M100P100Q42209F
  • License MIT

A lightweight toolset for working with local git, including utilities for retrieving git commits and tags, ideal for CI/CD pipelines and automated release workflows.

Package Exports

  • @wroud/git
  • @wroud/git/IGitCommitInfo.js
  • @wroud/git/IGitLink.js
  • @wroud/git/IGitTrailer.js
  • @wroud/git/defaultTagPrefix.js
  • @wroud/git/getGitCommits.js
  • @wroud/git/getGitLastSemverTag.js
  • @wroud/git/getGitLastSemverTags.js
  • @wroud/git/getGitPrefixedTag.js
  • @wroud/git/index.js
  • @wroud/git/package.json
  • @wroud/git/validateGitEnvironment.js

Readme

@wroud/git

ESM-only package NPM version

@wroud/git is a lightweight toolset for working with local git repositories. It provides utilities to retrieve and parse git commits and tags, making it useful for building CI/CD workflows, especially for automated release processes based on conventional commits.

Features

  • getGitCommits: Retrieves a list of parsed git commits as an async generator. It supports filtering commits by a specified path (default: '.') and a range of commits defined by the from and to parameters. You can limit the number of commits using maxCommits. Additionally, the function can include associated tags, trailers (metadata in commits), and even custom trailers and links based on user-defined regular expressions.

  • getGitLastSemverTag: Returns the most recent semantic version tag from the git history. By default, it checks up to HEAD and looks for tags with a v prefix, although both can be customized through the to and prefix parameters.

  • Pure ESM package

Installation

Install via npm:

npm install @wroud/git

Install via yarn:

yarn add @wroud/git

Documentation

For detailed usage and API reference, visit the documentation site.

Changelog

All notable changes to this project will be documented in the CHANGELOG file.

License

This project is licensed under the MIT License. See the LICENSE file for details.