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

fix!: change return type on Parse method #37

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

lewismiddleton
Copy link

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
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
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