Skip to content

Commit

Permalink
fix macro import in codemod output (adobe#7112)
Browse files Browse the repository at this point in the history
* fix macro import in codemod output

* remove recast patch
  • Loading branch information
reidbarber authored Sep 27, 2024
1 parent d57bd8d commit 9a60dca
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion packages/dev/codemods/src/s1-to-s2/src/codemods/codemod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default function transformer(file: FileInfo, api: API, options: Options)
}

root.find(j.Program).get('body', 0).node.comments = leadingComments;
return root.toSource();
return root.toSource().replace(/assert\s*\{\s*type:\s*"macro"\s*\}/g, 'with { type: "macro" }');
}

transformer.parser = 'tsx';
13 changes: 0 additions & 13 deletions patches/recast+0.23.6.patch

This file was deleted.

0 comments on commit 9a60dca

Please sign in to comment.