Skip to content

Commit 2d1a93d

Browse files
authored
feat: update swc_core to 58 (#579)
1 parent 4a5eba1 commit 2d1a93d

File tree

4 files changed

+63
-67
lines changed

4 files changed

+63
-67
lines changed

Cargo.lock

Lines changed: 56 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ regex = "1"
2424
serde = { version = "1", features = ["derive"] }
2525
serde_json = "1"
2626
swc_cached = "2"
27-
swc_core = { version = "48", features = ["ecma_plugin_transform"] }
27+
swc_core = { version = "58", features = ["ecma_plugin_transform"] }
2828

2929
# .cargo/config defines few alias to build plugin.
3030
# cargo build-wasip1 generates wasm-wasi32 binary

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "nightly-2025-05-06"
2+
channel = "nightly-2026-02-26"
33
components = ["clippy"]
44
targets = ["wasm32-wasip1"]
55
profile = "minimal"

src/transform.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,11 @@ impl VisitMut for TransformVisitor {
144144
s.visit_mut_children_with(self);
145145

146146
match s {
147-
Stmt::Decl(Decl::Var(var)) => {
148-
if var.decls.is_empty() {
149-
// Variable declaration without declarator is invalid.
150-
//
151-
// After this, `s` becomes `Stmt::Empty`.
152-
s.take();
153-
}
147+
Stmt::Decl(Decl::Var(var)) if var.decls.is_empty() => {
148+
// Variable declaration without declarator is invalid.
149+
//
150+
// After this, `s` becomes `Stmt::Empty`.
151+
s.take();
154152
}
155153
Stmt::Expr(expr) => {
156154
if let Expr::Call(call) = &mut *expr.expr {

0 commit comments

Comments
 (0)