conventional-changelog-ember
Advanced tools
Comparing version 0.2.10 to 0.3.0
@@ -6,2 +6,13 @@ # Change Log | ||
<a name="0.3.0"></a> | ||
# [0.3.0](https://github.com/stevemao/conventional-changelog-ember/compare/conventional-changelog-ember@0.2.10...conventional-changelog-ember@0.3.0) (2017-12-18) | ||
### Features | ||
* **preset:** add recommended-bump opts into presets ([60815b5](https://github.com/stevemao/conventional-changelog-ember/commit/60815b5)), closes [#241](https://github.com/stevemao/conventional-changelog-ember/issues/241) | ||
<a name="0.2.10"></a> | ||
@@ -8,0 +19,0 @@ ## [0.2.10](https://github.com/stevemao/conventional-changelog-ember/compare/conventional-changelog-ember@0.2.9...conventional-changelog-ember@0.2.10) (2017-12-08) |
75
index.js
'use strict'; | ||
var Q = require('q'); | ||
var readFile = Q.denodeify(require('fs').readFile); | ||
var resolve = require('path').resolve; | ||
function presetOpts(cb) { | ||
var parserOpts = { | ||
mergePattern: /^Merge pull request #(.*) from .*$/, | ||
mergeCorrespondence: ['pr'], | ||
headerPattern: /^\[(.*) (.*)] (.*)$/, | ||
headerCorrespondence: [ | ||
'tag', | ||
'taggedAs', | ||
'message' | ||
] | ||
}; | ||
const Q = require(`q`); | ||
const conventionalChangelog = require(`./conventional-changelog`); | ||
const parserOpts = require(`./parser-opts`); | ||
const recommendedBumpOpts = require(`./conventional-recommended-bump`); | ||
const writerOpts = require(`./writer-opts`); | ||
var writerOpts = { | ||
transform: function(commit) { | ||
if (!commit.pr) { | ||
return; | ||
} | ||
module.exports = presetOpts; | ||
if (commit.tag === 'BUGFIX') { | ||
commit.tag = 'Bug Fixes'; | ||
} else if (commit.tag === 'CLEANUP') { | ||
commit.tag = 'Cleanup'; | ||
} else if (commit.tag === 'FEATURE') { | ||
commit.tag = 'Features'; | ||
} else if (commit.tag === 'DOC') { | ||
commit.tag = 'Documentation'; | ||
} else if (commit.tag === 'SECURITY') { | ||
commit.tag = 'Security'; | ||
} else { | ||
return; | ||
} | ||
if (typeof commit.hash === 'string') { | ||
commit.hash = commit.hash.substring(0, 7); | ||
} | ||
return commit; | ||
}, | ||
groupBy: 'tag', | ||
commitGroupsSort: 'title', | ||
commitsSort: ['tag', 'taggedAs', 'message'] | ||
}; | ||
Q.all([ | ||
readFile(resolve(__dirname, 'templates/template.hbs'), 'utf-8'), | ||
readFile(resolve(__dirname, 'templates/header.hbs'), 'utf-8'), | ||
readFile(resolve(__dirname, 'templates/commit.hbs'), 'utf-8') | ||
]) | ||
.spread(function(template, header, commit) { | ||
writerOpts.mainTemplate = template; | ||
writerOpts.headerPartial = header; | ||
writerOpts.commitPartial = commit; | ||
cb(null, { | ||
gitRawCommitsOpts: { | ||
noMerges: null | ||
}, | ||
parserOpts: parserOpts, | ||
writerOpts: writerOpts | ||
}); | ||
}); | ||
function presetOpts(cb) { | ||
Q.all([conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts]) | ||
.spread((conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts) => { | ||
cb(null, {gitRawCommitsOpts: {noMerges: null}, conventionalChangelog, parserOpts, recommendedBumpOpts, writerOpts}); | ||
}); | ||
} | ||
module.exports = presetOpts; |
{ | ||
"name": "conventional-changelog-ember", | ||
"version": "0.2.10", | ||
"version": "0.3.0", | ||
"description": "conventional-changelog ember preset", | ||
@@ -23,3 +23,7 @@ "main": "index.js", | ||
"files": [ | ||
"conventional-changelog.js", | ||
"conventional-recommended-bump.js", | ||
"index.js", | ||
"parser-opts.js", | ||
"writer-opts.js", | ||
"templates" | ||
@@ -33,3 +37,3 @@ ], | ||
"chai": "^3.5.0", | ||
"conventional-changelog-core": "^1.9.4", | ||
"conventional-changelog-core": "^1.9.5", | ||
"git-dummy-commit": "^1.2.0", | ||
@@ -36,0 +40,0 @@ "istanbul": "^0.4.2", |
@@ -5,6 +5,53 @@ # [![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 Ember issue tracker.** | ||
See [convention](convention.md) | ||
## Ember Convention | ||
Please use an appropriate commit prefix. | ||
If your pull request fixes an issue specify it in the commit message. Some examples: | ||
``` | ||
[DOC beta] Update CONTRIBUTING.md for commit prefixes | ||
[FEATURE query-params-new] Message | ||
[BUGFIX beta] Message | ||
[SECURITY CVE-111-1111] Message | ||
``` | ||
## Commit Tagging | ||
All commits should be tagged. Tags are denoted by square brackets (`[]`) and come at the start of the commit message. | ||
`Tag` should not be confused with git tag. | ||
`Message` should not be confused with git commit message. | ||
### Bug Fixes | ||
In general bug fixes are pulled into the beta branch. As such, the prefix is: `[BUGFIX beta]`. If a bug fix is a serious regression that requires a new patch release, `[BUGFIX release]` can be used instead. | ||
For bugs related to canary features, follow the prefixing rules for features. | ||
### Cleanup | ||
Cleanup commits are for removing deprecated functionality and should be tagged | ||
as `[CLEANUP beta]`. | ||
### Features | ||
All additions and fixes for features in canary should be tagged as `[FEATURE name]` where name is the same as the flag for that feature. | ||
### Documentation | ||
Documentation commits are tagged as `[DOC channel]` where channel is `canary`, | ||
`beta`, or `release`. If no release is provided `canary` is assumed. The channel should be the most stable release that this documentation change applies to. | ||
### Security | ||
Security commits will be tagged as `[SECURITY cve]`. Please do not submit security related PRs without coordinating with the security team. See the [Security Policy](http://emberjs.com/security/) for more information. | ||
### Other | ||
In general almost all commits should fall into one of these categories. In the cases where they don't please submit your PR untagged. An Ember contributor will let you know if tagging is required. | ||
Based on https://github.com/emberjs/ember.js/blob/master/CONTRIBUTING.md | ||
[npm-image]: https://badge.fury.io/js/conventional-changelog-ember.svg | ||
@@ -11,0 +58,0 @@ [npm-url]: https://npmjs.org/package/conventional-changelog-ember |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
10086
11
111
64
11