Skip to content

Commit daa599d

Browse files
authored
chore(repo): Add yarn commit for structured commit messages (#4660)
**Summary** Adds commitizen and adopts the cz-conventional-changelog adapter for commit logs. Will be followed up by commit message linters and automatic version number bumping in CI builds. **Test plan** Run `yarn install` and then `yarn commit -a` after making some changes to test the new awesomeness. This commit message was also generated via that command.
1 parent 850e71f commit daa599d

File tree

3 files changed

+238
-13
lines changed

3 files changed

+238
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<a href="https://circleci.com/gh/yarnpkg/yarn"><img alt="Circle Status" src="https://circleci.com/gh/yarnpkg/yarn.svg?style=shield&circle-token=5f0a78473b0f440afb218bf2b82323cc6b3cb43f"></a>
1414
<a href="https://ci.appveyor.com/project/kittens/yarn/branch/master"><img alt="Appveyor Status" src="https://ci.appveyor.com/api/projects/status/0xdv8chwe2kmk463?svg=true"></a>
1515
<a href="https://discord.gg/yarnpkg"><img alt="Discord Chat" src="https://img.shields.io/discord/226791405589233664.svg"></a>
16+
<a href="http://commitizen.github.io/cz-cli/"><img alt="Commitizen friendly" src="https://img.shields.io/badge/commitizen-friendly-brightgreen.svg"></a>
1617
</p>
17-
1818
---
1919

2020
**Fast:** Yarn caches every package it has downloaded, so it never needs to download the same package again. It also does almost everything concurrently to maximize resource utilization. This means even faster installs.

package.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
"babel-preset-node5": "^10.2.0",
6262
"babel-preset-stage-0": "^6.0.0",
6363
"babylon": "^6.5.0",
64+
"commitizen": "^2.9.6",
65+
"cz-conventional-changelog": "^2.0.0",
6466
"eslint": "^4.3.0",
6567
"eslint-config-fb-strict": "^20.1.0-delta.3",
6668
"eslint-plugin-babel": "^4.0.0",
@@ -111,16 +113,26 @@
111113
"test-ci": "yarn build && yarn test-only",
112114
"test-only": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --verbose",
113115
"test-coverage": "node --max_old_space_size=4096 node_modules/jest/bin/jest.js --coverage --verbose",
114-
"watch": "gulp watch"
116+
"watch": "gulp watch",
117+
"commit": "git-cz"
115118
},
116119
"jest": {
117-
"collectCoverageFrom": ["src/**/*.js"],
120+
"collectCoverageFrom": [
121+
"src/**/*.js"
122+
],
118123
"testEnvironment": "node",
119-
"modulePathIgnorePatterns": ["__tests__/fixtures/"],
124+
"modulePathIgnorePatterns": [
125+
"__tests__/fixtures/"
126+
],
120127
"testPathIgnorePatterns": [
121128
"__tests__/(fixtures|__mocks__)/",
122129
"updates/",
123130
"/_(temp|mock|install|init|helpers).js$"
124131
]
132+
},
133+
"config": {
134+
"commitizen": {
135+
"path": "./node_modules/cz-conventional-changelog"
136+
}
125137
}
126138
}

0 commit comments

Comments
 (0)