New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

latest-github-tag

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

latest-github-tag

Fetch the latest tag name from a GitHub repo (promise-based)

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
2
-60%
Maintainers
1
Weekly downloads
 
Created
Source

Latest GitHub Tag

Fetch the latest tag name from a GitHub repo (promise-based)

Build Status NPM version js-standard-style

latestTag('mhkeller', 'stable-tag').then(function (tag) {
  console.log(tag) // Outputs v1.0.0
})
.catch(function (err) {
  console.error(err)
})

Resolves to an error if a package has no tags.

Options

You can pass an options object as an optional third argument. It can take the two keys:

  • auth — An authentication object that will be passed to the GitHub module's authenticate method.
  • timeout — A value, in milliseconds, to wait for this call to be made. Defaults to 5000.
latestTag('mhkeller', 'secret-repo', {
  timeout: 0,
  auth: {
    type: 'oauth', // See https://github.com/mikedeboer/node-github#authentication for other types
    token: 'your-access-token'
  }
}).then(function (tag) {
  console.log(tag) // Outputs the latest tag
})
.catch(function (err) {
  console.error(err)
})

License

MIT

Keywords

latest

FAQs

Package last updated on 24 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts