Skip to main content

· 5 min read
Alex Bit

Learn how to make your codebase more adaptable and maintainable using codemods. Discover the key factors—like consistency, simplicity, documentation, test coverage, modularity, API stability, and abstraction—that make code easier to update and scale.

· 34 min read
Alex Bit

This technical blog post discusses a large-scale migration from Next.js Pages to App, performed by us, Codemod engineers, on the Cal.com open-source product. We talk about the migration planning, execution, challenges we faced and overcame during such large migrations, the DevX and performance gains from this modernization project, and the lessons we learned that could be applied to future migrations. Hope you find it useful and please share your feedback and reactions with us.

· 10 min read
Greg Pabian

Over the years, the JavaScript community has introduced many test runners. The StateOfJS 2022 survey provides interesting data points and visuals on the trends of these testing libraries and frameworks, with Vitest sitting at the top in terms of community interest.

Read on to learn how we built and used open-source codemods to automate the migration from Mocha to Vitest, saving countless hours of tedious work.

Screenshot 2023-12-15 at 12 40 42 PM

· 9 min read
Alex Bit

In this post, I'll touch on the following topics:

  • Code migrations are becoming more important but also more difficult.
  • Migrations do not need to be a headache. I share our criteria for a dream migration.
  • I demo Codemod platform for fully automating Next.js app router migration for the cms-wordpress project.
  • I share my thoughts on the future of code automation at scale with the help of AI and the community.

· 9 min read
Mohab Sameh

In the previous tutorial, we discussed how to take your codemod skills to the next level by applying the techniques used by professionals to write a codemod like no-vars.

In this tutorial, we take it one step further by writing test cases that confirm that our codemods identify all essential code patterns and then perform transforms correctly and precisely. Writing tests for our codemods can significantly improve your codemod development process.

Keep reading to add this skill to your arsenal.

· 16 min read
Mohab Sameh

Writing Codemods Like a Pro

Writing codemods using imperative methods (like JSCodeShift for JS/TS) can be extremely powerful for code transformation. However, such codemods can be difficult to create, especially for new codemod authors.

In this article, we'll use what we've learned about ASTs and simple codemod development to tackle a real-world problem.