Photo by S&B Vonlanthen on Unsplash
Fun and Easily Update NPM Dependencies with npm-check-updates
Simplify NPM dependency updates with npm-check-updates
Today, I was trying to update multiple projects, but didn't want to struggle with compatibility issues or potential breaks. I found an amazing package, [npm-check-updates](https://www.npmjs.com/package/npm-check-updates)
.
It helps to find package updates and versions, and also shows which ones are compatible or come with breaking changes.
Using ncu
First, install with `npm i -g npm-check-updates
`, then run it in the project. It will find the versions and show which are compatible or indicate breaking changes in red.
After completing the process, update the package.json by running ncu -u
, or you can install the updates with ncu i
.
Perhaps you want to upgrade to a specific version and have more control over which version to choose. In that case, run ncu --interactive --format group
.
Example:
I find it incredibly useful! You can use it in any project. Learn more about it on the official GitHub page.