conventional-changelog-writer
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -55,7 +55,2 @@ 'use strict'; | ||
}, | ||
version: function(version) { | ||
if (_.isString(version)) { | ||
return version.replace(/^[v=]/i, ''); | ||
} | ||
}, | ||
committerDate: function(date) { | ||
@@ -62,0 +57,0 @@ if (!date) { |
{ | ||
"name": "conventional-changelog-writer", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Write logs based on conventional commits and templates", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/stevemao/conventional-changelog-writer", |
@@ -141,3 +141,3 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url] | ||
Type: `object` or `function` Default: get the first 7 digits of hash, strip leading `'v'` for `version`, and `committerDate` will be formatted as `'yyyy-mm-dd'`. | ||
Type: `object` or `function` Default: get the first 7 digits of hash, and `committerDate` will be formatted as `'yyyy-mm-dd'`. | ||
@@ -144,0 +144,0 @@ Replace with new values in each commit. |
@@ -153,29 +153,2 @@ 'use strict'; | ||
it('should strip the leading v', function(done) { | ||
var i = 0; | ||
var upstream = through.obj(); | ||
upstream.write({ | ||
header: 'bla', | ||
body: null, | ||
footer: null, | ||
notes: [], | ||
version: 'v1.0.0' | ||
}); | ||
upstream.end(); | ||
upstream | ||
.pipe(conventionalChangelogWriter()) | ||
.pipe(through(function(chunk, enc, cb) { | ||
if (i === 1) { | ||
expect(chunk.toString()).to.equal('<a name="1.0.0"></a>\n# 1.0.0 (' + today + ')\n\n\n* bla \n\n\n\n'); | ||
} | ||
i++; | ||
cb(null); | ||
}, function() { | ||
expect(i).to.equal(2); | ||
done(); | ||
})); | ||
}); | ||
it('should merge with the provided transform object', function(done) { | ||
@@ -182,0 +155,0 @@ var i = 0; |
71135
1767