codemod
A script that rewrites source code automatically, for example renaming a deprecated prop across a whole codebase.
In more detail
Codemods work on the code's syntax tree, not plain text, so they can change isOutline to variant="outline" safely. Shipping one with a major version turns hours of manual migration into one command.
Related terms
- jscodeshift — Meta's toolkit for writing and running codemods on JavaScript and TypeScript code.
- deprecation — Marking a feature as outdated and scheduled for removal, while it still works, so users have time to move to its replacement.
- breaking change — A change that makes existing users of a program or interface stop working until they change something too.
Taught in
- System Governance: Changesets, Semantic Versioning & Deprecation — Design Systems & Component Engineering