conventional-changelog-conventionalcommits
Advanced tools
Comparing version 4.4.0 to 4.5.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [4.5.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-conventionalcommits@4.4.0...conventional-changelog-conventionalcommits@4.5.0) (2020-11-05) | ||
### Features | ||
* **conventionalcommits:** allow matching scope ([#669](https://github.com/conventional-changelog/conventional-changelog/issues/669)) ([e01e027](https://github.com/conventional-changelog/conventional-changelog/commit/e01e027af60f5fa3e9146223b96797793930aeb4)) | ||
# [4.4.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-conventionalcommits@4.3.1...conventional-changelog-conventionalcommits@4.4.0) (2020-08-12) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "conventional-changelog-conventionalcommits", | ||
"version": "4.4.0", | ||
"version": "4.5.0", | ||
"description": "conventional-changelog conventionalcommits.org preset", | ||
@@ -41,3 +41,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "be1246c68f5dc4e6f28996129951a75bbf1cf307" | ||
"gitHead": "cc567b98facf71315f4b1620d81ce01d155efaca" | ||
} |
@@ -57,8 +57,17 @@ 'use strict' | ||
function findTypeEntry (types, commit) { | ||
const typeKey = (commit.revert ? 'revert' : (commit.type || '')).toLowerCase() | ||
return types.find((entry) => { | ||
if (entry.type !== typeKey) { | ||
return false | ||
} | ||
if (entry.scope && entry.scope !== commit.scope) { | ||
return false | ||
} | ||
return true | ||
}) | ||
} | ||
function getWriterOpts (config) { | ||
config = defaultConfig(config) | ||
const typesLookup = {} | ||
config.types.forEach(type => { | ||
typesLookup[type.type] = type | ||
}) | ||
@@ -69,3 +78,3 @@ return { | ||
const issues = [] | ||
const typeKey = (commit.revert ? 'revert' : (commit.type || '')).toLowerCase() | ||
const entry = findTypeEntry(config.types, commit) | ||
@@ -83,6 +92,6 @@ // adds additional breaking change notes | ||
// breaking changes attached to any type are still displayed. | ||
if (discard && (typesLookup[typeKey] === undefined || | ||
typesLookup[typeKey].hidden)) return | ||
if (discard && (entry === undefined || | ||
entry.hidden)) return | ||
if (typesLookup[typeKey]) commit.type = typesLookup[typeKey].section | ||
if (entry) commit.type = entry.section | ||
@@ -89,0 +98,0 @@ if (commit.scope === '*') { |
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
25883
297