{"_id":"@didxga/cz-conventional-changelog-for-jira","name":"@didxga/cz-conventional-changelog-for-jira","dist-tags":{"latest":"0.0.0-semantically-released"},"versions":{"0.0.0-semantically-released":{"name":"@didxga/cz-conventional-changelog-for-jira","version":"0.0.0-semantically-released","description":"Commitizen adapter following the conventional-changelog format and also asking for JIRA issue.","main":"index.js","scripts":{"commit":"git-cz","test":"mocha *.test.js","format":"prettier --write *.js","semantic-release":"semantic-release"},"homepage":"https://github.com/digitalroute/cz-conventional-changelog-for-jira","repository":{"type":"git","url":"git+https://github.com/digitalroute/cz-conventional-changelog-for-jira.git"},"engineStrict":true,"engines":{"node":">= 10"},"author":{"name":"Marcus Johansson","email":"polarn@gmail.com"},"license":"MIT","dependencies":{"boxen":"^5.1.2","chalk":"^2.4.1","commitizen":"^4.2.6","cz-conventional-changelog":"^3.3.0","inquirer":"^8.2.4","lodash.map":"^4.5.1","longest":"^2.0.1","right-pad":"^1.0.1","word-wrap":"^1.0.3"},"devDependencies":{"@types/chai":"^4.1.7","@types/mocha":"^5.2.7","chai":"^4.2.0","cosmiconfig":"^5.2.1","mocha":"^10.0.0","mock-require":"^3.0.3","prettier":"^1.15.3","semantic-release":"^19.0.3","semver":"^6.2.0"},"optionalDependencies":{"@commitlint/load":">6.1.1"},"config":{"commitizen":{"path":"./index.js","jiraMode":false,"skipScope":true}},"publishConfig":{"access":"public"},"_id":"@didxga/cz-conventional-changelog-for-jira@0.0.0-semantically-released","gitHead":"47900bb7f81773661d2daa7b1d4d338d14b634ac","bugs":{"url":"https://github.com/digitalroute/cz-conventional-changelog-for-jira/issues"},"_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-vOq3o9/NOZVvoXl1l3tX5VNFTcR3nfQC0Ko3h6bowMsEHlh62sZbyPUnxwdvBhfRYFzV6nGc3jNCljaHRV5M0g==","shasum":"f62fa3ce1abc7855cea42c39a34e316b1403c3fc","tarball":"https://registry.npmjs.org/@didxga/cz-conventional-changelog-for-jira/-/cz-conventional-changelog-for-jira-0.0.0-semantically-released.tgz","fileCount":14,"unpackedSize":1687681,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcDDBXjTPol1gvSExCVQO0jDt5+t5w4uU9YNMoqyEcHAiEA5Acx/L1xQd9lzHjS+fDSNF0PaNkbuUovntnHPcNtsDo="}]},"_npmUser":{"name":"didxga","email":"didxga@gmail.com"},"directories":{},"maintainers":[{"name":"didxga","email":"didxga@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/cz-conventional-changelog-for-jira_0.0.0-semantically-released_1711164158804_0.584816141747982"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-23T03:22:38.694Z","0.0.0-semantically-released":"2024-03-23T03:22:39.025Z","modified":"2024-03-23T03:22:40.006Z"},"maintainers":[{"name":"didxga","email":"didxga@gmail.com"}],"description":"Commitizen adapter following the conventional-changelog format and also asking for JIRA issue.","homepage":"https://github.com/digitalroute/cz-conventional-changelog-for-jira","repository":{"type":"git","url":"git+https://github.com/digitalroute/cz-conventional-changelog-for-jira.git"},"author":{"name":"Marcus Johansson","email":"polarn@gmail.com"},"bugs":{"url":"https://github.com/digitalroute/cz-conventional-changelog-for-jira/issues"},"license":"MIT","readme":"# cz-conventional-changelog-for-jira\n\nPart of the [commitizen/cz-cli](https://github.com/commitizen/cz-cli) family. Prompts for [conventional changelog](https://github.com/conventional-changelog/conventional-changelog) standard and also prompts for a mandatory JIRA issue.\n\n[![npm version](https://img.shields.io/npm/v/@digitalroute/cz-conventional-changelog-for-jira.svg?style=flat-square)](https://www.npmjs.org/package/@digitalroute/cz-conventional-changelog-for-jira)\n[![npm downloads](https://img.shields.io/npm/dm/@digitalroute/cz-conventional-changelog-for-jira.svg?style=flat-square)](http://npm-stat.com/charts.html?package=@digitalroute/cz-conventional-changelog-for-jira)\n[![Build Status](https://img.shields.io/travis/digitalroute/cz-conventional-changelog-for-jira.svg?style=flat-square)](https://travis-ci.org/digitalroute/cz-conventional-changelog-for-jira)\n\n## Features\n\n- Works seamlessly with semantic-release 🚀\n- Works seamlessly with Jira smart commits\n- Automatically detects the Jira issue from the branch name\n\n## Quickstart\n\n### Installation\n\n```bash\nnpm install commitizen @digitalroute/cz-conventional-changelog-for-jira\n```\n\nand then add the following to package.json:\n\n```json\n{\n  \"scripts\": {\n    \"commit\": \"git-cz\"\n  },\n  \"config\": {\n    \"commitizen\": {\n      \"path\": \"./node_modules/@digitalroute/cz-conventional-changelog-for-jira\"\n    }\n  }\n}\n```\n\n### Usage\n\n![Gif of terminal when using cz-conventional-changelog-for-jira](https://raw.githubusercontent.com/digitalroute/cz-conventional-changelog-for-jira/master/images/demo.gif)\n\n## Configuration\n\nLike commitizen, you can specify the configuration of cz-conventional-changelog-for-jira through the package.json's `config.commitizen` key, or with environment variables.\n\n| Environment variable | package.json    | Default           | Description                                                                                                                                                             |\n| -------------------- | --------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| CZ_JIRA_MODE         | jiraMode        | true              | If this is set to true, CZ will ask for a Jira issue and put it in the commit head. If set to false CZ will ask for the issue in the end, and can be used for GitHub.   |\n| CZ_MAX_HEADER_WIDTH  | maxHeaderWidth  | 72                | This limits how long a commit message head can be.                                                                                                                      |\n| CZ_MIN_HEADER_WIDTH  | minHeaderWidth  | 2                 | This limits how short a commit message can be.                                                                                                                          |\n| CZ_MAX_LINE_WIDTH    | maxLineWidth    | 100               | Commit message bodies are automatically wrapped. This decides how long the lines will be.                                                                               |\n| CZ_SKIP_SCOPE        | skipScope       | true              | If scope should be used in commit messages.                                                                                                                             |\n| CZ_SKIP_TYPE         | skipType        | false             | If type should be used in commit messages.                                                                                                                              |\n| CZ_SKIP_DESCRIPTION  | skipDescription | false             | If description should be used in commit messages.                                                                                                                       |\n| CZ_SKIP_BREAKING     | skipBreaking    | false             | If breaking changes should be used in commit messages.                                                                                                                  |\n|                      | scopes          | undefined         | A list (JS Array) of scopes that will be available for selection. Note that adding this will change the scope field from Inquirer 'input' to 'list'.                    |\n| CZ_TYPE              | defaultType     | undefined         | The default type.                                                                                                                                                       |\n| CZ_SCOPE             | defaultScope    | undefined         | The default scope.                                                                                                                                                      |\n| CZ_CUSTOM_SCOPE      | customScope     | false             | Whether user can provide custom scope in addition to predefined ones                                                                                                    |\n| CZ_SUBJECT           | defaultSubject  | undefined         | A default subject.                                                                                                                                                      |\n| CZ_BODY              | defaultBody     | undefined         | A default body.                                                                                                                                                         |\n| CZ_ISSUES            | defaultIssues   | undefined         | A default issue.                                                                                                                                                        |\n| CZ_JIRA_OPTIONAL     | jiraOptional    | false             | If this is set to true, you can leave the JIRA field blank.                                                                                                             |\n| CZ_JIRA_PREFIX       | jiraPrefix      | \"DAZ\"             | If this is set it will be displayed as the default JIRA ticket prefix                                                                                           |\n| CZ_JIRA_LOCATION     | jiraLocation    | \"pre-description\" | Changes position of JIRA ID. Options: `pre-type`, `pre-description`, `post-description`, `post-body`                                                                    |\n| CZ_JIRA_PREPEND      | jiraPrepend     | \"\"                | Prepends JIRA ID with an optional decorator. e.g.: `[DAZ-1234`                                                                                                          |\n| CZ_JIRA_APPEND       | jiraAppend      | \"\"                | Appends JIRA ID with an optional decorator. e.g.: `DAZ-1234]`                                                                                                           |\n| CZ_EXCLAMATION_MARK  | exclamationMark | false             | On breaking changes, adds an exclamation mark (!) after the scope, e.g.: `type(scope)!: break stuff`. When activated, reduces the effective allowed header length by 1. |\n\n### Jira Location Options\n\npre-type:\n\n```text\nJIRA-1234 type(scope): commit subject\n```\n\npre-description:\n\n```text\ntype(scope): JIRA-1234 commit subject\n```\n\npost-description:\n\n```text\ntype(scope): commit subject JIRA-1234\n```\n\npost-body:\n\n```text\ntype(scope): commit subject\n\nJIRA-1234\n```\n\n```text\ntype(scope): commit subject\n\nthis is a commit body\n\nJIRA-1234\n```\n\n## Dynamic Configuration\n\nAlternatively, if you want to create your own profile, you can use the _configurable_ approach.\nHere is an example:\n**./index.js**\n\n```javascript\nconst custom = require('@digitalroute/cz-conventional-changelog-for-jira/configurable');\n// You can do this optionally if you want to extend the commit types\nconst defaultTypes = require('@digitalroute/cz-conventional-changelog-for-jira/types');\n\nmodule.exports = custom({\n  types: {\n    ...defaultTypes,\n    perf: {\n      description: 'Improvements that will make your code perform better',\n      title: 'Performance'\n    }\n  },\n  skipScope: false,\n  scopes: ['myScope1', 'myScope2'],\n  customScope: true\n});\n```\n\n**./package.json**\n\n```json\n{\n  \"config\": {\n    \"commitizen\": {\n      \"path\": \"./index.js\"\n    }\n  }\n}\n```\n\nThis example would:\n\n- Display _\"perf\"_ as an extra commit type\n- Ask you to add a commit scope\n- Limit the scope selection to either `myScope` or `myScope2`\n\nList of all supported configurable options when using the _configurable_ approach:\n\n| Key             | Default           | Description                                                                                                                                                                                                                                  |\n| --------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| jiraMode        | true              | If this is set to true, CZ will ask for a Jira issue and put it in the commit head. If set to false CZ will ask for the issue in the end, and can be used for GitHub.                                                                        |\n| maxHeaderWidth  | 72                | This limits how long a commit message head can be.                                                                                                                                                                                           |\n| minHeaderWidth  | 2                 | This limits how short a commit message can be.                                                                                                                                                                                               |\n| maxLineWidth    | 100               | Commit message bodies are automatically wrapped. This decides how long the lines will be.                                                                                                                                                    |\n| skipScope       | true              | If scope should be used in commit messages.                                                                                                                                                                                                  |\n| defaultType     | undefined         | The default type.                                                                                                                                                                                                                            |\n| defaultScope    | undefined         | The default scope.                                                                                                                                                                                                                           |\n| defaultSubject  | undefined         | A default subject.                                                                                                                                                                                                                           |\n| defaultBody     | undefined         | A default body.                                                                                                                                                                                                                              |\n| defaultIssues   | undefined         | A default issue.                                                                                                                                                                                                                             |\n| jiraPrefix      | 'DAZ'             | The default JIRA ticket prefix that will be displayed.                                                                                                                                                                                       |\n| types           | ./types.js        | A list (JS Object) of supported commit types.                                                                                                                                                                                                |\n| scopes          | undefined         | A list (JS Array) of scopes that will be available for selection. Note that adding this will change the scope field from Inquirer 'input' to 'list'.                                                                                         |\n| customScope     | false             | If this is set to true, users are given an option to provide custom scope aside the ones predefined in 'scopes' array. In this case a new option named 'custom' appears in the list and once chosen a prompt appears to provide custom scope |\n| jiraOptional    | false             | If this is set to true, you can leave the JIRA field blank.                                                                                                                                                                                  |\n| jiraLocation    | \"pre-description\" | Changes position of JIRA ID. Options: `pre-type`, `pre-description`, `post-description`, `post-body`                                                                                                                                         |\n| jiraPrepend     | \"\"                | Prepends JIRA ID with an optional decorator. e.g.: `[DAZ-1234`                                                                                                                                                                               |\n| jiraAppend      | \"\"                | Appends JIRA ID with an optional decorator. e.g.: `DAZ-1234]`                                                                                                                                                                                |\n| exclamationMark | false             | On breaking changes, adds an exclamation mark (!) after the scope, e.g.: `type(scope)!: break stuff`. When activated, reduces the effective allowed header length by 1.                                                                      |\n\n### Commitlint\n\nIf using the [commitlint](https://github.com/conventional-changelog/commitlint) js library, the \"maxHeaderWidth\" configuration property will default to the configuration of the \"header-max-length\" rule instead of the hard coded value of 72. This can be ovewritten by setting the 'maxHeaderWidth' configuration in package.json or the CZ_MAX_HEADER_WIDTH environment variable.\n","readmeFilename":"README.md"}