mirror of
https://github.com/swc-project/swc.git
synced 2024-11-27 04:47:03 +03:00
refactor(es/parser): Remove import_assertions
from TsConfig
(#2950)
This commit is contained in:
parent
74363e0357
commit
97df4cef80
@ -1503,7 +1503,6 @@ impl Merge for swc_ecma_parser::TsConfig {
|
||||
self.tsx |= from.tsx;
|
||||
self.decorators |= from.decorators;
|
||||
self.dynamic_import |= from.dynamic_import;
|
||||
self.import_assertions |= from.import_assertions;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,8 +3,7 @@
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"dynamicImport": true,
|
||||
"decorators": true,
|
||||
"importAssertions": true
|
||||
"decorators": true
|
||||
},
|
||||
"transform": {
|
||||
"legacyDecorator": true,
|
||||
|
@ -135,7 +135,6 @@ fn shopify_2_same_opt() {
|
||||
dynamic_import: true,
|
||||
dts: false,
|
||||
no_early_errors: false,
|
||||
import_assertions: false,
|
||||
})),
|
||||
transform: None,
|
||||
external_helpers: false,
|
||||
|
@ -123,7 +123,6 @@ fn compile(input: &Path, output: &Path, opts: Options) {
|
||||
dynamic_import: true,
|
||||
dts: false,
|
||||
no_early_errors: true,
|
||||
import_assertions: false,
|
||||
})),
|
||||
..opts.config.jsc
|
||||
},
|
||||
|
@ -231,7 +231,6 @@ mod tests {
|
||||
dynamic_import: true,
|
||||
decorators: true,
|
||||
no_early_errors: true,
|
||||
import_assertions: true,
|
||||
..Default::default()
|
||||
}),
|
||||
EsVersion::Es2015,
|
||||
|
@ -148,10 +148,8 @@ impl Syntax {
|
||||
match self {
|
||||
Syntax::Es(EsConfig {
|
||||
import_assertions, ..
|
||||
})
|
||||
| Syntax::Typescript(TsConfig {
|
||||
import_assertions, ..
|
||||
}) => import_assertions,
|
||||
Syntax::Typescript(_) => true,
|
||||
}
|
||||
}
|
||||
|
||||
@ -314,10 +312,6 @@ pub struct TsConfig {
|
||||
|
||||
#[serde(skip, default)]
|
||||
pub no_early_errors: bool,
|
||||
|
||||
/// Stage 3.
|
||||
#[serde(default)]
|
||||
pub import_assertions: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, Default, Serialize, Deserialize)]
|
||||
|
@ -47,7 +47,6 @@ fn test(input: PathBuf) {
|
||||
decorators: true,
|
||||
dynamic_import: true,
|
||||
no_early_errors: true,
|
||||
import_assertions: true,
|
||||
..Default::default()
|
||||
}),
|
||||
_ => {
|
||||
|
@ -220,7 +220,6 @@ where
|
||||
tsx: fname.contains("tsx"),
|
||||
dynamic_import: true,
|
||||
decorators: true,
|
||||
import_assertions: true,
|
||||
no_early_errors,
|
||||
..Default::default()
|
||||
}),
|
||||
|
@ -20,7 +20,6 @@ fn no_empty(input: PathBuf) {
|
||||
decorators: true,
|
||||
dynamic_import: true,
|
||||
no_early_errors: true,
|
||||
import_assertions: true,
|
||||
..Default::default()
|
||||
}),
|
||||
EsVersion::latest(),
|
||||
|
@ -98,7 +98,6 @@ fn identity(entry: PathBuf) {
|
||||
dynamic_import: true,
|
||||
dts: false,
|
||||
no_early_errors: false,
|
||||
import_assertions: true,
|
||||
}),
|
||||
(&*src).into(),
|
||||
None,
|
||||
|
Loading…
Reference in New Issue
Block a user