git-semver-tags 8.0.0 → 8.0.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/README.md +1 -1
- package/package.json +4 -3
- package/src/cli.js +1 -1
- package/src/index.js +4 -4
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
[node-url]: https://nodejs.org
|
|
19
19
|
|
|
20
20
|
[deps]: https://img.shields.io/librariesio/release/npm/git-semver-tags
|
|
21
|
-
[deps-url]: https://libraries.io/npm/git-semver-tags
|
|
21
|
+
[deps-url]: https://libraries.io/npm/git-semver-tags
|
|
22
22
|
|
|
23
23
|
[size]: https://packagephobia.com/badge?p=git-semver-tags
|
|
24
24
|
[size-url]: https://packagephobia.com/result?p=git-semver-tags
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-semver-tags",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.0.
|
|
4
|
+
"version": "8.0.1",
|
|
5
5
|
"description": "Get all git semver tags of your repository in reverse chronological order.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Steve Mao",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"semver",
|
|
25
25
|
"tag",
|
|
26
26
|
"git-tag",
|
|
27
|
-
"git"
|
|
27
|
+
"git",
|
|
28
|
+
"deprecated"
|
|
28
29
|
],
|
|
29
30
|
"engines": {
|
|
30
31
|
"node": ">=18"
|
|
@@ -38,6 +39,6 @@
|
|
|
38
39
|
],
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"meow": "^13.0.0",
|
|
41
|
-
"@conventional-changelog/git-client": "^
|
|
42
|
+
"@conventional-changelog/git-client": "^2.6.0"
|
|
42
43
|
}
|
|
43
44
|
}
|
package/src/cli.js
CHANGED
|
@@ -32,7 +32,6 @@ const args = meow(`
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
})
|
|
35
|
-
|
|
36
35
|
const tags = await getSemverTags({
|
|
37
36
|
lernaTags: args.flags.lerna,
|
|
38
37
|
package: args.flags.package,
|
|
@@ -40,4 +39,5 @@ const tags = await getSemverTags({
|
|
|
40
39
|
skipUnstable: args.flags.skipUnstable
|
|
41
40
|
})
|
|
42
41
|
|
|
42
|
+
// eslint-disable-next-line no-console
|
|
43
43
|
console.log(tags.join('\n'))
|
package/src/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
packagePrefix
|
|
4
4
|
} from '@conventional-changelog/git-client'
|
|
5
5
|
|
|
6
|
-
function getFinalOptions
|
|
6
|
+
function getFinalOptions(options = {}) {
|
|
7
7
|
if (options.package && !options.lernaTags) {
|
|
8
8
|
throw new Error('opts.package should only be used when running in lerna mode')
|
|
9
9
|
}
|
|
@@ -20,13 +20,13 @@ function getFinalOptions (options = {}) {
|
|
|
20
20
|
/**
|
|
21
21
|
* Get semver tags from git.
|
|
22
22
|
* @param {*} options
|
|
23
|
-
* @param {string} [options.cwd
|
|
24
|
-
* @param {boolean} [options.lernaTags
|
|
23
|
+
* @param {string} [options.cwd] - Current working directory to run git.
|
|
24
|
+
* @param {boolean} [options.lernaTags] - Extract lerna style tags.
|
|
25
25
|
* @param {string} [options.package] - Filter lerna style tags by package.
|
|
26
26
|
* @param {string} [options.tagPrefix] - Filter semver tags by prefix.
|
|
27
27
|
* @returns Semver tags.
|
|
28
28
|
*/
|
|
29
|
-
export async function getSemverTags
|
|
29
|
+
export async function getSemverTags(options = {}) {
|
|
30
30
|
const {
|
|
31
31
|
cwd,
|
|
32
32
|
...finalOptions
|