# Bumping Node.js dependencies

> Learn how to update your package.json dependencies with npm-check-updates (ncu) and taze, targeting only minor or patch versions to avoid breaking changes.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2024-10-13 | Topics: [Node.js](https://flaviocopes.com/tags/node/) | Canonical: https://flaviocopes.com/bumping-nodejs-dependencies/

I usually run [`ncu`](https://www.npmjs.com/package/npm-check-updates) 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`](https://github.com/antfu-collective/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`.

If you're not sure whether a change deserves a major, minor or patch bump, I built a free [semver advisor](https://flaviocopes.com/tools/semver-advisor/) that helps with exactly this.
