bump-deps by paulrberg/agent-skills
npx skills add https://github.com/paulrberg/agent-skills --skill bump-deps使用 taze CLI 智能提示更新 Node.js 依赖:自动应用 MINOR/PATCH 更新,单独提示 MAJOR 更新,跳过固定版本包。
当提供包名作为参数时(例如 /bump-deps react typescript),使用 --include 将所有 taze 命令范围限定为仅这些包。
开始前,通过运行以下命令验证 taze 是否已安装:
scripts/run-taze.sh
如果退出码为 1,请停止并告知用户必须安装 taze:
npm install -g tazenpx taze运行 taze 脚本以发现可用更新。该脚本会自动检测 monorepo 项目(package.json 中的 workspaces 或 pnpm-workspace.yaml)并自动启用递归模式。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
scripts/run-taze.sh
根据 taze 输出,对每个包更新进行分类:
| 分类 | 版本变更 | 操作 |
|---|---|---|
| 固定版本 | 无 ^ 或 ~ 前缀(例如 "1.0.0") | 完全跳过 |
| PATCH | x.y.z → x.y.Z(例如 1.0.0 → 1.0.1) | 自动应用 |
| MINOR | x.y.z → x.Y.0(例如 1.0.0 → 1.1.0) | 自动应用 |
| MAJOR | x.y.z → X.0.0(例如 1.0.0 → 2.0.0) | 提示用户 |
如果提供了包参数,则仅筛选这些包。
识别固定版本: 在 package.json 中,固定版本没有范围前缀:
"lodash": "4.17.21" → 跳过"lodash": "^4.17.21" → 处理自动应用所有非 major 更新,无需提示:
# 所有包
taze minor --write
# 仅特定包(当提供参数时)
taze minor --write --include react,typescript
脚本会自动检测 monorepo 模式,但直接运行 taze 时,请自行检测:检查 package.json 或 pnpm-workspace.yaml 中是否存在 workspaces,如果存在则添加 -r。
报告已更新的包。
自动跳过包: 绝不提示这些包——自动应用它们的 major 更新:
lucide-react(图标库,频繁进行 major 版本更新,实际上向后兼容)对于每个剩余的有可用 major 更新的包,使用 AskUserQuestion 单独询问用户:
Package: <package-name>
Current: <current-version>
Available: <new-version>
Update to major version?
问题格式:
收集所有已批准的 major 更新。
收集用户批准后,应用已批准的 major 更新:
taze major --write --include <pkg1>,<pkg2>,<pkg3>
如果检测到 monorepo,则添加 -r。
应用所有更新后,检查根目录 package.json 中的 Bun 工作区目录。Bun monorepo 可以使用 workspaces 对象内的 catalog 和 catalogs 字段集中管理依赖版本:
{
"workspaces": {
"packages": ["packages/*"],
"catalog": {
"react": "^19.0.0"
},
"catalogs": {
"testing": {
"jest": "^30.0.0"
}
}
}
}
工作区包通过 "react": "catalog:"(默认目录)或 "jest": "catalog:testing"(命名目录)引用这些目录。
如果根目录 package.json 中既不存在 workspaces.catalog 也不存在 workspaces.catalogs,则跳过此步骤。
对于在步骤 3/5 中更新的每个包:
workspaces.catalog 中——如果是,则更新那里的版本workspaces.catalogs 中的每个命名目录——如果包出现,则更新那里的版本保留目录条目中现有的范围前缀(^、~ 或无)。例如,如果目录中有 "react": "^19.0.0" 且 taze 将 react 升级到 19.1.0,则将目录更新为 "react": "^19.1.0"。
使用 Edit 将版本更改直接应用到根目录 package.json。
应用所有更新后,运行 ni 以安装依赖。它会自动检测包管理器。
Taze 按类型分组显示更新。示例输出:
@types/node ^20.0.0 → ^22.0.0 (major)
typescript ^5.3.0 → ^5.4.0 (minor)
eslint ^8.56.0 → ^8.57.0 (patch)
最右侧列表示更新类型(major/minor/patch)。
使用 --include-locked 显示的没有 ^ 或 ~ 的包是固定版本——完全跳过这些。
| 脚本 | 用途 |
|---|---|
scripts/run-taze.sh | 以非交互模式运行 taze,检查安装 |
^ 或 ~)表示有意固定——绝不修改这些--include 标志接受逗号分隔的包名或正则表达式模式workspaces.catalog / workspaces.catalogs)是使用 catalog: 协议的工作区包的单一事实来源——始终在更新常规依赖的同时更新目录条目每周安装次数
93
仓库
GitHub 星标数
41
首次出现
2026 年 2 月 12 日
安全审计
已安装于
claude-code88
codex79
opencode78
gemini-cli77
github-copilot77
amp77
Update Node.js dependencies using taze CLI with smart prompting: auto-apply MINOR/PATCH updates, prompt for MAJOR updates individually, skip fixed-version packages.
When package names are provided as arguments (e.g. /bump-deps react typescript), scope all taze commands to only those packages using --include.
Before starting, verify taze is installed by running:
scripts/run-taze.sh
If exit code is 1, stop and inform the user that taze must be installed:
npm install -g tazenpx tazeRun the taze script to discover available updates. The script auto-detects monorepo projects (workspaces in package.json or pnpm-workspace.yaml) and enables recursive mode automatically.
scripts/run-taze.sh
From the taze output, categorize each package update:
| Category | Version Change | Action |
|---|---|---|
| Fixed | No ^ or ~ prefix (e.g., "1.0.0") | Skip entirely |
| PATCH | x.y.z → x.y.Z (e.g., 1.0.0 → 1.0.1) | Auto-apply |
| MINOR |
If package arguments were provided, filter to only those packages.
Identifying fixed versions: In package.json, fixed versions have no range prefix:
"lodash": "4.17.21" → skip"lodash": "^4.17.21" → processApply all non-major updates automatically without prompting:
# All packages
taze minor --write
# Specific packages only (when args provided)
taze minor --write --include react,typescript
The script auto-detects monorepo mode, but when running taze directly, detect it yourself: check for workspaces in package.json or pnpm-workspace.yaml and add -r if present.
Report the packages that were updated.
Auto-skip packages: Never prompt for these packages—auto-apply their major updates:
lucide-react (icon library with frequent major bumps, backward-compatible in practice)For each remaining package with a major update available, use AskUserQuestion to ask the user individually:
Package: <package-name>
Current: <current-version>
Available: <new-version>
Update to major version?
Question format:
Collect all approved major updates.
After collecting user approvals, apply the approved major updates:
taze major --write --include <pkg1>,<pkg2>,<pkg3>
Add -r if monorepo was detected.
After applying all updates, check the root package.json for Bun workspace catalogs. Bun monorepos can centralize dependency versions using catalog and catalogs fields inside the workspaces object:
{
"workspaces": {
"packages": ["packages/*"],
"catalog": {
"react": "^19.0.0"
},
"catalogs": {
"testing": {
"jest": "^30.0.0"
}
}
}
}
Workspace packages reference these with "react": "catalog:" (default catalog) or "jest": "catalog:testing" (named catalog).
Skip this step if neither workspaces.catalog nor workspaces.catalogs exists in the root package.json.
For each package that was updated in Steps 3/5:
workspaces.catalog — if so, update the version thereworkspaces.catalogs — if the package appears, update the version therePreserve the existing range prefix (^, ~, or none) from the catalog entry. For example, if the catalog has "react": "^19.0.0" and taze bumped react to 19.1.0, update the catalog to "react": "^19.1.0".
Use Edit to apply the version changes directly to the root package.json.
After all updates are applied, run ni to install dependencies. It auto-detects the package manager.
Taze displays updates grouped by type. Example output:
@types/node ^20.0.0 → ^22.0.0 (major)
typescript ^5.3.0 → ^5.4.0 (minor)
eslint ^8.56.0 → ^8.57.0 (patch)
The rightmost column indicates update type (major/minor/patch).
Packages shown with --include-locked that have no ^ or ~ are fixed versions—skip these entirely.
| Script | Purpose |
|---|---|
scripts/run-taze.sh | Run taze in non-interactive mode, check installation |
^ or ~) indicate intentional pinning—never modify these--include flag accepts comma-separated package names or regex patternsworkspaces.catalog / workspaces.catalogs) are the source of truth for workspace packages using the catalog: protocol—always update catalog entries alongside regular depsWeekly Installs
93
Repository
GitHub Stars
41
First Seen
Feb 12, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
claude-code88
codex79
opencode78
gemini-cli77
github-copilot77
amp77
x.y.z → x.Y.0 (e.g., 1.0.0 → 1.1.0) |
| Auto-apply |
| MAJOR | x.y.z → X.0.0 (e.g., 1.0.0 → 2.0.0) | Prompt user |