ワンクリックで
fix-dependabot
// Fix a Dependabot PR by updating all monorepo instances of the dependency, running bun install, and pushing
// Fix a Dependabot PR by updating all monorepo instances of the dependency, running bun install, and pushing
[HINT] SKILL.mdと関連ファイルを含む完全なスキルディレクトリをダウンロード
| name | fix-dependabot |
| description | Fix a Dependabot PR by updating all monorepo instances of the dependency, running bun install, and pushing |
Dependabot PRs only update one package.json and never run bun install, so the bun.lock file is out of date and other packages in the monorepo still reference the old version. This skill fixes both problems.
Get PR info — Use gh pr view <number> --json headRefName,files,title,body to identify the branch name, which dependency was bumped, and the old/new versions.
Checkout the branch:
git fetch origin <branch>
git checkout <branch>
package.json files that reference the same dependency at the old version and update them too:rg '"<dependency>": "[~^]?<old-version>"' --glob '**/package.json'
Update every match to the new version. Preserve the prefix style (^, ~, or exact) that each package already uses.
Run bun install from the repo root to regenerate bun.lock.
Verify — Run git status to confirm only bun.lock and the expected package.json files were modified. If other unexpected files changed, investigate before proceeding.
Commit and push:
git add -u
git commit -m "Update <dependency> to <version> across all monorepo packages"
git push
main):git checkout main
bun install fails, the dependency version may have conflicts with other packages. In that case, close the PR and comment explaining why.