• Stars
    star
    1,661
  • Rank 28,132 (Top 0.6 %)
  • Language
    JavaScript
  • Created over 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Semantic Git commits

Commitizen friendly

git-cz

image

Without installation

npx git-cz
# or
npx git-cz -e

Install globally standalone

npm install -g git-cz
git-cz
# or
git-cz -e

Install locally with Commitizen

npm install -g commitizen
npm install --save-dev git-cz

package.json:

{
  "config": {
    "commitizen": {
      "path": "git-cz"
    }
  }
}

run:

git cz

Install globally with Commitizen

npm install -g commitizen git-cz
commitizen init git-cz --save-dev --save-exact

run:

git cz

Custom config

You can provide a custom configuration in a changelog.config.js file in your repo, or in any parent folder. git-cz will search for the closest config file. Below is default config:

module.exports = {
  disableEmoji: false,
  format: '{type}{scope}: {emoji}{subject}',
  list: ['test', 'feat', 'fix', 'chore', 'docs', 'refactor', 'style', 'ci', 'perf'],
  maxMessageLength: 64,
  minMessageLength: 3,
  questions: ['type', 'scope', 'subject', 'body', 'breaking', 'issues', 'lerna'],
  scopes: [],
  types: {
    chore: {
      description: 'Build process or auxiliary tool changes',
      emoji: '🤖',
      value: 'chore'
    },
    ci: {
      description: 'CI related changes',
      emoji: '🎡',
      value: 'ci'
    },
    docs: {
      description: 'Documentation only changes',
      emoji: '✏️',
      value: 'docs'
    },
    feat: {
      description: 'A new feature',
      emoji: '🎸',
      value: 'feat'
    },
    fix: {
      description: 'A bug fix',
      emoji: '🐛',
      value: 'fix'
    },
    perf: {
      description: 'A code change that improves performance',
      emoji: '⚡️',
      value: 'perf'
    },
    refactor: {
      description: 'A code change that neither fixes a bug or adds a feature',
      emoji: '💡',
      value: 'refactor'
    },
    release: {
      description: 'Create a release commit',
      emoji: '🏹',
      value: 'release'
    },
    style: {
      description: 'Markup, white-space, formatting, missing semi-colons...',
      emoji: '💄',
      value: 'style'
    },
    test: {
      description: 'Adding missing tests',
      emoji: '💍',
      value: 'test'
    },
    messages: {
      type: 'Select the type of change that you\'re committing:',
      customScope: 'Select the scope this component affects:',
      subject: 'Write a short, imperative mood description of the change:\n',
      body: 'Provide a longer description of the change:\n ',
      breaking: 'List any breaking changes:\n',
      footer: 'Issues this commit closes, e.g #123:',
      confirmCommit: 'The packages that this commit has affected\n',
    },
  }
};

Non-interactive mode

Using --non-interactive flag you can run git-cz non-interactive mode.

For example:

git-cz --non-interactive --type=feat --subject="add onClick prop to component"

CLI parameters:

  • --type
  • --subject
  • --scope
  • --body
  • --breaking
  • --issues
  • --lerna

Disable Emoji

Using --disable-emoji flag will disable emoji.

For example:

git-cz --disable-emoji

Commit message format

  • A commit message consists of a header, body and footer.
  • The header has a type and a subject:
<type>[(<scope>)]: <emoji> <subject>
[BLANK LINE]
[body]
[BLANK LINE]
[breaking changes]
[BLANK LINE]
[footer]

The header is the only mandatory part of the commit message.

The first line (type + subject) is limited to 50 characters [enforced]

Any other line should be limited to 72 character [automatic wrapping]

This allows the message to be easier to read on GitHub as well as in various git tools.

Format

By default the subject format is: {type}{scope}: {subject}

Configuring the format field in .git-cz.json you can customize your own:

  • {type}{scope}: {emoji}{subject}
  • {emoji}{scope} {subject}

Type

Must be one of the following:

  • test — Adding missing tests
  • feat — A new feature
  • fix — A bug fix
  • chore — Build process or auxiliary tool changes
  • docs — Documentation only changes
  • refactor — A code change that neither fixes a bug or adds a feature
  • style — Markup, white-space, formatting, missing semi-colons...
  • ci — CI related changes
  • perf — A code change that improves performance

Subject

The subject contains succinct description of the change:

  • Use the imperative, present tense: "change" not "changed" nor "changes"
  • No dot (.) at the end.

Body

Just as in the subject, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.

Affects [only on lerna environments]

Select the packages the commit affected.

Breaking Changes

Breaking Changes must start with the words BREAKING CHANGE: .

Footer

