Skip to content

Commit 9a60dca

Browse files
authored
fix macro import in codemod output (#7112)
* fix macro import in codemod output * remove recast patch
1 parent d57bd8d commit 9a60dca

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

packages/dev/codemods/src/s1-to-s2/src/codemods/codemod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export default function transformer(file: FileInfo, api: API, options: Options)
274274
}
275275

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

280280
transformer.parser = 'tsx';

patches/recast+0.23.6.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)