diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml index 050bc09574e4..8957a76fa131 100644 --- a/.github/workflows/cargo.yml +++ b/.github/workflows/cargo.yml @@ -45,7 +45,7 @@ jobs: path: | ~/.cargo/ target - key: ${{ runner.os }}-cargo + key: ${{ runner.os }}-cargo-v2 # Ensure that all components are compilable. - name: Run cargo check for all targets run: cargo check --color always --all --all-targets @@ -151,7 +151,7 @@ jobs: path: | ~/.cargo/ target - key: ${{ runner.os }}-cargo + key: ${{ runner.os }}-cargo-v2 - name: Run cargo test run: | diff --git a/ecmascript/transforms/base/Cargo.toml b/ecmascript/transforms/base/Cargo.toml index 85c3d01979ed..dc0c7619d95a 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.8.0" +version = "0.8.1" [dependencies] fxhash = "0.2.1" diff --git a/ecmascript/transforms/base/src/fixer.rs b/ecmascript/transforms/base/src/fixer.rs index 2c20f946b85b..7472d929dc43 100644 --- a/ecmascript/transforms/base/src/fixer.rs +++ b/ecmascript/transforms/base/src/fixer.rs @@ -95,7 +95,7 @@ impl VisitMut for Fixer<'_> { self.ctx = old; match &*expr.arg { - Expr::Cond(..) => self.wrap(&mut expr.arg), + Expr::Cond(..) | Expr::Assign(..) => self.wrap(&mut expr.arg), _ => {} } } @@ -1064,4 +1064,6 @@ var store = global[SHARED] || (global[SHARED] = {}); issue_1397, "const main = async () => await (await server)()" ); + + identical!(deno_9810, "await (bar = Promise.resolve(2));"); }