From f4b5f9998bb2f52ee1db22caa8d76c4f005c6296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 13 Mar 2023 12:52:12 +0900 Subject: [PATCH 1/3] Update swc_core --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a1d795c..2d0561b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ serializable = ["serde"] [dependencies] markdown = "1.0.0-alpha.7" serde = { version = "1", optional = true } -swc_core = { version = "0.59.0", features = [ +swc_core = { version = "0.69.2", features = [ "ecma_ast", "ecma_visit", "ecma_codegen", From 490a42957bdc0f9bc2d489183c648e94aa34a8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 13 Mar 2023 12:54:20 +0900 Subject: [PATCH 2/3] Fix --- src/mdx_plugin_recma_jsx_rewrite.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mdx_plugin_recma_jsx_rewrite.rs b/src/mdx_plugin_recma_jsx_rewrite.rs index 09b7221..65b5aa4 100644 --- a/src/mdx_plugin_recma_jsx_rewrite.rs +++ b/src/mdx_plugin_recma_jsx_rewrite.rs @@ -473,7 +473,7 @@ impl<'a> State<'a> { decl.function.body.as_mut().unwrap() } Func::Arrow(arr) => { - if let BlockStmtOrExpr::Expr(expr) = &mut arr.body { + if let BlockStmtOrExpr::Expr(expr) = &mut *arr.body { let block = BlockStmt { stmts: vec![Stmt::Return(ReturnStmt { arg: Some(expr.take()), @@ -481,7 +481,7 @@ impl<'a> State<'a> { })], span: DUMMY_SP, }; - arr.body = BlockStmtOrExpr::BlockStmt(block); + arr.body = Box::new(BlockStmtOrExpr::BlockStmt(block)); } arr.body.as_mut_block_stmt().unwrap() } From 4047fa995778cfa64fce19d430587d0a0114c26f Mon Sep 17 00:00:00 2001 From: Titus Date: Mon, 13 Mar 2023 09:33:08 +0100 Subject: [PATCH 3/3] Update Cargo.toml Signed-off-by: Titus --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2d0561b..d2e79f1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ serializable = ["serde"] [dependencies] markdown = "1.0.0-alpha.7" serde = { version = "1", optional = true } -swc_core = { version = "0.69.2", features = [ +swc_core = { version = "0.69.0", features = [ "ecma_ast", "ecma_visit", "ecma_codegen",