The footer is the place to reference any tasks related to this commit.

Why this Fork?

npm i -g git-cz
added 1 package in 0.612s

Installs in 0.6s vs 31.1s.

npm i -g mol-conventional-changelog
added 345 packages in 31.076s

More Repositories

1

react-use

React Hooks — 👍
TypeScript
37,122
star
2

libreact

Collection of useful React components
TypeScript
2,623
star
3

memfs

JavaScript file system utilities
TypeScript
1,746
star
4

awesome-styleguides

A curated list of UI styleguides — 😎💄
1,193
star
5

use-media

useMedia React hook to track CSS media query state
TypeScript
515
star
6

json-joy

json-joy — JSON CRDT, JSON CRDT Patch, JSON Patch, JSON Predicate, JSON Patch Extended, JSON Patch+ OT, MessagePack codec, JSON-Rx, JSON-RPC 2.0, JSON Pointer, Reactive-RPC, random JSON generator, JSON Brand, JSON Expression, JSON Size, JSON Type, JSON Schema, JSON deep equality, JSON Binary, JSON clone / msgpack.org[JavaScript/TypeScript/NodeJS]
TypeScript
469
star
7

nano-css

Distilled CSS-in-JS for gourmet developers
JavaScript
412
star
8

freestyler

5th generation CSS-in-JS library
TypeScript
269
star
9

react-embed

Embed 3rd party widgets
TypeScript
242
star
10

unionfs

Use multiple fs modules at once
TypeScript
206
star
11

ass-js

Assembler.js — X86_64 and Ethereum
TypeScript
129
star
12

fs-monkey

Monkey-patches for file system related things
JavaScript
110
star
13

ts-easing

Easing functions in TypeScript
TypeScript
69
star
14

linkfs

Rewrite file system `fs` paths
TypeScript
52
star
15

awesome-css-animations

A curated list of CSS animation resources
48
star
16

jsx-plus-plus

Better JSX for busy developers
JavaScript
48
star
17

jskernel

Node.js exo-kernel dream - proposal
C
46
star
18

thingies

Kitchen sink of helpful utilities.
TypeScript
43
star
19

use-t

🗺 Translations with React hooks
TypeScript
42
star
20

libsys

POSIX/Linux/Mac system calls and low level operations for Node.js
C++
40
star
21

spyfs

Node filesystem spies and mocks
JavaScript
38
star
22

bamboo

Bamboo - Node.js clone in pure JavaScript
C
38
star
23

react-universal-interface

Universal Component Interface - FaCC, render prop, component prop, prop injection, HOC, decorator
TypeScript
38
star
24

memfs-webpack

Example of how to use memfs with webpack
JavaScript
37
star
25

libjs

libc implemented in JavaScript
TypeScript
35
star
26

react-use-media

react-media hook
TypeScript
27
star
27

md-mdast

Fast tiny Markdown to MDAST parser
TypeScript
21
star
28

react-micro-lifecycles

Life-cycles for React DOM elements
JavaScript
18
star
29

flexible-input

Autosizing <input> and <textarea> elements, which expand and shrink to fit contents
TypeScript
17
star
30

awesome-ci-recipes

Useful scripts and tricks for continuous integration
17
star
31

rx-use

RxJS DOM sensors
TypeScript
16
star
32

three-ducks

Distilled Redux for gourmet developers
JavaScript
15
star
33

fastest-json-copy

Fastest JSON deep clone implementation
JavaScript
14
star
34

react-simple-player

Lightweight React audio player component
TypeScript
14
star
35

pure-arr

Immutable pure Array.prototype functions
TypeScript
13
star
36

cross-ci

Travis, CircleCI, et. al. env vars normalized
JavaScript
13
star
37

jssh

JavaScript Shell
JavaScript
12
star
38

sonic-forest

High performance tree and sorted map implementations for JavaScript in TypeScript
TypeScript
12
star
39

iconista

One NPM install, one React component — 💯+ icons
TypeScript
11
star
40

virtual-css

💄 Virtual CSS for virtual DOM libraries
TypeScript
11
star
41

set-harmonic-interval

one timer for all setInterval() with identical ms delay
TypeScript
11
star
42

hyperdyperid

Very fast base-36 ID generator and random integer generator for Node.js
JavaScript
11
star
43

content-ranking

Formulas for content ranking
TypeScript
11
star
44

entask

Micro- and Macro-tasks for Node and browsers
JavaScript
10
star
45

clickable-json

Interactive JSON and JSON CRDT editing and viewing React components
TypeScript
10
star
46

json-schema-serializer

Fast JSON.stringify with schema
TypeScript
10
star
47

