diff --git a/ecmascript/transforms/base/Cargo.toml b/ecmascript/transforms/base/Cargo.toml index 8b7d35b86d5e..f293cee57bf1 100644 --- a/ecmascript/transforms/base/Cargo.toml +++ b/ecmascript/transforms/base/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" license = "Apache-2.0/MIT" name = "swc_ecma_transforms_base" repository = "https://github.com/swc-project/swc.git" -version = "0.22.0" +version = "0.22.1" [dependencies] fxhash = "0.2.1" diff --git a/ecmascript/transforms/base/src/fixer.rs b/ecmascript/transforms/base/src/fixer.rs index c431b02af2ab..f2c7c0cafc0e 100644 --- a/ecmascript/transforms/base/src/fixer.rs +++ b/ecmascript/transforms/base/src/fixer.rs @@ -78,6 +78,7 @@ impl VisitMut for Fixer<'_> { node.callee.visit_mut_with(self); match *node.callee { Expr::Call(..) + | Expr::Await(..) | Expr::Bin(..) | Expr::Assign(..) | Expr::Seq(..) @@ -1241,4 +1242,9 @@ var store = global[SHARED] || (global[SHARED] = {}); identical!(new_call, "new (getCtor())"); test_fixer!(new_member_1, "new obj.ctor()", "new obj.ctor()"); test_fixer!(new_member_2, "new (obj.ctor)", "new obj.ctor"); + + identical!( + new_await_1, + "async function foo() { new (await getServerImpl())(options) }" + ); }