-
Notifications
You must be signed in to change notification settings - Fork 5
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
Draft release #19
Draft release #19
Conversation
…without git in the $PATH (Fixes #17)
LGTM, I'll just trust you on the TypeScript definitions since I haven't used it at all :) Not that I'd mind this module being TypeScript, I've heard good things about it and would check it out sooner or later anyway.
Good catch. Though I doubt anyone relies on this detail it is technically breaking, yeah. And having been screwed over by updates of modules where it was decided that something was "technically breaking but let's just pass it off as a feature/fix" a few times too often, I'd say it should be semver-major. Conversely I expect that the typical use case for this module isn't hindered by the current behavior either, so my suggestion is to leave it for now and incorporate it in a major release if other breaking changes are needed in the future, or until someone complains about it.
I don't see these as pressing issues either so I'd say this is good to go for release. |
Ok! I have added I'm actually not 100% sure how a git tag behaves on a merge - I think it'll come across with the commits as long as the merge is a fast-forward merge, but this is outside the things I am certain about in git land. I've also added some config in |
I just realised I didn't say this explicitly - this is now ready for merge and release, which I'll leave to you. Of course, you might want to run the tests first, since Travis isn't running the CI at the moment. I'm planning to get to the travis -> github actions uplift sometime next week. |
Alright, it's been published. Thanks for your efforts so far!
I actually ended up discovering one minor bug in the tests, specifically when git is globally configured to use GPG signing. I'll fix that on master though since it wasn't worth breaking up the release over.
Yeah the tag does come along, provided the commits aren't squashed or anything like that. The tag is simply a pointer to a certain commit, so as long as the commit it points to stays intact there is no problem. (It can be argued that a tag on the merge commit itself is a bit "cleaner", but I don't think it's a big deal.)
Sure, looks fine. |
Small side-note, the latest release here on GitHub is still |
This PR fixes all of the currently open issues (#15, #16 and #17). I haven't done the release chores (version bump / changelog etc) yet, so that if you have any review comments we can fix those up first.
I've tried to match the implementation style in the repository. It's a little outside my usual style, which was quite fun. However, I might have missed the mark in places - please let me know if there are any idioms you would like to change. Of course, all other feedback is welcome too.
Some things to mention:
long
(Make --long an optional arguement #15), I noticed that the behaviour oflongSemver
is slightly different togit describe --long
when the repo is dirty. WhenlongSemver: false
on an exact tag, the semver is of the form1.2.3-0.abce12.dirty
(including the commit count and hash), whereasgit describe
without--long
is justv1.2.3-dirty
. I did not change the behaviour oflongSemver
to match--long
, because I guess it's technically a breaking change. It's a pretty straightforward change if you do want to make it, though.spawnSync
are actually wrong about the return type - it saysstdout
andstderr
are<Buffer> | <string>
, but they are bothnull
if the process fails during spawn (at least they are on node 14). So I put in a guard for that.git
was missing (Cannot read property 'toString' of null whengit
is missing #17) was only present ingitDescribeSync
. Most of the tests only testgitDescribe
. It might make sense to refactor the tests to include a harness that runs each test with bothgitDescribe
andgitDescribeSync
. Again, I left this for future work, but I'd be happy to do it now if you prefer.