{"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":{"integrity":"sha512-H2ZmUVt6q+KBccXfMBhbBF14NlANeqHTXL4qCL6QGbMzrc4HDXyzWuxPxPNbz71f/5UkR5DrycP5VO9u7crahg==","shasum":"213717b25b7ff85260d295466c282226ffe094f2","tarball":"http://registry-npm.ywwl.com/@conventional-commits/parser/download/@conventional-commits/parser-0.4.1.tgz","fileCount":11,"unpackedSize":28839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf9nTwCRA9TVsSAnZWagAANbcQAJb/zIgpfjxKUKFwcP6z\n+fl6RO/JT0L3Z+asVmueDN+xih3bYb5NlldQtpYO2lMIIR57/YFdzmSWzvqD\ng2V4a/L7cNdAPZxciVAAeeZCMB36PoC5NJyEHPzVGLbpRh2fdHilKHBmzwBo\n0Hi56pO1QBs+g5CHLTafBEqC4Xg3cpZsTJ/T5TmnF6Wkh0u9lPOLP7l239fu\niSrjIx6LMjmprs4LytA/20wkl/RbuxDRNBe4QLOZ9bUHdxC5kSJvr5YDJ2PF\nqnvYekezC+M2OSOKZafidysEQXTYPtKKRhrTaR/bjbH19btDHr1zPgcQoN3E\naCFEtQ7IbF/dzBLDrb4eZ7ZEe/0fiwASTQ+IynCWwREmu8m7iN5jlfgVMeog\n3eRrSjG1zXsd9vqDuhexZ3+gUrSNT9Ho1KFgFNvFDADAoxIKP9eRqzI+ZJUj\n8pBIcMiQX4h8kCilq2fVBExxlA6rYgi4JS/zZTzkzGEn9Fpn6yUfejz3+iU1\nXOCIxiw/1SY7o4ebq+iXIV/BlYotCtbc3JIX6rZjekZh+NrHKby7L/IFcWr5\nKXyu3eFQ+dRz+zbkD6QMksDzuj/8KwAkfeCGYjMULepC9tE/nvZEbrBN6mIp\nTwIpzpeGiweynnV/nNMx4WmTSCi18BT5Z0JYw4FJc9yfKXhFzTLjfy5QBNwD\n8OMh\r\n=JVyc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBjlpEs1zFJOXQvBaIcpKo/QuUTuEPSeKpoKTZegt36rAiEA4TSqouJ6Q6SqpoUuexOTN6McwExybs8BszgpqsG2smc="}],"size":8167,"noattachment":false,"key":"/@conventional-commits/parser/-/@conventional-commits/parser-0.4.1.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.4.1_1609987312021_0.9272012834763503"},"_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":1609987312208,"_cnpm_publish_time":1609987312208,"dist-tags":{"latest":"0.4.1"}}