modern-pick

Template string accessors to the selector rescue
TypeScript
10
star
48

stripe-web

Typesafe Stripe for browser
TypeScript
10
star
49

fast-shallow-equal

Very fast object shallow equal comparator
JavaScript
9
star
50

structured-interviews

Templates for structured interviews
JavaScript
9
star
51

ts-brand-json

TypeScript type for JSON-in-a-string
JavaScript
9
star
52

react-passport

React context for client-passport
TypeScript
8
star
53

state-containers

Simple state containers for your services and React apps
TypeScript
8
star
54

igit

Interactive CLI for semantic Git commit messages.
Go
8
star
55

use-unmount

React hook which returns unmount observable
JavaScript
6
star
56

tree-dump

Simple console tree printing helpers
TypeScript
6
star
57

proofread

Proofread your Redux sagas.
JavaScript
6
star
58

crunchme

Pack your .js in a self-extracting compressed file
JavaScript
6
star
59

nodefs

THIS IS OLD, USE streamich/memfs INSTEAD
JavaScript
6
star
60

client-passport

Authentication for single-page apps
TypeScript
5
star
61

fasttrack

TypeScript boilerplate with commands
Shell
5
star
62

json-crdt-traces

JSON CRDT document sample change traces in JSON CRDT Patch format, for testing and benchmarking
TypeScript
5
star
63

emoji-json-list

List of emojis, their aliases and unicode values
JavaScript
5
star
64

css-light

Light-weight module to write CSS in JavaScript
JavaScript
5
star
65

puppet-master

Executes Node.js function in a Chrome browser and returns result
JavaScript
5
star
66

code-colors

Code syntax highlighting for the web
TypeScript
5
star
67

collaborative-input

Collaboration-enabled HTML text editing elements: <input>, <textarea>, and [contenteditable]
TypeScript
5
star
68

code-colors-react

Code syntax highlighting React component
TypeScript
4
star
69

current-tick

Enqueue function to execute later within current event loop cycle
TypeScript
4
star
70

mdast-flat

Flat version of MDAST format
TypeScript
4
star
71

elf

ELF structs
TypeScript
4
star
72

nmsg-rpc

RPC event based router for JavaScript bi-directional messaging
JavaScript
4
star
73

redis-joy

Fast and mean Redis 7+ cluster client written in TypeScript which supports RESP3 protocol
TypeScript
4
star
74

nano-css-extract-demo

Demo of nano-css extract addon - extracts CSS into an external style sheet
JavaScript
3
star
75

fs-zoo

File system abstractions and implementations
TypeScript
3
star
76

enwire

🐙 Rewire env vars
JavaScript
3
star
77

fslib

fs.js in pure JavaScript
TypeScript
3
star
78

libaio

asynchronous system call wrapper
JavaScript
3
star
79

typebase

C/C++ structs in Node.js
TypeScript
3
star
80

jml-h

JsonML + Virtual Hypertext generator (h)
JavaScript
3
star
81

node-multicore

Delightful multicore programming in Node.js
TypeScript
3
star
82

v4-uuid

Simple UUID for browser without crypto dependency
TypeScript
2
star
83

collaborative-quill

JSON CRDT bindings for Quill rich-text editor, with React suppport
TypeScript
2
star
84

uint8-to-b64

Isomorphic Uint8Array conversion to Base64 string and back for browser and Node.js
JavaScript
2
star
85

socket.io-reqres

Request/response for socket.io
JavaScript
2
star
86

portable-example

portable.js web app tutorial
JavaScript
2
star
87

cpuid

cpuid x86 in JavaScript
JavaScript
2
star
88

redux-oop

TypeScript
2
star
89

json-joy-php

JSON Pointer, JSON Patch and JSON Patch OT for PHP
PHP
2
star
90

xml-light

Simple XML/HTML in JavaScript
JavaScript
2
star
91

nano-theme

CSS theming for web apps
TypeScript
2
star
92

collaborative-editor

JSON CRDT "str" node binding to any generic plain text editor UI.
TypeScript
2
star
93

config-galore

Collection of configs for Node.js and React projects
1
star
94

md-jml

Markdown to JsonML parser in JavaScript
TypeScript
1
star
95

ci-scripts

Travis and CircleCI scripts
JavaScript
1
star
96

dom-copy

Copy to Clipboard
HTML
1
star
97

static-buffer

Execute machine code in your Buffer
JavaScript
1
star
98

p4-css

CSS for P4
TypeScript
1
star
99

utf8-bar

UTF8 % bar for terminal
JavaScript
1
star
100

logich

A light-weight extensible logging system written in Node.js way.
JavaScript
1
star