axelrindle/github-version-checker

Use 'latest' github release API instead?

matthewgonzalez opened this issue · 2 comments

First off thanks for this little module.

Wanted to know why the complete release JSON is being pulled rather than just using the 'latest' URI? Is it because it doesn't include the prereleases?

ie. /repos/:owner/:repo/releases/latest

https://developer.github.com/v3/repos/releases/#get-the-latest-release

@matthewgonzalez Yes, you are right. I wanted to include prereleases into the version check. But thanks for asking, I will think of some changes ASAP.

Ok thanks for the response.

I was just noticing that the JSON returned from the 'release' URI can be substantially larger. An example:

https://api.github.com/repos/atom/atom/releases 1MB
https://api.github.com/repos/atom/atom/releases/latest 27kb

Granted, not many projects will have a release list as heavy as Atom... In my case, I'm more interested in just grabbing the latest version (w/out prereleases), so having a method to call or option to set for that would be nice.

Thanks again.