{"_id":"@conventional-commits/parser","_rev":"2982875","name":"@conventional-commits/parser","description":"reference implementation of conventionalcommits.org spec","dist-tags":{"latest":"0.4.1"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"oss-bot","email":""}],"time":{"modified":"2023-07-21T07:31:16.000Z","created":"2020-12-28T20:04:15.931Z","0.4.1":"2021-01-07T02:41:52.208Z","0.4.0":"2021-01-07T00:55:46.171Z","0.3.0":"2020-12-30T00:47:42.077Z","0.2.0":"2020-12-28T20:04:15.931Z"},"users":{},"author":{"name":"Ben Coe","email":"bencoe@gmail.com"},"repository":{"type":"git","url":"git+ssh://git@github.com/conventional-commits/parser.git"},"versions":{"0.4.1":{"name":"@conventional-commits/parser","version":"0.4.1","description":"reference implementation of conventionalcommits.org spec","main":"index.js","types":"index.d.ts","scripts":{"test":"c8 mocha ./test/*.js","test:snap":"CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test","coverage":"c8 --check-coverage mocha --timeout=8000 ./test/*.js","posttest":"standard","fix":"standard --fix","inspect":"./scripts/inspect.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/conventional-commits/parser.git"},"keywords":["parser","conventional","commits"],"author":{"name":"Ben Coe","email":"bencoe@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/conventional-commits/parser/issues"},"homepage":"https://github.com/conventional-commits/parser#readme","devDependencies":{"c8":"^7.3.5","chai":"^4.2.0","chai-jest-snapshot":"^2.0.0","mocha":"^8.2.1","standard":"^16.0.3","unist-util-inspect":"^6.0.1","unist-util-source":"^3.0.0","unist-util-visit":"^2.0.3","yargs":"^16.2.0"},"dependencies":{"unist-util-visit":"^2.0.3","unist-util-visit-parents":"^3.1.1"},"gitHead":"eeefb961ebf5b9dfea0fea8b06f8ad34a1e439b9","_id":"@conventional-commits/parser@0.4.1","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"shasum":"213717b25b7ff85260d295466c282226ffe094f2","size":8167,"noattachment":false,"key":"/@conventional-commits/parser/-/@conventional-commits/parser-0.4.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@conventional-commits/parser/download/@conventional-commits/parser-0.4.1.tgz"},"_npmUser":{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"},"directories":{},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"oss-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parser_0.4.1_1609987312021_0.9272012834763503"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-26T21:03:09.536Z","publish_time":1609987312208,"_cnpm_publish_time":1609987312208},"0.4.0":{"name":"@conventional-commits/parser","version":"0.4.0","description":"reference implementation of conventionalcommits.org spec","main":"index.js","types":"index.d.ts","scripts":{"test":"c8 mocha ./test/*.js","test:snap":"CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test","coverage":"c8 --check-coverage mocha --timeout=8000 ./test/*.js","posttest":"standard","fix":"standard --fix","inspect":"./scripts/inspect.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/conventional-commits/parser.git"},"keywords":["parser","conventional","commits"],"author":{"name":"Ben Coe","email":"bencoe@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/conventional-commits/parser/issues"},"homepage":"https://github.com/conventional-commits/parser#readme","devDependencies":{"c8":"^7.3.5","chai":"^4.2.0","chai-jest-snapshot":"^2.0.0","mocha":"^8.2.1","standard":"^16.0.3","unist-util-inspect":"^6.0.1","unist-util-source":"^3.0.0","unist-util-visit":"^2.0.3","yargs":"^16.2.0"},"dependencies":{"unist-util-visit":"^2.0.3","unist-util-visit-parents":"^3.1.1"},"gitHead":"5020bf5ee27ce205ba53f67fa5302e1cc1ae56cc","_id":"@conventional-commits/parser@0.4.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"shasum":"0d0cfa45dbdf35345bc1afa19c22567bc6781e25","size":8070,"noattachment":false,"key":"/@conventional-commits/parser/-/@conventional-commits/parser-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@conventional-commits/parser/download/@conventional-commits/parser-0.4.0.tgz"},"_npmUser":{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"},"directories":{},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"oss-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parser_0.4.0_1609980945978_0.4844641970726469"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-26T21:03:07.854Z","publish_time":1609980946171,"_cnpm_publish_time":1609980946171},"0.3.0":{"name":"@conventional-commits/parser","version":"0.3.0","description":"reference implementation of conventionalcommits.org spec","main":"index.js","types":"index.d.ts","scripts":{"test":"c8 mocha ./test/*.js","test:snap":"CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test","coverage":"c8 --check-coverage mocha --timeout=8000 ./test/*.js","posttest":"standard","fix":"standard --fix","inspect":"./scripts/inspect.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/conventional-commits/parser.git"},"keywords":["parser","conventional","commits"],"author":{"name":"Ben Coe","email":"bencoe@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/conventional-commits/parser/issues"},"homepage":"https://github.com/conventional-commits/parser#readme","devDependencies":{"c8":"^7.3.5","chai":"^4.2.0","chai-jest-snapshot":"^2.0.0","mocha":"^8.2.1","standard":"^16.0.3","unist-util-inspect":"^6.0.1","unist-util-source":"^3.0.0","unist-util-visit":"^2.0.3","yargs":"^16.2.0"},"dependencies":{"unist-util-visit":"^2.0.3","unist-util-visit-parents":"^3.1.1"},"gitHead":"2b679ffadca842141a974b69cdd9f55dc401cb34","_id":"@conventional-commits/parser@0.3.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"shasum":"b73582c3dc9643bed909fadc23eab379223eddbb","size":7935,"noattachment":false,"key":"/@conventional-commits/parser/-/@conventional-commits/parser-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@conventional-commits/parser/download/@conventional-commits/parser-0.3.0.tgz"},"_npmUser":{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"},"directories":{},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"oss-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parser_0.3.0_1609289261943_0.4495152124232442"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-26T21:03:05.537Z","publish_time":1609289262077,"_cnpm_publish_time":1609289262077},"0.2.0":{"name":"@conventional-commits/parser","version":"0.2.0","description":"reference implementation of conventionalcommits.org spec","main":"index.js","scripts":{"test":"c8 mocha ./test/*.js","test:snap":"CHAI_JEST_SNAPSHOT_UPDATE_ALL=true npm test","coverage":"c8 --check-coverage mocha --timeout=8000 ./test/*.js","posttest":"standard","fix":"standard --fix","inspect":"./scripts/inspect.js"},"repository":{"type":"git","url":"git+ssh://git@github.com/conventional-commits/parser.git"},"keywords":["parser","conventional","commits"],"author":{"name":"Ben Coe","email":"bencoe@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/conventional-commits/parser/issues"},"homepage":"https://github.com/conventional-commits/parser#readme","devDependencies":{"c8":"^7.3.5","chai":"^4.2.0","chai-jest-snapshot":"^2.0.0","mocha":"^8.2.1","standard":"^16.0.3","unist-util-inspect":"^6.0.1","yargs":"^16.2.0"},"dependencies":{"unist-util-visit":"^2.0.3"},"gitHead":"1dab5cad29704e3b688f46fa562b39626f1710a7","_id":"@conventional-commits/parser@0.2.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"shasum":"814199cdfcfd49d1780e4168d6a3fecca6d9c5f8","size":6733,"noattachment":false,"key":"/@conventional-commits/parser/-/@conventional-commits/parser-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@conventional-commits/parser/download/@conventional-commits/parser-0.2.0.tgz"},"_npmUser":{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"},"directories":{},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"oss-bot","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parser_0.2.0_1609185855731_0.9319547410476077"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-26T21:03:03.835Z","publish_time":1609185855931,"_cnpm_publish_time":1609185855931}},"readme":"## Conventional Commits Parser\n\n![ci](https://github.com/conventional-commits/parser/workflows/ci/badge.svg)\n![nycrc config on GitHub](https://img.shields.io/nycrc/conventional-commits/parser)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n\nReference implementation of Conventional Commits specification.\n\nOutputs a tree structure based on the\n[unist specification](https://github.com/syntax-tree/unist).\n\n## Install\n\n```\nnpm i @conventional-commits/parser\n```\n\n## Usage\n\n```js\nconst {parser} = require('@conventional-commits/parser')\nconst ast = parser('feat(parser): add support for scopes')\n```\n\n## API\n\n### `parser(text: string)`\n\nRuns conventional commits parser on the string provided.\n\n* Returns: Object adhering to [unist spec](https://github.com/syntax-tree/unist).\n\n### `toConventionalChangelogFormat(ast: object)`\n\nGiven an `object`, representing the parsed commit messages in `unist` format,\nreturns an object useable by the [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) ecosystem of libraries.\n\n## The Grammar\n\nThe parser is based on the following grammar. An effort is made to keep this\nin sync with the written specification on conventionalcommits.org.\n\n```ebnf\n/* See: https://tools.ietf.org/html/rfc3629#section-4 */\n<UTF8-char>       ::= \"Placeholder for UTF-8 grammar\"\n<UTF8-octets>     ::= <UTF8char>+\n\n<CR>              ::= \"0x000D\"\n<LF>              ::= \"0x000A\"\n<newline>         ::= [<CR>], <LF>\n<parens>          ::= \"(\" | \")\"\n<ZWNBSP>          ::= \"U+FEFF\"\n<TAB>             ::= \"U+0009\"\n<VT>              ::= \"U+000B\"\n<FF>              ::= \"U+000C\"\n<SP>              ::= \"U+0020\"\n<NBSP>            ::= \"U+00A0\"\n/* See: https://www.ecma-international.org/ecma-262/11.0/index.html#sec-white-space */\n<USP>             ::= \"Any other Unicode 'Space_Separator' code point\"\n/* Any non-newline whitespace: */\n<whitespace>      ::= <ZWNBSP> | <TAB> | <VT> | <FF> | <SP> | <NBSP> | <USP>\n\n<message>         ::= <summary>, <newline>+, <body>, (<newline>+, <footer>)*\n                   |  <summary>, (<newline>+, <footer>)*\n                   |  <summary>, <newline>*\n\n/* \"!\" should be added to the AST as a <breaking-change> node with the value \"!\" */\n<summary>         ::= <type>, \"(\", <scope>, \")\", [\"!\"], \":\", <whitespace>*, <text>\n                   |  <type>, [\"!\"], \":\", <whitespace>*, <text>\n<type>            ::= <any UTF8-octets except newline or parens or \":\" or \"!:\" or whitespace>+\n<scope>           ::= <any UTF8-octets except newline or parens>+\n<text>            ::= <any UTF8-octets except newline>*\n\n\n<body>            ::= [<any body-text except pre-footer>], <newline>, <body>*\n                   |  [<any body-text except pre-footer>]\n/* For convenience the <breaking-change>, <separator>, <whitespace>, and\n * <text> tokens of <body-text> should be appended as children to <body> */\n<body-text>       ::= [<breaking-change>, \":\", <whitespace>*], text\n/* Note: <pre-footer> is used during parsing, but not returned in the AST. */\n<pre-footer>      ::= <newline>+, <footer>\n\n<footer>          ::= <token>, <separator>, <whitespace>*, <value>\n/* \"!\" should be added to the AST as a <breaking-change> node with the value \"!\" */\n<token>           ::= <breaking-change>\n                   |  <type>, \"(\" <scope> \")\", [\"!\"]\n                   |  <type>, [\"!\"]\n<separator>       ::= \":\" | \" #\"\n<value>           ::= <text>, <continuation>+\n                   |  <text>\n<continuation>    ::= <newline>, <whitespace>+, <text>\n\n<breaking-change> ::= \"BREAKING CHANGE\" | \"BREAKING-CHANGE\"\n```\n","_attachments":{},"homepage":"https://github.com/conventional-commits/parser#readme","bugs":{"url":"https://github.com/conventional-commits/parser/issues"},"license":"ISC"}