{"name":"commitizen","version":"4.2.4","description":"Git commit, but play nice with conventions.","main":"dist/index.js","scripts":{"check-coverage":"nyc check-coverage --statements 80 --branches 80 --functions 80 --lines 80 ","commit":"node bin/git-cz","build":"babel src --out-dir dist","build:watch":"babel --watch src --out-dir dist","prepare":"not-in-install && npm run build || true","report-coverage":"nyc report --reporter=lcov | codecov","write-coverage":"nyc report --reporter=lcov --reporter=cobertura --reporter=html","semantic-release":"npx semantic-release","start":"npm run test:watch","test-actual":"mocha --reporter=mocha-multi-reporters --reporter-options configFile=./test/mochareporters.json test/tests/index.js","test":"nyc --require @babel/register npm run test-actual","test:watch":"nodemon -q --ignore test/.tmp/ --ignore test/artifacts/ --ignore coverage/ --exec \"npm run test\" --"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"},"ghooks":{"pre-commit":"npm run test && npm run check-coverage"}},"homepage":"https://github.com/commitizen/cz-cli","repository":{"type":"git","url":"git+https://github.com/commitizen/cz-cli.git"},"keywords":["commit","pretty","format","conventional changelog","commitizen"],"bugs":{"url":"https://github.com/commitizen/cz-cli/issues"},"bin":{"cz":"bin/git-cz","git-cz":"bin/git-cz","commitizen":"bin/commitizen"},"author":{"name":"Jim Cummins","email":"jimthedev@gmail.com","url":"https://github.com/jimthedev"},"license":"MIT","devDependencies":{"@babel/cli":"7.11.6","@babel/core":"7.11.6","@babel/plugin-proposal-object-rest-spread":"7.11.0","@babel/preset-env":"7.11.5","@babel/register":"7.11.5","@istanbuljs/nyc-config-babel":"2.1.1","axios":"0.19.0","babel-plugin-istanbul":"5.2.0","chai":"4.1.2","codecov.io":"0.1.6","conventional-changelog-conventionalcommits":"4.4.0","cz-conventional-changelog-default-export":"0.0.0-semantically-released.1","ghooks":"2.0.4","in-publish":"2.0.0","mocha":"6.2.0","mocha-junit-reporter":"1.18.0","mocha-multi-reporters":"1.1.7","nodemon":"1.19.1","nyc":"15.1.0","proxyquire":"2.1.0","semantic-release":"15.14.0","semver":"6.3.0","sinon":"6.3.4","uuid":"3.4.0"},"dependencies":{"cachedir":"2.2.0","cz-conventional-changelog":"3.2.0","dedent":"0.7.0","detect-indent":"6.0.0","find-node-modules":"^2.1.2","find-root":"1.1.0","fs-extra":"8.1.0","glob":"7.1.4","inquirer":"6.5.2","is-utf8":"^0.2.1","lodash":"^4.17.20","minimist":"1.2.5","strip-bom":"4.0.0","strip-json-comments":"3.0.1"},"nyc":{"extends":"@istanbuljs/nyc-config-babel","exclude":["src/cli","test"]},"engineStrict":true,"engines":{"node":">= 10"},"collective":{"type":"opencollective","url":"https://opencollective.com/commitizen"},"release":{"preset":"conventionalcommits"},"gitHead":"e4349016fdef70a0d065c9079609466664e5b0f6","_id":"commitizen@4.2.4","_nodeVersion":"10.24.1","_npmVersion":"6.14.8","dist":{"shasum":"a3e5b36bd7575f6bf6e7aa19dbbf06b0d8f37165","size":65815,"noattachment":false,"tarball":"https://registry.npmmirror.com/commitizen/-/commitizen-4.2.4.tgz","integrity":"sha512-LlZChbDzg3Ir3O2S7jSo/cgWp5/QwylQVr59K4xayVq8S4/RdKzSyJkghAiZZHfhh5t4pxunUoyeg0ml1q/7aw=="},"_npmUser":{"name":"commitizen-bot","email":"jimthedev+commitizen-bot@gmail.com"},"directories":{},"maintainers":[{"name":"commitizen-bot","email":"jimthedev+commitizen-bot@gmail.com"},{"name":"jimthedev","email":"jimthedev@gmail.com"},{"name":"kentcdodds","email":"kent@doddsfamily.us"},{"name":"pgoodjohn","email":"info@pietrobongiovanni.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/commitizen_4.2.4_1620403017936_0.7121839484794328"},"_hasShrinkwrap":false,"publish_time":1620403018107,"_cnpm_publish_time":1620403018107,"_cnpmcore_publish_time":"2021-12-16T10:03:24.603Z","readme":"## Commitizen for contributors\n\nWhen you commit with Commitizen, you'll be prompted to fill out any required commit fields at commit time. No more waiting until later for a git commit hook to run and reject your commit (though [that](https://github.com/kentcdodds/validate-commit-msg) can still be helpful). No more digging through [CONTRIBUTING.md](CONTRIBUTING.md) to find what the preferred format is. Get instant feedback on your commit message formatting and be prompted for required fields.\n\n[![Backers on Open Collective](https://opencollective.com/commitizen/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/commitizen/sponsors/badge.svg)](#sponsors) [![travis.ci](https://img.shields.io/travis/commitizen/cz-cli.svg?style=flat-square&branch=master)](https://travis-ci.org/commitizen/cz-cli) [![Azure Build Status](https://dev.azure.com/commitizen/cz-cli/_apis/build/status/commitizen.cz-cli?branchName=master)](https://dev.azure.com/commitizen/cz-cli/_build/latest?definitionId=2)\n[![codecov.io](https://img.shields.io/codecov/c/github/commitizen/cz-cli.svg?style=flat-square)](https://codecov.io/github/commitizen/cz-cli?branch=master) [![npm monthly downloads](https://img.shields.io/npm/dm/commitizen.svg?style=flat-square)](https://www.npmjs.com/package/commitizen) [![current version](https://img.shields.io/npm/v/commitizen.svg?style=flat-square)](https://www.npmjs.com/package/commitizen) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) [![commitizen on stackoverflow](https://img.shields.io/badge/stackoverflow-community-orange.svg?longCache=true&style=flat-square&logo=stackoverflow)](https://stackoverflow.com/tags/commitizen)\n\n## Installing the command line tool\n\nCommitizen is currently tested against\nnode 10 and 12 although it may work in\nolder node. You should also have npm 6\nor greater.\n\nInstallation is as simple as running the following command (if you see `EACCES` error, reading [fixing npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions) may help):\n\n```sh\nnpm install -g commitizen\n```\n\n## Using the command line tool\n\n### If your repo is [Commitizen-friendly]:\n\nSimply use `git cz` or just `cz` instead of `git commit` when committing. You can also use `git-cz`, which is an alias for `cz`.\n\n_Alternatively_, if you are using **NPM 5.2+** you can [use `npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) instead of installing globally:\n\n```sh\nnpx cz\n```\n\nor as an npm script:\n\n```json\n ...\n \"scripts\": {\n \"commit\": \"cz\"\n }\n```\n\nWhen you're working in a Commitizen friendly repository, you'll be prompted to fill in any required fields and your commit messages will be formatted according to the standards defined by project maintainers.\n\n[![Add and commit with Commitizen](https://github.com/commitizen/cz-cli/raw/master/meta/screenshots/add-commit.png)](https://github.com/commitizen/cz-cli/raw/master/meta/screenshots/add-commit.png)\n\n### If your repo is NOT Commitizen friendly:\n\nIf you're **not** working in a Commitizen friendly repository, then `git cz` will work just the same as `git commit` but `npx cz` will use the [streamich/git-cz](https://github.com/streamich/git-cz) adapter. To fix this, you need to first [make your repo Commitizen-friendly](#making-your-repo-commitizen-friendly)\n\n## Making your repo Commitizen-friendly\n\nFor this example, we'll be setting up our repo to use [AngularJS's commit message convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines) also known as [conventional-changelog](https://github.com/ajoslin/conventional-changelog).\n\nFirst, install the Commitizen cli tools:\n\n```sh\nnpm install commitizen -g\n```\n\nNext, initialize your project to use the cz-conventional-changelog adapter by typing:\n\n```sh\ncommitizen init cz-conventional-changelog --save-dev --save-exact\n```\n\nOr if you are using Yarn:\n\n```sh\ncommitizen init cz-conventional-changelog --yarn --dev --exact\n```\n\nNote that if you want to force install over the top of an old adapter, you can apply the `--force` argument. For more information on this, just run `commitizen help`.\n\nThe above command does three things for you.\n\n1. Installs the cz-conventional-changelog adapter npm module\n2. Saves it to package.json's dependencies or devDependencies\n3. Adds the `config.commitizen` key to the root of your **package.json** as shown here:\n\n```json\n...\n \"config\": {\n \"commitizen\": {\n \"path\": \"cz-conventional-changelog\"\n }\n }\n```\n\nAlternatively, commitizen configs may be added to a .czrc file:\n\n```json\n{\n \"path\": \"cz-conventional-changelog\"\n}\n```\n\nThis just tells Commitizen which adapter we actually want our contributors to use when they try to commit to this repo.\n\n`commitizen.path` is resolved via [require.resolve](https://nodejs.org/api/globals.html#globals_require_resolve) and supports\n\n- npm modules\n- directories relative to `process.cwd()` containing an `index.js` file\n- file base names relative to `process.cwd()` with `js` extension\n- full relative file names\n- absolute paths.\n\nPlease note that in the previous version of Commitizen we used czConfig. **czConfig has been deprecated** and you should migrate to the new format before Commitizen 3.0.0.\n\n### Optional: Install and run Commitizen locally\n\nInstalling and running Commitizen locally allows you to make sure that developers are running the exact same version of Commitizen on every machine.\n\nInstall Commitizen with `npm install --save-dev commitizen`.\n\nOn **NPM 5.2+** you can [use `npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) to initialize the conventional changelog adapter:\n\n```\nnpx commitizen init cz-conventional-changelog --save-dev --save-exact\n```\n\nFor **previous versions of NPM (< 5.2)** you can execute `./node_modules/.bin/commitizen` or `./node_modules/.bin/cz` in order to actually use the commands.\n\nYou can then initialize the conventional changelog adapter using: `./node_modules/.bin/commitizen init cz-conventional-changelog --save-dev --save-exact`\n\nAnd you can then add some nice npm run scripts in your package.json pointing to the local version of commitizen:\n\n```json\n ...\n \"scripts\": {\n \"commit\": \"cz\"\n }\n```\n\nThis will be more convenient for your users because then if they want to do a commit, all they need to do is run `npm run commit` and they will get the prompts needed to start a commit!\n\n> **NOTE:** if you are using `precommit` hooks thanks to something like [`husky`](https://www.npmjs.com/package/husky), you will need to name your script some thing other than `\"commit\"`\n> (e.g. `\"cm\": \"cz\"`). The reason is because npm-scripts has a \"feature\" where it automatically runs scripts with the name _prexxx_ where _xxx_ is the name of another script. In essence,\n> npm and husky will run `\"precommit\"` scripts twice if you name the script `\"commit\"`, and the work around is to prevent the npm-triggered _precommit_ script.\n\n#### Optional: Running Commitizen on `git commit`\n\nThis example shows how to incorporate Commitizen into the existing `git commit` workflow by using git hooks and the `--hook` command-line option. This is useful for project maintainers\nwho wish to ensure the proper commit format is enforced on contributions from those unfamiliar with Commitizen.\n\nOnce either of these methods is implemented, users running `git commit` will be presented with an interactive Commitizen session that helps them write useful commit messages.\n\n> **NOTE:** This example assumes that the project has been set up to [use Commitizen locally](https://github.com/commitizen/cz-cli#optional-install-and-run-commitizen-locally).\n\n##### Traditional git hooks\n\nUpdate `.git/hooks/prepare-commit-msg` with the following code:\n\n```sh\n#!/bin/bash\nexec < /dev/tty && node_modules/.bin/cz --hook || true\n```\n\n##### Husky\n\nFor `husky` users, add the following configuration to the project's `package.json`:\n\n```json\n\"husky\": {\n \"hooks\": {\n \"prepare-commit-msg\": \"exec < /dev/tty && git cz --hook || true\",\n }\n}\n```\n\n> **Why `exec < /dev/tty`?** By default, git hooks are not interactive. This command allows the user to use their terminal to interact with Commitizen during the hook.\n\n#### Congratulations your repo is Commitizen-friendly. Time to flaunt it!\n\nAdd the Commitizen-friendly badge to your README using the following markdown:\n\n```\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n```\n\nYour badge will look like this:\n\n[![Commitizen-friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\nIt may also make sense to change your README.md or CONTRIBUTING.md to include or link to the Commitizen project so that your new contributors may learn more about installing and using Commitizen.\n\n## Conventional commit messages as a global utility\n\nInstall `commitizen` globally, if you have not already.\n\n```sh\nnpm install -g commitizen\n```\n\nInstall your preferred `commitizen` adapter globally, for example [`cz-conventional-changelog`](https://www.npmjs.com/package/cz-conventional-changelog)\n\n```sh\nnpm install -g cz-conventional-changelog\n```\n\nCreate a `.czrc` file in your `home` directory, with `path` referring to the preferred, globally installed, `commitizen` adapter\n\n```sh\necho '{ \"path\": \"cz-conventional-changelog\" }' > ~/.czrc\n```\n\nYou are all set! Now `cd`into any `git` repository and use `git cz` instead of `git commit` and you will find the `commitizen` prompt.\n\nProtip: You can use all the `git commit` `options` with `git cz`, for example: `git cz -a`.\n\n> If your repository is a [nodejs](https://nodejs.org/en/) project, making it [Commitizen-friendly] is super easy.\n\nIf your repository is already [Commitizen-friendly], the local `commitizen` adapter will be used, instead of globally installed one.\n\n## Commitizen for multi-repo projects\n\nAs a project maintainer of many projects, you may want to standardize on a single commit message\nformat for all of them. You can create your own node module which acts as front-end for commitizen.\n\n### 1. Create your own entry point script\n\n```js\n// my-cli.js\n\n#!/usr/bin/env node\n\"use strict\";\n\nconst path = require('path');\nconst bootstrap = require('commitizen/dist/cli/git-cz').bootstrap;\n\nbootstrap({\n cliPath: path.join(__dirname, '../../node_modules/commitizen'),\n // this is new\n config: {\n \"path\": \"cz-conventional-changelog\"\n }\n});\n```\n\n### 2. Add script to package.json\n\n```json\n// package.json\n\n{\n \"name\": \"company-commit\",\n \"bin\": \"./my-cli.js\",\n \"dependencies\": {\n \"commitizen\": \"^2.7.6\",\n \"cz-conventional-changelog\": \"^1.1.5\",\n }\n}\n```\n\n### 3. Publish it to npm and use it!\n\n```sh\nnpm install --save-dev company-commit\n\n./node_modules/.bin/company-commit\n```\n\n## Adapters\n\nWe know that every project and build process has different requirements so we've tried to keep Commitizen open for extension. You can do this by choosing from any of the pre-build adapters or even by building your own. Here are some of the great adapters available to you:\n\n- [cz-conventional-changelog](https://www.npmjs.com/package/cz-conventional-changelog)\n- [cz-conventional-changelog-for-jira](https://www.npmjs.com/package/@digitalroute/cz-conventional-changelog-for-jira)\n- [cz-conventional-changelog-with-jiraid-detection](https://www.npmjs.com/package/cz-conventional-changelog-with-jiraid-detection)\n- [cz-jira-smart-commit](https://www.npmjs.com/package/cz-jira-smart-commit)\n- [@endemolshinegroup/cz-jira-smart-commit](https://github.com/EndemolShineGroup/cz-jira-smart-commit)\n- [@endemolshinegroup/cz-github](https://github.com/EndemolShineGroup/cz-github)\n- [rb-conventional-changelog](https://www.npmjs.com/package/rb-conventional-changelog)\n- [cz-mapbox-changelog](https://www.npmjs.com/package/cz-mapbox-changelog)\n- [cz-customizable](https://github.com/leonardoanalista/cz-customizable)\n- [commitlint](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/prompt)\n- [vscode-commitizen](https://github.com/KnisterPeter/vscode-commitizen)\n- [cz-emoji](https://github.com/ngryman/cz-emoji)\n- [cz-adapter-eslint](https://www.npmjs.com/package/cz-adapter-eslint)\n- [commitiquette](https://github.com/martinmcwhorter/commitiquette)\n- [cz-format-extension](https://github.com/tyankatsu0105/cz-format-extension)\n\nTo create an adapter, just fork one of these great adapters and modify it to suit your needs. We pass you an instance of [Inquirer.js](https://github.com/SBoudrias/Inquirer.js/) but you can capture input using whatever means necessary. Just call the `commit` callback with a string and we'll be happy. Publish it to npm, and you'll be all set!\n\n## Retrying failed commits\n\nAs of version 2.7.1, you may attempt to retry the last commit using the `git cz --retry` command. This can be helpful when you have tests set up to run via a git precommit hook. In this scenario, you may have attempted a Commitizen commit, painstakingly filled out all of the commitizen fields, but your tests fail. In previous Commitizen versions, after fixing your tests, you would be forced to fill out all of the fields again. Enter the retry command. Commitizen will retry the last commit that you attempted in this repo without you needing to fill out the fields again.\n\nPlease note that the retry cache may be cleared when upgrading commitizen versions, upgrading adapters, or if you delete the `commitizen.json` file in your home or temp directory. Additionally, the commit cache uses the filesystem path of the repo, so if you move a repo or change its path, you will not be able to retry a commit. This is an edge case, but might be confusing if you have scenarios where you are moving folders that contain repos.\n\nIt is important to note that if you are running `cz` from a npm script (let's say it is called `commit`) you will need to do one of the following:\n\n- Pass `-- --retry` as an argument for your script. i.e: `npm run commit -- --retry`\n- Use [npx](https://www.npmjs.com/package/npx) to find and call `cz` executable directly. i.e: `npx cz --retry`\n\nNote that the last two options **do not** require you to pass `--` before the args but the first **does**.\n\n## Commitizen for project maintainers\n\nAs a project maintainer, making your repo Commitizen friendly allows you to select pre-existing commit message conventions or to create your own custom commit message convention. When a contributor to your repo uses Commitizen, they will be prompted for the correct fields at commit time.\n\n## Go further\n\nCommitizen is great on its own, but it shines when you use it with some other amazing open source tools. Kent C. Dodds shows you how to accomplish this in his Egghead.io series, [How to write an open source javascript library](https://egghead.io/series/how-to-write-an-open-source-javascript-library). Many of the concepts can be applied to non-javascript projects as well.\n\n## Philosophy\n\n### About Commitizen\n\nCommitizen is an open source project that helps contributors be good open source citizens. It accomplishes this by prompting them to follow commit message conventions at commit time. It also empowers project maintainers to create or use predefined commit message conventions in their repos to better communicate their expectations to potential contributors.\n\n### Commitizen or Commit Hooks\n\nBoth! Commitizen is not meant to be a replacement for git commit hooks. Rather, it is meant to work side-by-side with them to ensure a consistent and positive experience for your contributors. Commitizen treats the commit command as a declarative action. The contributor is declaring that they wish to contribute to your project. It is up to you as the maintainer to define what rules they should be following.\n\nWe accomplish this by letting you define which adapter you'd like to use in your project. Adapters just allow multiple projects to share the same commit message conventions. A good example of an adapter is the cz-conventional-changelog adapter.\n\n## Related projects\n\n- [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) – Generate a changelog from conventional commit history\n- [commitlint](https://github.com/conventional-changelog/commitlint) - Lint commit messages\n\n## Authors and Contributors\n\n@JimTheDev (Jim Cummins, author)\n@kentcdodds\n@accraze\n@kytwb\n@Den-dp\n\nSpecial thanks to @stevelacy, whose [gulp-git](https://www.npmjs.com/package/gulp-git) project makes commitizen possible.\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n\n\n## Backers\n\nThank you to all our backers! ???? [[Become a backer](https://opencollective.com/commitizen#backer)]\n\n\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/commitizen#sponsor)]\n\n\n\n\n\n\n\n\n\n\n\n\n[commitizen-friendly]: #making-your-repo-commitizen-friendly\n"}