Skip to content

Commit a4c7294

Browse files
committed
Upgrade swc to latest
1 parent a0cb297 commit a4c7294

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ serde = { version = "1.0.203", features = ["derive"] }
1616
# swc
1717
# docs: https://swc.rs
1818
# crate: https://crates.io/search?q=swc
19-
swc_common = { version = "0.33.26" }
20-
swc_ecmascript = { version = "0.242.0", features = ["parser", "visit"] }
19+
swc_common = { version = "0.34.3" }
20+
swc_ecmascript = { version = "0.244.1", features = ["parser", "visit"] }
2121

2222
# wasm-bindgen
2323
# docs: https://rustwasm.github.io/docs/wasm-bindgen

src/swc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use swc_common::comments::SingleThreadedComments;
77
use swc_common::errors::{Handler, HandlerFlags};
88
use swc_common::{FileName, SourceMap};
99
use swc_ecmascript::ast::{EsVersion, Module, Program};
10-
use swc_ecmascript::parser::{lexer::Lexer, EsConfig, StringInput, Syntax};
10+
use swc_ecmascript::parser::{lexer::Lexer, EsSyntax, StringInput, Syntax};
1111
use swc_ecmascript::visit::FoldWith;
1212

1313
pub struct SWC {
@@ -21,7 +21,7 @@ impl SWC {
2121
let source_file = source_map.new_source_file(FileName::Real(Path::new(specifier).to_path_buf()), source.into());
2222
let sm = &source_map;
2323
let error_buffer = ErrorBuffer::new(specifier);
24-
let syntax = Syntax::Es(EsConfig::default());
24+
let syntax = Syntax::Es(EsSyntax::default());
2525
let input = StringInput::from(&*source_file);
2626
let comments = SingleThreadedComments::default();
2727
let lexer = Lexer::new(syntax, EsVersion::Es2020, input, Some(&comments));

0 commit comments

Comments
 (0)