Skip to content

fix!: change return type on Parse method#37

Open
lewismiddleton wants to merge 1 commit intoleodido:developfrom
lewismiddleton:parse-return-type
Open

fix!: change return type on Parse method#37
lewismiddleton wants to merge 1 commit intoleodido:developfrom
lewismiddleton:parse-return-type

Conversation

@lewismiddleton
Copy link
Copy Markdown

@lewismiddleton lewismiddleton commented Jul 14, 2024

Changes the return type on the Machine.Parse method to return a ConventionalCommit object. This gives the type system more information on the properties available.

We still get the type information from the Message interface because ConventionalCommit implements Message so no functionality is lost. However this does change the return types for all consumers using the Parse method.

BREAKING CHANGE: Machine.Parse() method now returns ConventionalCommit object instead of Message
Resolves: #36

Changes the return type on the `Machine.Parse` method to return a
ConventionalCommit object. This gives the type system more information
on the properties available.

We still get the type information from the `Message` interface because
ConventionalCommit implements Message so no functionality is lose.
However this is does change the return types for all consumers using
the Parse method.

BREAKING CHANGE: `Machine.Parse()` method now returns ConventionalCommit
object instead of Message
@lewismiddleton
Copy link
Copy Markdown
Author

Ah I see from the build that the parser/machine.go file is generated. I've now changed the source file parser/machine.go.rl to include the new return type.

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.

Return ConventionalCommit content in public interface

1 participant