Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-conventional-commits

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-conventional-commits - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

git-conventional-commits.default.json

@@ -18,3 +18,3 @@ {

"commitScopes": [],
"releaseTagGlobPattern": "v[0-9].*",
"releaseTagGlobPattern": "v[0-9]*.[0-9]*.[0-9]*",
"issueRegexPattern": "(^|\\s)#\\d+(\\s|$)"

@@ -21,0 +21,0 @@ },

@@ -93,3 +93,3 @@ const fs = require("fs");

// match only release version e.g. 1.2.3 ((?:[^-]|$) ignores pre-release versions e.g. 1.2.3-SNAPSHOT)
config.convention.semanticVersionRegex = /(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)(?:[^-]|$)/;
config.convention.semanticVersionRegex = /(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)/;

@@ -96,0 +96,0 @@ config.changelog.commitIgnoreRegex = () => RegExp(config.changelog.commitIgnoreRegexPattern || '(?!)');

const execAsync = require('./execAsync');
async function getLastTag(tagGlobPattern, commitAnchor = 'HEAD') {
return await execAsync(`git describe --tags --match=${tagGlobPattern} --no-abbrev ${commitAnchor}`, {encoding: 'UTF-8'})
/**
* @function
* @param {Object} options - changelog specific generator parameters.
* @param {Object} [options.commitAnchor] - commit anchor.
* @param {string} [options.matchPattern] - tag glob pattern.
* @param {string} [options.excludePattern] - tag exclude glob pattern.
*/
async function getLastTag(
{
commitAnchor = 'HEAD',
matchPattern= '*',
excludePattern,
}
) {
return await execAsync(`git describe --tags --match=${matchPattern} ${excludePattern ? `--exclude=${excludePattern}` : ''} --no-abbrev ${commitAnchor}`, {encoding: 'UTF-8'})
.then(output => output.trim())

@@ -6,0 +19,0 @@ .catch(err => {

@@ -129,4 +129,8 @@ const Git = require("./git");

async function getLastReleaseTag(commitRef) {
return await Git.getLastTag(convention.releaseTagGlobPattern, commitRef)
return await Git.getLastTag({
commitAnchor: commitRef,
matchPattern: convention.releaseTagGlobPattern,
excludePattern: '*-*', // exclude pre-release versions
})
}
};
{
"name": "git-conventional-commits",
"version": "2.0.0",
"version": "2.0.1",
"description": "git conventional commits util",

@@ -5,0 +5,0 @@ "licence": "GPLv3",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc