Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support BREAKING CHANGE in body #30

Merged
merged 3 commits into from
Dec 29, 2020
Merged

feat: support BREAKING CHANGE in body #30

merged 3 commits into from
Dec 29, 2020

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Dec 29, 2020

  • Add support for BREAKING CHANGE node in body.
  • while I was at it, did some refactoring of how we handle BREAKING CHANGE, adding support for BREAKING-CHANGE (See: spec).

@bcoe bcoe requested review from byCedric and wesleytodd December 29, 2020 00:21
<newline> ::= [<CR>], <LF>
<parens> ::= "(" | ")"
<ZWNBSP> ::= "U+FEFF"
<TAB> ::= "U+0009"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding the breaking-change node forced me to indent for consistency.

| <summary>, <newline>*, <footer>+
| <summary>, <newline>*

/* "!" should be added to the AST as a <breaking-change> node with the value "!" */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added note that ! should be added as a breaking-change node to the AST (this is already the behavior).

<text> ::= <any UTF8-octets except newline>*


<body> ::= [<any body-text except pre-footer>], <newline>, <body>*
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

introduced a <body-text> node, which is <text> with an optional BREAKING CHANGE prefix.


<body> ::= [<any body-text except pre-footer>], <newline>, <body>*
| [<any body-text except pre-footer>]
/* For convenience the <breaking-change>, <separator>, <whitespace>, and
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for implementers that we don't want to add a <body-text> node to the AST.

| <text>
<continuation> ::= <newline>, <whitespace>+, <text>

<breaking-change> ::= "BREAKING CHANGE" | "BREAKING-CHANGE"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text on conventionalcommits.org indicates that we should support BREAKING-CHANGE.

@bcoe bcoe merged commit 8f3f5c7 into main Dec 29, 2020
@bcoe bcoe deleted the implement-breaking branch December 29, 2020 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants