4 ms·
I totally agree. I'd love to see more languages supporting bidirectional code transforms. I've used jscodeshift [0] to refactor large JavaScript codebases, and
by TheAceOfHearts 9y ago
I totally agree. I'd love to see more languages supporting bidirectional code transforms.
I've used jscodeshift [0] to refactor large JavaScript codebases, and it's absolutely amazing. It's incredibly empowering to write code to update your code. For example: unhappy with your test assertions library? Safely migrate all your tests with a quick script.
The React team has a react-codemod [1] repo which has scripts to help you update to newer APIs. That means they can make changes and iterate on improvements without leaving people behind. Quite frankly, I don't see why more tools, libraries, and frameworks wouldn't do the same.
[0] https://github.com/facebook/jscodeshift https://github.com/facebook/jscodeshift
[1] https://github.com/reactjs/react-codemod https://github.com/reactjs/react-codemod