What is git-semver-tags?
The git-semver-tags npm package is a utility that retrieves all semantic version (semver) tags from a Git repository. It is useful for versioning and release management in software projects.
What are git-semver-tags's main functionalities?
Retrieve Semver Tags
This feature allows you to retrieve all semantic version tags from the current Git repository. The code sample demonstrates how to use the git-semver-tags package to get the tags and log them to the console.
const gitSemverTags = require('git-semver-tags');
gitSemverTags((err, tags) => {
if (err) {
console.error(err);
} else {
console.log(tags);
}
});
Other packages similar to git-semver-tags
semver
The semver package is a comprehensive library for parsing, validating, and comparing semantic version numbers. While it does not directly interact with Git repositories to fetch tags, it provides extensive utilities for working with semver strings.
git-tags
The git-tags package is a utility for listing all tags in a Git repository. Unlike git-semver-tags, it does not filter tags based on semantic versioning, but it can be used in conjunction with other tools to achieve similar functionality.
nodegit
NodeGit is a library that provides native bindings to Git. It offers a wide range of Git functionalities, including listing tags. While more complex and feature-rich than git-semver-tags, it requires more setup and understanding of Git internals.
git-semver-tags

Get all git semver tags of your repository in reverse chronological order.
Note: since lightweight tags do not store date information, the date of a tag is the date of the commit that is tagged on. If two tags on one commit, the order is not guaranteed.
Install
pnpm add git-semver-tags
yarn add git-semver-tags
npm i git-semver-tags
CLI
git-semver-tags
git-semver-tags --help
API
For JS API see @conventional-changelog/git-client.
License
MIT © Steve Mao