mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 20:28:58 +00:00
feat(transformer): add TransformerOptions::env with EnvOptions (#7037)
This commit is contained in:
parent
e921df6199
commit
fcaba4a92a
15 changed files with 903 additions and 352 deletions
|
|
@ -80,9 +80,6 @@ pub struct TransformOptions {
|
|||
/// Configure how TSX and JSX are transformed.
|
||||
pub jsx: Option<JsxOptions>,
|
||||
|
||||
/// Enable ES2015 transformations.
|
||||
pub es2015: Option<Es2015Options>,
|
||||
|
||||
/// Define Plugin
|
||||
#[napi(ts_type = "Record<string, string>")]
|
||||
pub define: Option<FxHashMap<String, String>>,
|
||||
|
|
@ -101,7 +98,6 @@ impl From<TransformOptions> 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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
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};
|
||||
pub use async_to_generator::AsyncGeneratorExecutor;
|
||||
|
||||
pub use options::ES2017Options;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub struct ES2017<'a, 'ctx> {
|
||||
options: ES2017Options,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use super::ObjectRestSpreadOptions;
|
|||
pub struct ES2018Options {
|
||||
#[serde(skip)]
|
||||
pub object_rest_spread: Option<ObjectRestSpreadOptions>,
|
||||
|
||||
#[serde(skip)]
|
||||
pub async_generator_functions: bool,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,5 +7,7 @@ use super::ClassPropertiesOptions;
|
|||
pub struct ES2022Options {
|
||||
#[serde(skip)]
|
||||
pub class_static_block: bool,
|
||||
|
||||
#[serde(skip)]
|
||||
pub class_properties: Option<ClassPropertiesOptions>,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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, &self.ctx),
|
||||
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, &self.ctx),
|
||||
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),
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
///
|
||||
/// <https://babel.dev/docs/options#plugin-and-preset-options>
|
||||
|
|
|
|||
274
crates/oxc_transformer/src/options/env.rs
Normal file
274
crates/oxc_transformer/src/options/env.rs
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
use oxc_diagnostics::{Error, OxcDiagnostic};
|
||||
|
||||
use crate::{
|
||||
es2015::{ArrowFunctionsOptions, ES2015Options},
|
||||
es2016::ES2016Options,
|
||||
es2017::ES2017Options,
|
||||
es2018::{ES2018Options, ObjectRestSpreadOptions},
|
||||
es2019::ES2019Options,
|
||||
es2020::ES2020Options,
|
||||
es2021::ES2021Options,
|
||||
es2022::{ClassPropertiesOptions, 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,
|
||||
// Turned off because it is not ready.
|
||||
async_generator_functions: false,
|
||||
},
|
||||
es2019: ES2019Options { optional_catch_binding: true },
|
||||
es2020: ES2020Options { nullish_coalescing_operator: true },
|
||||
es2021: ES2021Options { logical_assignment_operators: true },
|
||||
es2022: ES2022Options { class_static_block: true, class_properties: None },
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<&BabelEnvOptions> for EnvOptions {
|
||||
type Error = Vec<Error>;
|
||||
|
||||
/// If there are any errors in the `options.targets``, they will be returned as a list of errors.
|
||||
fn try_from(o: &BabelEnvOptions) -> Result<Self, Self::Error> {
|
||||
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),
|
||||
async_generator_functions: o
|
||||
.can_enable_plugin("transform-async-generator-functions"),
|
||||
},
|
||||
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"),
|
||||
class_properties: o
|
||||
.can_enable_plugin("transform-class-properties")
|
||||
.then(Default::default),
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<&BabelOptions> for EnvOptions {
|
||||
type Error = Vec<Error>;
|
||||
|
||||
/// If the `options` contains any unknown fields, they will be returned as a list of errors.
|
||||
fn try_from(options: &BabelOptions) -> Result<Self, Self::Error> {
|
||||
let mut errors = Vec::<Error>::new();
|
||||
|
||||
let env = options
|
||||
.get_preset("env")
|
||||
.flatten()
|
||||
.and_then(|value| {
|
||||
serde_json::from_value::<BabelEnvOptions>(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::<ArrowFunctionsOptions>(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::<ObjectRestSpreadOptions>(options)
|
||||
.inspect_err(|err| {
|
||||
report_error(plugin_name, err, false, &mut errors);
|
||||
})
|
||||
.ok()
|
||||
})
|
||||
.unwrap_or_default()
|
||||
})
|
||||
.or(env.es2018.object_rest_spread)
|
||||
},
|
||||
async_generator_functions: {
|
||||
let plugin_name = "transform-async-generator-functions";
|
||||
options.get_plugin(plugin_name).is_some() || env.es2018.async_generator_functions
|
||||
},
|
||||
};
|
||||
|
||||
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
|
||||
},
|
||||
class_properties: {
|
||||
let plugin_name = "transform-class-properties";
|
||||
options
|
||||
.get_plugin(plugin_name)
|
||||
.map(|o| {
|
||||
o.and_then(|options| {
|
||||
serde_json::from_value::<ClassPropertiesOptions>(options)
|
||||
.inspect_err(|err| {
|
||||
report_error(plugin_name, err, false, &mut errors);
|
||||
})
|
||||
.ok()
|
||||
})
|
||||
.unwrap_or_default()
|
||||
})
|
||||
.or(env.es2022.class_properties)
|
||||
},
|
||||
};
|
||||
|
||||
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<Error>) {
|
||||
let message =
|
||||
if is_preset { format!("preset-{name}: {err}",) } else { format!("{name}: {err}",) };
|
||||
errors.push(OxcDiagnostic::error(message).into());
|
||||
}
|
||||
|
|
@ -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::{ClassPropertiesOptions, ES2022Options},
|
||||
jsx::JsxOptions,
|
||||
regexp::RegExpOptions,
|
||||
typescript::TypeScriptOptions,
|
||||
ReactRefreshOptions,
|
||||
};
|
||||
|
||||
pub use babel::{
|
||||
env::{BabelEnvOptions, Targets},
|
||||
BabelOptions,
|
||||
};
|
||||
use babel::BabelOptions;
|
||||
|
||||
/// <https://babel.dev/docs/options>
|
||||
#[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,37 +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()),
|
||||
// Turned off because it is not ready.
|
||||
async_generator_functions: false,
|
||||
},
|
||||
es2019: ES2019Options { optional_catch_binding: true },
|
||||
es2020: ES2020Options { nullish_coalescing_operator: true },
|
||||
es2021: ES2021Options { logical_assignment_operators: true },
|
||||
es2022: ES2022Options {
|
||||
class_static_block: true,
|
||||
class_properties: Some(ClassPropertiesOptions::default()),
|
||||
},
|
||||
env: EnvOptions::enable_all(),
|
||||
helper_loader: HelperLoaderOptions {
|
||||
mode: HelperLoaderMode::Runtime,
|
||||
..Default::default()
|
||||
|
|
@ -121,62 +66,6 @@ impl TransformOptions {
|
|||
}
|
||||
}
|
||||
|
||||
impl TryFrom<&BabelEnvOptions> for TransformOptions {
|
||||
type Error = Vec<Error>;
|
||||
|
||||
/// If there are any errors in the `options.targets``, they will be returned as a list of errors.
|
||||
fn try_from(o: &BabelEnvOptions) -> Result<Self, Self::Error> {
|
||||
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),
|
||||
async_generator_functions: o
|
||||
.can_enable_plugin("transform-async-generator-functions"),
|
||||
},
|
||||
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"),
|
||||
class_properties: o
|
||||
.can_enable_plugin("transform-class-properties")
|
||||
.then(Default::default),
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<&BabelOptions> for TransformOptions {
|
||||
type Error = Vec<Error>;
|
||||
|
||||
|
|
@ -251,129 +140,12 @@ impl TryFrom<&BabelOptions> for TransformOptions {
|
|||
react_options
|
||||
};
|
||||
|
||||
let env = options
|
||||
.get_preset("env")
|
||||
.flatten()
|
||||
.and_then(|value| {
|
||||
serde_json::from_value::<BabelEnvOptions>(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::<ArrowFunctionsOptions>(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::<ObjectRestSpreadOptions>(options)
|
||||
.inspect_err(|err| {
|
||||
report_error(plugin_name, err, false, &mut errors);
|
||||
})
|
||||
.ok()
|
||||
})
|
||||
.unwrap_or_default()
|
||||
})
|
||||
.or(env.es2018.object_rest_spread)
|
||||
},
|
||||
async_generator_functions: {
|
||||
let plugin_name = "transform-async-generator-functions";
|
||||
options.get_plugin(plugin_name).is_some() || env.es2018.async_generator_functions
|
||||
},
|
||||
};
|
||||
|
||||
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
|
||||
},
|
||||
class_properties: {
|
||||
let plugin_name = "transform-class-properties";
|
||||
options
|
||||
.get_plugin(plugin_name)
|
||||
.map(|o| {
|
||||
o.and_then(|options| {
|
||||
serde_json::from_value::<ClassPropertiesOptions>(options)
|
||||
.inspect_err(|err| {
|
||||
report_error(plugin_name, err, false, &mut errors);
|
||||
})
|
||||
.ok()
|
||||
})
|
||||
.unwrap_or_default()
|
||||
})
|
||||
.or(env.es2022.class_properties)
|
||||
},
|
||||
let env = match EnvOptions::try_from(options) {
|
||||
Ok(env) => Some(env),
|
||||
Err(errs) => {
|
||||
errors.extend(errs);
|
||||
None
|
||||
}
|
||||
};
|
||||
|
||||
if !errors.is_empty() {
|
||||
|
|
@ -394,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,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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::<Vec<_>>(),
|
||||
);
|
||||
}
|
||||
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::<Vec<_>>(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 : <None>
|
||||
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 : <None>
|
||||
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 : <None>
|
||||
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 = <value>;` 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 : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "d":
|
||||
after transform: SymbolId(3) "d"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "d":
|
||||
after transform: SymbolId(3) "d"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "e":
|
||||
after transform: SymbolId(4) "e"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "e":
|
||||
after transform: SymbolId(4) "e"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "f":
|
||||
after transform: SymbolId(5) "f"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "f":
|
||||
after transform: SymbolId(5) "f"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "g":
|
||||
after transform: SymbolId(6) "g"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "g":
|
||||
after transform: SymbolId(6) "g"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "h":
|
||||
after transform: SymbolId(7) "h"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "h":
|
||||
after transform: SymbolId(7) "h"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "i":
|
||||
after transform: SymbolId(8) "i"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "i":
|
||||
after transform: SymbolId(8) "i"
|
||||
rebuilt : <None>
|
||||
|
|
@ -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 : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(2) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "result":
|
||||
after transform: SymbolId(1) "result"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(3) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(3) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "result":
|
||||
after transform: SymbolId(1) "result"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(4) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(4) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "result":
|
||||
after transform: SymbolId(1) "result"
|
||||
rebuilt : <None>
|
||||
|
|
@ -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 : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(2) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "result":
|
||||
after transform: SymbolId(1) "result"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(3) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(3) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "result":
|
||||
after transform: SymbolId(1) "result"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(4) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(4) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "result":
|
||||
after transform: SymbolId(1) "result"
|
||||
rebuilt : <None>
|
||||
|
|
@ -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 : <None>
|
||||
Reference symbol mismatch for "x":
|
||||
after transform: SymbolId(0) "x"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "x":
|
||||
after transform: SymbolId(0) "x"
|
||||
rebuilt : <None>
|
||||
|
|
@ -42557,6 +42608,12 @@ rebuilt : ScopeId(0): ["f1", "f2", "f3", "f4"]
|
|||
Reference symbol mismatch for "yadda":
|
||||
after transform: SymbolId(15) "yadda"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "yadda":
|
||||
after transform: SymbolId(15) "yadda"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "yadda":
|
||||
after transform: SymbolId(15) "yadda"
|
||||
rebuilt : <None>
|
||||
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 : <None>
|
||||
Reference symbol mismatch for "yadda":
|
||||
after transform: SymbolId(15) "yadda"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "yadda":
|
||||
after transform: SymbolId(15) "yadda"
|
||||
rebuilt : <None>
|
||||
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 : <None>
|
||||
|
|
@ -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 : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
|
|
@ -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 : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
|
|
@ -45688,18 +45822,60 @@ rebuilt : <None>
|
|||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(0) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(1) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(2) "c"
|
||||
rebuilt : <None>
|
||||
|
|
@ -45709,8 +45885,8 @@ 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 : <None>
|
|||
Reference symbol mismatch for "f":
|
||||
after transform: SymbolId(0) "f"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "f":
|
||||
after transform: SymbolId(0) "f"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "f":
|
||||
after transform: SymbolId(0) "f"
|
||||
rebuilt : <None>
|
||||
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,48 +45947,90 @@ rebuilt : ScopeId(0): ["aa1", "aa2", "aa3", "aa4", "aa5", "aa6", "aa7", "
|
|||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(20) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(20) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
|
|
@ -45811,12 +46046,24 @@ rebuilt : <None>
|
|||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
|
|
@ -45829,12 +46076,24 @@ rebuilt : <None>
|
|||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
|
|
@ -45847,12 +46106,24 @@ rebuilt : <None>
|
|||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
|
|
@ -45865,12 +46136,24 @@ rebuilt : <None>
|
|||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
|
|
@ -45883,6 +46166,42 @@ rebuilt : <None>
|
|||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(20) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "c":
|
||||
after transform: SymbolId(20) "c"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a":
|
||||
after transform: SymbolId(18) "a"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "b":
|
||||
after transform: SymbolId(19) "b"
|
||||
rebuilt : <None>
|
||||
|
|
@ -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 : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a1":
|
||||
after transform: SymbolId(0) "a1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a2":
|
||||
after transform: SymbolId(1) "a2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a3":
|
||||
after transform: SymbolId(2) "a3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a4":
|
||||
after transform: SymbolId(3) "a4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a5":
|
||||
after transform: SymbolId(4) "a5"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a6":
|
||||
after transform: SymbolId(5) "a6"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a7":
|
||||
after transform: SymbolId(6) "a7"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a8":
|
||||
after transform: SymbolId(7) "a8"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "a9":
|
||||
after transform: SymbolId(8) "a9"
|
||||
rebuilt : <None>
|
||||
|
|
@ -46075,24 +46448,48 @@ rebuilt : <None>
|
|||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o2":
|
||||
after transform: SymbolId(1) "o2"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o3":
|
||||
after transform: SymbolId(2) "o3"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o4":
|
||||
after transform: SymbolId(3) "o4"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
Reference symbol mismatch for "o1":
|
||||
after transform: SymbolId(0) "o1"
|
||||
rebuilt : <None>
|
||||
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): []
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue