patchup
v0.2.0
Published
Automatically update the packages in your projects
Readme
Patchup
Automatically update npm packages one at a time, running tests after each update and committing successful updates to git.
Features
- Updates packages individually with automatic test verification
- Rolls back failed updates automatically
- Creates a git commit for each successful update
- Supports pnpm workspaces
- Interactive package selection
- Filter by workspace, package name, or version diff (patch/minor/major)
Usage
npx patchup [options]Options
| Option | Alias | Description |
|--------|-------|-------------|
| --help | -h | Display usage guide |
| --workspace <name> | -w | Filter by workspace name (can be used multiple times) |
| --package <name> | -p | Filter by package name (can be used multiple times) |
| --max-version-diff <diff> | -m | Filter by max version diff: patch, minor, or major |
| --test <command> | | Custom test command (default: pnpm test) |
| --pre-update <command> | | Command to run before each update |
Examples
# Update all packages interactively
npx patchup
# Only patch updates in a specific workspace and a with max version diff of patch
npx patchup -w admin -m patch
# Use a custom test command
npx patchup --test "npm run test:ci"
# Filter for specific packages
npx patchup -p sass -p dayjsDevelopment
# Bump version
pnpm version <patch|minor|major>
# Publish
pnpm test
pnpm build
pnpm publish
# Link
pnpm link --global
pnpm remove --global patchup
pnpm list --global