Skip to content

junosuarez/github-resolve-semver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-resolve-semver

resolve an npm-style semver range to a git tag for a github repo

usage

var resolve = require('github-resolve-semver')

resolve('jden','github-resolve-semver', '0.1.x', function (err, ver) {
  console.log(ver)
  // '0.1.0' (or whatever's the latest)
})

api

resolve(username: String, repo: String, range: String, Callback<tag: String>) => Void

Yields the latest version tag satisfying the range. Uses the algorithm in [semver](https://npm.im/semver), just like npm.

resolve.latest(username: String, repo: String, Callback<tag: String>) => Void

Yields the latest version tag for the repo.

resolve.getTags(username: String, repo: String, Callback<tags: Array<String>) => Void

Yields an array of all semver tags for the repo.

installation

$ npm install github-resolve-semver

running the tests

From package root:

$ npm install
$ npm test

contributors

Special thanks to @tmpvar for github-latest, on which this work is based.

license

MIT. (c) 2013 jden jason@denizac.org. See LICENSE.md

About

resolve an npm-style semver range to a git tag for a github repo

Resources

License

Stars

Watchers

Forks

Packages

No packages published