git-semver-tags 4.1.0 → 5.0.0
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/README.md +3 -3
- package/cli.js +3 -3
- package/index.js +12 -12
- package/package.json +8 -9
- package/CHANGELOG.md +0 -195
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][
|
|
1
|
+
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coverage-image]][coverage-url]
|
|
2
2
|
|
|
3
3
|
> Get all git semver tags of your repository in reverse chronological order
|
|
4
4
|
|
|
@@ -50,5 +50,5 @@ MIT © [Steve Mao](https://github.com/stevemao)
|
|
|
50
50
|
[travis-url]: https://travis-ci.org/conventional-changelog/git-semver-tags
|
|
51
51
|
[daviddm-image]: https://david-dm.org/stevemao/git-semver-tags.svg?theme=shields.io
|
|
52
52
|
[daviddm-url]: https://david-dm.org/stevemao/git-semver-tags
|
|
53
|
-
[
|
|
54
|
-
[
|
|
53
|
+
[coverage-image]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master
|
|
54
|
+
[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master
|
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": "
|
|
3
|
+
"version": "5.0.0",
|
|
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"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"engines": {
|
|
20
|
-
"node": ">=
|
|
20
|
+
"node": ">=14"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"index.js",
|
|
@@ -32,14 +32,13 @@
|
|
|
32
32
|
"git"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"meow": "^
|
|
36
|
-
"semver": "^6.
|
|
37
|
-
},
|
|
38
|
-
"scripts": {
|
|
39
|
-
"test-windows": "mocha --timeout 30000"
|
|
35
|
+
"meow": "^8.1.2",
|
|
36
|
+
"semver": "^6.3.0"
|
|
40
37
|
},
|
|
41
38
|
"bin": {
|
|
42
39
|
"git-semver-tags": "cli.js"
|
|
43
40
|
},
|
|
44
|
-
"
|
|
45
|
-
|
|
41
|
+
"scripts": {
|
|
42
|
+
"test-windows": "mocha --timeout 30000"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [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
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* add support for '--skip-unstable' option ([#656](https://github.com/conventional-changelog/conventional-changelog/issues/656)) ([#656](https://github.com/conventional-changelog/conventional-changelog/issues/656)) ([0679d7a](https://github.com/conventional-changelog/conventional-changelog/commit/0679d7a1d7a8715918326f31ec3f6168c2341fd6))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# [4.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@3.0.1...git-semver-tags@4.0.0) (2020-05-08)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Bug Fixes
|
|
21
|
-
|
|
22
|
-
* **deps:** update yargs-parser to move off a flagged-vulnerable version. ([#635](https://github.com/conventional-changelog/conventional-changelog/issues/635)) ([aafc0f0](https://github.com/conventional-changelog/conventional-changelog/commit/aafc0f00412c3e4b23b8418300e5a570a48fe24d))
|
|
23
|
-
* **git-semver-tags:** change --tagPrefix flag to --tag-prefix ([#566](https://github.com/conventional-changelog/conventional-changelog/issues/566)) ([490cda6](https://github.com/conventional-changelog/conventional-changelog/commit/490cda6cff74abe63617f982765b63aebdf3b4b6)), closes [#553](https://github.com/conventional-changelog/conventional-changelog/issues/553)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
### BREAKING CHANGES
|
|
27
|
-
|
|
28
|
-
* **git-semver-tags:** --tagPrefix flag was changed to --tag-prefix
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## [3.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@3.0.0...git-semver-tags@3.0.1) (2019-11-14)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Bug Fixes
|
|
38
|
-
|
|
39
|
-
* add types for cli flags ([#551](https://github.com/conventional-changelog/conventional-changelog/issues/551)) ([bf1d64a](https://github.com/conventional-changelog/conventional-changelog/commit/bf1d64aeaf8f262d4b2beec02d2aebb78df7343b))
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
# [3.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@2.0.3...git-semver-tags@3.0.0) (2019-07-29)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
* refactor!: modify gitSemverTags to take options first (#390) ([dc8aeda](https://github.com/conventional-changelog/conventional-changelog/commit/dc8aeda)), closes [#390](https://github.com/conventional-changelog/conventional-changelog/issues/390)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### BREAKING CHANGES
|
|
52
|
-
|
|
53
|
-
* gitSemverTags now takes options followed by callback.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## [2.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@2.0.2...git-semver-tags@2.0.3) (2019-05-18)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Bug Fixes
|
|
63
|
-
|
|
64
|
-
* **deps:** update dependency semver to v6 ([#458](https://github.com/conventional-changelog/conventional-changelog/issues/458)) ([efaa7bb](https://github.com/conventional-changelog/conventional-changelog/commit/efaa7bb))
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
## [2.0.2](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@2.0.1...git-semver-tags@2.0.2) (2018-11-01)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
### Bug Fixes
|
|
74
|
-
|
|
75
|
-
* bad release of git-semver-tags ([8827ae4](https://github.com/conventional-changelog/conventional-changelog/commit/8827ae4))
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
## [2.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@2.0.0...git-semver-tags@2.0.1) (2018-11-01)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### Bug Fixes
|
|
85
|
-
|
|
86
|
-
* Upgrade to Lerna 3, fix Node.js v11 error ([#385](https://github.com/conventional-changelog/conventional-changelog/issues/385)) ([cdef282](https://github.com/conventional-changelog/conventional-changelog/commit/cdef282))
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<a name="2.0.0"></a>
|
|
93
|
-
# [2.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@1.3.6...git-semver-tags@2.0.0) (2018-05-29)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
### Chores
|
|
97
|
-
|
|
98
|
-
* **package:** set Node requirement to oldest supported LTS ([#329](https://github.com/conventional-changelog/conventional-changelog/issues/329)) ([cae2fe0](https://github.com/conventional-changelog/conventional-changelog/commit/cae2fe0))
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### BREAKING CHANGES
|
|
102
|
-
|
|
103
|
-
* **package:** Set the package's minimum required Node version to be the oldest LTS
|
|
104
|
-
currently supported by the Node Release working group. At this time,
|
|
105
|
-
that is Node 6 (which is in its Maintenance LTS phase).
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
<a name="1.3.6"></a>
|
|
111
|
-
## [1.3.6](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@1.3.5...git-semver-tags@1.3.6) (2018-03-27)
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
**Note:** Version bump only for package git-semver-tags
|
|
117
|
-
|
|
118
|
-
<a name="1.3.5"></a>
|
|
119
|
-
## [1.3.5](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@1.3.4...git-semver-tags@1.3.5) (2018-03-22)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
**Note:** Version bump only for package git-semver-tags
|
|
125
|
-
|
|
126
|
-
<a name="1.3.4"></a>
|
|
127
|
-
## [1.3.4](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@1.3.3...git-semver-tags@1.3.4) (2018-02-24)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
**Note:** Version bump only for package git-semver-tags
|
|
133
|
-
|
|
134
|
-
<a name="1.3.3"></a>
|
|
135
|
-
## [1.3.3](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@1.3.2...git-semver-tags@1.3.3) (2018-02-20)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
**Note:** Version bump only for package git-semver-tags
|
|
141
|
-
|
|
142
|
-
<a name="1.3.2"></a>
|
|
143
|
-
## [1.3.2](https://github.com/stevemao/git-semver-tags/compare/git-semver-tags@1.3.1...git-semver-tags@1.3.2) (2018-02-13)
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
**Note:** Version bump only for package git-semver-tags
|
|
149
|
-
|
|
150
|
-
<a name="1.3.1"></a>
|
|
151
|
-
## [1.3.1](https://github.com/stevemao/git-semver-tags/compare/git-semver-tags@1.3.0...git-semver-tags@1.3.1) (2018-02-13)
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
**Note:** Version bump only for package git-semver-tags
|
|
157
|
-
|
|
158
|
-
<a name="1.3.0"></a>
|
|
159
|
-
# [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)
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### Features
|
|
163
|
-
|
|
164
|
-
* allow to specify a tagPrefix in conventional-recommended-bump ([f60f86f](https://github.com/stevemao/git-semver-tags/commit/f60f86f))
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<a name="1.2.3"></a>
|
|
170
|
-
## [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)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
**Note:** Version bump only for package git-semver-tags
|
|
176
|
-
|
|
177
|
-
<a name="1.2.2"></a>
|
|
178
|
-
## [1.2.2](https://github.com/stevemao/git-semver-tags/compare/git-semver-tags@1.2.1...git-semver-tags@1.2.2) (2017-10-01)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
### Bug Fixes
|
|
182
|
-
|
|
183
|
-
* **lerna tags:** support multi-digit version tags ([#223](https://github.com/conventional-changelog/conventional-changelog/issues/223)) ([67012fb](https://github.com/stevemao/git-semver-tags/commit/67012fb))
|
|
184
|
-
|
|
185
|
-
<a name="1.2.1"></a>
|
|
186
|
-
## [1.2.1](https://github.com/stevemao/git-semver-tags/compare/git-semver-tags@1.2.0...git-semver-tags@1.2.1) (2017-07-17)
|
|
187
|
-
|
|
188
|
-
<a name="1.2.0"></a>
|
|
189
|
-
# [1.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/git-semver-tags@1.1.2...v1.2.0) (2017-03-10)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
### Features
|
|
193
|
-
|
|
194
|
-
* add support for listing lerna style tags (project[@version](https://github.com/version)) ([#161](https://github.com/conventional-changelog/conventional-changelog/issues/161)) ([b245f9d](https://github.com/conventional-changelog/conventional-changelog/commit/b245f9d))
|
|
195
|
-
* migrate repo to lerna mono-repo ([793e823](https://github.com/conventional-changelog/conventional-changelog/commit/793e823))
|