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.
Files changed (4) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/cli.js +3 -3
  3. package/index.js +12 -12
  4. 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
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict'
3
- var meow = require('meow')
4
- var gitSemverTags = require('./')
3
+ const meow = require('meow')
4
+ const gitSemverTags = require('./')
5
5
 
6
- var args = meow(`
6
+ const args = meow(`
7
7
  Usage
8
8
  git-semver-tags
9
9
  Options
package/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict'
2
2
 
3
- var proc = require('process')
4
- var exec = require('child_process').exec
5
- var semverValid = require('semver').valid
6
- var regex = /tag:\s*(.+?)[,)]/gi
7
- var cmd = 'git log --decorate --no-color'
8
- var unstableTagTest = /.*-\w*\.\d$/
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
- var options = Object.assign({ maxBuffer: Infinity, cwd: proc.cwd() }, opts)
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
- var tags = []
37
- var tagPrefixRegexp
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
- var match
42
+ let match
43
43
  while ((match = regex.exec(decorations))) {
44
- var tag = match[1]
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
- var matches = tag.match(tagPrefixRegexp)
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.0",
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": "^7.0.0",
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": "be1246c68f5dc4e6f28996129951a75bbf1cf307"
44
+ "gitHead": "cc567b98facf71315f4b1620d81ce01d155efaca"
45
45
  }