Master
Tools

jscodeshift

NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions it is likely that it is still relevant. If the blip is older it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the RadarUnderstand more
Published: Oct 28, 2020
Oct 2020
Trial?

Maintaining large-scale JavaScript codebases is never easy, but it's especially challenging when migrating breaking changes. IDEs with refactoring capabilities may help in simple scenarios. However, when your codebase is a widely dependent library, every time you make a breaking change you have to go through a series of client codebases to make the appropriate updates — which requires human oversight and needs to be done manually. jscodeshift, a toolkit to refactor JavaScript and TypeScript, helps relieve this pain. It can parse your code to abstract syntax trees (AST) and provides an API to manipulate the tree with various transformations (e.g., adding, renaming and deleting properties from existing components) and then exports the tree as final source code. jscodeshift also comes with a simple unit testing utility, which can apply test-driven development for writing migration codemods. We've found jscodeshift to be quite helpful when maintaining design systems.