Last active
April 11, 2024 21:31
-
-
Save andersonbosa/fa3feff150d44d3ae329fe681a4c3994 to your computer and use it in GitHub Desktop.
NPM: How to Keep Dependencies Up-To-Date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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