chore(CHANGELOG): introduce perf() section for performance-related commits

Instead of using fix() or chore() when labelling a commit which improves
speed or performance use perf(). Perf commits will be listed in the
CHANGELOG under "Performance Improvements".

For example:
perf($animate): cache all getComputedStyle operations to reduce additional reflows
This commit is contained in:
Matias Niemelä 2013-12-06 12:54:20 -05:00
parent b4d44e1298
commit a14266e464
3 changed files with 5 additions and 1 deletions

View file

@ -198,6 +198,7 @@ Must be one of the following:
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing * **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
semi-colons, etc) semi-colons, etc)
* **refactor**: A code change that neither fixes a bug or adds a feature * **refactor**: A code change that neither fixes a bug or adds a feature
* **perf**: A code change that improves performance
* **test**: Adding missing tests * **test**: Adding missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation * **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
generation generation

View file

@ -142,6 +142,7 @@ var writeChangelog = function(stream, commits, version) {
var sections = { var sections = {
fix: {}, fix: {},
feat: {}, feat: {},
perf: {},
breaks: {} breaks: {}
}; };
@ -169,6 +170,7 @@ var writeChangelog = function(stream, commits, version) {
stream.write(util.format(HEADER_TPL, version, version, currentDate())); stream.write(util.format(HEADER_TPL, version, version, currentDate()));
printSection(stream, 'Bug Fixes', sections.fix); printSection(stream, 'Bug Fixes', sections.fix);
printSection(stream, 'Features', sections.feat); printSection(stream, 'Features', sections.feat);
printSection(stream, 'Performance Improvements', sections.perf);
printSection(stream, 'Breaking Changes', sections.breaks, false); printSection(stream, 'Breaking Changes', sections.breaks, false);
} }
@ -186,7 +188,7 @@ var getPreviousTag = function() {
var generate = function(version, file) { var generate = function(version, file) {
getPreviousTag().then(function(tag) { getPreviousTag().then(function(tag) {
console.log('Reading git log since', tag); console.log('Reading git log since', tag);
readGitLog('^fix|^feat|BREAKING', tag).then(function(commits) { readGitLog('^fix|^feat|^perf|BREAKING', tag).then(function(commits) {
console.log('Parsed', commits.length, 'commits'); console.log('Parsed', commits.length, 'commits');
console.log('Generating changelog to', file || 'stdout', '(', version, ')'); console.log('Generating changelog to', file || 'stdout', '(', version, ')');
writeChangelog(file ? fs.createWriteStream(file) : process.stdout, commits, version); writeChangelog(file ? fs.createWriteStream(file) : process.stdout, commits, version);

View file

@ -21,6 +21,7 @@ var TYPES = {
docs: true, docs: true,
style: true, style: true,
refactor: true, refactor: true,
perf: true,
test: true, test: true,
chore: true, chore: true,
revert: true revert: true