git-semver-tags
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="1.3.0"></a> | ||
# [1.3.0](https://github.com/stevemao/git-semver-tags/compare/git-semver-tags@1.2.3...git-semver-tags@1.3.0) (2018-01-29) | ||
### Features | ||
* allow to specify a tagPrefix in conventional-recommended-bump ([f60f86f](https://github.com/stevemao/git-semver-tags/commit/f60f86f)) | ||
<a name="1.2.3"></a> | ||
@@ -8,0 +19,0 @@ ## [1.2.3](https://github.com/stevemao/git-semver-tags/compare/git-semver-tags@1.2.2...git-semver-tags@1.2.3) (2017-11-13) |
@@ -12,3 +12,4 @@ #!/usr/bin/env node | ||
' --lerna parse lerna style git tags', | ||
' --package when listing lerna style tags, filter by a package' | ||
' --package when listing lerna style tags, filter by a package', | ||
' --tagPrefix prefix to remove from the tags during their processing' | ||
] | ||
@@ -26,3 +27,4 @@ }); | ||
lernaTags: args.flags.lerna, | ||
package: args.flags.package | ||
package: args.flags.package, | ||
tagPrefix: args.flags.tagPrefix | ||
}); |
10
index.js
@@ -32,3 +32,6 @@ 'use strict'; | ||
var tags = []; | ||
var tagPrefixRegexp; | ||
if (opts.tagPrefix) { | ||
tagPrefixRegexp = new RegExp('^' + opts.tagPrefix + '(.*)'); | ||
} | ||
data.split('\n').forEach(function(decorations) { | ||
@@ -42,2 +45,7 @@ var match; | ||
} | ||
} else if (opts.tagPrefix) { | ||
var matches = tag.match(tagPrefixRegexp); | ||
if (matches && semverValid(matches[1])) { | ||
tags.push(tag); | ||
} | ||
} else if (semverValid(tag)) { | ||
@@ -44,0 +52,0 @@ tags.push(tag); |
{ | ||
"name": "git-semver-tags", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "Get all git semver tags of your repository in reverse chronological order", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/stevemao/git-semver-tags", |
@@ -39,2 +39,3 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url] | ||
`foo-package`. | ||
* `opts.tagPrefix`: specify a prefix for the git tag to be ignored from the semver checks | ||
@@ -41,0 +42,0 @@ ## License |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6515
76
54
2