DEV Community

Nuno Cruz
Nuno Cruz

Posted on

2 1

πŸ’‘How to update your npm dependencies easily 🏎

In large projects with many dependencies it is sometimes hard to track which dependencies are outdated or not. Whenever you need to update them, the npm-check tool can help you with that.

This tool has an interactive mode that can be run with:

npx npm-check -u
Enter fullscreen mode Exit fullscreen mode

The tool interactive mode looks like this:
Tool interactive mode

Then you just need to use the up/down arrow keys to navigate between the packages and use the space bar to select those that you want to update. In the end, just press enter to update and install the previously selected packages.

Besides listing outdated libraries, it also adds a link to the package documentation, which is very useful to quickly access the release notes to check the migration guides.

Please check the tool documentation for extra options.

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

Top comments (2)

Collapse
 
hozefaj profile image
Hozefa β€’

For bigger projects, I would recommend using an automated service like renovate or greenkeeper.

I have seen that will projects that have a large dependency tree, manual upgrading does not scale. This is something that can(and should) be automated.

Collapse
 
nunoancruz profile image
Nuno Cruz β€’

Totally agree with you Hozefa. In large projects it makes sense to spend some initial time automating these tasks.
Thanks for pointing it out πŸ‘

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay