-
Notifications
You must be signed in to change notification settings - Fork 23
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
Altering Types of changes #12
Comments
I think, for now, the proposal 1 is the best, because it's pretty easy to extend the changes with more types. Just note that currently there's a function for each type ( Other problem I see is the parser, that needs a way to set a custom |
Good point. Haven't noticed that thing with the parser. The only quick fix I can think of now is a bit of Dependency Injection: function defaultReleaseCreator(title, description){ return new Realease(title, description)}
function parser(markdown, releaseCreator = defaultReleaseCreator) {
//...
} |
I think that an object with options (so it can be extended in a future with more settings) is better. For example: const options = {
releaseCreator: (title, description) => new Release(title, description)
}
const changelog = parser(markdown, options); If you want to work on a PR for this, I'd appreciate it very much. |
I'm on it 😉 |
Great tool!
I understand it supports the Types of changes based on https://keepachangelog.com/en/1.0.0/
However, I think that a change of those "Types of changes" could be beneficial to many users. For example some could add a "Upgrade" type or anything else...
Well, it was discussed a while back here brightcove/kacl#6 But with no additional initiative it seems...
Is this something that would be considered?
Solution proposals:
Release
class can be extended. Just cover it by a test and mention in documentation, so people can rely on it.ReleaseBase
that could e.g. accept another parameter in constructor to define the types. Additionaly,ReleaseBase
does not include methods likeadded
,changed
etc.Release
class would extendReleaseBase
. It still doesn't introduce any breaking changes.Release
class to accept optional parameter for types (in constructor). No way to add new methods for specific change types.Release
classsetTypes
. That just doesn't seem rightThe text was updated successfully, but these errors were encountered: