Upgrades, Codemods, and Rollbacks
Upgrade sequence​
- Read the official release notes and upgrade guide.
- Confirm supported Node.js and React versions.
- Upgrade on a dedicated branch with a clean lockfile diff.
- Run official codemods and review every change.
- Remove deprecated configuration and APIs.
- Run lint, typecheck, unit, integration, end-to-end, accessibility, and build checks.
- Compare bundle, Web Vitals, server latency, cache behavior, and memory.
- Deploy to preview, then a canary cohort.
- Monitor error rate, latency, cache misses, and business flows.
- Complete or roll back within a defined decision window.
Breaking-change risks​
Pay special attention to async request APIs, caching defaults, Turbopack behavior, runtime support, proxy/middleware terminology, image configuration, Server Function serialization, and removed CLI behavior.
Codemods​
Codemods accelerate syntax changes; they do not prove semantic correctness. Review authorization, caching, dynamic rendering, request data, and error handling after automated edits.
Version skew​
Rolling deployments may run old and new builds simultaneously. Keep database changes backward compatible, understand Server Function encryption/build identifiers, and avoid incompatible message or cache formats.
Rollback plan​
A rollback includes the previous application artifact, compatible database schema, previous environment configuration, cache strategy, queue consumers, and feature flags. Database contraction should happen only after the rollback window closes.
Evidence​
Record upgrade date, versions, migration commands, test results, performance comparison, incidents, and final commit in an architecture or release note.