conventional-changelog-writer
Advanced tools
Comparing version 0.0.16 to 0.0.17
{ | ||
"name": "conventional-changelog-writer", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Write logs based on conventional commits and templates", | ||
@@ -30,3 +30,3 @@ "homepage": "https://github.com/stevemao/conventional-changelog-writer", | ||
"meow": "^3.3.0", | ||
"semver": "^4.3.3", | ||
"semver": "^5.0.1", | ||
"split": "^1.0.0", | ||
@@ -33,0 +33,0 @@ "through2": "^2.0.0" |
@@ -34,3 +34,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] | ||
notes: [], | ||
references: [ { action: 'Closes', repository: null, issue: '1', raw: '#1' } ] } | ||
references: [ { action: 'Closes', owner: null, repository: null, issue: '1', raw: '#1' } ] } | ||
{ hash: '13f31602f396bc269076ab4d389cfd8ca94b20ba', | ||
@@ -100,2 +100,8 @@ header: 'feat(ng-list): Allow custom separator', | ||
##### owner | ||
Type: `string` | ||
The owner of the repository. Eg: `'stevemao'`. | ||
##### repository | ||
@@ -105,3 +111,3 @@ | ||
The repository name on `host`. Eg: `'stevemao/conventional-changelog-writer'`. | ||
The repository name on `host`. Eg: `'conventional-changelog-writer'`. | ||
@@ -281,3 +287,3 @@ ##### linkReferences | ||
```js | ||
{"hash":"9b1aff905b638aa274a5fc8f88662df446d374bd","header":"feat(ngMessages): provide support for dynamic message resolution","type":"feat","scope":"ngMessages","subject":"provide support for dynamic message resolution","body":"Prior to this fix it was impossible to apply a binding to a the ngMessage directive to represent the name of the error.","footer":"BREAKING CHANGE: The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive.\nCloses #10036\nCloses #9338","notes":[{"title":"BREAKING CHANGE","text":"The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive."}],"references":[{"action":"Closes","repository":null,"issue":"10036","raw":"#10036"},{"action":"Closes","repository":null,"issue":"9338","raw":"#9338"}]} | ||
{"hash":"9b1aff905b638aa274a5fc8f88662df446d374bd","header":"feat(ngMessages): provide support for dynamic message resolution","type":"feat","scope":"ngMessages","subject":"provide support for dynamic message resolution","body":"Prior to this fix it was impossible to apply a binding to a the ngMessage directive to represent the name of the error.","footer":"BREAKING CHANGE: The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive.\nCloses #10036\nCloses #9338","notes":[{"title":"BREAKING CHANGE","text":"The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive."}],"references":[{"action":"Closes","owner",null,"repository":null,"issue":"10036","raw":"#10036"},{"action":"Closes","owner":null,"repository":null,"issue":"9338","raw":"#9338"}]} | ||
``` | ||
@@ -284,0 +290,0 @@ |
@@ -20,3 +20,4 @@ 'use strict'; | ||
host: 'www.myhost.com', | ||
repository: 'a/b', | ||
owner: 'a', | ||
repository: 'b', | ||
commit: 'my commits', | ||
@@ -29,3 +30,3 @@ issue: 'my issue', | ||
describe('partial.commit', function() { | ||
it('should generate commit if `linkReferences` is falsy', function() { | ||
it('should not link the commit if `linkReferences` is falsy', function() { | ||
var log = Handlebars.compile(template)(templateContext); | ||
@@ -36,3 +37,3 @@ | ||
it('should generate commit if `linkReferences` is thuthy', function() { | ||
it('should link the commit if `linkReferences` is thuthy', function() { | ||
templateContext.linkReferences = true; | ||
@@ -44,3 +45,12 @@ var log = Handlebars.compile(template)(templateContext); | ||
it('should generate commit if `references` is truthy and `linkReferences` is falsy', function() { | ||
it('should link reference commit if `linkReferences` is thuthy and no `owner`', function() { | ||
templateContext.linkReferences = true; | ||
templateContext.owner = null; | ||
templateContext.repository = 'a/b'; | ||
var log = Handlebars.compile(template)(templateContext); | ||
expect(log).to.equal('* my header ([hash](www.myhost.com/a/b/my commits/hash))\n'); | ||
}); | ||
it('should not link reference if `references` is truthy and `linkReferences` is falsy', function() { | ||
templateContext.references = [{ | ||
@@ -58,3 +68,3 @@ issue: 1 | ||
it('should generate commit if `references` is truthy and `linkReferences` is truthy', function() { | ||
it('should link reference if `references` is truthy and `linkReferences` is truthy', function() { | ||
templateContext.linkReferences = true; | ||
@@ -73,5 +83,33 @@ templateContext.references = [{ | ||
it('should reference an issue in a different repository', function() { | ||
it('should link reference if `references` is truthy and `linkReferences` is truthy without an owner', function() { | ||
templateContext.linkReferences = true; | ||
templateContext.owner = null; | ||
templateContext.repository = 'a/b'; | ||
templateContext.references = [{ | ||
issue: 1 | ||
}, { | ||
issue: 2 | ||
}, { | ||
issue: 3 | ||
}]; | ||
var log = Handlebars.compile(template)(templateContext); | ||
expect(log).to.equal('* my header ([hash](www.myhost.com/a/b/my commits/hash)), closes [#1](www.myhost.com/a/b/my issue/1) [#2](www.myhost.com/a/b/my issue/2) [#3](www.myhost.com/a/b/my issue/3)\n'); | ||
}); | ||
it('should link reference from a different repository with an owner', function() { | ||
templateContext.linkReferences = true; | ||
templateContext.references = [{ | ||
owner: 'c', | ||
repository: 'd', | ||
issue: 1 | ||
}]; | ||
var log = Handlebars.compile(template)(templateContext); | ||
expect(log).to.equal('* my header ([hash](www.myhost.com/a/b/my commits/hash)), closes [c/d#1](www.myhost.com/c/d/my issue/1)\n'); | ||
}); | ||
it('should link reference from a different repository without an owner', function() { | ||
templateContext.linkReferences = true; | ||
templateContext.references = [{ | ||
repository: 'c/d', | ||
@@ -78,0 +116,0 @@ issue: 1 |
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
71220
1762
326
+ Addedsemver@5.7.2(transitive)
- Removedsemver@4.3.6(transitive)
Updatedsemver@^5.0.1