Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit a14266e

Browse files
committed
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
1 parent b4d44e1 commit a14266e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CONTRIBUTING.md

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

changelog.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ var writeChangelog = function(stream, commits, version) {
142142
var sections = {
143143
fix: {},
144144
feat: {},
145+
perf: {},
145146
breaks: {}
146147
};
147148

@@ -169,6 +170,7 @@ var writeChangelog = function(stream, commits, version) {
169170
stream.write(util.format(HEADER_TPL, version, version, currentDate()));
170171
printSection(stream, 'Bug Fixes', sections.fix);
171172
printSection(stream, 'Features', sections.feat);
173+
printSection(stream, 'Performance Improvements', sections.perf);
172174
printSection(stream, 'Breaking Changes', sections.breaks, false);
173175
}
174176

@@ -186,7 +188,7 @@ var getPreviousTag = function() {
186188
var generate = function(version, file) {
187189
getPreviousTag().then(function(tag) {
188190
console.log('Reading git log since', tag);
189-
readGitLog('^fix|^feat|BREAKING', tag).then(function(commits) {
191+
readGitLog('^fix|^feat|^perf|BREAKING', tag).then(function(commits) {
190192
console.log('Parsed', commits.length, 'commits');
191193
console.log('Generating changelog to', file || 'stdout', '(', version, ')');
192194
writeChangelog(file ? fs.createWriteStream(file) : process.stdout, commits, version);

validate-commit-msg.js

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ var TYPES = {
2121
docs: true,
2222
style: true,
2323
refactor: true,
24+
perf: true,
2425
test: true,
2526
chore: true,
2627
revert: true

0 commit comments

Comments
 (0)