mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Currently the codemod always runs `root.toSource()`, recreating the source from the AST. But this can sometimes add unexpected semicolons to files that actually didn't get updated by the codemod. This PR adds a check to see if the AST has been updated before running `root.toSource()`, otherwise it just returns the original source.