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

Use the most recently released version when comparing versions #39

Merged
merged 2 commits into from
Oct 12, 2015

Conversation

hawkrives
Copy link
Contributor

The prior behavior would error if you had an "unreleased" section at the top of your changelog.

I like to keep the section there, even empty, so that I don't have to remember to add it back in when I need to add an entry.

This finds the first changelog entry with a non-null version, rather than just the first changelog entry.

add test for skipping Unreleased sections
@ungoldman
Copy link
Owner

Thanks @hawkrives, makes sense to me!

Array.prototype.find() is ES6+, would you be willing to rewrite that line to support older Node versions? Lots of people still using 0.10 & 0.12 out there.

@ungoldman
Copy link
Owner

Looks like the test is failing in iojs too: https://travis-ci.org/ngoldman/gh-release/jobs/84983915

I need to update .travis.yml to target 0.10, 0.12, and stable (4). Reasoning for covering all those versions is here:

ungoldman/module-init#25 (comment)

@hawkrives
Copy link
Contributor Author

Sure thing! I was trying to figure out why that wasn't working… guess I'm too used to es6.

Is ES5 OK for a target?

@ungoldman
Copy link
Owner

result.versions.filter(function (release) { return release.version !== null })[0] is a little less elegant but would probably do the trick.

@hawkrives
Copy link
Contributor Author

That's pretty much what I was thinking. Crossing fingers...

@ungoldman
Copy link
Owner

@hawkrives yeah that's fine, most of ES5 has been supported in v8 for a long time. http://kangax.github.io/compat-table/es5/ helps me remember what's what (blessings unto @kangax).

@hawkrives
Copy link
Contributor Author

Indeed. Would you like a second PR for updating .travis.yml for 0.10, 0.12, and stable, or would you rather do that yourself?

ungoldman added a commit that referenced this pull request Oct 12, 2015
Use the most recently released version when comparing versions
@ungoldman ungoldman merged commit 324f8cb into ungoldman:master Oct 12, 2015
@ungoldman
Copy link
Owner

Thanks @hawkrives! I'll take care of the .travis.yml versions.

@hawkrives hawkrives deleted the patch-1 branch October 12, 2015 19:55
@hawkrives
Copy link
Contributor Author

Thanks!

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.

2 participants