diff --git a/packages/dev/codemods/src/s1-to-s2/src/codemods/codemod.ts b/packages/dev/codemods/src/s1-to-s2/src/codemods/codemod.ts index 7f5761557ac..14a7a623ed6 100644 --- a/packages/dev/codemods/src/s1-to-s2/src/codemods/codemod.ts +++ b/packages/dev/codemods/src/s1-to-s2/src/codemods/codemod.ts @@ -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'; diff --git a/patches/recast+0.23.6.patch b/patches/recast+0.23.6.patch deleted file mode 100644 index bd034ae8717..00000000000 --- a/patches/recast+0.23.6.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/recast/lib/printer.js b/node_modules/recast/lib/printer.js -index 9bedd42..33941b0 100644 ---- a/node_modules/recast/lib/printer.js -+++ b/node_modules/recast/lib/printer.js -@@ -2199,7 +2199,7 @@ function printFunctionParams(path, options, print) { - function maybePrintImportAssertions(path, options, print) { - var n = path.getValue(); - if (n.assertions && n.assertions.length > 0) { -- var parts = [" assert {"]; -+ var parts = [" with {"]; - var printed = path.map(print, "assertions"); - var flat = (0, lines_1.fromString)(", ").join(printed); - if (flat.length > 1 || flat.getLineLength(1) > options.wrapColumn) {