{"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":{"integrity":"sha512-r1P6mPy3+6hGIOYyi9moo3kF5n1c4ora/DyYy5g9fP67kdn7TW4DfNgB2vSNEfrICHTQAJbSs+khy7rIkmCLmg==","shasum":"814199cdfcfd49d1780e4168d6a3fecca6d9c5f8","tarball":"http://registry-npm.ywwl.com/@conventional-commits/parser/download/@conventional-commits/parser-0.2.0.tgz","fileCount":10,"unpackedSize":22286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6jpACRA9TVsSAnZWagAAmPQP+wSaaI6tXYOGCYqXCsBa\n/3zhXrt3wN3I/g0cO65aNE/LF41HqkBWZHeYsYydzdg/PUKB3CyBigByDDQo\n2PBcczGZEUcJjJEWOU44MxHU6ghHe0x6sQKtCWtqB3UTIbYKoXuVyI+f7ZKD\nrMe8Fp8FXLW5m23Dcv/Py1zEsKfkZK0gNXwCMyKtCQe5i4y9TyZTcCCmFx5f\nYQfDgjTc/RcVC9Ghe8Q+xmJ/5HsjLo0gDoVNe8Hb+SAlDWt5QIMtGIkWZLq0\nMoUJR9oOTYk/T0GawYT0djRlDuxJn5horPgUYHjBQEXXQWOZa6PhNk4/NlkI\nHetFcFvT5Pl7Ryr2L1+fcBCqcyTtzug9Mfdf3lB7D8BQ6y8njNPTSC8un4X7\nR4spr2wRhmSrOvVmbUxgB0QJSbhffxbJS5ECXq827MVrWj8gWiFHLi3MODnz\ngmyHIeDLsWRSZAWVbgyJ/Hq70kpvwOQMOPKFNNIp1DLpllZBudhi98pnSvGu\nyuBwJ85zRV4KFeuFWP2dLUm/jSNLpwvgtGu+mqWJbEExlVnP9Zm9kJi0ORP8\n6fQIFwWbAN9cESsUxuDvlTr8H22M/uuefyA7JFpURsBe8BHZxXl9vWk3awpe\ngP4GgR63dnOpHXKPiMeAUVm4gCiMZ7n16+IvN+jTiSThNWFtqz7mBgRe+YW8\nM7bU\r\n=vYAL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUjEAUAigY11PMId5q6SudxBG80w/tT9qjwFK/8ilQoAiEAnqPHKjsCwDWkNm05a2yhzydqKLM5wk5lq+3V/d79mqY="}],"size":6733,"noattachment":false,"key":"/@conventional-commits/parser/-/@conventional-commits/parser-0.2.0.tgz"},"_npmUser":{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"},"directories":{},"maintainers":[{"name":"oss-bot","email":"bencoe+oss-bot@gmail.com"},{"name":"bcoe","email":"bencoe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parser_0.2.0_1609185855731_0.9319547410476077"},"_hasShrinkwrap":false,"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","publish_time":1609185855931,"_cnpm_publish_time":1609185855931,"dist-tags":{"latest":"0.4.1"}}