MCPcopy Index your code
hub / github.com/sindresorhus/latest-version

github.com/sindresorhus/latest-version @v9.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v9.0.0 ↗ · + Follow
1 symbols 9 edges 4 files 0 documented · 0% 20 cross-repo links

Browse by type

Functions 1 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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

Core symbols most depended-on inside this repo

Shape

Function 1

Languages

TypeScript100%

Modules by API surface

index.js1 symbols

For agents

$ claude mcp add latest-version \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page