javascript-studio / studio-changes

📦 Generate a changelog as part of the npm version command
https://medium.com/javascript-studio/nice-and-easy-module-releases-a32c906b564e
MIT License
49 stars 7 forks source link

feat: custom git tag format support #16

Closed tivac closed 6 years ago

tivac commented 6 years ago

Supports the parsed version from CHANGES.md as ${version} along w/ any other string-compatible key in package.json.

Now it's possible to use this lib with lerna!

$ changes -t ${name}@${version}

Fixes #15

mantoni commented 6 years ago

Thank you!

I guess the git command would fail if a property cannot be read from the package. Did you check what happens?

Otherwise, this looks good to me. I can merge and cut a release for you this evening 👍

tivac commented 6 years ago

I don't currently handle that case right now. What would be your preference for how to handle that scenario?

My instinct would be to have buildTag() throw an error and wrap changes.write() in cmd.js within a try/catch. Sound reasonable?

mantoni commented 6 years ago

Yeah, I don’t know. Was just a thought. We can add error handling later if it actually causes issues ... let’s keep it simple 🙂

mantoni commented 6 years ago

Can I ask you to add the documentation for —tag in the readme as well?

tivac commented 6 years ago

@mantoni Oof, embarassing. Updated readme.

mantoni commented 6 years ago

Thanks a lot! Released as v1.4.0 🎉. See release notes.

I also made a few internal changes to avoid having the file name and the tag format as global state :)

tivac commented 6 years ago

Removal of global state is a good change, I was trying not to rearrange too much furniture in a repo I don't own 😅 Sorry about the lint bugs, it was passing for me when running locally!

mantoni commented 6 years ago

No worries. All good. I also prefer pull requests that deal with one thing at a time 👍