
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
get-latest-release
Advanced tools
Find the latest release of a given GitHub repository
$ npm install --save get-latest-release
const getLatestRelease = require('get-latest-release');
getLatestRelease({
owner: 'sindresorhus',
repo: 'caprine',
ext: 'dmg'
});
/**
{
version: 'v2.3.1',
url: 'https://github.com/sindresorhus/caprine/releases/tag/v2.3.1',
asset: {
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867404',
name: 'caprine-2.3.1.dmg',
content_type: 'application/x-apple-diskimage',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/caprine-2.3.1.dmg'
}
}
*/
getLatestRelease({
owner: 'sindresorhus',
repo: 'caprine',
});
/**
{
version: 'v2.3.1',
url: 'https://github.com/sindresorhus/caprine/releases/tag/v2.3.1'
assets: [
{
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867410',
name: 'caprine-2.3.1-mac.zip',
content_type: 'application/zip',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/caprine-2.3.1-mac.zip'
},
{
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867402',
name: 'caprine-2.3.1-x86_64.AppImage',
content_type: 'application/octet-stream',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/caprine-2.3.1-x86_64.AppImage'
},
{
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867404',
name: 'caprine-2.3.1.dmg',
content_type: 'application/x-apple-diskimage',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/caprine-2.3.1.dmg'
},
{
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867415',
name: 'caprine-setup-2.3.1.exe',
content_type: 'application/x-msdownload',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/caprine-setup-2.3.1.exe'
},
{
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867409',
name: 'caprine_2.3.1_amd64.deb',
content_type: 'application/x-debian-package',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/caprine_2.3.1_amd64.deb'
},
{
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867411',
name: 'latest-mac.json',
content_type: 'application/json',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/latest-mac.json'
},
{
url: 'https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867416',
name: 'latest.yml',
content_type: 'text/yaml',
download_url: 'https://github.com/sindresorhus/caprine/releases/download/v2.3.1/latest.yml'
}
]
}
*/
$ npm install --global get-latest-release
$ get-latest-release --help
Find the latest release of a given GitHub repository
Usage
$ get-latest-release -o [owner] -r [repository]
Options
-o Owner of the repository [required]
-r Respository to get latest released from [required]
-e Extension of a target release asset [optional]
Examples
$ get-latest-release -r caprine -o sindresorhus -e dmg
The latest version is: v2.3.1
Tag URL: https://github.com/sindresorhus/caprine/releases/tag/v2.3.1
Asset name: caprine-2.3.1.dmg
Asset URL: https://api.github.com/repos/sindresorhus/caprine/releases/assets/3867404
Content Type: application/x-apple-diskimage
Download URL: https://github.com/sindresorhus/caprine/releases/download/v2.3.1/caprine-2.3.1.dmg
MIT © jxom
FAQs
Find the latest release of a given GitHub repository
We found that get-latest-release demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.