latest-version
Get the latest version of an npm package
Last updated 2 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install latest-version 
SYNC missed versions from official npm registry.

latest-version

Get the latest version of an npm package

Fetches the version directly from the registry instead of depending on the massive npm module like the latest module does.

Install

npm install latest-version

Usage

import latestVersion from 'latest-version';

console.log(await latestVersion('ava'));
//=> '6.1.1'

console.log(await latestVersion('@sindresorhus/df'));
//=> '4.0.0'

// Also works with semver ranges and dist-tags
console.log(await latestVersion('npm', {version: 'latest-5'}));
//=> '5.10.0'

This package exposes the version, registryUrl, and omitDeprecated options from package-json, as well as the PackageNotFoundError and VersionNotFoundError errors.

Related

Current Tags

  • 9.0.0                                ...           latest (2 years ago)

16 Versions

  • 9.0.0                                ...           2 years ago
  • 8.0.0                                ...           2 years ago
  • 7.0.0                                ...           4 years ago
  • 6.0.0                                ...           5 years ago
  • 5.1.0                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 4.0.0                                ...           8 years ago
  • 3.1.0                                ...           9 years ago
  • 3.0.0                                ...           9 years ago
  • 2.0.0                                ...           11 years ago
  • 1.0.1                                ...           11 years ago
  • 1.0.0                                ...           12 years ago
  • 0.2.0                                ...           12 years ago
  • 0.1.2                                ...           12 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           12 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (1)
Dev Dependencies (5)

Copyright 2013 - present © cnpmjs.org | Home |