About npm version checker
Check the latest version of an npm package and test whether a version range matches it.
Range symbols
- ^1.2.3 allows 1.x.x updates but not 2.0.0.
- ~1.2.3 allows only 1.2.x updates.
- A fixed version such as 1.2.3 allows nothing else.
A worked example
Enter react and the tool shows the latest published version. Then test the range ^18.2.0 against 18.3.1 (it matches) and 19.0.0 (it does not). That tells you what npm install would pick up and whether an upgrade is a major change.
Range cheat sheet
- ^1.2.3 means 1.2.3 up to, but not including, 2.0.0.
- ~1.2.3 means 1.2.3 up to, but not including, 1.3.0.
- 1.x or * allow any matching version, which is risky in production.
Keep dependencies safe
Run npm outdated and npm audit regularly, commit your lock file and read the changelog before a major upgrade.
Pinning versions
For applications, commit package-lock.json and use npm ci in CI, so the exact versions you tested are installed every time.
