A simple Node.js script to check when your package dependencies were published to npm registry.
This tool helps you verify if the versions of packages in your package.json were released before a specific date (November 20, 2025 by default).
- Node.js (no additional dependencies required - uses built-in modules)
- Save
check-versions.jsto your project directory - That's it! No
npm installneeded.
# Check package.json in current directory
node check-versions.js
# Check a specific package.json file
node check-versions.js path/to/package.jsonThe script displays a formatted table with:
- Package name
- Version specified in package.json
- Publication date from npm registry
- Whether it was published before November 20, 2025
Example output:
Package Name Version Published Before Nov 20, 2025
------------------------------------------------------------------------------------------
base64url 3.0.1 2018-04-23 Yes
cookie 0.4.2 2021-02-15 Yes
express 4.21.2 2024-10-08 Yes
The script:
- Reads your
package.jsonfile - Extracts all dependencies and devDependencies
- Queries the npm registry API for each package
- Retrieves the exact publication date for each version
- Compares against the cutoff date
The script includes a 100ms delay between API requests to avoid rate limiting from the npm registry.