diff --git a/packages/next-swc/crates/next-custom-transforms/src/transforms/page_static_info/mod.rs b/packages/next-swc/crates/next-custom-transforms/src/transforms/page_static_info/mod.rs index 8eae568fb90fd..e6da033aced7f 100644 --- a/packages/next-swc/crates/next-custom-transforms/src/transforms/page_static_info/mod.rs +++ b/packages/next-swc/crates/next-custom-transforms/src/transforms/page_static_info/mod.rs @@ -234,7 +234,7 @@ mod tests { common::{errors::ColorConfig, FilePathMapping, SourceMap, GLOBALS}, ecma::{ ast::Program, - parser::{EsConfig, Syntax, TsConfig}, + parser::{EsSyntax, Syntax, TsSyntax}, }, }; @@ -247,13 +247,13 @@ mod tests { let options = ParseOptions { is_module: IsModule::Unknown, syntax: if file_path.ends_with(".ts") || file_path.ends_with(".tsx") { - Syntax::Typescript(TsConfig { + Syntax::Typescript(TsSyntax { tsx: true, decorators: true, ..Default::default() }) } else { - Syntax::Es(EsConfig { + Syntax::Es(EsSyntax { jsx: true, decorators: true, ..Default::default() diff --git a/packages/next-swc/crates/next-custom-transforms/tests/errors.rs b/packages/next-swc/crates/next-custom-transforms/tests/errors.rs index be74f9fc9a6b1..6daf8887cde7e 100644 --- a/packages/next-swc/crates/next-custom-transforms/tests/errors.rs +++ b/packages/next-swc/crates/next-custom-transforms/tests/errors.rs @@ -15,7 +15,7 @@ use turbopack_binding::swc::{ core::{ common::{chain, FileName, Mark}, ecma::{ - parser::{EsConfig, Syntax}, + parser::{EsSyntax, Syntax}, transforms::{ base::resolver, testing::{test_fixture, FixtureTestConfig}, @@ -26,7 +26,7 @@ use turbopack_binding::swc::{ }; fn syntax() -> Syntax { - Syntax::Es(EsConfig { + Syntax::Es(EsSyntax { jsx: true, ..Default::default() }) diff --git a/packages/next-swc/crates/next-custom-transforms/tests/fixture.rs b/packages/next-swc/crates/next-custom-transforms/tests/fixture.rs index 3e84caad00e5d..72cac88b8563a 100644 --- a/packages/next-swc/crates/next-custom-transforms/tests/fixture.rs +++ b/packages/next-swc/crates/next-custom-transforms/tests/fixture.rs @@ -27,7 +27,7 @@ use turbopack_binding::swc::{ core::{ common::{chain, comments::SingleThreadedComments, FileName, Mark, SyntaxContext}, ecma::{ - parser::{EsConfig, Syntax}, + parser::{EsSyntax, Syntax}, transforms::{ base::resolver, react::jsx, @@ -40,7 +40,7 @@ use turbopack_binding::swc::{ }; fn syntax() -> Syntax { - Syntax::Es(EsConfig { + Syntax::Es(EsSyntax { jsx: true, ..Default::default() }) diff --git a/packages/next-swc/crates/next-custom-transforms/tests/full.rs b/packages/next-swc/crates/next-custom-transforms/tests/full.rs index f99323085f173..a0a2bb784b777 100644 --- a/packages/next-swc/crates/next-custom-transforms/tests/full.rs +++ b/packages/next-swc/crates/next-custom-transforms/tests/full.rs @@ -2,14 +2,12 @@ use std::path::{Path, PathBuf}; use next_custom_transforms::chain_transforms::{custom_before_pass, TransformOptions}; use serde::de::DeserializeOwned; +use swc_core::ecma::parser::TsSyntax; use turbopack_binding::swc::{ core::{ base::Compiler, common::{comments::SingleThreadedComments, Mark}, - ecma::{ - parser::{Syntax, TsConfig}, - transforms::base::pass::noop, - }, + ecma::{parser::Syntax, transforms::base::pass::noop}, }, testing::{NormalizedOutput, Tester}, }; @@ -49,7 +47,7 @@ fn test(input: &Path, minify: bool) { } else { None }, - syntax: Some(Syntax::Typescript(TsConfig { + syntax: Some(Syntax::Typescript(TsSyntax { tsx: true, ..Default::default() })),