Skip to content

Commit 5cb8efd

Browse files
chore(deps): update rust crate oxc to 0.31.0 (#79)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 086abb7 commit 5cb8efd

File tree

3 files changed

+67
-40
lines changed

3 files changed

+67
-40
lines changed

Cargo.lock

Lines changed: 63 additions & 35 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
@@ -21,7 +21,7 @@ test = false
2121
doctest = false
2222

2323
[dependencies]
24-
oxc = { version = "0.30.5", features = ["transformer", "codegen", "semantic"] }
24+
oxc = { version = "0.31.0", features = ["transformer", "codegen", "semantic"] }
2525

2626
swc = "0.290.0"
2727
swc_common = "0.40.1"

src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub mod oxc {
77
parser::Parser,
88
semantic::SemanticBuilder,
99
span::SourceType,
10-
transformer::{ReactOptions, TransformOptions, Transformer, TypeScriptOptions},
10+
transformer::{JsxOptions, TransformOptions, Transformer, TypeScriptOptions},
1111
};
1212

1313
pub fn transform(path: &Path, source_text: &str) -> (Allocator, String) {
@@ -19,7 +19,7 @@ pub mod oxc {
1919
let mut program = ret.program;
2020
let transform_options = TransformOptions {
2121
typescript: TypeScriptOptions::default(),
22-
react: ReactOptions::default(),
22+
react: JsxOptions::default(),
2323
..TransformOptions::default()
2424
};
2525
let (symbols, scopes) = SemanticBuilder::new(source_text)
@@ -29,14 +29,13 @@ pub mod oxc {
2929
let ret = Transformer::new(
3030
&allocator,
3131
path,
32-
source_type,
3332
source_text,
3433
trivias.clone(),
3534
transform_options,
3635
)
3736
.build_with_symbols_and_scopes(symbols, scopes, &mut program);
3837
assert!(ret.errors.is_empty());
39-
CodeGenerator::new().build(&program).source_text
38+
CodeGenerator::new().build(&program).code
4039
};
4140

4241
(allocator, printed)

0 commit comments

Comments
 (0)