Skip to content

Instantly share code, notes, and snippets.

@andersonbosa
Last active April 11, 2024 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andersonbosa/fa3feff150d44d3ae329fe681a4c3994 to your computer and use it in GitHub Desktop.
Save andersonbosa/fa3feff150d44d3ae329fe681a4c3994 to your computer and use it in GitHub Desktop.
NPM: How to Keep Dependencies Up-To-Date
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# This command will check every installed dependency and compare the current
# version with the latest version in the npm registry. It is printed out into
# a table outlining available versions.
npm outdated
# Keep in mind that with npm update it will never update to a
# breaking-changes version
npm update
# This package can do everything npm outdated and npm upgrade can do with some
# added customization options
npm install -g npm-check-updates
# ncu to display packages to upgrade. Similar to npm outdated it will not apply
# any changes
ncu
# To upgrade dependencies, you just need to run:
ncu --upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment