git-semver-tags 1.3.4 → 2.0.2

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 CHANGED
@@ -3,6 +3,62 @@
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
+ ## [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)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * bad release of git-semver-tags ([8827ae4](https://github.com/conventional-changelog/conventional-changelog/commit/8827ae4))
12
+
13
+
14
+
15
+
16
+
17
+ ## [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)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * 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))
23
+
24
+
25
+
26
+
27
+
28
+ <a name="2.0.0"></a>
29
+ # [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)
30
+
31
+
32
+ ### Chores
33
+
34
+ * **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))
35
+
36
+
37
+ ### BREAKING CHANGES
38
+
39
+ * **package:** Set the package's minimum required Node version to be the oldest LTS
40
+ currently supported by the Node Release working group. At this time,
41
+ that is Node 6 (which is in its Maintenance LTS phase).
42
+
43
+
44
+
45
+
46
+ <a name="1.3.6"></a>
47
+ ## [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)
48
+
49
+
50
+
51
+
52
+ **Note:** Version bump only for package git-semver-tags
53
+
54
+ <a name="1.3.5"></a>
55
+ ## [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)
56
+
57
+
58
+
59
+
60
+ **Note:** Version bump only for package git-semver-tags
61
+
6
62
  <a name="1.3.4"></a>
7
63
  ## [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)
8
64
 
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ ### MIT License
2
+
3
+ Copyright © [conventional-changelog team](https://github.com/conventional-changelog)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
+ of the Software, and to permit persons to whom the Software is furnished to do
10
+ so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -11,7 +11,6 @@
11
11
  $ npm install --save git-semver-tags
12
12
  ```
13
13
 
14
-
15
14
  ## Usage
16
15
 
17
16
  ```js
package/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';
3
- var meow = require('meow');
4
- var gitSemverTags = require('./');
2
+ 'use strict'
3
+ var meow = require('meow')
4
+ var gitSemverTags = require('./')
5
5
 
6
6
  var args = meow(`
7
7
  Usage
@@ -10,17 +10,17 @@ var args = meow(`
10
10
  --lerna parse lerna style git tags
11
11
  --package when listing lerna style tags, filter by a package
12
12
  --tagPrefix prefix to remove from the tags during their processing`
13
- );
13
+ )
14
14
 
15
- gitSemverTags(function(err, tags) {
15
+ gitSemverTags(function (err, tags) {
16
16
  if (err) {
17
- console.error(err.toString());
18
- process.exit(1);
17
+ console.error(err.toString())
18
+ process.exit(1)
19
19
  }
20
20
 
21
- console.log(tags.join('\n'));
21
+ console.log(tags.join('\n'))
22
22
  }, {
23
23
  lernaTags: args.flags.lerna,
24
24
  package: args.flags.package,
25
25
  tagPrefix: args.flags.tagPrefix
26
- });
26
+ })
package/index.js CHANGED
@@ -1,58 +1,58 @@
1
- 'use strict';
1
+ 'use strict'
2
2
 
3
- var exec = require('child_process').exec;
4
- var semverValid = require('semver').valid;
5
- var regex = /tag:\s*(.+?)[,\)]/gi;
6
- var cmd = 'git log --decorate --no-color';
3
+ var exec = require('child_process').exec
4
+ var semverValid = require('semver').valid
5
+ var regex = /tag:\s*(.+?)[,)]/gi
6
+ var cmd = 'git log --decorate --no-color'
7
7
 
8
- function lernaTag(tag, pkg) {
8
+ function lernaTag (tag, pkg) {
9
9
  if (pkg && !(new RegExp('^' + pkg + '@')).test(tag)) {
10
- return false;
10
+ return false
11
11
  } else {
12
- return /^.+@[0-9]+\.[0-9]+\.[0-9]+(-.+)?$/.test(tag);
12
+ return /^.+@[0-9]+\.[0-9]+\.[0-9]+(-.+)?$/.test(tag)
13
13
  }
14
14
  }
15
15
 
16
- module.exports = function(callback, opts) {
17
- opts = opts || {};
16
+ module.exports = function (callback, opts) {
17
+ opts = opts || {}
18
18
 
19
19
  if (opts.package && !opts.lernaTags) {
20
- callback(Error('opts.package should only be used when running in lerna mode'));
21
- return;
20
+ callback(Error('opts.package should only be used when running in lerna mode'))
21
+ return
22
22
  }
23
23
 
24
24
  exec(cmd, {
25
25
  maxBuffer: Infinity
26
- }, function(err, data) {
26
+ }, function (err, data) {
27
27
  if (err) {
28
- callback(err);
29
- return;
28
+ callback(err)
29
+ return
30
30
  }
31
31
 
32
- var tags = [];
33
- var tagPrefixRegexp;
32
+ var tags = []
33
+ var tagPrefixRegexp
34
34
  if (opts.tagPrefix) {
35
- tagPrefixRegexp = new RegExp('^' + opts.tagPrefix + '(.*)');
35
+ tagPrefixRegexp = new RegExp('^' + opts.tagPrefix + '(.*)')
36
36
  }
37
- data.split('\n').forEach(function(decorations) {
38
- var match;
39
- while (match = regex.exec(decorations)) {
40
- var tag = match[1];
37
+ data.split('\n').forEach(function (decorations) {
38
+ var match
39
+ while ((match = regex.exec(decorations))) {
40
+ var tag = match[1]
41
41
  if (opts.lernaTags) {
42
42
  if (lernaTag(tag, opts.package)) {
43
- tags.push(tag);
43
+ tags.push(tag)
44
44
  }
45
45
  } else if (opts.tagPrefix) {
46
- var matches = tag.match(tagPrefixRegexp);
46
+ var matches = tag.match(tagPrefixRegexp)
47
47
  if (matches && semverValid(matches[1])) {
48
- tags.push(tag);
48
+ tags.push(tag)
49
49
  }
50
50
  } else if (semverValid(tag)) {
51
- tags.push(tag);
51
+ tags.push(tag)
52
52
  }
53
53
  }
54
- });
54
+ })
55
55
 
56
- callback(null, tags);
57
- });
58
- };
56
+ callback(null, tags)
57
+ })
58
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-semver-tags",
3
- "version": "1.3.4",
3
+ "version": "2.0.2",
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"
@@ -16,6 +16,9 @@
16
16
  "url": "https://github.com/conventional-changelog/conventional-changelog.git"
17
17
  },
18
18
  "license": "MIT",
19
+ "engines": {
20
+ "node": ">=6.9.0"
21
+ },
19
22
  "files": [
20
23
  "index.js",
21
24
  "cli.js"
@@ -32,16 +35,11 @@
32
35
  "meow": "^4.0.0",
33
36
  "semver": "^5.5.0"
34
37
  },
35
- "devDependencies": {
36
- "git-dummy-commit": "^1.2.0",
37
- "shelljs": "^0.8.0"
38
- },
39
38
  "scripts": {
40
- "lint": "jshint *.js --exclude node_modules && jscs *.js",
41
- "test": "npm run-script lint && mocha --timeout 30000",
42
39
  "test-windows": "mocha --timeout 30000"
43
40
  },
44
41
  "bin": {
45
42
  "git-semver-tags": "cli.js"
46
- }
43
+ },
44
+ "gitHead": "80ee156a3d42409c7e9d0bc3ff0eed134cb1c529"
47
45
  }