conventional-commits-parser
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -0,1 +1,11 @@ | ||
<a name="1.3.0"></a> | ||
# [1.3.0](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.2.3...v1.3.0) (2016-10-15) | ||
### Features | ||
* support squash commits (#31) ([860c7a1](https://github.com/conventional-changelog/conventional-commits-parser/commit/860c7a1)) | ||
<a name="1.2.3"></a> | ||
@@ -2,0 +12,0 @@ ## [1.2.3](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.2.2...v1.2.3) (2016-08-06) |
@@ -21,3 +21,3 @@ 'use strict'; | ||
return new RegExp('^\\s*(' + join(noteKeywords, '|') + ')[:\\s]+(.*)', 'i'); | ||
return new RegExp('^[\\s|*]*(' + join(noteKeywords, '|') + ')[:\\s]+(.*)', 'i'); | ||
} | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "conventional-commits-parser", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "Parse raw conventional commits", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/conventional-changelog/conventional-commits-parser", |
@@ -220,6 +220,6 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url] | ||
For example, if we have commit | ||
For example, if we had commit | ||
``` | ||
revert throw an error if a callback is passed | ||
Revert "throw an error if a callback is passed" | ||
@@ -229,3 +229,3 @@ This reverts commit 9bb4d6c. | ||
And the parsed result might be | ||
If configured correctly, the parsed result would be | ||
@@ -232,0 +232,0 @@ ```js |
@@ -483,2 +483,31 @@ 'use strict'; | ||
it('should parse important notes that start with asterisks (for squash commits)', function() { | ||
var text = 'Previously multiple template bindings on one element\n' + | ||
'(ex. `<div *ngIf=\'..\' *ngFor=\'...\'>`) were allowed but most of the time\n' + | ||
'were leading to undesired result. It is possible that a small number\n' + | ||
'of applications will see template parse errors that shuld be fixed by\n' + | ||
'nesting elements or using `<template>` tags explicitly.\n' + | ||
'\n' + | ||
'Closes #9462'; | ||
options.noteKeywords = ['BREAKING CHANGE']; | ||
reg = regex(options); | ||
var msg = parser( | ||
'fix(core): report duplicate template bindings in templates\n' + | ||
'\n' + | ||
'Fixes #7315\n' + | ||
'\n' + | ||
'* BREAKING CHANGE:\n' + | ||
'\n' + | ||
text, | ||
options, | ||
reg | ||
); | ||
var expected = { | ||
title: 'BREAKING CHANGE', | ||
text: text | ||
}; | ||
expect(msg.notes[0]).to.eql(expected); | ||
}); | ||
it('should not treat it as important notes if there are texts after `noteKeywords`', function() { | ||
@@ -485,0 +514,0 @@ options.noteKeywords = ['BREAKING CHANGE']; |
@@ -46,2 +46,11 @@ 'use strict'; | ||
}); | ||
it('should not match if there is text after `noteKeywords`', function() { | ||
var reNotes = regex({ | ||
noteKeywords: [' BREAKING CHANGE'], | ||
issuePrefixes: ['#'] | ||
}).notes; | ||
var match = 'BREAKING CHANGES: Wow.'.match(reNotes); | ||
expect(match).to.equal(null); | ||
}); | ||
}); | ||
@@ -48,0 +57,0 @@ |
Sorry, the diff of this file is not supported yet
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
83559
1865