conventional-recommended-bump
Advanced tools
Comparing version 0.0.2 to 0.0.3
46
index.js
'use strict'; | ||
var concat = require('concat-stream'); | ||
var conventionalCommitsFilter = require('conventional-commits-filter'); | ||
var conventionalCommitsParser = require('conventional-commits-parser'); | ||
var gitLatestSemverTag = require('git-latest-semver-tag'); | ||
var gitRawCommits = require('git-raw-commits'); | ||
var modifyValues = require('modify-values'); | ||
var isSubset = require('is-subset'); | ||
var objectAssign = require('object-assign'); | ||
@@ -12,43 +11,2 @@ | ||
function filterCommits(commits) { | ||
var ret = []; | ||
var ignores = []; | ||
commits.forEach(function(commit) { | ||
if (commit.revert) { | ||
ignores.push(commit.revert); | ||
} else { | ||
ret.push(commit); | ||
} | ||
}); | ||
ret = ret.filter(function(commit) { | ||
var ignoreThis = false; | ||
commit = modifyValues(commit, function(val) { | ||
if (typeof val === 'string') { | ||
return val.trim(); | ||
} | ||
return val; | ||
}); | ||
ignores.some(function(ignore) { | ||
ignore = modifyValues(ignore, function(val) { | ||
if (typeof val === 'string') { | ||
return val.trim(); | ||
} | ||
return val.trim(); | ||
}); | ||
ignoreThis = isSubset(commit, ignore); | ||
return ignoreThis; | ||
}); | ||
return !ignoreThis; | ||
}); | ||
return ret; | ||
} | ||
function conventionalRecommendedBump(options, parserOpts, cb) { | ||
@@ -103,3 +61,3 @@ var preset; | ||
if (options.ignoreReverted) { | ||
commits = filterCommits(data); | ||
commits = conventionalCommitsFilter(data); | ||
} else { | ||
@@ -106,0 +64,0 @@ commits = data; |
{ | ||
"name": "conventional-recommended-bump", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Get a recommended version bump based on conventional commits", | ||
@@ -21,8 +21,7 @@ "homepage": "https://github.com/stevemao/conventional-recommended-bump", | ||
"concat-stream": "^1.4.10", | ||
"conventional-commits-parser": "0.0.18", | ||
"git-latest-semver-tag": "0.0.0", | ||
"git-raw-commits": "0.0.8", | ||
"is-subset": "^0.1.1", | ||
"conventional-commits-filter": "^0.1.1", | ||
"conventional-commits-parser": "^0.1.0", | ||
"git-latest-semver-tag": "^1.0.0", | ||
"git-raw-commits": "^0.1.2", | ||
"meow": "^3.3.0", | ||
"modify-values": "^1.0.0", | ||
"object-assign": "^3.0.0" | ||
@@ -33,3 +32,3 @@ }, | ||
"istanbul": "^0.3.8", | ||
"jscs": "^1.11.3", | ||
"jscs": "^2.0.0", | ||
"jshint": "^2.6.3", | ||
@@ -36,0 +35,0 @@ "mocha": "*", |
@@ -63,3 +63,3 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coverall-image]][coverall-url] | ||
If true, reverted commits will be ignored. | ||
If `true`, reverted commits will be ignored. | ||
@@ -107,3 +107,5 @@ ##### preset | ||
- [conventional-github-releaser](https://github.com/stevemao/conventional-github-releaser) - Make a new GitHub release from git metadata | ||
- [conventional-changelog](https://github.com/ajoslin/conventional-changelog) - Generate a changelog from git metadata | ||
- [conventional-commits-detector](https://github.com/stevemao/conventional-commits-detector) - Detect what commit message convention your repository is using | ||
@@ -110,0 +112,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14673
7
15
124
271
+ Addedarrify@1.0.1(transitive)
+ Addedcamelcase@4.1.0(transitive)
+ Addedcamelcase-keys@4.2.0(transitive)
+ Addedconventional-commits-filter@0.1.1(transitive)
+ Addedconventional-commits-parser@0.1.2(transitive)
+ Addeddecamelize-keys@1.1.1(transitive)
+ Addedfind-up@2.1.0(transitive)
+ Addedgit-latest-semver-tag@1.0.2(transitive)
+ Addedgit-raw-commits@0.1.2(transitive)
+ Addedgit-semver-tags@1.3.6(transitive)
+ Addedindent-string@3.2.0(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedjson-parse-better-errors@1.0.2(transitive)
+ Addedload-json-file@4.0.0(transitive)
+ Addedlocate-path@2.0.0(transitive)
+ Addedmap-obj@2.0.0(transitive)
+ Addedmeow@4.0.1(transitive)
+ Addedminimist-options@3.0.2(transitive)
+ Addedp-limit@1.3.0(transitive)
+ Addedp-locate@2.0.0(transitive)
+ Addedp-try@1.0.0(transitive)
+ Addedparse-json@4.0.0(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpath-type@3.0.0(transitive)
+ Addedpify@3.0.0(transitive)
+ Addedquick-lru@1.1.0(transitive)
+ Addedread-pkg@3.0.0(transitive)
+ Addedread-pkg-up@3.0.0(transitive)
+ Addedredent@2.0.0(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedstrip-indent@2.0.0(transitive)
+ Addedtrim-newlines@2.0.0(transitive)
+ Addedtrim-off-newlines@1.0.3(transitive)
- Removedis-subset@^0.1.1
- Removedmodify-values@^1.0.0
- Removedconventional-commits-parser@0.0.18(transitive)
- Removedgit-latest-semver-tag@0.0.0(transitive)
- Removedgit-raw-commits@0.0.8(transitive)
- Removedsemver@4.3.6(transitive)
Updatedgit-latest-semver-tag@^1.0.0
Updatedgit-raw-commits@^0.1.2