Installations
npm install latest-version
Developer
sindresorhus
Developer Guide
Module System
ESM
Min. Node Version
>=18
Typescript Support
Yes
Node Version
21.6.2
NPM Version
9.2.0
Statistics
177 Stars
50 Commits
22 Forks
11 Watching
1 Branches
9 Contributors
Updated on 07 Nov 2024
Languages
JavaScript (79.69%)
TypeScript (20.31%)
Total Downloads
Cumulative downloads
Total Downloads
2,287,700,609
Last day
-11%
1,343,935
Compared to previous day
Last week
1.8%
8,298,120
Compared to previous week
Last month
17.9%
33,111,929
Compared to previous month
Last year
-11.1%
329,223,891
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
5
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
1npm install latest-version
Usage
1import latestVersion from 'latest-version'; 2 3console.log(await latestVersion('ava')); 4//=> '6.1.1' 5 6console.log(await latestVersion('@sindresorhus/df')); 7//=> '4.0.0' 8 9// Also works with semver ranges and dist-tags 10console.log(await latestVersion('npm', {version: 'latest-5'})); 11//=> '5.10.0'
This package exposes the version
, registryUrl
, and omitDeprecated
options from package-json
, as well as the PackageNotFoundError
and VersionNotFoundError
errors.
Related
- latest-version-cli - CLI for this module
- package-json - Get the package.json of a package from the npm registry
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
- Info: security policy file detected: .github/security.md:1
- Info: Found linked content: .github/security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: .github/security.md:1
- Info: Found text in security policy: .github/security.md:1
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
Found 8/30 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/latest-version/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/latest-version/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:22
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 8 are checked with a SAST tool
Score
4.2
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More