Upgrade a dependency
Bump a library, fix what breaks and open a pull request.
Engineering · Software · When you ask · Updated
Works with
- Slack
How do you upgrade a dependency?
To upgrade a dependency, ask Maito in Slack which library and version. It reads the release notes, bumps it on a branch, fixes the code that breaks, runs your tests and build, then opens a pull request listing each change. It also flags requirements like a newer Node version in your CI setup.
How it's done today
Upgrades get put off until they're painful.
What Maito does
- Read the release notes
- Upgrade and fix breaking changes
- Run tests
- Open a PR
Example
@Maito upgrade React Router to the latest version.
PR #918 is open: React Router 6.22 to 7.9. 187 tests pass, build is green. What broke and how I fixed it: • Imports moved from react-router-dom to react-router: 4 files • 2 loaders used the removed json() helper and now return plain objects 6 files changed in total, plus the lockfile. Catch: this version needs Node 20, and our CI workflow still runs Node 18. I changed .github/workflows/ci.yml to 20. If your deploy image is on 18, it needs the same bump before you merge. From the release notes and the migration guide. Nothing is merged. Want me to check the deploy config for the Node version?
Alex (4:10 PM):
upgrade React Router to the latest version.
Maito (4:38 PM):
PR #918 is open: React Router 6.22 to 7.9. 187 tests pass, build is green.
What broke and how I fixed it:
• Imports moved from react-router-dom to react-router: 4 files
• 2 loaders used the removed json() helper and now return plain objects
6 files changed in total, plus the lockfile.
Catch: this version needs Node 20, and our CI workflow still runs Node 18. I changed .github/workflows/ci.yml to 20. If your deploy image is on 18, it needs the same bump before you merge.
From the release notes and the migration guide. Nothing is merged. Want me to check the deploy config for the Node version?
How to set it up
- Set up
Nothing to set up. Ask in Slack or by email whenever you need it.
What it won't do
It tests what your tests cover. Behavior with no test, or problems in production only, can still appear after the upgrade.
Questions
No. It opens the pull request and a person reviews and merges.
It fixes what it can, and tells you which failures remain and why. It does not hide failing tests.
Yes. It reads the migration guide and changes the affected files, but a large major upgrade deserves a careful human review.