Only run toSource in next/font codemod if there are changes (#46877)
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.
Showing
Please
register
or
sign in
to comment