Writing Code to Update our Code
summary
Projects move from brittle sed regexes to recast AST transforms that parse and rewrite code while preserving spacing and quote style, then print it back. A packaged ember-watson addon runs transforms for route generation, QUnit assertion updates, and Ember-Data relationship/name fixes. Prototype-extension conversion and many initializer migrations succeed; some initializer cases reach roughly 60% automated coverage. The approach targets actual node patterns not surface text so it works across teams and styles.
AI-written summary · about
chapters (27)
- 0:00Intro
- 0:15Writing code to update our code
- 1:07Envoy 3 Ember
- 1:28I used to do Ember consulting
- 1:42Ember facilitator
- 2:12ember-cli 0.1.13 came out
- 2:34QUnit's syntax changed
- 3:27How can I fix this?
- 3:57It worked great the first time
- 4:38How can I get this to work on any project?
- 5:00Early ember-cli adopter?
- 5:59ember-router- generator
- 6:18Abstract Syntax Trees (AST) to the rescue!
- 7:51Esprima and Recast
- 8:29Recast has a better support ES-NEXT
- 8:43AST generation
- 10:11Identifying nodes
- 12:20Builders
- 13:18Printing
- 13:45Final Result?
- 14:16Ember 2.0 and my dreams of a self-upgrading framework
- 20:37Present/Future
- 20:55Long Term Goal?
- 21:23A lot of companies stay behind because upgrading
- 21:37Make Ember self- upgradable through custom formulas
- 21:55More people might jump on the rapid-release train
- 22:09While helping Ember to move forward
related talks
47mComputer, refactor my code!
20mThey see me refactorin'. They hatin'
43mMachine Powered Refactoring: Leverage AST's to Push Your Legacy Code (& the Web) Forward
36mTransformers - codemods in disguise
21mAutomating Front-End Refactoring
34mTransform your codebase without breaking a sweat
29mAST: the Secret Weapon to Transform a Codebase
28mCross-File Codemodding
