docs/agents/dependency-management.md
Use --target minor for safe minor/patch updates only:
# Check all three locations for available updates
npx npm-check-updates --target minor # Root
npx npm-check-updates --target minor --cwd site # Site workspace
npx npm-check-updates --target minor --cwd src/app # App workspace
# Apply updates with -u flag
npx npm-check-updates --target minor -u
npx npm-check-updates --target minor -u --cwd site
npx npm-check-updates --target minor -u --cwd src/app
# Install and verify
npm install
npm run build && npm test && npm run lint && npm run format:check
# Check version consistency (required by CI)
npx check-dependency-version-consistency
Version consistency across workspaces - All workspaces must use the same version of shared dependencies. CI enforces this via check-dependency-version-consistency.
Update examples/ - 20+ package.json files in examples/ are user-facing; keep them current when updating dependencies.
Run npm audit - Use npm audit or npm run audit:fix to check for security vulnerabilities across all workspaces. Do not let npm audit fix lockfile drift ride along with an unrelated change; ship audit-driven updates as their own PR.
If updates fail - Revert the problematic package and keep the current version. Don't force incompatible updates.
Test before committing - Always run npm run build && npm test after updating dependencies.
# See available major updates (don't apply automatically)
npx npm-check-updates --target latest
# Major updates often require code changes - evaluate each carefully
Major updates require careful evaluation:
The project uses npm workspaces. Updates must be checked in all three locations:
/) - Core library dependencies/site) - Documentation site (Docusaurus)/src/app) - Web UI (React/Vite)Renovate force-pushes its branches whenever main changes or someone comments
@renovate rebase. Any manual commit you add may be overwritten without warning.
npm run local -- eval -c <example>.yaml --no-cache -o output.json, adding
--env-file .env when credentials are needed and the file exists)
before deciding whether the upgrade needs code changes.# Fix security vulnerabilities in all workspaces
npm run audit:fix
# Check for outdated packages
npm outdated
# See why a package is installed
npm explain <package-name>
# Check for unused dependencies
npm run depcheck