{"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":{"integrity":"sha512-d4zk0gf9hQAILHE1pXWuIuqM/OBsvcOxcUgGZN4PQkIXQWvjbFOkoSv6HztKFEqfZEY95fe85XqBWLWqWtaW6g==","shasum":"b73582c3dc9643bed909fadc23eab379223eddbb","tarball":"http://registry-npm.ywwl.com/@conventional-commits/parser/download/@conventional-commits/parser-0.3.0.tgz","fileCount":11,"unpackedSize":27443,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf684uCRA9TVsSAnZWagAAVSEP/j0BcKBdTnkWrQVvIw0T\nDKzXt5Tvp3FAxNu3iGIPR1ZWegsXvskOYfJ2PM0BQ+6tGSybGXk+tpbgrxUH\noci3uVEMqtPJDZKkYIX/P3NGOHkGNLcthsADm7qlP3Oxi36wCttLL31qlWYt\nFOldn2oTz6e1toui7rG361yxKPKT+quugb1L9OLfFvJtTB1ZO7HrfMdDAOJt\nRiAnMc4IGHl2bVh0dkEoIpB4YncdQpi8eFtPqpCgvKwiXiOpaokmhQ64yqZC\nuqtYWOu+dTF3D9ePY4fNuf2Fslj92KrxaLL31U7UlbZ4i418LkkyYCWhphII\nwSA9Znit/hSaiDg/endK2s5b+ATf2gYFFmLvKqR3Yy5nVB94b8EfQJlgLNIA\ngF8I9P04ZmJIpp545hBkUakXvLe3bTG3xZizeVwLkKAXygwXWFj/Z8HEnQwv\nc1Wt9hjSRcIhoDbtBHSF6HHqZEMIGmRUxHMRwcCmykmCgTVa7R1qFux65++r\nHyRizpMJWm+uq2pdeBVa81lswEVYA4B0Ov/5lcTHxpgiRa8Iqb9MubKwFpd8\nh0ywf47GSSMiTTmL/lGlAcOhEmP+4AvdDKt7PTI4U5RTxtM1CJmeAXk6a7sF\nOf/qiDmZkCeijavIbXhUpwZcNMydtfjvR/XPPTnV3Ch2dm54CwyLvIjF0kq4\nEmsz\r\n=aRUe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC8pge67AwBJa1bJlcyaANmwWFGbqTAnRv4qyDn+019BAiArFW+iOIUM8Gp04ULt5ZBZyUIKgZs0j5MbJnByVWiMEg=="}],"size":7935,"noattachment":false,"key":"/@conventional-commits/parser/-/@conventional-commits/parser-0.3.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.3.0_1609289261943_0.4495152124232442"},"_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":1609289262077,"_cnpm_publish_time":1609289262077,"dist-tags":{"latest":"0.4.1"}}