-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cfb18f6
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## Conventional Commits Parser | ||
|
||
Reference implementation of Conventional Commits specification. | ||
|
||
## The Grammar | ||
|
||
```bnf | ||
# See: https://tools.ietf.org/html/rfc3629#section-4 | ||
<UTF8-octets> ::= 1*<UTF8-char> | ||
<CR> ::= "0x000D" | ||
<LF> ::= "0x000A" | ||
<newline> ::= <CR>? <LF> | ||
<parens> ::= "(" | ")" | ||
<ZWNBSP> ::= "U+FEFF" | ||
<TAB> ::= "U+0009" | ||
<VT> ::= "U+000B" | ||
<FF> ::= "U+000C" | ||
<SP> ::= "U+000C" | ||
<NBSP> ::= "U+00A0" | ||
# See: https://www.ecma-international.org/ecma-262/11.0/index.html#sec-white-space | ||
<USP> ::= "Any other Unicode “Space_Separator” code point" | ||
<whitespace> ::= <ZWNBSP> | <TAB> | <VT> | <FF> | <SP> | <NBSP> | <USP> | ||
<message> ::= <summary> <newline> <newline> 1*<footer> | ||
| <summary> <newline> <newline> <body> <newline> <newline> 1*<footer> | ||
| <summary> <newline> <newline> <body> | ||
| <summary> | ||
<summary> ::= <type> "(" <scope> ")" ":" <summary-text> | ||
| <type> ":" <summary-text> | ||
<type> ::= 1*<any UTF8-octets except newline or parens or ":" or whitespace> | ||
<scope> ::= 1*<any UTF8-octets except newline or parens> | ||
<summary-text> ::= 1*<any UTF8-octets except newline> | ||
<footer> ::= <token> ":" <value> | ||
<token> ::= <type> "(" <scope> ")" | ||
| <type> | ||
| "BREAKING CHANGE" | ||
<value> ::= <summary-text> 1*<continuation> | ||
| <summary-text> | ||
<continuation> ::= <newline> <whitespace> <summary-text> | ||
<body> ::= 1*<body-text> | ||
<body-text> ::= <newline>? <summary-text> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "@conventional-commits/parser", | ||
"version": "1.0.0", | ||
"description": "reference implementation of conventionalcommits.org spec", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "c8 mocha test.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/conventional-commits/parser.git" | ||
}, | ||
"keywords": [ | ||
"parser", | ||
"conventional", | ||
"commits" | ||
], | ||
"author": "Ben Coe <[email protected]>", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/conventional-commits/parser/issues" | ||
}, | ||
"homepage": "https://github.com/conventional-commits/parser#readme" | ||
} |