conventional-changelog-angular
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -0,1 +1,18 @@ | ||
<a name="1.1.0"></a> | ||
# [1.1.0](https://github.com/conventional-changelog/conventional-changelog-angular/compare/v1.0.0...v1.1.0) (2016-04-26) | ||
### Bug Fixes | ||
* **template:** whitespace ([72f8b12](https://github.com/conventional-changelog/conventional-changelog-angular/commit/72f8b12)) | ||
* update to reference conventional-changelog org ([cd1a75a](https://github.com/conventional-changelog/conventional-changelog-angular/commit/cd1a75a)) | ||
* **template:** wrong version link if no host ([bb20a7b](https://github.com/conventional-changelog/conventional-changelog-angular/commit/bb20a7b)), closes [#8](https://github.com/conventional-changelog/conventional-changelog-angular/issues/8) | ||
### Features | ||
* remove commit length restriction ([6aebb75](https://github.com/conventional-changelog/conventional-changelog-angular/commit/6aebb75)), closes [#12](https://github.com/conventional-changelog/conventional-changelog-angular/issues/12) | ||
* **github:** adds github-specific replacements for issues and users ([2633f73](https://github.com/conventional-changelog/conventional-changelog-angular/commit/2633f73)), closes [#12](https://github.com/conventional-changelog/conventional-changelog-angular/issues/12) | ||
<a name="1.0.0"></a> | ||
@@ -2,0 +19,0 @@ # [1.0.0](https://github.com/stevemao/conventional-changelog-angular/compare/v0.1.0...v1.0.0) (2016-02-05) |
@@ -47,5 +47,2 @@ #### Examples | ||
Any line of the commit message cannot be longer 100 characters! This allows the message to be easier | ||
to read on GitHub as well as in various git tools. | ||
### Revert | ||
@@ -52,0 +49,0 @@ |
34
index.js
@@ -6,2 +6,13 @@ 'use strict'; | ||
var resolve = require('path').resolve; | ||
var path = require('path'); | ||
var pkgJson = {}; | ||
var gufg = require('github-url-from-git'); | ||
try { | ||
pkgJson = require(path.resolve( | ||
process.cwd(), | ||
'./package.json' | ||
)); | ||
} catch (err) { | ||
console.error('no root package.json found'); | ||
} | ||
@@ -20,2 +31,15 @@ var parserOpts = { | ||
function issueUrl() { | ||
var url = null; | ||
if (pkgJson.repository && pkgJson.repository.url && ~pkgJson.repository.url.indexOf('github.com')) { | ||
var gitUrl = gufg(pkgJson.repository.url); | ||
if (gitUrl) { | ||
return gitUrl + '/issues/'; | ||
} else { | ||
return url; | ||
} | ||
} | ||
} | ||
var writerOpts = { | ||
@@ -61,3 +85,10 @@ transform: function(commit) { | ||
if (typeof commit.subject === 'string') { | ||
commit.subject = commit.subject.substring(0, 80); | ||
var url = issueUrl(); | ||
if (url) { | ||
// GitHub issue URLs. | ||
commit.subject = commit.subject.replace(/( ?)#([0-9]+)(\b|^)/g, '$1[#$2](' + url + '$2)$3'); | ||
} | ||
// GitHub user URLs. | ||
commit.subject = commit.subject.replace(/( ?)@([a-zA-Z0-9_]+)(\b|^)/g, '$1[@$2](https://github.com/$2)$3'); | ||
commit.subject = commit.subject; | ||
} | ||
@@ -81,2 +112,3 @@ | ||
.spread(function(template, header, commit, footer) { | ||
writerOpts.mainTemplate = template; | ||
@@ -83,0 +115,0 @@ writerOpts.headerPartial = header; |
{ | ||
"name": "conventional-changelog-angular", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "conventional-changelog angular preset", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"type": "git", | ||
"url": "git+https://github.com/stevemao/conventional-changelog-angular.git" | ||
"url": "git+https://github.com/conventional-changelog/conventional-changelog-angular.git" | ||
}, | ||
@@ -24,8 +24,8 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/stevemao/conventional-changelog-angular/issues" | ||
"url": "https://github.com/conventional-changelog/conventional-changelog-angular/issues" | ||
}, | ||
"homepage": "https://github.com/stevemao/conventional-changelog-angular#readme", | ||
"homepage": "https://github.com/conventional-changelog/conventional-changelog-angular#readme", | ||
"devDependencies": { | ||
"chai": "^3.4.1", | ||
"conventional-changelog-core": "1.0.0", | ||
"conventional-changelog-core": "^1.0.1", | ||
"coveralls": "^2.11.6", | ||
@@ -35,3 +35,3 @@ "git-dummy-commit": "^1.1.1", | ||
"jscs": "^2.7.0", | ||
"jshint": "^2.9.1-rc2", | ||
"jshint": "^2.9.1", | ||
"mocha": "*", | ||
@@ -43,4 +43,5 @@ "shelljs": "^0.6.0", | ||
"compare-func": "^1.3.1", | ||
"github-url-from-git": "^1.4.0", | ||
"q": "^1.4.1" | ||
} | ||
} |
@@ -8,10 +8,12 @@ # [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url] | ||
**Issues with the convention itself should be reported on the angular issue tracker.** | ||
[npm-image]: https://badge.fury.io/js/conventional-changelog-angular.svg | ||
[npm-url]: https://npmjs.org/package/conventional-changelog-angular | ||
[travis-image]: https://travis-ci.org/stevemao/conventional-changelog-angular.svg?branch=master | ||
[travis-url]: https://travis-ci.org/stevemao/conventional-changelog-angular | ||
[daviddm-image]: https://david-dm.org/stevemao/conventional-changelog-angular.svg?theme=shields.io | ||
[daviddm-url]: https://david-dm.org/stevemao/conventional-changelog-angular | ||
[coveralls-image]: https://coveralls.io/repos/stevemao/conventional-changelog-angular/badge.svg | ||
[coveralls-url]: https://coveralls.io/r/stevemao/conventional-changelog-angular | ||
[travis-image]: https://travis-ci.org/conventional-changelog/conventional-changelog-angular.svg?branch=master | ||
[travis-url]: https://travis-ci.org/conventional-changelog/conventional-changelog-angular | ||
[daviddm-image]: https://david-dm.org/conventional-changelog/conventional-changelog-angular.svg?theme=shields.io | ||
[daviddm-url]: https://david-dm.org/conventional-changelog/conventional-changelog-angular | ||
[coveralls-image]: https://coveralls.io/repos/conventional-changelog/conventional-changelog-angular/badge.svg | ||
[coveralls-url]: https://coveralls.io/r/conventional-changelog/conventional-changelog-angular |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
19281
15
262
19
3
2
2
+ Addedgithub-url-from-git@^1.4.0
+ Addedgithub-url-from-git@1.5.0(transitive)