{"name":"latest-version","version":"8.0.0","description":"Get the latest version of an npm package","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/latest-version.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["latest","version","npm","pkg","package","package.json","current","module"],"dependencies":{"package-json":"^9.0.0"},"devDependencies":{"ava":"^6.1.0","semver":"^7.5.4","semver-regex":"^4.0.5","tsd":"^0.30.4","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"cb09280a7ccfd464408dc1e6b2a31d7bf1452bdd","bugs":{"url":"https://github.com/sindresorhus/latest-version/issues"},"homepage":"https://github.com/sindresorhus/latest-version#readme","_id":"latest-version@8.0.0","_nodeVersion":"21.5.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-FvwzZ43AtFdin94Mmuu/Sa+2vpDKbaDarz/MZU2EuDU7B9aGWq+c6M7EccBD7XJGnEwBmSDRRYabkvnEKqqksw==","shasum":"1b2dcfe633ec1ffd2382c69a1bc3a855cbc5c2c6","tarball":"http://registry-npm.ywwl.com/latest-version/download/latest-version-8.0.0.tgz","fileCount":5,"unpackedSize":3718,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+unCPc8RSgyCMH7CYCXkPv84SgcIfcsvlRiwWgB6f8AiBuJlhlWbrnGqVctnGYns59JcomGVn5cDKQpmUpPL2WYg=="}],"size":1863,"noattachment":false,"key":"/latest-version/-/latest-version-8.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/latest-version_8.0.0_1706017903449_0.32025542925942574"},"_hasShrinkwrap":false,"readme":"# latest-version\n\n> Get the latest version of an npm package\n\nFetches the version directly from the registry instead of depending on the massive [npm](https://github.com/npm/npm/blob/8b5e7b6ae5b4cd2d7d62eaf93b1428638b387072/package.json#L37-L85) module like the [latest](https://github.com/bahamas10/node-latest) module does.\n\n## Install\n\n```sh\nnpm install latest-version\n```\n\n## Usage\n\n```js\nimport latestVersion from 'latest-version';\n\nconsole.log(await latestVersion('ava'));\n//=> '6.1.1'\n\nconsole.log(await latestVersion('@sindresorhus/df'));\n//=> '4.0.0'\n\n// Also works with semver ranges and dist-tags\nconsole.log(await latestVersion('npm', {version: 'latest-5'}));\n//=> '5.10.0'\n```\n\nThis package exposes the [`version`](https://github.com/sindresorhus/package-json#version), [`registryUrl`](https://github.com/sindresorhus/package-json#registryurl), and [`omitDeprecated`](https://github.com/sindresorhus/package-json#omitdeprecated) options from [`package-json`](https://github.com/sindresorhus/package-json#options), as well as the [`PackageNotFoundError`](https://github.com/sindresorhus/package-json#packagenotfounderror) and [`VersionNotFoundError`](https://github.com/sindresorhus/package-json#versionnotfounderror) errors.\n\n## Related\n\n- [latest-version-cli](https://github.com/sindresorhus/latest-version-cli) - CLI for this module\n- [package-json](https://github.com/sindresorhus/package-json) - Get the package.json of a package from the npm registry\n","publish_time":1706017903610,"_cnpm_publish_time":1706017903610,"dist-tags":{"latest":"9.0.0"}}