Audit NPM Dependencies
Yep, the npm cli already has commands for npm outdated and npm audit. So why bother?
Well, npm audit is debatably useless.npm outdated is a useful tool (when it works) but I found myself repeating the same steps every time I update dependencies:
- Run npm outdated to see what needs to be upgraded.
- Pick a package and search for its changelog to see what breaking changes I need to be aware of.
- Run npm install <PACKAGE_NAME>@<SOME_VERSION>. Usually including several interrelated dependencies in one go.
- Rinse. Repeat. Many, many times.
This is a simple utility to assit this repetitious proceedure. Just paste in any package.json file to generate a filterable report of all of your project's dependencies. No identifying information is stored about your JSON file. In fact, if you're feeling paranoid, simply provide a valid JSON object with fields for "dependencies" and/or "devDependencies". That's all that's needed.
The generated report highlights packages needing to be updated, provides quick links to the package's npm page, and builds update commands based on your selected packages.
Sound useful for your workflow?
Give it a try!