Update all dependencies across frontend and backend projects. Reads changelogs for breaking changes, checks affected code, runs tests, and provides a summary. Use when updating npm dependencies across the monorepo.
Update all npm dependencies across the frontend (current repo) and backend projects. This skill handles the full update workflow including changelog review, code impact analysis, testing, and summarization.
Ask the user for the backend project directory path. Do NOT hardcode any path. Example prompt:
Please provide the backend project directory path (e.g.,
/path/to/backend).
Wait for the user's response before proceeding. Save the path as BACKEND_DIR for later use.
pnpm outdated --recursive in the current repo root to identify all outdated dependencies.pnpm outdated --recursive in BACKEND_DIR to identify all outdated dependencies.Present the user with a summary of how many dependencies are outdated in each project.
Update in two phases to isolate issues:
Phase 1 — Patch and minor updates (safer):
From the pnpm outdated output, identify all dependencies where the update is a patch or minor version bump. Update them in batch:
pnpm update <package>@latest --recursive in the repo root.pnpm update <package>@latest --recursive in BACKEND_DIR.Why
@latest? Both projects usesave-exact=true, so versions are pinned without^or~. Without--latest,pnpm updateonly resolves within the existing range, which for exact versions is a no-op.
Phase 2 — Major updates (requires careful review):
For each dependency with a major version update available:
pnpm update <package>@latest --recursive to update specific packages.Important pnpm workspace notes:
pnpm catalog in pnpm-workspace.yaml for some shared versions. If a dependency is managed via catalog, update the version in pnpm-workspace.yaml instead of individual package.json files.save-exact=true, so versions are pinned without ^ or ~.patchedDependencies in pnpm-workspace.yaml or package.json — if a patched dependency is being updated, verify the patch still applies or remove it if no longer needed.For each dependency with a major version update, you MUST read the changelog before updating.
Use these methods in order of preference:
npm view <package> repository.url to find the repo, then check for CHANGELOG.md or GitHub releases.https://github.com/<owner>/<repo>/releases using WebFetch.<package> changelog <old-version> to <new-version>.For each major update, record:
foo: 2.x → 3.x)For each dependency with breaking changes identified in Step 3:
Grep to find all imports and usages of the affected package across the relevant project (frontend or backend).After all updates are applied:
Run these commands sequentially in the repo root and capture results:
pnpm install
pnpm typecheck
pnpm test
pnpm lint
Run these commands sequentially in BACKEND_DIR and capture results:
pnpm install
pnpm typecheck
pnpm test
pnpm lint
pnpm lint:fix first. If issues persist, fix manually or revert the causing update.Repeat the test cycle until all checks pass.
Present the user with a comprehensive summary:
## Dependencies Updated
### Frontend
- <package>: <old-version> → <new-version> (patch/minor/major)
- ...
### Backend
- <package>: <old-version> → <new-version> (patch/minor/major)
- ...
## Skipped Updates (with reasons)
- <package>: <reason why not updated>
- ...
## Key Changelog Highlights
### Breaking Changes Applied
- <package> <version>: <what changed and how we adapted>
### Notable New Features
- <package> <version>: <brief description>
### Deprecation Warnings
- <package> <version>: <what's deprecated and timeline>
## Test Results
- Frontend typecheck: ✅/❌
- Frontend tests: ✅/❌
- Frontend lint: ✅/❌
- Backend typecheck: ✅/❌
- Backend tests: ✅/❌
- Backend lint: ✅/❌
Ask the user if they want to commit the changes.