git-semver-tags 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/cli.js +3 -3
- package/index.js +12 -12
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.1.1](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@4.1.0...git-semver-tags@4.1.1) (2020-11-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* bug in unstableTagTest causing a mismatch on beta release higher then beta-9 ([#679](https://github.com/conventional-changelog/conventional-changelog/issues/679)) ([cd4c726](https://github.com/conventional-changelog/conventional-changelog/commit/cd4c726b1ca227a132ec2eadac5d0cfdd75d9e81))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [4.1.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@4.0.0...git-semver-tags@4.1.0) (2020-08-12)
|
|
7
18
|
|
|
8
19
|
|
package/cli.js
CHANGED
package/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
const proc = require('process')
|
|
4
|
+
const exec = require('child_process').exec
|
|
5
|
+
const semverValid = require('semver').valid
|
|
6
|
+
const regex = /tag:\s*(.+?)[,)]/gi
|
|
7
|
+
const cmd = 'git log --decorate --no-color'
|
|
8
|
+
const unstableTagTest = /.+-\w+\.\d+$/
|
|
9
9
|
|
|
10
10
|
function lernaTag (tag, pkg) {
|
|
11
11
|
if (pkg && !(new RegExp('^' + pkg + '@')).test(tag)) {
|
|
@@ -20,7 +20,7 @@ module.exports = function gitSemverTags (opts, callback) {
|
|
|
20
20
|
callback = opts
|
|
21
21
|
opts = {}
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
const options = Object.assign({ maxBuffer: Infinity, cwd: proc.cwd() }, opts)
|
|
24
24
|
|
|
25
25
|
if (options.package && !options.lernaTags) {
|
|
26
26
|
callback(new Error('opts.package should only be used when running in lerna mode'))
|
|
@@ -33,15 +33,15 @@ module.exports = function gitSemverTags (opts, callback) {
|
|
|
33
33
|
return
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const tags = []
|
|
37
|
+
let tagPrefixRegexp
|
|
38
38
|
if (options.tagPrefix) {
|
|
39
39
|
tagPrefixRegexp = new RegExp('^' + options.tagPrefix + '(.*)')
|
|
40
40
|
}
|
|
41
41
|
data.split('\n').forEach(function (decorations) {
|
|
42
|
-
|
|
42
|
+
let match
|
|
43
43
|
while ((match = regex.exec(decorations))) {
|
|
44
|
-
|
|
44
|
+
const tag = match[1]
|
|
45
45
|
|
|
46
46
|
if (options.skipUnstable && unstableTagTest.test(tag)) {
|
|
47
47
|
// skip unstable tag
|
|
@@ -53,7 +53,7 @@ module.exports = function gitSemverTags (opts, callback) {
|
|
|
53
53
|
tags.push(tag)
|
|
54
54
|
}
|
|
55
55
|
} else if (options.tagPrefix) {
|
|
56
|
-
|
|
56
|
+
const matches = tag.match(tagPrefixRegexp)
|
|
57
57
|
if (matches && semverValid(matches[1])) {
|
|
58
58
|
tags.push(tag)
|
|
59
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-semver-tags",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.1",
|
|
4
4
|
"description": "Get all git semver tags of your repository in reverse chronological order",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"git"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"meow": "^
|
|
35
|
+
"meow": "^8.0.0",
|
|
36
36
|
"semver": "^6.0.0"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"bin": {
|
|
42
42
|
"git-semver-tags": "cli.js"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "cc567b98facf71315f4b1620d81ce01d155efaca"
|
|
45
45
|
}
|