conventional-commits-parser
Advanced tools
Comparing version 3.0.8 to 3.1.0
@@ -6,2 +6,19 @@ # Change Log | ||
# [3.1.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.8...conventional-commits-parser@3.1.0) (2020-05-08) | ||
### Bug Fixes | ||
* **deps:** update yargs-parser to move off a flagged-vulnerable version. ([#635](https://github.com/conventional-changelog/conventional-changelog/issues/635)) ([aafc0f0](https://github.com/conventional-changelog/conventional-changelog/commit/aafc0f00412c3e4b23b8418300e5a570a48fe24d)) | ||
### Features | ||
* **conventional-commits-parser:** add issuePrefixesCaseSensitive parser option ([#580](https://github.com/conventional-changelog/conventional-changelog/issues/580)) ([526b282](https://github.com/conventional-changelog/conventional-changelog/commit/526b28214d12c55158eb2e4d44408378587ceb97)) | ||
* support slash in headerPattern default options ([93a547d](https://github.com/conventional-changelog/conventional-changelog/commit/93a547d742634d8676f499cfa2a274bc3792d020)) | ||
## [3.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.7...conventional-commits-parser@3.0.8) (2019-11-14) | ||
@@ -8,0 +25,0 @@ |
22
cli.js
@@ -34,11 +34,12 @@ #!/usr/bin/env node | ||
Options | ||
-p, --header-pattern Regex to match header pattern | ||
-c, --header-correspondence Comma separated parts used to define what capturing group of 'headerPattern' captures what | ||
-r, --reference-actions Comma separated keywords that used to reference issues | ||
-i, --issue-prefixes Comma separated prefixes of an issue | ||
-n, --note-keywords Comma separated keywords for important notes | ||
-f, --field-pattern Regex to match other fields | ||
--revert-pattern Regex to match revert pattern | ||
--revert-correspondence Comma separated fields used to define what the commit reverts | ||
-v, --verbose Verbose output | ||
-p, --header-pattern Regex to match header pattern | ||
-c, --header-correspondence Comma separated parts used to define what capturing group of 'headerPattern' captures what | ||
-r, --reference-actions Comma separated keywords that used to reference issues | ||
-i, --issue-prefixes Comma separated prefixes of an issue | ||
--issue-prefixes-case-sensitive Treat issue prefixes as case sensitive | ||
-n, --note-keywords Comma separated keywords for important notes | ||
-f, --field-pattern Regex to match other fields | ||
--revert-pattern Regex to match revert pattern | ||
--revert-correspondence Comma separated fields used to define what the commit reverts | ||
-v, --verbose Verbose output | ||
`, { | ||
@@ -62,2 +63,5 @@ flags: { | ||
}, | ||
'issue-prefixes-case-sensitive': { | ||
type: 'boolean' | ||
}, | ||
'note-keywords': { | ||
@@ -64,0 +68,0 @@ alias: 'n', |
@@ -10,3 +10,3 @@ 'use strict' | ||
options = _.extend({ | ||
headerPattern: /^(\w*)(?:\(([\w$.\-* ]*)\))?: (.*)$/, | ||
headerPattern: /^(\w*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$/, | ||
headerCorrespondence: ['type', 'scope', 'subject'], | ||
@@ -13,0 +13,0 @@ referenceActions: [ |
@@ -24,3 +24,3 @@ 'use strict' | ||
function getReferencePartsRegex (issuePrefixes) { | ||
function getReferencePartsRegex (issuePrefixes, issuePrefixesCaseSensitive) { | ||
if (!issuePrefixes) { | ||
@@ -30,3 +30,4 @@ return reNomatch | ||
return new RegExp('(?:.*?)??\\s*([\\w-\\.\\/]*?)??(' + join(issuePrefixes, '|') + ')([\\w-]*\\d+)', 'gi') | ||
var flags = issuePrefixesCaseSensitive ? 'g' : 'gi' | ||
return new RegExp('(?:.*?)??\\s*([\\w-\\.\\/]*?)??(' + join(issuePrefixes, '|') + ')([\\w-]*\\d+)', flags) | ||
} | ||
@@ -47,3 +48,3 @@ | ||
var reNotes = getNotesRegex(options.noteKeywords) | ||
var reReferenceParts = getReferencePartsRegex(options.issuePrefixes) | ||
var reReferenceParts = getReferencePartsRegex(options.issuePrefixes, options.issuePrefixesCaseSensitive) | ||
var reReferences = getReferencesRegex(options.referenceActions) | ||
@@ -50,0 +51,0 @@ |
{ | ||
"name": "conventional-commits-parser", | ||
"version": "3.0.8", | ||
"version": "3.1.0", | ||
"description": "Parse raw conventional commits", | ||
@@ -20,3 +20,3 @@ "bugs": { | ||
"engines": { | ||
"node": ">=6.9.0" | ||
"node": ">=10" | ||
}, | ||
@@ -40,3 +40,3 @@ "files": [ | ||
"lodash": "^4.17.15", | ||
"meow": "^5.0.0", | ||
"meow": "^7.0.0", | ||
"split2": "^2.0.0", | ||
@@ -52,3 +52,6 @@ "through2": "^3.0.0", | ||
}, | ||
"gitHead": "79217815a7ce5f3d3f833961ce9a14bd454e5789" | ||
"devDependencies": { | ||
"forceable-tty": "^0.1.0" | ||
}, | ||
"gitHead": "83643c5a0d2c4d7c9ba14cbf990ffbc577a51e8c" | ||
} |
@@ -196,2 +196,8 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url] | ||
##### issuePrefixesCaseSensitive | ||
Type: `boolean` Default: false | ||
Used to define if `issuePrefixes` should be considered case sensitive. | ||
##### noteKeywords | ||
@@ -198,0 +204,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
54888
526
377
1
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@types/minimist@1.2.5(transitive)
+ Added@types/normalize-package-data@2.4.4(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedcamelcase-keys@6.2.2(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedhard-rejection@2.1.0(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedkind-of@6.0.3(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedmap-obj@4.3.0(transitive)
+ Addedmeow@7.1.1(transitive)
+ Addedmin-indent@1.0.1(transitive)
+ Addedminimist-options@4.1.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedquick-lru@4.0.1(transitive)
+ Addedread-pkg@5.2.0(transitive)
+ Addedread-pkg-up@7.0.1(transitive)
+ Addedredent@3.0.0(transitive)
+ Addedstrip-indent@3.0.0(transitive)
+ Addedtrim-newlines@3.0.1(transitive)
+ Addedtype-fest@0.13.10.6.00.8.1(transitive)
+ Addedyargs-parser@18.1.3(transitive)
- Removedarray-find-index@1.0.2(transitive)
- Removedcamelcase@4.1.0(transitive)
- Removedcamelcase-keys@4.2.0(transitive)
- Removedcurrently-unhandled@0.4.1(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedindent-string@3.2.0(transitive)
- Removedjson-parse-better-errors@1.0.2(transitive)
- Removedload-json-file@4.0.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedloud-rejection@1.6.0(transitive)
- Removedmap-obj@2.0.0(transitive)
- Removedmeow@5.0.0(transitive)
- Removedminimist-options@3.0.2(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
- Removedparse-json@4.0.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpath-type@3.0.0(transitive)
- Removedpify@3.0.0(transitive)
- Removedquick-lru@1.1.0(transitive)
- Removedread-pkg@3.0.0(transitive)
- Removedread-pkg-up@3.0.0(transitive)
- Removedredent@2.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedstrip-bom@3.0.0(transitive)
- Removedstrip-indent@2.0.0(transitive)
- Removedtrim-newlines@2.0.0(transitive)
- Removedyargs-parser@10.1.0(transitive)
Updatedmeow@^7.0.0