Skip to content

Commit

Permalink
fix: bump swc_core to 0.90.* (#104)
Browse files Browse the repository at this point in the history
fix: change `PatOrExpr` to `AssignTarget`
  • Loading branch information
orionmiz committed Mar 3, 2024
1 parent 2620c27 commit e164fe7
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 48 deletions.
88 changes: 44 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
serde = "1.0.144"
serde_json = "1.0.85"
swc_core = { version = "0.89.*", features = ["ecma_plugin_transform", "ecma_ast", "ecma_utils", "ecma_visit", "ecma_transforms", "ecma_parser", "common"] }
swc_core = { version = "0.90.*", features = ["ecma_plugin_transform", "ecma_ast", "ecma_utils", "ecma_visit", "ecma_transforms", "ecma_parser", "common"] }

[dev-dependencies]
testing = "0.33.11"
Expand Down
6 changes: 3 additions & 3 deletions src/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ impl VisitMut for PageTransformer {
fn visit_mut_assign_expr(&mut self, a: &mut AssignExpr) {
a.visit_mut_children_with(self);

if a.left.is_expr() {
if let Some(mut expr) = a.left.take().expr() {
if a.left.is_simple() {
if let Some(mut expr) = a.left.take().simple() {
if let Some(MemberExpr { prop, .. }) = expr.as_mut_member() {
prop.visit_mut_children_with(self);
}
Expand All @@ -549,7 +549,7 @@ impl VisitMut for PageTransformer {
self.has_init_props = false;
}

a.left = PatOrExpr::Expr(expr);
a.left = AssignTarget::Simple(expr);
}
}
}
Expand Down

0 comments on commit e164fe7

Please sign in to comment.