Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

conventional-changelog-writer

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conventional-changelog-writer - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="1.1.0"></a>
# [1.1.0](https://github.com/stevemao/conventional-changelog-writer/compare/v1.0.3...v1.1.0) (2016-02-08)
### Features
* **generate:** originalCommits as last argument ([186bfb9](https://github.com/stevemao/conventional-changelog-writer/commit/186bfb9))
<a name="1.0.3"></a>

@@ -2,0 +12,0 @@ ## [1.0.3](https://github.com/stevemao/conventional-changelog-writer/compare/v1.0.2...v1.0.3) (2016-02-06)

11

lib/util.js

@@ -149,9 +149,12 @@ 'use strict';

var notes = [];
var filteredCommits;
var compiled = compileTemplates(options);
if (options.ignoreReverted) {
commits = conventionalCommitsFilter(commits);
filteredCommits = conventionalCommitsFilter(commits);
} else {
filteredCommits = _.clone(commits);
}
_.forEach(commits, function(commit) {
_.forEach(filteredCommits, function(commit) {
_.map(commit.notes, function(note) {

@@ -166,3 +169,3 @@ note.commit = commit;

context = _.merge({}, context, keyCommit, getExtraContext(commits, notes, options));
context = _.merge({}, context, keyCommit, getExtraContext(filteredCommits, notes, options));

@@ -177,3 +180,3 @@ if (keyCommit && keyCommit.committerDate) {

context = options.finalizeContext(context, options, commits, keyCommit);
context = options.finalizeContext(context, options, filteredCommits, keyCommit, commits);

@@ -180,0 +183,0 @@ return compiled(context);

{
"name": "conventional-changelog-writer",
"version": "1.0.3",
"version": "1.1.0",
"description": "Write logs based on conventional commits and templates",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/stevemao/conventional-changelog-writer",

@@ -594,4 +594,2 @@ 'use strict';

it('should not flush when it is the only potential release', function(done) {
var i = 0;
var upstream = through.obj();

@@ -620,3 +618,2 @@ upstream.write({

}, function() {
expect(i).to.equal(0);
done();

@@ -819,4 +816,2 @@ }));

it('should not flush when it is the only potential release', function(done) {
var i = 0;
var upstream = through.obj();

@@ -846,3 +841,2 @@ upstream.write({

}, function() {
expect(i).to.equal(0);
done();

@@ -849,0 +843,0 @@ }));

@@ -789,3 +789,67 @@ 'use strict';

});
it('should pass the correct arguments', function() {
util.generate({
mainTemplate: '{{#each noteGroups}}{{#each notes}}{{commit.header}}{{/each}}{{/each}}',
ignoreReverted: true,
finalizeContext: function(context, options, filteredCommits, keyCommit, originalCommits) {
expect(filteredCommits.length).to.equal(2);
expect(originalCommits.length).to.equal(4);
}
}, [{
header: 'revert: feat(): amazing new module\n',
body: 'This reverts commit 56185b7356766d2b30cfa2406b257080272e0b7a.\n',
footer: null,
notes: [],
references: [],
revert: {
header: 'feat(): amazing new module',
hash: '56185b7356766d2b30cfa2406b257080272e0b7a'
},
hash: '789d898b5f8422d7f65cc25135af2c1a95a125ac\n'
}, {
header: 'feat(): amazing nee\n',
body: null,
footer: 'BREAKI]ompatible.\n',
notes: [{
title: 'BREAKING CHANGE',
text: 'some breaking change'
}],
references: [],
revert: null,
hash: '56185b',
raw: {
header: 'feat(): amazing new module\n',
body: null,
footer: 'BREAKING CHANGE: Not backward compatible.\n',
notes: [{
title: 'BREAKING CHANGE',
text: 'some breaking change'
}],
references: [],
revert: null,
hash: '56185b7356766d2b30cfa2406b257080272e0b7a\n',
}
}, {
header: 'feat(): new feature\n',
body: null,
footer: null,
notes: [{
title: 'BREAKING CHANGE',
text: 'WOW SO MANY CHANGES'
}],
references: [],
revert: null,
hash: '815a3f0717bf1dfce007bd076420c609504edcf3\n'
}, {
header: 'chore: first commit\n',
body: null,
footer: null,
notes: [],
references: [],
revert: null,
hash: '74a3e4d6d25dee2c0d6483a0a3887417728cbe0a\n'
}]);
});
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc