diff --git a/crates/oxc/src/napi/transform.rs b/crates/oxc/src/napi/transform.rs index ecf5a49894d804..a4f29d2f985ded 100644 --- a/crates/oxc/src/napi/transform.rs +++ b/crates/oxc/src/napi/transform.rs @@ -80,9 +80,6 @@ pub struct TransformOptions { /// Configure how TSX and JSX are transformed. pub jsx: Option, - /// Enable ES2015 transformations. - pub es2015: Option, - /// Define Plugin #[napi(ts_type = "Record")] pub define: Option>, @@ -101,7 +98,6 @@ impl From for oxc_transformer::TransformOptions { .map(oxc_transformer::TypeScriptOptions::from) .unwrap_or_default(), jsx: options.jsx.map(Into::into).unwrap_or_default(), - es2015: options.es2015.map(Into::into).unwrap_or_default(), ..Self::default() } } diff --git a/crates/oxc_transformer/examples/transformer.rs b/crates/oxc_transformer/examples/transformer.rs index 2d0dbbba18c970..5e8f491f622194 100644 --- a/crates/oxc_transformer/examples/transformer.rs +++ b/crates/oxc_transformer/examples/transformer.rs @@ -6,7 +6,7 @@ use oxc_codegen::CodeGenerator; use oxc_parser::Parser; use oxc_semantic::SemanticBuilder; use oxc_span::SourceType; -use oxc_transformer::{BabelEnvOptions, Targets, TransformOptions, Transformer}; +use oxc_transformer::{TransformOptions, Transformer}; use pico_args::Arguments; // Instruction: @@ -54,12 +54,14 @@ fn main() { let (symbols, scopes) = ret.semantic.into_symbol_table_and_scope_tree(); - let transform_options = if let Some(targets) = &targets { - TransformOptions::try_from(&BabelEnvOptions { - targets: Targets::try_from_query(targets).unwrap(), - ..BabelEnvOptions::default() - }) - .unwrap() + let transform_options = if let Some(_targets) = &targets { + // FIXME + TransformOptions::enable_all() + // TransformOptions::try_from(&BabelEnvOptions { + // targets: Targets::try_from_query(targets).unwrap(), + // ..BabelEnvOptions::default() + // }) + // .unwrap() } else { TransformOptions::enable_all() }; diff --git a/crates/oxc_transformer/src/es2017/mod.rs b/crates/oxc_transformer/src/es2017/mod.rs index 8dbb3a7bd96492..233b81b55b97dc 100644 --- a/crates/oxc_transformer/src/es2017/mod.rs +++ b/crates/oxc_transformer/src/es2017/mod.rs @@ -1,13 +1,12 @@ mod async_to_generator; -pub mod options; +mod options; -use options::ES2017Options; use oxc_ast::ast::{Expression, Statement}; use oxc_traverse::{Traverse, TraverseCtx}; use crate::{es2017::async_to_generator::AsyncToGenerator, TransformCtx}; -#[expect(unused_imports)] -pub use async_to_generator::AsyncGeneratorExecutor; + +pub use options::ES2017Options; #[allow(dead_code)] pub struct ES2017<'a, 'ctx> { diff --git a/crates/oxc_transformer/src/lib.rs b/crates/oxc_transformer/src/lib.rs index 1e740880b2a31d..3f43c027c899d8 100644 --- a/crates/oxc_transformer/src/lib.rs +++ b/crates/oxc_transformer/src/lib.rs @@ -54,7 +54,10 @@ pub use crate::{ compiler_assumptions::CompilerAssumptions, es2015::{ArrowFunctionsOptions, ES2015Options}, jsx::{JsxOptions, JsxRuntime, ReactRefreshOptions}, - options::{BabelEnvOptions, BabelOptions, Targets, TransformOptions}, + options::{ + babel::{BabelEnvOptions, BabelOptions, Targets}, + TransformOptions, + }, plugins::*, typescript::{RewriteExtensionsMode, TypeScriptOptions}, }; @@ -96,15 +99,15 @@ impl<'a> Transformer<'a> { .is_typescript() .then(|| TypeScript::new(&self.options.typescript, &self.ctx)), x1_jsx: Jsx::new(self.options.jsx, ast_builder, &self.ctx), - x2_es2022: ES2022::new(self.options.es2022), - x2_es2021: ES2021::new(self.options.es2021, &self.ctx), - x2_es2020: ES2020::new(self.options.es2020, &self.ctx), - x2_es2019: ES2019::new(self.options.es2019), - x2_es2018: ES2018::new(self.options.es2018, &self.ctx), - x2_es2016: ES2016::new(self.options.es2016, &self.ctx), - x2_es2017: ES2017::new(self.options.es2017, &self.ctx), - x3_es2015: ES2015::new(self.options.es2015), - x4_regexp: RegExp::new(self.options.regexp, &self.ctx), + x2_es2022: ES2022::new(self.options.env.es2022), + x2_es2021: ES2021::new(self.options.env.es2021, &self.ctx), + x2_es2020: ES2020::new(self.options.env.es2020, &self.ctx), + x2_es2019: ES2019::new(self.options.env.es2019), + x2_es2018: ES2018::new(self.options.env.es2018, &self.ctx), + x2_es2016: ES2016::new(self.options.env.es2016, &self.ctx), + x2_es2017: ES2017::new(self.options.env.es2017, &self.ctx), + x3_es2015: ES2015::new(self.options.env.es2015), + x4_regexp: RegExp::new(self.options.env.regexp, &self.ctx), common: Common::new(&self.ctx), }; diff --git a/crates/oxc_transformer/src/options/babel/mod.rs b/crates/oxc_transformer/src/options/babel/mod.rs index bf4c5ae18ce457..f6b08255514065 100644 --- a/crates/oxc_transformer/src/options/babel/mod.rs +++ b/crates/oxc_transformer/src/options/babel/mod.rs @@ -1,10 +1,12 @@ -pub mod env; +mod env; use std::path::{Path, PathBuf}; use serde::Deserialize; use serde_json::Value; +pub use env::{BabelEnvOptions, Targets}; + /// Babel options /// /// diff --git a/crates/oxc_transformer/src/options/env.rs b/crates/oxc_transformer/src/options/env.rs new file mode 100644 index 00000000000000..e7bdefe33a6604 --- /dev/null +++ b/crates/oxc_transformer/src/options/env.rs @@ -0,0 +1,247 @@ +use oxc_diagnostics::{Error, OxcDiagnostic}; + +use crate::{ + es2015::{ArrowFunctionsOptions, ES2015Options}, + es2016::ES2016Options, + es2017::ES2017Options, + es2018::{ES2018Options, ObjectRestSpreadOptions}, + es2019::ES2019Options, + es2020::ES2020Options, + es2021::ES2021Options, + es2022::ES2022Options, + regexp::RegExpOptions, +}; + +use super::babel::{BabelEnvOptions, BabelOptions}; + +#[derive(Debug, Default, Clone)] +pub struct EnvOptions { + pub regexp: RegExpOptions, + + pub es2015: ES2015Options, + + pub es2016: ES2016Options, + + pub es2017: ES2017Options, + + pub es2018: ES2018Options, + + pub es2019: ES2019Options, + + pub es2020: ES2020Options, + + pub es2021: ES2021Options, + + pub es2022: ES2022Options, +} + +impl EnvOptions { + /// Explicitly enable all plugins that are ready, mainly for testing purposes. + pub fn enable_all() -> Self { + Self { + regexp: RegExpOptions { + sticky_flag: true, + unicode_flag: true, + dot_all_flag: true, + look_behind_assertions: true, + named_capture_groups: true, + unicode_property_escapes: true, + match_indices: true, + set_notation: true, + }, + es2015: ES2015Options { + // Turned off because it is not ready. + arrow_function: None, + }, + es2016: ES2016Options { exponentiation_operator: true }, + es2017: ES2017Options { + // Turned off because it is not ready. + async_to_generator: false, + }, + es2018: ES2018Options { + // Turned off because it is not ready. + object_rest_spread: None, + }, + es2019: ES2019Options { optional_catch_binding: true }, + es2020: ES2020Options { nullish_coalescing_operator: true }, + es2021: ES2021Options { logical_assignment_operators: true }, + es2022: ES2022Options { class_static_block: true }, + } + } +} + +impl TryFrom<&BabelEnvOptions> for EnvOptions { + type Error = Vec; + + /// If there are any errors in the `options.targets``, they will be returned as a list of errors. + fn try_from(o: &BabelEnvOptions) -> Result { + Ok(Self { + regexp: RegExpOptions { + sticky_flag: o.can_enable_plugin("transform-sticky-regex"), + unicode_flag: o.can_enable_plugin("transform-unicode-regex"), + dot_all_flag: o.can_enable_plugin("transform-dotall-regex"), + look_behind_assertions: o.can_enable_plugin("esbuild-regexp-lookbehind-assertions"), + named_capture_groups: o.can_enable_plugin("transform-named-capturing-groups-regex"), + unicode_property_escapes: o.can_enable_plugin("transform-unicode-property-regex"), + match_indices: o.can_enable_plugin("esbuild-regexp-match-indices"), + set_notation: o.can_enable_plugin("transform-unicode-sets-regex"), + }, + es2015: ES2015Options { + arrow_function: o + .can_enable_plugin("transform-arrow-functions") + .then(Default::default), + }, + es2016: ES2016Options { + exponentiation_operator: o.can_enable_plugin("transform-exponentiation-operator"), + }, + es2017: ES2017Options { + async_to_generator: o.can_enable_plugin("transform-async-to-generator"), + }, + es2018: ES2018Options { + object_rest_spread: o + .can_enable_plugin("transform-object-rest-spread") + .then(Default::default), + }, + es2019: ES2019Options { + optional_catch_binding: o.can_enable_plugin("transform-optional-catch-binding"), + }, + es2020: ES2020Options { + nullish_coalescing_operator: o + .can_enable_plugin("transform-nullish-coalescing-operator"), + }, + es2021: ES2021Options { + logical_assignment_operators: o + .can_enable_plugin("transform-logical-assignment-operators"), + }, + es2022: ES2022Options { + class_static_block: o.can_enable_plugin("transform-class-static-block"), + }, + }) + } +} + +impl TryFrom<&BabelOptions> for EnvOptions { + type Error = Vec; + + /// If the `options` contains any unknown fields, they will be returned as a list of errors. + fn try_from(options: &BabelOptions) -> Result { + let mut errors = Vec::::new(); + + let env = options + .get_preset("env") + .flatten() + .and_then(|value| { + serde_json::from_value::(value) + .inspect_err(|err| report_error("env", err, true, &mut errors)) + .ok() + }) + .and_then(|env_options| EnvOptions::try_from(&env_options).ok()) + .unwrap_or_default(); + + let regexp = RegExpOptions { + sticky_flag: env.regexp.sticky_flag || options.has_plugin("transform-sticky-regex"), + unicode_flag: env.regexp.unicode_flag || options.has_plugin("transform-unicode-regex"), + dot_all_flag: env.regexp.dot_all_flag || options.has_plugin("transform-dotall-regex"), + look_behind_assertions: env.regexp.look_behind_assertions, + named_capture_groups: env.regexp.named_capture_groups + || options.has_plugin("transform-named-capturing-groups-regex"), + unicode_property_escapes: env.regexp.unicode_property_escapes + || options.has_plugin("transform-unicode-property-regex"), + match_indices: env.regexp.match_indices, + set_notation: env.regexp.set_notation + || options.has_plugin("transform-unicode-sets-regex"), + }; + + let es2015 = ES2015Options { + arrow_function: { + let plugin_name = "transform-arrow-functions"; + options + .get_plugin(plugin_name) + .map(|o| { + o.and_then(|options| { + serde_json::from_value::(options) + .inspect_err(|err| { + report_error(plugin_name, err, false, &mut errors); + }) + .ok() + }) + .unwrap_or_default() + }) + .or(env.es2015.arrow_function) + }, + }; + + let es2016 = ES2016Options { + exponentiation_operator: { + let plugin_name = "transform-exponentiation-operator"; + options.get_plugin(plugin_name).is_some() || env.es2016.exponentiation_operator + }, + }; + + let es2017 = ES2017Options { + async_to_generator: { + let plugin_name = "transform-async-to-generator"; + options.get_plugin(plugin_name).is_some() || env.es2017.async_to_generator + }, + }; + + let es2018 = ES2018Options { + object_rest_spread: { + let plugin_name = "transform-object-rest-spread"; + options + .get_plugin(plugin_name) + .map(|o| { + o.and_then(|options| { + serde_json::from_value::(options) + .inspect_err(|err| { + report_error(plugin_name, err, false, &mut errors); + }) + .ok() + }) + .unwrap_or_default() + }) + .or(env.es2018.object_rest_spread) + }, + }; + + let es2019 = ES2019Options { + optional_catch_binding: { + let plugin_name = "transform-optional-catch-binding"; + options.get_plugin(plugin_name).is_some() || env.es2019.optional_catch_binding + }, + }; + + let es2020 = ES2020Options { + nullish_coalescing_operator: { + let plugin_name = "transform-nullish-coalescing-operator"; + options.get_plugin(plugin_name).is_some() || env.es2020.nullish_coalescing_operator + }, + }; + + let es2021 = ES2021Options { + logical_assignment_operators: { + let plugin_name = "transform-logical-assignment-operators"; + options.get_plugin(plugin_name).is_some() || env.es2021.logical_assignment_operators + }, + }; + + let es2022 = ES2022Options { + class_static_block: { + let plugin_name = "transform-class-static-block"; + options.get_plugin(plugin_name).is_some() || env.es2022.class_static_block + }, + }; + + if !errors.is_empty() { + return Err(errors); + } + + Ok(Self { regexp, es2015, es2016, es2017, es2018, es2019, es2020, es2021, es2022 }) + } +} + +fn report_error(name: &str, err: &serde_json::Error, is_preset: bool, errors: &mut Vec) { + let message = + if is_preset { format!("preset-{name}: {err}",) } else { format!("{name}: {err}",) }; + errors.push(OxcDiagnostic::error(message).into()); +} diff --git a/crates/oxc_transformer/src/options/mod.rs b/crates/oxc_transformer/src/options/mod.rs index 3fad055bc1cb35..d459752957d076 100644 --- a/crates/oxc_transformer/src/options/mod.rs +++ b/crates/oxc_transformer/src/options/mod.rs @@ -1,30 +1,20 @@ -mod babel; +pub mod babel; +mod env; use std::path::PathBuf; +use env::EnvOptions; use oxc_diagnostics::{Error, OxcDiagnostic}; use crate::{ common::helper_loader::{HelperLoaderMode, HelperLoaderOptions}, compiler_assumptions::CompilerAssumptions, - es2015::{ArrowFunctionsOptions, ES2015Options}, - es2016::ES2016Options, - es2017::options::ES2017Options, - es2018::{ES2018Options, ObjectRestSpreadOptions}, - es2019::ES2019Options, - es2020::ES2020Options, - es2021::ES2021Options, - es2022::ES2022Options, jsx::JsxOptions, - regexp::RegExpOptions, typescript::TypeScriptOptions, ReactRefreshOptions, }; -pub use babel::{ - env::{BabelEnvOptions, Targets}, - BabelOptions, -}; +use babel::BabelOptions; /// #[derive(Debug, Default, Clone)] @@ -49,23 +39,8 @@ pub struct TransformOptions { /// See [preset-react](https://babeljs.io/docs/babel-preset-react) pub jsx: JsxOptions, - pub regexp: RegExpOptions, - - pub es2015: ES2015Options, - - pub es2016: ES2016Options, - - pub es2017: ES2017Options, - - pub es2018: ES2018Options, - - pub es2019: ES2019Options, - - pub es2020: ES2020Options, - - pub es2021: ES2021Options, - - pub es2022: ES2022Options, + /// ECMAScript Env Options + pub env: EnvOptions, pub helper_loader: HelperLoaderOptions, } @@ -82,30 +57,7 @@ impl TransformOptions { refresh: Some(ReactRefreshOptions::default()), ..JsxOptions::default() }, - regexp: RegExpOptions { - sticky_flag: true, - unicode_flag: true, - dot_all_flag: true, - look_behind_assertions: true, - named_capture_groups: true, - unicode_property_escapes: true, - match_indices: true, - set_notation: true, - }, - es2015: ES2015Options { - // Turned off because it is not ready. - arrow_function: None, - }, - es2016: ES2016Options { exponentiation_operator: true }, - es2017: ES2017Options { - // Turned off because it is not ready. - async_to_generator: false, - }, - es2018: ES2018Options { object_rest_spread: Some(ObjectRestSpreadOptions::default()) }, - es2019: ES2019Options { optional_catch_binding: true }, - es2020: ES2020Options { nullish_coalescing_operator: true }, - es2021: ES2021Options { logical_assignment_operators: true }, - es2022: ES2022Options { class_static_block: true }, + env: EnvOptions::enable_all(), helper_loader: HelperLoaderOptions { mode: HelperLoaderMode::Runtime, ..Default::default() @@ -114,57 +66,6 @@ impl TransformOptions { } } -impl TryFrom<&BabelEnvOptions> for TransformOptions { - type Error = Vec; - - /// If there are any errors in the `options.targets``, they will be returned as a list of errors. - fn try_from(o: &BabelEnvOptions) -> Result { - Ok(Self { - regexp: RegExpOptions { - sticky_flag: o.can_enable_plugin("transform-sticky-regex"), - unicode_flag: o.can_enable_plugin("transform-unicode-regex"), - dot_all_flag: o.can_enable_plugin("transform-dotall-regex"), - look_behind_assertions: o.can_enable_plugin("esbuild-regexp-lookbehind-assertions"), - named_capture_groups: o.can_enable_plugin("transform-named-capturing-groups-regex"), - unicode_property_escapes: o.can_enable_plugin("transform-unicode-property-regex"), - match_indices: o.can_enable_plugin("esbuild-regexp-match-indices"), - set_notation: o.can_enable_plugin("transform-unicode-sets-regex"), - }, - es2015: ES2015Options { - arrow_function: o - .can_enable_plugin("transform-arrow-functions") - .then(Default::default), - }, - es2016: ES2016Options { - exponentiation_operator: o.can_enable_plugin("transform-exponentiation-operator"), - }, - es2017: ES2017Options { - async_to_generator: o.can_enable_plugin("transform-async-to-generator"), - }, - es2018: ES2018Options { - object_rest_spread: o - .can_enable_plugin("transform-object-rest-spread") - .then(Default::default), - }, - es2019: ES2019Options { - optional_catch_binding: o.can_enable_plugin("transform-optional-catch-binding"), - }, - es2020: ES2020Options { - nullish_coalescing_operator: o - .can_enable_plugin("transform-nullish-coalescing-operator"), - }, - es2021: ES2021Options { - logical_assignment_operators: o - .can_enable_plugin("transform-logical-assignment-operators"), - }, - es2022: ES2022Options { - class_static_block: o.can_enable_plugin("transform-class-static-block"), - }, - ..Default::default() - }) - } -} - impl TryFrom<&BabelOptions> for TransformOptions { type Error = Vec; @@ -239,109 +140,12 @@ impl TryFrom<&BabelOptions> for TransformOptions { react_options }; - let env = options - .get_preset("env") - .flatten() - .and_then(|value| { - serde_json::from_value::(value) - .inspect_err(|err| report_error("env", err, true, &mut errors)) - .ok() - }) - .and_then(|env_options| Self::try_from(&env_options).ok()) - .unwrap_or_default(); - - let regexp = RegExpOptions { - sticky_flag: env.regexp.sticky_flag || options.has_plugin("transform-sticky-regex"), - unicode_flag: env.regexp.unicode_flag || options.has_plugin("transform-unicode-regex"), - dot_all_flag: env.regexp.dot_all_flag || options.has_plugin("transform-dotall-regex"), - look_behind_assertions: env.regexp.look_behind_assertions, - named_capture_groups: env.regexp.named_capture_groups - || options.has_plugin("transform-named-capturing-groups-regex"), - unicode_property_escapes: env.regexp.unicode_property_escapes - || options.has_plugin("transform-unicode-property-regex"), - match_indices: env.regexp.match_indices, - set_notation: env.regexp.set_notation - || options.has_plugin("transform-unicode-sets-regex"), - }; - - let es2015 = ES2015Options { - arrow_function: { - let plugin_name = "transform-arrow-functions"; - options - .get_plugin(plugin_name) - .map(|o| { - o.and_then(|options| { - serde_json::from_value::(options) - .inspect_err(|err| { - report_error(plugin_name, err, false, &mut errors); - }) - .ok() - }) - .unwrap_or_default() - }) - .or(env.es2015.arrow_function) - }, - }; - - let es2016 = ES2016Options { - exponentiation_operator: { - let plugin_name = "transform-exponentiation-operator"; - options.get_plugin(plugin_name).is_some() || env.es2016.exponentiation_operator - }, - }; - - let es2017 = ES2017Options { - async_to_generator: { - let plugin_name = "transform-async-to-generator"; - options.get_plugin(plugin_name).is_some() || env.es2017.async_to_generator - }, - }; - - let es2018 = ES2018Options { - object_rest_spread: { - let plugin_name = "transform-object-rest-spread"; - options - .get_plugin(plugin_name) - .map(|o| { - o.and_then(|options| { - serde_json::from_value::(options) - .inspect_err(|err| { - report_error(plugin_name, err, false, &mut errors); - }) - .ok() - }) - .unwrap_or_default() - }) - .or(env.es2018.object_rest_spread) - }, - }; - - let es2019 = ES2019Options { - optional_catch_binding: { - let plugin_name = "transform-optional-catch-binding"; - options.get_plugin(plugin_name).is_some() || env.es2019.optional_catch_binding - }, - }; - - let es2020 = ES2020Options { - nullish_coalescing_operator: { - let plugin_name = "transform-nullish-coalescing-operator"; - options.get_plugin(plugin_name).is_some() || env.es2020.nullish_coalescing_operator - }, - }; - - let es2021 = ES2021Options { - logical_assignment_operators: { - let plugin_name = "transform-logical-assignment-operators"; - options.get_plugin(plugin_name).is_some() || env.es2021.logical_assignment_operators - }, - }; - - let es2022 = ES2022Options { - class_static_block: { - let plugin_name = "transform-class-static-block"; - options.get_plugin(plugin_name).is_some() || env.es2022.class_static_block - }, + let env = match EnvOptions::try_from(options) { + Ok(env) => Some(env), + Err(errs) => { + errors.extend(errs); + None + } }; if !errors.is_empty() { @@ -362,15 +166,7 @@ impl TryFrom<&BabelOptions> for TransformOptions { assumptions, typescript, jsx, - regexp, - es2015, - es2016, - es2017, - es2018, - es2019, - es2020, - es2021, - es2022, + env: env.unwrap_or_default(), helper_loader, }) } diff --git a/crates/oxc_wasm/src/lib.rs b/crates/oxc_wasm/src/lib.rs index a61ee859530f86..df82c6f21921a1 100644 --- a/crates/oxc_wasm/src/lib.rs +++ b/crates/oxc_wasm/src/lib.rs @@ -21,7 +21,7 @@ use oxc::{ ScopeFlags, ScopeId, ScopeTree, SemanticBuilder, SymbolTable, }, span::SourceType, - transformer::{BabelEnvOptions, Targets, TransformOptions, Transformer}, + transformer::{TransformOptions, Transformer}, }; use oxc_index::Idx; use oxc_linter::Linter; @@ -242,17 +242,13 @@ impl Oxc { } if run_options.transform.unwrap_or_default() { - if let Ok(options) = TransformOptions::try_from(&BabelEnvOptions { - targets: Targets::try_from_query("chrome 51").unwrap_or_default(), - ..BabelEnvOptions::default() - }) { - let result = Transformer::new(&allocator, &path, options) - .build_with_symbols_and_scopes(symbols, scopes, &mut program); - if !result.errors.is_empty() { - self.save_diagnostics( - result.errors.into_iter().map(Error::from).collect::>(), - ); - } + let options = TransformOptions::enable_all(); + let result = Transformer::new(&allocator, &path, options) + .build_with_symbols_and_scopes(symbols, scopes, &mut program); + if !result.errors.is_empty() { + self.save_diagnostics( + result.errors.into_iter().map(Error::from).collect::>(), + ); } } diff --git a/tasks/benchmark/benches/transformer.rs b/tasks/benchmark/benches/transformer.rs index 900f81d6e5aeef..7bf1d056dc67f7 100644 --- a/tasks/benchmark/benches/transformer.rs +++ b/tasks/benchmark/benches/transformer.rs @@ -6,7 +6,7 @@ use oxc_parser::{Parser, ParserReturn}; use oxc_semantic::SemanticBuilder; use oxc_span::SourceType; use oxc_tasks_common::TestFiles; -use oxc_transformer::{ArrowFunctionsOptions, TransformOptions, Transformer}; +use oxc_transformer::{TransformOptions, Transformer}; fn bench_transformer(criterion: &mut Criterion) { let mut group = criterion.benchmark_group("transformer"); @@ -35,11 +35,7 @@ fn bench_transformer(criterion: &mut Criterion) { .semantic .into_symbol_table_and_scope_tree(); - // `enable_all` enables all transforms except arrow functions transform - // and async-to-generator - let mut options = TransformOptions::enable_all(); - options.es2015.arrow_function = Some(ArrowFunctionsOptions { spec: true }); - options.es2017.async_to_generator = true; + let options = TransformOptions::enable_all(); runner.run(|| { let ret = Transformer::new(&allocator, Path::new(&file.file_name), options) diff --git a/tasks/coverage/snapshots/semantic_test262.snap b/tasks/coverage/snapshots/semantic_test262.snap index 7ac4df54312b01..96652c2e6f065a 100644 --- a/tasks/coverage/snapshots/semantic_test262.snap +++ b/tasks/coverage/snapshots/semantic_test262.snap @@ -2,7 +2,7 @@ commit: 06454619 semantic_test262 Summary: AST Parsed : 43851/43851 (100.00%) -Positive Passed: 43671/43851 (99.59%) +Positive Passed: 43663/43851 (99.57%) tasks/coverage/test262/test/annexB/language/function-code/if-decl-else-decl-a-func-block-scoping.js semantic error: Symbol scope ID mismatch for "f": after transform: SymbolId(3): ScopeId(4294967294) @@ -1119,3 +1119,127 @@ semantic error: Symbol scope ID mismatch for "f": after transform: SymbolId(0): ScopeId(4294967294) rebuilt : SymbolId(0): ScopeId(4294967294) +tasks/coverage/test262/test/language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x10", "_x11", "_x12", "_x5", "_x6", "_x7", "_x8", "_x9", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x10", "_x11", "_x12", "_x2", "_x3", "_x4", "_x5", "_x6", "_x7", "_x8", "_x9", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2", "_x3", "_x4"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(5): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(6): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) +Symbol scope ID mismatch for "_x3": +after transform: SymbolId(7): ScopeId(1) +rebuilt : SymbolId(2): ScopeId(0) +Symbol scope ID mismatch for "_x4": +after transform: SymbolId(8): ScopeId(1) +rebuilt : SymbolId(3): ScopeId(0) + +tasks/coverage/test262/test/language/expressions/class/cpn-class-expr-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x3", "_x4", "_x5", "_x6", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x2", "_x3", "_x4", "_x5", "_x6", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) + +tasks/coverage/test262/test/language/expressions/class/cpn-class-expr-fields-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x3", "_x4", "_x5", "_x6", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x2", "_x3", "_x4", "_x5", "_x6", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) + +tasks/coverage/test262/test/language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x3", "_x4", "_x5", "_x6", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x2", "_x3", "_x4", "_x5", "_x6", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) + +tasks/coverage/test262/test/language/statements/class/cpn-class-decl-accessors-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x10", "_x11", "_x12", "_x5", "_x6", "_x7", "_x8", "_x9", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x10", "_x11", "_x12", "_x2", "_x3", "_x4", "_x5", "_x6", "_x7", "_x8", "_x9", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2", "_x3", "_x4"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(5): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(6): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) +Symbol scope ID mismatch for "_x3": +after transform: SymbolId(7): ScopeId(1) +rebuilt : SymbolId(2): ScopeId(0) +Symbol scope ID mismatch for "_x4": +after transform: SymbolId(8): ScopeId(1) +rebuilt : SymbolId(3): ScopeId(0) + +tasks/coverage/test262/test/language/statements/class/cpn-class-decl-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x3", "_x4", "_x5", "_x6", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x2", "_x3", "_x4", "_x5", "_x6", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) + +tasks/coverage/test262/test/language/statements/class/cpn-class-decl-fields-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x3", "_x4", "_x5", "_x6", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x2", "_x3", "_x4", "_x5", "_x6", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) + +tasks/coverage/test262/test/language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-assignment-expression-coalesce.js +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["C", "_x3", "_x4", "_x5", "_x6", "c", "x"] +rebuilt : ScopeId(0): ["C", "_x", "_x2", "_x3", "_x4", "_x5", "_x6", "c", "x"] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "_x2"] +rebuilt : ScopeId(1): [] +Symbol scope ID mismatch for "_x": +after transform: SymbolId(3): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) +Symbol scope ID mismatch for "_x2": +after transform: SymbolId(4): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) + diff --git a/tasks/coverage/snapshots/semantic_typescript.snap b/tasks/coverage/snapshots/semantic_typescript.snap index 96e29be2d1d7d8..736f031cf40828 100644 --- a/tasks/coverage/snapshots/semantic_typescript.snap +++ b/tasks/coverage/snapshots/semantic_typescript.snap @@ -2,7 +2,7 @@ commit: df9d1650 semantic_typescript Summary: AST Parsed : 6490/6490 (100.00%) -Positive Passed: 2687/6490 (41.40%) +Positive Passed: 2685/6490 (41.37%) tasks/coverage/typescript/tests/cases/compiler/2dArrays.ts semantic error: Symbol reference IDs mismatch for "Cell": after transform: SymbolId(0): [ReferenceId(1)] @@ -5672,8 +5672,8 @@ Reference symbol mismatch for "require": after transform: SymbolId(0) "require" rebuilt : Unresolved references mismatch: -after transform: ["Error", "JSON"] -rebuilt : ["Error", "JSON", "require"] +after transform: ["Error", "JSON", "RegExp"] +rebuilt : ["Error", "JSON", "RegExp", "require"] tasks/coverage/typescript/tests/cases/compiler/controlFlowUnionContainingTypeParameter1.ts semantic error: Bindings mismatch: @@ -8324,7 +8324,7 @@ after transform: ["ReturnType", "globalThis"] rebuilt : ["globalThis"] Unresolved reference IDs mismatch for "globalThis": after transform: [ReferenceId(0), ReferenceId(1), ReferenceId(3), ReferenceId(4), ReferenceId(5), ReferenceId(8), ReferenceId(9), ReferenceId(11), ReferenceId(12), ReferenceId(13), ReferenceId(14), ReferenceId(16), ReferenceId(17), ReferenceId(18), ReferenceId(21), ReferenceId(22), ReferenceId(24), ReferenceId(25), ReferenceId(32), ReferenceId(34), ReferenceId(35), ReferenceId(38), ReferenceId(40), ReferenceId(41), ReferenceId(43), ReferenceId(44), ReferenceId(47), ReferenceId(49), ReferenceId(56), ReferenceId(58), ReferenceId(59), ReferenceId(62), ReferenceId(64), ReferenceId(65), ReferenceId(67), ReferenceId(68), ReferenceId(71), ReferenceId(73), ReferenceId(80), ReferenceId(81), ReferenceId(84), ReferenceId(85), ReferenceId(86), ReferenceId(90), ReferenceId(91), ReferenceId(94), ReferenceId(95), ReferenceId(102), ReferenceId(104), ReferenceId(105), ReferenceId(108), ReferenceId(110), ReferenceId(111), ReferenceId(113), ReferenceId(114), ReferenceId(116), ReferenceId(117), ReferenceId(119), ReferenceId(120), ReferenceId(121), ReferenceId(122)] -rebuilt : [ReferenceId(4), ReferenceId(9), ReferenceId(14), ReferenceId(19), ReferenceId(24), ReferenceId(29), ReferenceId(37), ReferenceId(43)] +rebuilt : [ReferenceId(6), ReferenceId(13), ReferenceId(20), ReferenceId(27), ReferenceId(34), ReferenceId(41), ReferenceId(51), ReferenceId(59)] tasks/coverage/typescript/tests/cases/compiler/declarationEmitHasTypesRefOnNamespaceUse.ts semantic error: Unresolved references mismatch: @@ -10161,8 +10161,8 @@ Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] rebuilt : ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3)] Bindings mismatch: -after transform: ScopeId(2): ["MenuItemVariant", "data", "listItemVariant"] -rebuilt : ScopeId(1): ["data", "listItemVariant"] +after transform: ScopeId(2): ["MenuItemVariant", "_data$menuItemsVarian", "data", "listItemVariant"] +rebuilt : ScopeId(1): ["_data$menuItemsVarian", "data", "listItemVariant"] Bindings mismatch: after transform: ScopeId(4): ["Avatar", "ListItemVariant", "OneLine"] rebuilt : ScopeId(2): ["ListItemVariant"] @@ -10171,10 +10171,10 @@ after transform: ScopeId(4): ScopeFlags(0x0) rebuilt : ScopeId(2): ScopeFlags(Function) Symbol flags mismatch for "ListItemVariant": after transform: SymbolId(7): SymbolFlags(RegularEnum) -rebuilt : SymbolId(5): SymbolFlags(FunctionScopedVariable) +rebuilt : SymbolId(6): SymbolFlags(FunctionScopedVariable) Symbol reference IDs mismatch for "ListItemVariant": -after transform: SymbolId(7): [ReferenceId(0), ReferenceId(1), ReferenceId(3), ReferenceId(4), ReferenceId(8), ReferenceId(11), ReferenceId(12), ReferenceId(21)] -rebuilt : SymbolId(5): [ReferenceId(2), ReferenceId(12)] +after transform: SymbolId(7): [ReferenceId(0), ReferenceId(1), ReferenceId(3), ReferenceId(4), ReferenceId(8), ReferenceId(11), ReferenceId(12), ReferenceId(24)] +rebuilt : SymbolId(6): [ReferenceId(5), ReferenceId(15)] tasks/coverage/typescript/tests/cases/compiler/discriminatedUnionWithIndexSignature.ts semantic error: Bindings mismatch: @@ -11153,19 +11153,19 @@ after transform: SymbolId(0): SymbolFlags(RegularEnum) rebuilt : SymbolId(0): SymbolFlags(FunctionScopedVariable) Symbol reference IDs mismatch for "MyEnum": after transform: SymbolId(0): [ReferenceId(0), ReferenceId(2), ReferenceId(3), ReferenceId(5), ReferenceId(6), ReferenceId(8), ReferenceId(9), ReferenceId(11), ReferenceId(25)] -rebuilt : SymbolId(0): [ReferenceId(7), ReferenceId(19), ReferenceId(21), ReferenceId(23), ReferenceId(25)] +rebuilt : SymbolId(0): [ReferenceId(7), ReferenceId(21), ReferenceId(23), ReferenceId(27), ReferenceId(29)] Symbol flags mismatch for "MyStringEnum": after transform: SymbolId(4): SymbolFlags(RegularEnum) rebuilt : SymbolId(2): SymbolFlags(FunctionScopedVariable) Symbol reference IDs mismatch for "MyStringEnum": after transform: SymbolId(4): [ReferenceId(12), ReferenceId(14), ReferenceId(30)] -rebuilt : SymbolId(2): [ReferenceId(12), ReferenceId(27)] +rebuilt : SymbolId(2): [ReferenceId(12), ReferenceId(31)] Symbol flags mismatch for "MyStringEnumWithEmpty": after transform: SymbolId(8): SymbolFlags(RegularEnum) rebuilt : SymbolId(4): SymbolFlags(FunctionScopedVariable) Symbol reference IDs mismatch for "MyStringEnumWithEmpty": after transform: SymbolId(8): [ReferenceId(15), ReferenceId(17), ReferenceId(35)] -rebuilt : SymbolId(4): [ReferenceId(17), ReferenceId(29)] +rebuilt : SymbolId(4): [ReferenceId(17), ReferenceId(33)] tasks/coverage/typescript/tests/cases/compiler/enumNegativeLiteral1.ts semantic error: Bindings mismatch: @@ -11669,8 +11669,8 @@ Reference symbol mismatch for "y": after transform: SymbolId(1) "y" rebuilt : Unresolved references mismatch: -after transform: ["Promise"] -rebuilt : ["a", "x", "y", "z"] +after transform: ["Math", "Promise"] +rebuilt : ["Math", "a", "x", "y", "z"] tasks/coverage/typescript/tests/cases/compiler/es5-asyncFunctionCallExpressions.ts semantic error: Bindings mismatch: @@ -21355,8 +21355,8 @@ Reference symbol mismatch for "literalUnion": after transform: SymbolId(12) "literalUnion" rebuilt : Unresolved references mismatch: -after transform: [] -rebuilt : ["literalUnion", "numLiteral"] +after transform: ["Math"] +rebuilt : ["Math", "literalUnion", "numLiteral"] tasks/coverage/typescript/tests/cases/compiler/localAliasExportAssignment.ts semantic error: `export = ;` is only supported when compiling modules to CommonJS. @@ -39200,7 +39200,7 @@ rebuilt : SymbolId(1): [] tasks/coverage/typescript/tests/cases/conformance/classes/classStaticBlock/classStaticBlock17.ts semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(9)] -rebuilt : ScopeId(0): [ScopeId(1), ScopeId(7)] +rebuilt : ScopeId(0): [ScopeId(1), ScopeId(6)] Symbol reference IDs mismatch for "A": after transform: SymbolId(1): [ReferenceId(0), ReferenceId(1), ReferenceId(7), ReferenceId(13)] rebuilt : SymbolId(1): [ReferenceId(10)] @@ -41704,32 +41704,59 @@ rebuilt : SymbolId(0): [ReferenceId(0)] tasks/coverage/typescript/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment1.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["a", "b", "c", "d", "e", "f", "g", "h", "i"] -rebuilt : ScopeId(0): [] +after transform: ScopeId(0): ["_c", "_f", "_i", "a", "b", "c", "d", "e", "f", "g", "h", "i"] +rebuilt : ScopeId(0): ["_c", "_f", "_i"] +Reference symbol mismatch for "a": +after transform: SymbolId(0) "a" +rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(0) "a" rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(1) "b" rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(1) "b" +rebuilt : +Reference symbol mismatch for "c": +after transform: SymbolId(2) "c" +rebuilt : Reference symbol mismatch for "c": after transform: SymbolId(2) "c" rebuilt : Reference symbol mismatch for "d": after transform: SymbolId(3) "d" rebuilt : +Reference symbol mismatch for "d": +after transform: SymbolId(3) "d" +rebuilt : +Reference symbol mismatch for "e": +after transform: SymbolId(4) "e" +rebuilt : Reference symbol mismatch for "e": after transform: SymbolId(4) "e" rebuilt : Reference symbol mismatch for "f": after transform: SymbolId(5) "f" rebuilt : +Reference symbol mismatch for "f": +after transform: SymbolId(5) "f" +rebuilt : +Reference symbol mismatch for "g": +after transform: SymbolId(6) "g" +rebuilt : Reference symbol mismatch for "g": after transform: SymbolId(6) "g" rebuilt : Reference symbol mismatch for "h": after transform: SymbolId(7) "h" rebuilt : +Reference symbol mismatch for "h": +after transform: SymbolId(7) "h" +rebuilt : +Reference symbol mismatch for "i": +after transform: SymbolId(8) "i" +rebuilt : Reference symbol mismatch for "i": after transform: SymbolId(8) "i" rebuilt : @@ -41739,26 +41766,35 @@ rebuilt : ["a", "b", "c", "d", "e", "f", "g", "h", "i"] tasks/coverage/typescript/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment2.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["A", "a", "b", "c", "result"] -rebuilt : ScopeId(0): [] +after transform: ScopeId(0): ["A", "_a$foo", "_a$foo$bar", "_b$foo", "_b$foo$bar", "_baz", "_baz2", "_baz3", "_c$baz", "_c$foo", "_c$foo$_baz", "_c$foo$bar", "_c$foo$bar$baz", "a", "b", "c", "result"] +rebuilt : ScopeId(0): ["_a$foo", "_a$foo$bar", "_b$foo", "_b$foo$bar", "_baz", "_baz2", "_baz3", "_c$baz", "_c$foo", "_c$foo$_baz", "_c$foo$bar", "_c$foo$bar$baz"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] Reference symbol mismatch for "a": after transform: SymbolId(2) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(2) "a" +rebuilt : Reference symbol mismatch for "result": after transform: SymbolId(1) "result" rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(3) "b" rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(3) "b" +rebuilt : Reference symbol mismatch for "result": after transform: SymbolId(1) "result" rebuilt : Reference symbol mismatch for "c": after transform: SymbolId(4) "c" rebuilt : +Reference symbol mismatch for "c": +after transform: SymbolId(4) "c" +rebuilt : Reference symbol mismatch for "result": after transform: SymbolId(1) "result" rebuilt : @@ -41804,26 +41840,35 @@ rebuilt : ["a", "b", "c", "result"] tasks/coverage/typescript/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment3.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["A", "a", "b", "c", "result"] -rebuilt : ScopeId(0): [] +after transform: ScopeId(0): ["A", "_c$baz", "a", "b", "c", "result"] +rebuilt : ScopeId(0): ["_c$baz"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] Reference symbol mismatch for "a": after transform: SymbolId(2) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(2) "a" +rebuilt : Reference symbol mismatch for "result": after transform: SymbolId(1) "result" rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(3) "b" rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(3) "b" +rebuilt : Reference symbol mismatch for "result": after transform: SymbolId(1) "result" rebuilt : Reference symbol mismatch for "c": after transform: SymbolId(4) "c" rebuilt : +Reference symbol mismatch for "c": +after transform: SymbolId(4) "c" +rebuilt : Reference symbol mismatch for "result": after transform: SymbolId(1) "result" rebuilt : @@ -41833,8 +41878,14 @@ rebuilt : ["a", "b", "c", "result"] tasks/coverage/typescript/tests/cases/conformance/es2021/logicalAssignment/logicalAssignment9.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["x"] -rebuilt : ScopeId(0): [] +after transform: ScopeId(0): ["_x$a", "x"] +rebuilt : ScopeId(0): ["_x$a"] +Reference symbol mismatch for "x": +after transform: SymbolId(0) "x" +rebuilt : +Reference symbol mismatch for "x": +after transform: SymbolId(0) "x" +rebuilt : Reference symbol mismatch for "x": after transform: SymbolId(0) "x" rebuilt : @@ -42557,6 +42608,12 @@ rebuilt : ScopeId(0): ["f1", "f2", "f3", "f4"] Reference symbol mismatch for "yadda": after transform: SymbolId(15) "yadda" rebuilt : +Reference symbol mismatch for "yadda": +after transform: SymbolId(15) "yadda" +rebuilt : +Reference symbol mismatch for "yadda": +after transform: SymbolId(15) "yadda" +rebuilt : Unresolved references mismatch: after transform: [] rebuilt : ["yadda"] @@ -42595,6 +42652,12 @@ rebuilt : ScopeId(0): ["f1", "f2", "f3", "f4"] Reference symbol mismatch for "yadda": after transform: SymbolId(15) "yadda" rebuilt : +Reference symbol mismatch for "yadda": +after transform: SymbolId(15) "yadda" +rebuilt : +Reference symbol mismatch for "yadda": +after transform: SymbolId(15) "yadda" +rebuilt : Unresolved references mismatch: after transform: [] rebuilt : ["yadda"] @@ -43047,7 +43110,7 @@ after transform: SymbolId(0): SymbolFlags(RegularEnum) rebuilt : SymbolId(0): SymbolFlags(FunctionScopedVariable) Symbol reference IDs mismatch for "E": after transform: SymbolId(0): [ReferenceId(0), ReferenceId(11), ReferenceId(13), ReferenceId(15), ReferenceId(16), ReferenceId(17), ReferenceId(19), ReferenceId(21), ReferenceId(22), ReferenceId(28)] -rebuilt : SymbolId(0): [ReferenceId(5), ReferenceId(16), ReferenceId(18), ReferenceId(20), ReferenceId(21), ReferenceId(22), ReferenceId(24), ReferenceId(26), ReferenceId(27)] +rebuilt : SymbolId(0): [ReferenceId(5), ReferenceId(22), ReferenceId(25), ReferenceId(28), ReferenceId(29), ReferenceId(31), ReferenceId(34), ReferenceId(37), ReferenceId(39)] tasks/coverage/typescript/tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithEnumUnion.ts semantic error: Bindings mismatch: @@ -43067,7 +43130,7 @@ after transform: SymbolId(0): SymbolFlags(RegularEnum) rebuilt : SymbolId(0): SymbolFlags(FunctionScopedVariable) Symbol reference IDs mismatch for "E": after transform: SymbolId(0): [ReferenceId(0), ReferenceId(12), ReferenceId(14), ReferenceId(16), ReferenceId(17), ReferenceId(18), ReferenceId(20), ReferenceId(22), ReferenceId(23), ReferenceId(29)] -rebuilt : SymbolId(0): [ReferenceId(5), ReferenceId(22), ReferenceId(24), ReferenceId(26), ReferenceId(27), ReferenceId(28), ReferenceId(30), ReferenceId(32), ReferenceId(33)] +rebuilt : SymbolId(0): [ReferenceId(5), ReferenceId(28), ReferenceId(31), ReferenceId(34), ReferenceId(35), ReferenceId(37), ReferenceId(40), ReferenceId(43), ReferenceId(45)] Symbol flags mismatch for "F": after transform: SymbolId(3): SymbolFlags(RegularEnum) rebuilt : SymbolId(2): SymbolFlags(FunctionScopedVariable) @@ -43893,8 +43956,8 @@ rebuilt : ["dec"] tasks/coverage/typescript/tests/cases/conformance/esDecorators/classExpression/namedEvaluation/esDecorators-classExpression-namedEvaluation.1.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["dec", "x"] -rebuilt : ScopeId(0): ["x"] +after transform: ScopeId(0): ["_x", "_x2", "dec", "x"] +rebuilt : ScopeId(0): ["_x", "_x2", "x"] Reference symbol mismatch for "dec": after transform: SymbolId(0) "dec" rebuilt : @@ -45614,6 +45677,17 @@ semantic error: Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] +tasks/coverage/typescript/tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator12.ts +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["obj"] +rebuilt : ScopeId(0): ["_ref", "obj"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref", "i"] +rebuilt : ScopeId(1): ["i"] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(2): ScopeId(1) +rebuilt : SymbolId(0): ScopeId(0) + tasks/coverage/typescript/tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator2.ts semantic error: Bindings mismatch: after transform: ScopeId(0): ["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa1", "aa2", "aa3", "aa4", "aa5", "aa6", "aa7", "aa8", "aa9"] @@ -45621,27 +45695,81 @@ rebuilt : ScopeId(0): ["aa1", "aa2", "aa3", "aa4", "aa5", "aa6", "aa7", " Reference symbol mismatch for "a1": after transform: SymbolId(0) "a1" rebuilt : +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : Reference symbol mismatch for "a2": after transform: SymbolId(1) "a2" rebuilt : +Reference symbol mismatch for "a2": +after transform: SymbolId(1) "a2" +rebuilt : +Reference symbol mismatch for "a2": +after transform: SymbolId(1) "a2" +rebuilt : +Reference symbol mismatch for "a3": +after transform: SymbolId(2) "a3" +rebuilt : +Reference symbol mismatch for "a3": +after transform: SymbolId(2) "a3" +rebuilt : Reference symbol mismatch for "a3": after transform: SymbolId(2) "a3" rebuilt : Reference symbol mismatch for "a4": after transform: SymbolId(3) "a4" rebuilt : +Reference symbol mismatch for "a4": +after transform: SymbolId(3) "a4" +rebuilt : +Reference symbol mismatch for "a4": +after transform: SymbolId(3) "a4" +rebuilt : +Reference symbol mismatch for "a5": +after transform: SymbolId(4) "a5" +rebuilt : +Reference symbol mismatch for "a5": +after transform: SymbolId(4) "a5" +rebuilt : Reference symbol mismatch for "a5": after transform: SymbolId(4) "a5" rebuilt : Reference symbol mismatch for "a6": after transform: SymbolId(5) "a6" rebuilt : +Reference symbol mismatch for "a6": +after transform: SymbolId(5) "a6" +rebuilt : +Reference symbol mismatch for "a6": +after transform: SymbolId(5) "a6" +rebuilt : +Reference symbol mismatch for "a7": +after transform: SymbolId(6) "a7" +rebuilt : +Reference symbol mismatch for "a7": +after transform: SymbolId(6) "a7" +rebuilt : Reference symbol mismatch for "a7": after transform: SymbolId(6) "a7" rebuilt : Reference symbol mismatch for "a8": after transform: SymbolId(7) "a8" rebuilt : +Reference symbol mismatch for "a8": +after transform: SymbolId(7) "a8" +rebuilt : +Reference symbol mismatch for "a8": +after transform: SymbolId(7) "a8" +rebuilt : +Reference symbol mismatch for "a9": +after transform: SymbolId(8) "a9" +rebuilt : +Reference symbol mismatch for "a9": +after transform: SymbolId(8) "a9" +rebuilt : Reference symbol mismatch for "a9": after transform: SymbolId(8) "a9" rebuilt : @@ -45651,8 +45779,14 @@ rebuilt : ["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9"] tasks/coverage/typescript/tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator3.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["a1", "a2", "a3", "a4", "a5", "a6", "aa1"] -rebuilt : ScopeId(0): ["aa1"] +after transform: ScopeId(0): ["_ref", "_ref2", "_ref3", "_ref4", "_ref5", "a1", "a2", "a3", "a4", "a5", "a6", "aa1"] +rebuilt : ScopeId(0): ["_ref", "_ref2", "_ref3", "_ref4", "_ref5", "aa1"] +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : Reference symbol mismatch for "a1": after transform: SymbolId(0) "a1" rebuilt : @@ -45688,29 +45822,71 @@ rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(0) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(0) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(0) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(0) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(0) "a" +rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(1) "b" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(1) "b" rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(1) "b" +rebuilt : +Reference symbol mismatch for "c": +after transform: SymbolId(2) "c" +rebuilt : Reference symbol mismatch for "c": after transform: SymbolId(2) "c" rebuilt : +Reference symbol mismatch for "c": +after transform: SymbolId(2) "c" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(0) "a" +rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(0) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(0) "a" +rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(1) "b" +rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(1) "b" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(1) "b" rebuilt : Reference symbol mismatch for "c": after transform: SymbolId(2) "c" rebuilt : +Reference symbol mismatch for "c": +after transform: SymbolId(2) "c" +rebuilt : +Reference symbol mismatch for "c": +after transform: SymbolId(2) "c" +rebuilt : Unresolved references mismatch: after transform: [] rebuilt : ["a", "b", "c"] tasks/coverage/typescript/tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator8.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["a", "b", "n1", "n2", "n3"] -rebuilt : ScopeId(0): ["n1", "n2", "n3"] +after transform: ScopeId(0): ["_a$m", "_a$m2", "_a$p", "_ref", "_ref2", "a", "b", "n1", "n2", "n3"] +rebuilt : ScopeId(0): ["_a$m", "_a$m2", "_a$p", "_ref", "_ref2", "n1", "n2", "n3"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1), ScopeId(2)] rebuilt : ScopeId(0): [] @@ -45743,10 +45919,27 @@ rebuilt : Reference symbol mismatch for "f": after transform: SymbolId(0) "f" rebuilt : +Reference symbol mismatch for "f": +after transform: SymbolId(0) "f" +rebuilt : +Reference symbol mismatch for "f": +after transform: SymbolId(0) "f" +rebuilt : Unresolved references mismatch: after transform: [] rebuilt : ["f"] +tasks/coverage/typescript/tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperatorInParameterBindingPattern.ts +semantic error: Bindings mismatch: +after transform: ScopeId(0): ["a"] +rebuilt : ScopeId(0): ["_a", "a"] +Bindings mismatch: +after transform: ScopeId(2): ["_a", "c"] +rebuilt : ScopeId(2): ["c"] +Symbol scope ID mismatch for "_a": +after transform: SymbolId(2): ScopeId(2) +rebuilt : SymbolId(0): ScopeId(0) + tasks/coverage/typescript/tests/cases/conformance/expressions/nullishCoalescingOperator/nullishCoalescingOperator_es2020.ts semantic error: Bindings mismatch: after transform: ScopeId(0): ["a", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa1", "aa2", "aa3", "aa4", "aa5", "aa6", "aa7", "aa8", "aa9", "b", "c", "x1", "x2", "x3", "x4", "x5", "x6", "y1", "y2", "y3", "y4", "y5", "y6"] @@ -45754,33 +45947,93 @@ rebuilt : ScopeId(0): ["aa1", "aa2", "aa3", "aa4", "aa5", "aa6", "aa7", " Reference symbol mismatch for "a1": after transform: SymbolId(0) "a1" rebuilt : +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : +Reference symbol mismatch for "a2": +after transform: SymbolId(1) "a2" +rebuilt : +Reference symbol mismatch for "a2": +after transform: SymbolId(1) "a2" +rebuilt : Reference symbol mismatch for "a2": after transform: SymbolId(1) "a2" rebuilt : Reference symbol mismatch for "a3": after transform: SymbolId(2) "a3" rebuilt : +Reference symbol mismatch for "a3": +after transform: SymbolId(2) "a3" +rebuilt : +Reference symbol mismatch for "a3": +after transform: SymbolId(2) "a3" +rebuilt : Reference symbol mismatch for "a4": after transform: SymbolId(3) "a4" rebuilt : +Reference symbol mismatch for "a4": +after transform: SymbolId(3) "a4" +rebuilt : +Reference symbol mismatch for "a4": +after transform: SymbolId(3) "a4" +rebuilt : +Reference symbol mismatch for "a5": +after transform: SymbolId(4) "a5" +rebuilt : +Reference symbol mismatch for "a5": +after transform: SymbolId(4) "a5" +rebuilt : Reference symbol mismatch for "a5": after transform: SymbolId(4) "a5" rebuilt : Reference symbol mismatch for "a6": after transform: SymbolId(5) "a6" rebuilt : +Reference symbol mismatch for "a6": +after transform: SymbolId(5) "a6" +rebuilt : +Reference symbol mismatch for "a6": +after transform: SymbolId(5) "a6" +rebuilt : +Reference symbol mismatch for "a7": +after transform: SymbolId(6) "a7" +rebuilt : +Reference symbol mismatch for "a7": +after transform: SymbolId(6) "a7" +rebuilt : Reference symbol mismatch for "a7": after transform: SymbolId(6) "a7" rebuilt : Reference symbol mismatch for "a8": after transform: SymbolId(7) "a8" rebuilt : +Reference symbol mismatch for "a8": +after transform: SymbolId(7) "a8" +rebuilt : +Reference symbol mismatch for "a8": +after transform: SymbolId(7) "a8" +rebuilt : +Reference symbol mismatch for "a9": +after transform: SymbolId(8) "a9" +rebuilt : +Reference symbol mismatch for "a9": +after transform: SymbolId(8) "a9" +rebuilt : Reference symbol mismatch for "a9": after transform: SymbolId(8) "a9" rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : @@ -45793,12 +46046,24 @@ rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : @@ -45811,12 +46076,24 @@ rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : @@ -45829,12 +46106,24 @@ rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : @@ -45847,12 +46136,24 @@ rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : @@ -45865,12 +46166,24 @@ rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : @@ -45883,6 +46196,12 @@ rebuilt : Reference symbol mismatch for "a": after transform: SymbolId(18) "a" rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : +Reference symbol mismatch for "a": +after transform: SymbolId(18) "a" +rebuilt : Reference symbol mismatch for "b": after transform: SymbolId(19) "b" rebuilt : @@ -45897,27 +46216,81 @@ rebuilt : ScopeId(0): ["aa1", "aa2", "aa3", "aa4", "aa5", "aa6", "aa7", " Reference symbol mismatch for "a1": after transform: SymbolId(0) "a1" rebuilt : +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : +Reference symbol mismatch for "a1": +after transform: SymbolId(0) "a1" +rebuilt : Reference symbol mismatch for "a2": after transform: SymbolId(1) "a2" rebuilt : +Reference symbol mismatch for "a2": +after transform: SymbolId(1) "a2" +rebuilt : +Reference symbol mismatch for "a2": +after transform: SymbolId(1) "a2" +rebuilt : +Reference symbol mismatch for "a3": +after transform: SymbolId(2) "a3" +rebuilt : Reference symbol mismatch for "a3": after transform: SymbolId(2) "a3" rebuilt : +Reference symbol mismatch for "a3": +after transform: SymbolId(2) "a3" +rebuilt : +Reference symbol mismatch for "a4": +after transform: SymbolId(3) "a4" +rebuilt : +Reference symbol mismatch for "a4": +after transform: SymbolId(3) "a4" +rebuilt : Reference symbol mismatch for "a4": after transform: SymbolId(3) "a4" rebuilt : Reference symbol mismatch for "a5": after transform: SymbolId(4) "a5" rebuilt : +Reference symbol mismatch for "a5": +after transform: SymbolId(4) "a5" +rebuilt : +Reference symbol mismatch for "a5": +after transform: SymbolId(4) "a5" +rebuilt : +Reference symbol mismatch for "a6": +after transform: SymbolId(5) "a6" +rebuilt : +Reference symbol mismatch for "a6": +after transform: SymbolId(5) "a6" +rebuilt : Reference symbol mismatch for "a6": after transform: SymbolId(5) "a6" rebuilt : Reference symbol mismatch for "a7": after transform: SymbolId(6) "a7" rebuilt : +Reference symbol mismatch for "a7": +after transform: SymbolId(6) "a7" +rebuilt : +Reference symbol mismatch for "a7": +after transform: SymbolId(6) "a7" +rebuilt : Reference symbol mismatch for "a8": after transform: SymbolId(7) "a8" rebuilt : +Reference symbol mismatch for "a8": +after transform: SymbolId(7) "a8" +rebuilt : +Reference symbol mismatch for "a8": +after transform: SymbolId(7) "a8" +rebuilt : +Reference symbol mismatch for "a9": +after transform: SymbolId(8) "a9" +rebuilt : +Reference symbol mismatch for "a9": +after transform: SymbolId(8) "a9" +rebuilt : Reference symbol mismatch for "a9": after transform: SymbolId(8) "a9" rebuilt : @@ -46075,24 +46448,48 @@ rebuilt : Reference symbol mismatch for "o1": after transform: SymbolId(0) "o1" rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : Reference symbol mismatch for "o2": after transform: SymbolId(1) "o2" rebuilt : Reference symbol mismatch for "o1": after transform: SymbolId(0) "o1" rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : Reference symbol mismatch for "o3": after transform: SymbolId(2) "o3" rebuilt : Reference symbol mismatch for "o1": after transform: SymbolId(0) "o1" rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : Reference symbol mismatch for "o4": after transform: SymbolId(3) "o4" rebuilt : Reference symbol mismatch for "o1": after transform: SymbolId(0) "o1" rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : +Reference symbol mismatch for "o1": +after transform: SymbolId(0) "o1" +rebuilt : Unresolved references mismatch: after transform: [] rebuilt : ["o1", "o2", "o3", "o4"] @@ -51628,7 +52025,7 @@ Missing ReferenceId: "N" Missing ReferenceId: "N" Binding symbols mismatch: after transform: ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(7), SymbolId(9), SymbolId(11), SymbolId(22), SymbolId(24), SymbolId(26), SymbolId(28), SymbolId(29), SymbolId(30), SymbolId(31), SymbolId(32), SymbolId(33), SymbolId(34), SymbolId(35), SymbolId(36), SymbolId(37), SymbolId(38), SymbolId(39), SymbolId(41), SymbolId(43)] -rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(7), SymbolId(9), SymbolId(11), SymbolId(22), SymbolId(24), SymbolId(26), SymbolId(29), SymbolId(30), SymbolId(31), SymbolId(32), SymbolId(33), SymbolId(34), SymbolId(35), SymbolId(36), SymbolId(37), SymbolId(38), SymbolId(39), SymbolId(40), SymbolId(42), SymbolId(44)] +rebuilt : ScopeId(0): [SymbolId(0), SymbolId(1), SymbolId(3), SymbolId(5), SymbolId(7), SymbolId(9), SymbolId(11), SymbolId(22), SymbolId(24), SymbolId(26), SymbolId(29), SymbolId(30), SymbolId(31), SymbolId(32), SymbolId(33), SymbolId(35), SymbolId(36), SymbolId(37), SymbolId(38), SymbolId(39), SymbolId(40), SymbolId(41), SymbolId(43), SymbolId(45)] Binding symbols mismatch: after transform: ScopeId(37): [SymbolId(27), SymbolId(44)] rebuilt : ScopeId(37): [SymbolId(27), SymbolId(28)] @@ -52721,8 +53118,8 @@ rebuilt : ["g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "undefined"] tasks/coverage/typescript/tests/cases/conformance/types/literal/literalTypesAndDestructuring.ts semantic error: Bindings mismatch: -after transform: ScopeId(0): ["Foo", "a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "bar", "x"] -rebuilt : ScopeId(0): ["a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "bar"] +after transform: ScopeId(0): ["Foo", "_x$a", "_x$a2", "_x$a3", "a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "bar", "x"] +rebuilt : ScopeId(0): ["_x$a", "_x$a2", "_x$a3", "a1", "a2", "a3", "a4", "b1", "b2", "b3", "b4", "bar"] Scope children mismatch: after transform: ScopeId(0): [ScopeId(1)] rebuilt : ScopeId(0): [] diff --git a/tasks/coverage/src/tools/semantic.rs b/tasks/coverage/src/tools/semantic.rs index 49bad281d827c0..162bfddc88f9c5 100644 --- a/tasks/coverage/src/tools/semantic.rs +++ b/tasks/coverage/src/tools/semantic.rs @@ -2,7 +2,7 @@ use std::path::{Path, PathBuf}; use oxc::{ span::SourceType, - transformer::{ES2015Options, JsxOptions, JsxRuntime, TransformOptions, TypeScriptOptions}, + transformer::{JsxOptions, JsxRuntime, TransformOptions}, }; use crate::{ @@ -16,15 +16,13 @@ use crate::{ fn get_default_transformer_options() -> TransformOptions { TransformOptions { - typescript: TypeScriptOptions::default(), - es2015: ES2015Options { arrow_function: None }, jsx: JsxOptions { jsx_plugin: true, jsx_self_plugin: true, jsx_source_plugin: true, ..Default::default() }, - ..Default::default() + ..TransformOptions::enable_all() } } diff --git a/tasks/coverage/src/tools/transformer.rs b/tasks/coverage/src/tools/transformer.rs index 2f1675fdc7121f..840f24694083fd 100644 --- a/tasks/coverage/src/tools/transformer.rs +++ b/tasks/coverage/src/tools/transformer.rs @@ -2,10 +2,7 @@ use std::path::{Path, PathBuf}; use oxc::{ span::SourceType, - transformer::{ - ArrowFunctionsOptions, ES2015Options, JsxOptions, JsxRuntime, TransformOptions, - TypeScriptOptions, - }, + transformer::{JsxOptions, JsxRuntime, TransformOptions}, }; use crate::{ @@ -48,15 +45,13 @@ fn get_result( fn get_default_transformer_options() -> TransformOptions { TransformOptions { - typescript: TypeScriptOptions::default(), - es2015: ES2015Options { arrow_function: Some(ArrowFunctionsOptions::default()) }, jsx: JsxOptions { jsx_plugin: true, jsx_self_plugin: true, jsx_source_plugin: true, ..Default::default() }, - ..Default::default() + ..TransformOptions::enable_all() } }