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

Support non-SemVer and en dashes #22

Closed
koppor opened this issue Oct 22, 2023 · 5 comments
Closed

Support non-SemVer and en dashes #22

koppor opened this issue Oct 22, 2023 · 5 comments

Comments

@koppor
Copy link
Contributor

koppor commented Oct 22, 2023

When trying to parse https://github.com/JabRef/jabref/blob/v5.11/CHANGELOG.md, version is always null. I think, it could be because of the used en dash. There is an issue, because the official format might permit en dash (see olivierlacan/keep-a-changelog#497; linked from nbbrd/heylogs#140 (comment)).

    {
      "version": null,
      "link": "https://github.com/JabRef/jabref/compare/v5.10...v5.11",
      "date": null,

If en dash support is "difficult" to implement, maybe this tool coud parse the github compare link to get the version out of that link?

(General background: I was recommended clparse at NiclasvanEyk/keepac#20 (comment))

@koppor koppor changed the title Support en dashes Support non-SemVer and en dashes Oct 22, 2023
@koppor
Copy link
Contributor Author

koppor commented Oct 22, 2023

Update: Sometimes, software uses keep-a-changelog, but do not follow SemVer. JabRef is one example. It would be nice if this tool was usable with JabRef, too.

@marcaddeo
Copy link
Owner

Hi @koppor, those seem like reasonable requests. I'm going to add a flag (--separator) that you can pass the en dash with. This will use it for parsing the initial changelog as well as when outputting markdown versions.

I've also updated it to allow more permissive version strings, instead of only SemVer.

I took a look at the JabRef changelog, and saw that you guys have some very long changelog entries and went ahead and also added the ability to disable entry line wrapping and the ability to wrap at a custom character count (--no-wrap & --wrap-at).

I've got it in a PR (#23) for now, and will try and get a release out later today or tomorrow.

@marcaddeo
Copy link
Owner

marcaddeo commented Oct 23, 2023

One other thing I wanted to mention: The JabRef changelog has an "Older versions" section at the bottom of it, which is not really in line with Keep a Changelog and thus does not parse very well with clparse (it creates an additional unreleased section at the bottom).

This may still be acceptable for your use-cases, as I think you're just looking to diff things, but I'm not sure how to support that.

@marcaddeo
Copy link
Owner

@koppor I've released clparse 0.9.0. However, it's only currently able to be installed via cargo as I'm having trouble generating releases. I haven't updated this repository since before I got a new MacBook with an M1 (arm64) processor. So I'm going to have to stand up a GitHub Actions build workflow to get those back in place.

@marcaddeo
Copy link
Owner

Released 0.9.1, should be all set now.

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

No branches or pull requests

2 participants