Bumping Node.js dependencies
I usually run ncu
to upgrade package.json dependencies to the latest versions.
Sometimes however I want to update to the latest version of a major version, for example I’m on 1.2 and I don’t want to jump to 2.3, I want to stick to 1.3 for example, if it exists.
By default, ncu
upgrades the package to the latest version available.
We have the option to only upgrade to minor versions (ignoring major new versions, with breaking changes) with ncu --target minor
(or ncu -t minor
).
Upgrade only patch versions with ncu -t patch
.
I recently also found out about taze
. A similar tool.
Use it as taze minor
to bump to latest minor changes within the same major version.
Or if you prefer, taze major
will check all changes and bump to the latest stable changes including majors.
Patch updates, use taze patch
.
→ I wrote 17 books to help you become a better developer:
- C Handbook
- Command Line Handbook
- CSS Handbook
- Express Handbook
- Git Cheat Sheet
- Go Handbook
- HTML Handbook
- JS Handbook
- Laravel Handbook
- Next.js Handbook
- Node.js Handbook
- PHP Handbook
- Python Handbook
- React Handbook
- SQL Handbook
- Svelte Handbook
- Swift Handbook
Also, JOIN MY CODING BOOTCAMP, an amazing cohort course that will be a huge step up in your coding career - covering React, Next.js - next edition February 2025