Updating dependencies is repetitive, which makes it a good job for an agent, and risky, because a bad update looks like a good one in the diff.
Workflow
- One package, or one tightly related group, per pull request.
- Ask the agent to read the changelog or release notes and list breaking changes before it edits code.
- Run the full test suite and the build, in CI as well as locally. Use the lockfile install command (
npm ci) so CI uses exactly what you review. - Review the lockfile diff for packages that changed that you did not expect, including transitive ones.
- Check that the new version is the one you meant, by name and publisher. Look-alike package names exist.
- Merge, deploy, and watch before the next update.
Security updates
Security fixes are urgent but not exempt. Update the vulnerable package alone, with a test that shows the fix when one is possible, and read the advisory. npm audit and your repository host’s alerts tell you where to look.
Do not
- Update everything at once because the agent can.
- Let the agent change the version range rules without telling you.
- Accept a change that removes a failing test to get CI green.
Keep the findings
A package that needed a workaround is a finding for the next update. Save it with the version it applies to.