Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .jscsrc

This file was deleted.

4 changes: 3 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"esversion": 6,
"boss": true,
"curly": true,
"eqeqeq": true,
Expand All @@ -11,5 +12,6 @@
"node": true,
"sub": true,
"undef": true,
"unused": true
"unused": true,
"asi": true
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Change Log

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

<a name="0.2.3"></a>
## [0.2.3](https://github.com/ellerbrock/conventional-changelog-angular-emoji/compare/v0.2.2...v0.2.3) (2019-06-05)
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "conventional-changelog-angular-emoji",
"description": "conventional-changelog angular-emoji preset",
"version": "0.2.2",
"version": "0.2.3",
"main": "src/index.js",
"author": "Maik Ellerbrock <[email protected]> (https://github.com/ellerbrock)",
"license": "ISC",
Expand All @@ -11,7 +11,7 @@
"homepage": "https://github.com/ellerbrock/conventional-changelog-angular-emoji.git#readme",
"scripts": {
"coverage": "istanbul cover -x test.js _mocha -- -R spec --timeout 30000 && rm -rf ./coverage",
"lint": "jshint src/*.js --exclude node_modules && jscs src/*.js",
"lint": "jshint src/*.js --exclude node_modules",
"test": "mocha --timeout 30000 && npm run-script lint",
"pre-release": "npm run lint && npm test && npm run coverage",
"release": "standard-version",
Expand Down Expand Up @@ -40,7 +40,6 @@
"git-dummy-commit": "^1.3.0",
"greenkeeper-postpublish": "1.1.0",
"istanbul": "^0.4.5",
"jscs": "^3.0.7",
"jshint": "^2.9.4",
"mocha": "*",
"shelljs": "^0.7.5",
Expand Down
16 changes: 10 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Build Status](https://travis-ci.org/ellerbrock/conventional-changelog-angular-emoji.svg?branch=master)](https://travis-ci.org/ellerbrock/conventional-changelog-angular-emoji) [![Javascript](https://badges.frapsoft.com/javascript/code/javascript.svg?v=100)](https://github.com/ellerbrock/javascript-badges/) [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=102)](https://github.com/ellerbrock/open-source-badges/) [![Gitter Chat](https://badges.gitter.im/frapsoft/frapsoft.svg)](https://gitter.im/frapsoft/frapsoft/)

## [Angular Git Commit Guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#type) with Emojis
## [Angular Git Commit Guidelines](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#type) with Emojis

*This is a fork from [conventional-changelog-angular](https://github.com/conventional-changelog/conventional-changelog-angular).*

Expand All @@ -18,16 +18,20 @@

### Update Information:

Update commit convention from [Angular 1x](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#type) to [Angular 2x](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type).
Use emojis in commit messages will now generate the changelog correctly.

- added: build, ci
- added: emoji support

Pass additional configuration to the writer.

- added: userUrlFormat, issueUrlFormat, commitUrlFormat, compareUrlFormat

### Preview:

feat(xxx): :sparkles: Features your commit message

fix(xxx): :bug: Bug Fixes

docs(xxx): :book: Documentation

style: :gem: Styles
Expand All @@ -41,7 +45,7 @@ test(xxx): :rotating_light: Tests
build(xxx): :construction_worker: Build

ci(xxx): :computer: Continuous Integration

chore(xxx): :ticket: Chores

revert(xxx): :back: Reverts
Expand Down
30 changes: 30 additions & 0 deletions src/conventional-recommended-bump.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use strict'

const { parserOpts } = require(`./index`)

module.exports = {
parserOpts,

whatBump: (commits) => {
let level = 2
let breakings = 0
let features = 0

commits.forEach(commit => {
if (commit.notes.length > 0) {
breakings += commit.notes.length
level = 0
} else if (commit.type === `feat`) {
features += 1
if (level === 2) {
level = 1
}
}
})

return {
level: level,
reason: breakings === 1 ? `There is ${breakings} BREAKING CHANGE and ${features} features` : `There are ${breakings} BREAKING CHANGES and ${features} features`
}
}
}
Loading