depsup
v0.10.3
Published
A CLI tool to update dependencies in Nx workspaces.
Readme
depsup
A powerful CLI tool to update dependencies in Nx workspaces and monorepos automatically.
Table of Contents
Features
- 🚀 Automatic Nx Updates: Updates Nx to the latest version and runs migrations automatically (skips if Nx not present)
- 📦 Monorepo & Single-Package Support: Updates dependencies in workspace root and all packages in
packages/directory - 🎯 Smart Package Manager Detection: Automatically detects npm, pnpm, yarn, or bun based on lock files
- 🔄 Interactive Mode: Choose which dependencies to update interactively (default)
- ⚡ Non-Interactive/CI Mode: Skip prompts and update all dependencies automatically with
--ciflag - 🔍 Workspace Root Detection: Automatically finds the workspace root from any subdirectory
- 📊 Uses npm-check-updates: Leverages the powerful npm-check-updates tool under the hood
- 🖍️ Colorful Logging: Beautiful, color-coded log output for info, warnings, errors, and success
Installation
# Using npm
npm install -g depsup
# Using pnpm
pnpm add -g depsup
# Using yarn
yarn global add depsup
# Using bun
bun add -g depsupOr use directly with npx/pnpm dlx/yarn dlx/bunx:
npx depsup
pnpm dlx depsup
yarn dlx depsup
bunx depsupUsage
Run in your workspace root or any subdirectory:
depsup depsup -y depsup --yes
# Interactive mode (default) - choose which dependencies to update
depsup
# Non-interactive/CI mode - update all dependencies automatically
depsup --ciHow It Works
- Resolves Workspace Root: Automatically detects the workspace root by looking for workspace markers (
pnpm-workspace.yaml,.yarnrc.yml,bunfig.toml) orpackage.jsonwith lock files - Detects Package Manager: Identifies the package manager by scanning for lock files:
package-lock.json→ npmpnpm-lock.yaml→ pnpmyarn.lock→ yarnbun.lockorbun.lockb→ bun
- Updates Nx (if present): Runs
nx migrate <version>(default: latest) and applies migrations automatically, with optional commit prefix if--ciis enabled - Updates Root Dependencies: Updates dependencies in the workspace root
package.json - Updates Package Dependencies: Iterates through all packages in the
packages/directory (skips if directory doesn't exist) - Skips Non-Package Directories: Automatically skips directories without a
package.json
Supported Package Managers
- npm - Uses
npx npm-check-updates - pnpm - Uses
pnpm dlx npm-check-updates - yarn - Uses
yarn dlx npm-check-updates - bun - Uses
bunx npm-check-updates
Examples
depsup depsup --yes Update all dependencies in interactive mode:
depsupUpdate all dependencies automatically (CI/CD):
depsup --ciBuilding
This library was generated with Nx.
Run nx build depsup to build the library.
License
This project is licensed under the MIT License.
Copyright (c) 2025 Davide Di Criscito
For the full details, see the LICENSE file.
