├── .gitignore ├── .npmignore ├── .travis.yml ├── README.md ├── index.json ├── index.spec.js ├── index.spec.json ├── package-lock.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/node 3 | 4 | ### Node ### 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | 10 | # Runtime data 11 | pids 12 | *.pid 13 | *.seed 14 | *.pid.lock 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # nyc test coverage 23 | .nyc_output 24 | 25 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 26 | .grunt 27 | 28 | # node-waf configuration 29 | .lock-wscript 30 | 31 | # Compiled binary addons (http://nodejs.org/api/addons.html) 32 | build/Release 33 | 34 | # Dependency directories 35 | node_modules 36 | jspm_packages 37 | 38 | # Optional npm cache directory 39 | .npm 40 | 41 | # Optional REPL history 42 | .node_repl_history 43 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .travis.yml 2 | 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # conventional-commit-types 2 | 3 | [![npm](https://img.shields.io/npm/v/conventional-commit-types.svg?maxAge=2592000)](https://www.npmjs.com/package/conventional-commit-types) 4 | [![Build Status](https://img.shields.io/travis/commitizen/conventional-commit-types.svg?maxAge=2592000)](https://travis-ci.org/commitizen/conventional-commit-types) 5 | 6 | List of conventional commit types. 7 | 8 | ## Spec 9 | 10 | Exports an object with a `types` key whose value is an object whose keys are type names and whose values are objects with key-value pairs such as `description` as string, optional `title` as string, etc. See [index.json](index.json). Any alternatives should follow the same spec. 11 | 12 | ## Etc. 13 | 14 | Used by [commitizen/cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog) for [commitizen/cz-cli](https://github.com/commitizen/cz-cli). 15 | 16 | Can be used with [kentcdodds/validate-commit-msg](https://github.com/kentcdodds/validate-commit-msg#types). 17 | 18 | Commit types originally from: 19 | * [Angular Git Commit Message Conventions](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#type) 20 | * [commitizen/cz-conventional-changelog](https://github.com/commitizen/cz-conventional-changelog) 21 | 22 | Created for [AndersDJohnson/conventional-commit-types-cli](https://github.com/AndersDJohnson/conventional-commit-types-cli). 23 | -------------------------------------------------------------------------------- /index.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./index.spec.json", 3 | "types": { 4 | "feat": { 5 | "description": "A new feature", 6 | "title": "Features" 7 | }, 8 | "fix": { 9 | "description": "A bug fix", 10 | "title": "Bug Fixes" 11 | }, 12 | "docs": { 13 | "description": "Documentation only changes", 14 | "title": "Documentation" 15 | }, 16 | "style": { 17 | "description": "Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", 18 | "title": "Styles" 19 | }, 20 | "refactor": { 21 | "description": "A code change that neither fixes a bug nor adds a feature", 22 | "title": "Code Refactoring" 23 | }, 24 | "perf": { 25 | "description": "A code change that improves performance", 26 | "title": "Performance Improvements" 27 | }, 28 | "test": { 29 | "description": "Adding missing tests or correcting existing tests", 30 | "title": "Tests" 31 | }, 32 | "build": { 33 | "description": "Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)", 34 | "title": "Builds" 35 | }, 36 | "ci": { 37 | "description": "Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)", 38 | "title": "Continuous Integrations" 39 | }, 40 | "chore": { 41 | "description": "Other changes that don't modify src or test files", 42 | "title": "Chores" 43 | }, 44 | "revert": { 45 | "description": "Reverts a previous commit", 46 | "title": "Reverts" 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /index.spec.js: -------------------------------------------------------------------------------- 1 | var jsonschema = require("jsonschema"); 2 | var fs = require("fs"); 3 | 4 | var data = fs.readFileSync("./index.json"); 5 | var schema = fs.readFileSync("./index.spec.json"); 6 | 7 | jsonschema.validate(JSON.parse(data), JSON.parse(schema), { 8 | throwAll: true, 9 | }); 10 | -------------------------------------------------------------------------------- /index.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "title": "Conventional Commit Types Data Schema", 4 | "additionalProperties": true, 5 | "definitions": { 6 | "commitType": { 7 | "type": "object", 8 | "additionalProperties": false, 9 | "properties": { 10 | "description": { 11 | "type": "string" 12 | }, 13 | "title": { 14 | "type": "string" 15 | } 16 | }, 17 | "required": ["description", "title"] 18 | } 19 | }, 20 | "properties": { 21 | "types": { 22 | "type": "object", 23 | "additionalProperties": { "$ref": "#/definitions/commitType" } 24 | } 25 | }, 26 | "required": ["types"] 27 | } 28 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "conventional-commit-types", 3 | "version": "3.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "version": "3.0.0", 9 | "license": "ISC", 10 | "devDependencies": { 11 | "jsonschema": "^1.4.0" 12 | } 13 | }, 14 | "node_modules/jsonschema": { 15 | "version": "1.4.0", 16 | "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", 17 | "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", 18 | "dev": true, 19 | "engines": { 20 | "node": "*" 21 | } 22 | } 23 | }, 24 | "dependencies": { 25 | "jsonschema": { 26 | "version": "1.4.0", 27 | "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.4.0.tgz", 28 | "integrity": "sha512-/YgW6pRMr6M7C+4o8kS+B/2myEpHCrxO4PEWnqJNBFMjn7EWXqlQ4tGwL6xTHeRplwuZmcAncdvfOad1nT2yMw==", 29 | "dev": true 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "conventional-commit-types", 3 | "version": "3.0.0", 4 | "description": "List of conventional commit types.", 5 | "main": "index.json", 6 | "scripts": { 7 | "test": "node index.spec" 8 | }, 9 | "keywords": [], 10 | "author": "Anders D. Johnson", 11 | "license": "ISC", 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/commitizen/conventional-commit-types.git" 15 | }, 16 | "devDependencies": { 17 | "jsonschema": "^1.4.0" 18 | } 19 | } 20 | --------------------------------------------------------------------------------