Mass Frontend Refactors: Less Stress; More Success
summary
Shows how to convert a 2 million‑line JavaScript codebase to a new i18n API using AST transforms rather than blind find/replace, using babel codemod or Facebook’s jscodeshift (SWC plugins are coming). Emphasizes required armor: reliable CI, per‑file unit tests, E2E and TypeScript checks, and a roll forward strategy. Recommends monorepo + divide‑and‑conquer PRs, commit‑then‑rebase‑and‑fix workflow, and experimenting at astexplorer.net; result: big changes succeed but expect temporary breakage and the need for quick rollbacks.
AI-written summary · about
chapters (9)
- 0:00Introduction to mass refactors
- 3:33Armor for successful refactors
- 6:21Monorepos as refactor tools
- 7:03Choosing your code mod weapon
- 10:34Writing your code mod script
- 12:58Refactor strategies and tactics
- 16:24Live AST exploration demo
- 30:07Rollback and roll forward strategies
- 33:17Closing and feedback request
related talks
40mRefactoring large JavaScript codebases
43mMachine Powered Refactoring: Leverage AST's to Push Your Legacy Code (& the Web) Forward
21mAutomating Front-End Refactoring
20mThey see me refactorin'. They hatin'
30mRefactoring large JavaScript codebases
13mSpeed at Scale: Optimizing The Largest CX Platform Out There
46mCompilers, User Interfaces & the Rest of Us
47mComputer, refactor my code!
