Phase 0
Inventory current moment usage with mmntjs migrate --check. Identify timezone, locale, and parsing hotspots.
Phase 0.5
Optionally set npm alias with mmntjs migrate --mode=alias — zero code change, lets your build tool resolve moment → mmntjs at install time.
Phase 1
Run mmntjs migrate --apply to auto-rewrite imports. For full-only codebases, start with mmntjs (full compat). For lite-compatible code, switch directly to mmntjs/lite.
Phase 2
If your code only uses basic formatting/manipulation, mmntjs/lite/fns is an option — standalone functions with a small base. Run mmntjs migrate --apply --fns --dry to preview.
Phase 3
Run compatibility checks and review known differences for the APIs your codebase uses. Compare production-like behavior, especially invalid dates, offsets, and custom parsing.
Phase 4
Replace imports in a low-risk module or service and run the existing test suite. Expand rollout module by module with ownership and rollback clarity.
Phase 5
Use the bridge period to guide new code toward modern date/time APIs, including Temporal where it fits.