From 365d48f5e1f5254dcb9ad07bac2813ac2a23d600 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:36:16 +0000 Subject: [PATCH] fix(tasks/compat_data): fix misplaced features (#7284) closes #7279 --- crates/oxc_transformer/src/options/env.rs | 4 +- .../src/options/es_features.rs | 677 +++++++------- .../tests/integrations/es_target.rs | 2 +- tasks/compat_data/data.json | 852 +++++++++--------- tasks/compat_data/es-features.js | 258 +++--- 5 files changed, 905 insertions(+), 888 deletions(-) diff --git a/crates/oxc_transformer/src/options/env.rs b/crates/oxc_transformer/src/options/env.rs index abc3f3c3b60fcc..667206afb370a9 100644 --- a/crates/oxc_transformer/src/options/env.rs +++ b/crates/oxc_transformer/src/options/env.rs @@ -177,7 +177,7 @@ impl From for EnvOptions { async_generator_functions: o.has_feature(ES2018AsyncGeneratorFunctions), }, es2019: ES2019Options { - optional_catch_binding: o.has_feature(ES2018OptionalCatchBinding), + optional_catch_binding: o.has_feature(ES2019OptionalCatchBinding), }, es2020: ES2020Options { nullish_coalescing_operator: o.has_feature(ES2020NullishCoalescingOperator), @@ -185,7 +185,7 @@ impl From for EnvOptions { optional_chaining: o.has_feature(ES2020OptionalChaining), }, es2021: ES2021Options { - logical_assignment_operators: o.has_feature(ES2020LogicalAssignmentOperators), + logical_assignment_operators: o.has_feature(ES2021LogicalAssignmentOperators), }, es2022: ES2022Options { class_static_block: o.has_feature(ES2022ClassStaticBlock), diff --git a/crates/oxc_transformer/src/options/es_features.rs b/crates/oxc_transformer/src/options/es_features.rs index 7a1f6b21a9e203..56a47be15c1568 100644 --- a/crates/oxc_transformer/src/options/es_features.rs +++ b/crates/oxc_transformer/src/options/es_features.rs @@ -6,53 +6,53 @@ use rustc_hash::FxHashMap; use std::sync::OnceLock; #[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] pub enum ESFeature { - ES5ReservedWords, - ES5PropertyLiterals, ES5MemberExpressionLiterals, + ES5PropertyLiterals, + ES5ReservedWords, ES2015Parameters, - ES2015Regenerator, - ES2015NewTarget, - ES2015TypeofSymbol, - ES2015BlockScoping, - ES2015Destructuring, - ES2015Spread, - ES2015UnicodeRegex, - ES2015UnicodeEscapes, - ES2015StickyRegex, - ES2015ForOf, - ES2015ComputedProperties, - ES2015DuplicateKeys, - ES2015ShorthandProperties, - ES2015ObjectSuper, - ES2015Classes, - ES2015BlockScopedFunctions, - ES2015ArrowFunctions, - ES2015FunctionName, - ES2015Literals, ES2015TemplateLiterals, + ES2015Literals, + ES2015FunctionName, + ES2015ArrowFunctions, + ES2015BlockScopedFunctions, + ES2015Classes, + ES2015ObjectSuper, + ES2015ShorthandProperties, + ES2015DuplicateKeys, + ES2015ComputedProperties, + ES2015ForOf, + ES2015StickyRegex, + ES2015UnicodeEscapes, + ES2015UnicodeRegex, + ES2015Spread, + ES2015Destructuring, + ES2015BlockScoping, + ES2015TypeofSymbol, + ES2015NewTarget, + ES2015Regenerator, ES2016ExponentiationOperator, ES2017AsyncToGenerator, - ES2018NamedCapturingGroupsRegex, - ES2018UnicodePropertyRegex, + ES2018AsyncGeneratorFunctions, + ES2018ObjectRestSpread, ES2018DotallRegex, + ES2018UnicodePropertyRegex, + ES2018NamedCapturingGroupsRegex, ES2018LookbehindRegex, - ES2018ObjectRestSpread, - ES2018AsyncGeneratorFunctions, - ES2018OptionalCatchBinding, ES2019JsonStrings, - ES2020OptionalChaining, + ES2019OptionalCatchBinding, ES2020NullishCoalescingOperator, - ES2020LogicalAssignmentOperators, + ES2020OptionalChaining, ES2020BigInt, ES2021NumericSeparator, - ES2022PrivateMethods, - ES2022ClassProperties, - ES2022PrivatePropertyInObject, + ES2021LogicalAssignmentOperators, ES2022ClassStaticBlock, + ES2022PrivatePropertyInObject, + ES2022ClassProperties, + ES2022PrivateMethods, ES2022MatchIndicesRegex, ES2024UnicodeSetsRegex, - ES2025RegexpModifiers, ES2025DuplicateNamedCapturingGroupsRegex, + ES2025RegexpModifiers, } pub fn features() -> &'static FxHashMap { use ESFeature::*; @@ -61,20 +61,20 @@ pub fn features() -> &'static FxHashMap { FEATURES.get_or_init(|| { FxHashMap::from_iter([ ( - ES5ReservedWords, + ES5MemberExpressionLiterals, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(13u32, 0u32, 0u32)), - (Safari, Version(3u32, 1u32, 0u32)), - (OperaMobile, Version(10u32, 1u32, 0u32)), + (Chrome, Version(7u32, 0u32, 0u32)), + (Safari, Version(5u32, 1u32, 0u32)), + (OperaMobile, Version(12u32, 0u32, 0u32)), (Samsung, Version(1u32, 0u32, 0u32)), (Rhino, Version(1u32, 7u32, 13u32)), - (Node, Version(0u32, 6u32, 0u32)), + (Node, Version(0u32, 4u32, 0u32)), (Ie, Version(9u32, 0u32, 0u32)), (Firefox, Version(2u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Android, Version(4u32, 4u32, 0u32)), + (Android, Version(4u32, 0u32, 0u32)), (Electron, Version(0u32, 20u32, 0u32)), - (Opera, Version(10u32, 50u32, 0u32)), + (Opera, Version(12u32, 0u32, 0u32)), (Ios, Version(6u32, 0u32, 0u32)), (Edge, Version(12u32, 0u32, 0u32)), (Es, Version(5u32, 0, 0)), @@ -101,20 +101,20 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES5MemberExpressionLiterals, + ES5ReservedWords, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(7u32, 0u32, 0u32)), - (Safari, Version(5u32, 1u32, 0u32)), - (OperaMobile, Version(12u32, 0u32, 0u32)), + (Chrome, Version(13u32, 0u32, 0u32)), + (Safari, Version(3u32, 1u32, 0u32)), + (OperaMobile, Version(10u32, 1u32, 0u32)), (Samsung, Version(1u32, 0u32, 0u32)), (Rhino, Version(1u32, 7u32, 13u32)), - (Node, Version(0u32, 4u32, 0u32)), + (Node, Version(0u32, 6u32, 0u32)), (Ie, Version(9u32, 0u32, 0u32)), (Firefox, Version(2u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Android, Version(4u32, 0u32, 0u32)), + (Android, Version(4u32, 4u32, 0u32)), (Electron, Version(0u32, 20u32, 0u32)), - (Opera, Version(12u32, 0u32, 0u32)), + (Opera, Version(10u32, 50u32, 0u32)), (Ios, Version(6u32, 0u32, 0u32)), (Edge, Version(12u32, 0u32, 0u32)), (Es, Version(5u32, 0, 0)), @@ -138,76 +138,42 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES2015Regenerator, + ES2015TemplateLiterals, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(50u32, 0u32, 0u32)), - (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(37u32, 0u32, 0u32)), - (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(6u32, 0u32, 0u32)), - (Firefox, Version(53u32, 0u32, 0u32)), + (Chrome, Version(41u32, 0u32, 0u32)), + (Safari, Version(13u32, 0u32, 0u32)), + (OperaMobile, Version(28u32, 0u32, 0u32)), + (Samsung, Version(3u32, 4u32, 0u32)), + (Node, Version(4u32, 0u32, 0u32)), + (Firefox, Version(34u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(1u32, 1u32, 0u32)), - (Opera, Version(37u32, 0u32, 0u32)), - (Ios, Version(10u32, 0u32, 0u32)), + (Electron, Version(0u32, 21u32, 0u32)), + (Opera, Version(28u32, 0u32, 0u32)), + (Ios, Version(13u32, 0u32, 0u32)), (Edge, Version(13u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015NewTarget, - EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(46u32, 0u32, 0u32)), - (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(33u32, 0u32, 0u32)), - (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(5u32, 0u32, 0u32)), - (Firefox, Version(41u32, 0u32, 0u32)), - (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 36u32, 0u32)), - (Opera, Version(33u32, 0u32, 0u32)), - (Ios, Version(10u32, 0u32, 0u32)), - (Edge, Version(14u32, 0u32, 0u32)), - (Es, Version(2015u32, 0, 0)), - ])), - ), - ( - ES2015TypeofSymbol, + ES2015Literals, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(38u32, 0u32, 0u32)), + (Chrome, Version(44u32, 0u32, 0u32)), (Safari, Version(9u32, 0u32, 0u32)), - (OperaMobile, Version(25u32, 0u32, 0u32)), - (Samsung, Version(3u32, 0u32, 0u32)), - (Node, Version(0u32, 12u32, 0u32)), - (Rhino, Version(1u32, 7u32, 13u32)), - (Firefox, Version(36u32, 0u32, 0u32)), + (OperaMobile, Version(32u32, 0u32, 0u32)), + (Samsung, Version(4u32, 0u32, 0u32)), + (Node, Version(4u32, 0u32, 0u32)), + (Rhino, Version(1u32, 7u32, 15u32)), + (Firefox, Version(53u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 20u32, 0u32)), - (Opera, Version(25u32, 0u32, 0u32)), + (Electron, Version(0u32, 30u32, 0u32)), + (Opera, Version(31u32, 0u32, 0u32)), (Ios, Version(9u32, 0u32, 0u32)), (Edge, Version(12u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015BlockScoping, - EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(50u32, 0u32, 0u32)), - (Safari, Version(11u32, 0u32, 0u32)), - (OperaMobile, Version(37u32, 0u32, 0u32)), - (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(6u32, 0u32, 0u32)), - (Firefox, Version(53u32, 0u32, 0u32)), - (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(1u32, 1u32, 0u32)), - (Opera, Version(37u32, 0u32, 0u32)), - (Ios, Version(11u32, 0u32, 0u32)), - (Edge, Version(14u32, 0u32, 0u32)), - (Es, Version(2015u32, 0, 0)), - ])), - ), - ( - ES2015Destructuring, + ES2015FunctionName, EngineTargets::new(FxHashMap::from_iter([ (Chrome, Version(51u32, 0u32, 0u32)), (Safari, Version(10u32, 0u32, 0u32)), @@ -219,110 +185,94 @@ pub fn features() -> &'static FxHashMap { (Electron, Version(1u32, 2u32, 0u32)), (Opera, Version(38u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), - (Edge, Version(15u32, 0u32, 0u32)), + (Edge, Version(79u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015Spread, + ES2015ArrowFunctions, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(46u32, 0u32, 0u32)), + (Chrome, Version(47u32, 0u32, 0u32)), (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(33u32, 0u32, 0u32)), + (OperaMobile, Version(34u32, 0u32, 0u32)), (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(5u32, 0u32, 0u32)), - (Firefox, Version(45u32, 0u32, 0u32)), + (Node, Version(6u32, 0u32, 0u32)), + (Rhino, Version(1u32, 7u32, 13u32)), + (Firefox, Version(43u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), (Electron, Version(0u32, 36u32, 0u32)), - (Opera, Version(33u32, 0u32, 0u32)), + (Opera, Version(34u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), (Edge, Version(13u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015UnicodeRegex, - EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(50u32, 0u32, 0u32)), - (Safari, Version(12u32, 0u32, 0u32)), - (OperaMobile, Version(37u32, 0u32, 0u32)), - (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(6u32, 0u32, 0u32)), - (Firefox, Version(46u32, 0u32, 0u32)), - (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(1u32, 1u32, 0u32)), - (Opera, Version(37u32, 0u32, 0u32)), - (Ios, Version(12u32, 0u32, 0u32)), - (Edge, Version(13u32, 0u32, 0u32)), - (Es, Version(2015u32, 0, 0)), - ])), - ), - ( - ES2015UnicodeEscapes, + ES2015BlockScopedFunctions, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(44u32, 0u32, 0u32)), - (Safari, Version(9u32, 0u32, 0u32)), - (OperaMobile, Version(32u32, 0u32, 0u32)), - (Samsung, Version(4u32, 0u32, 0u32)), + (Chrome, Version(41u32, 0u32, 0u32)), + (Safari, Version(10u32, 0u32, 0u32)), + (OperaMobile, Version(28u32, 0u32, 0u32)), + (Samsung, Version(3u32, 4u32, 0u32)), (Node, Version(4u32, 0u32, 0u32)), - (Rhino, Version(1u32, 7u32, 15u32)), - (Firefox, Version(53u32, 0u32, 0u32)), + (Ie, Version(11u32, 0u32, 0u32)), + (Firefox, Version(46u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 30u32, 0u32)), - (Opera, Version(31u32, 0u32, 0u32)), - (Ios, Version(9u32, 0u32, 0u32)), + (Electron, Version(0u32, 21u32, 0u32)), + (Opera, Version(28u32, 0u32, 0u32)), + (Ios, Version(10u32, 0u32, 0u32)), (Edge, Version(12u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015StickyRegex, + ES2015Classes, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(49u32, 0u32, 0u32)), + (Chrome, Version(46u32, 0u32, 0u32)), (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(36u32, 0u32, 0u32)), + (OperaMobile, Version(33u32, 0u32, 0u32)), (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(6u32, 0u32, 0u32)), - (Rhino, Version(1u32, 7u32, 15u32)), - (Firefox, Version(3u32, 0u32, 0u32)), + (Node, Version(5u32, 0u32, 0u32)), + (Firefox, Version(45u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 37u32, 0u32)), - (Opera, Version(36u32, 0u32, 0u32)), + (Electron, Version(0u32, 36u32, 0u32)), + (Opera, Version(33u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), (Edge, Version(13u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015ForOf, + ES2015ObjectSuper, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(51u32, 0u32, 0u32)), + (Chrome, Version(46u32, 0u32, 0u32)), (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(41u32, 0u32, 0u32)), + (OperaMobile, Version(33u32, 0u32, 0u32)), (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(6u32, 5u32, 0u32)), - (Firefox, Version(53u32, 0u32, 0u32)), + (Node, Version(5u32, 0u32, 0u32)), + (Firefox, Version(45u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(1u32, 2u32, 0u32)), - (Opera, Version(38u32, 0u32, 0u32)), + (Electron, Version(0u32, 36u32, 0u32)), + (Opera, Version(33u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), - (Edge, Version(15u32, 0u32, 0u32)), + (Edge, Version(13u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015ComputedProperties, + ES2015ShorthandProperties, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(44u32, 0u32, 0u32)), - (Safari, Version(7u32, 1u32, 0u32)), - (OperaMobile, Version(32u32, 0u32, 0u32)), + (Chrome, Version(43u32, 0u32, 0u32)), + (Safari, Version(9u32, 0u32, 0u32)), + (OperaMobile, Version(30u32, 0u32, 0u32)), (Samsung, Version(4u32, 0u32, 0u32)), (Node, Version(4u32, 0u32, 0u32)), - (Firefox, Version(34u32, 0u32, 0u32)), + (Rhino, Version(1u32, 7u32, 14u32)), + (Firefox, Version(33u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 30u32, 0u32)), - (Opera, Version(31u32, 0u32, 0u32)), - (Ios, Version(8u32, 0u32, 0u32)), + (Electron, Version(0u32, 27u32, 0u32)), + (Opera, Version(30u32, 0u32, 0u32)), + (Ios, Version(9u32, 0u32, 0u32)), (Edge, Version(12u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), @@ -345,95 +295,111 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES2015ShorthandProperties, + ES2015ComputedProperties, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(43u32, 0u32, 0u32)), - (Safari, Version(9u32, 0u32, 0u32)), - (OperaMobile, Version(30u32, 0u32, 0u32)), + (Chrome, Version(44u32, 0u32, 0u32)), + (Safari, Version(7u32, 1u32, 0u32)), + (OperaMobile, Version(32u32, 0u32, 0u32)), (Samsung, Version(4u32, 0u32, 0u32)), (Node, Version(4u32, 0u32, 0u32)), - (Rhino, Version(1u32, 7u32, 14u32)), - (Firefox, Version(33u32, 0u32, 0u32)), + (Firefox, Version(34u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 27u32, 0u32)), - (Opera, Version(30u32, 0u32, 0u32)), - (Ios, Version(9u32, 0u32, 0u32)), + (Electron, Version(0u32, 30u32, 0u32)), + (Opera, Version(31u32, 0u32, 0u32)), + (Ios, Version(8u32, 0u32, 0u32)), (Edge, Version(12u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015ObjectSuper, + ES2015ForOf, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(46u32, 0u32, 0u32)), + (Chrome, Version(51u32, 0u32, 0u32)), (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(33u32, 0u32, 0u32)), + (OperaMobile, Version(41u32, 0u32, 0u32)), (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(5u32, 0u32, 0u32)), - (Firefox, Version(45u32, 0u32, 0u32)), + (Node, Version(6u32, 5u32, 0u32)), + (Firefox, Version(53u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 36u32, 0u32)), - (Opera, Version(33u32, 0u32, 0u32)), + (Electron, Version(1u32, 2u32, 0u32)), + (Opera, Version(38u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), - (Edge, Version(13u32, 0u32, 0u32)), + (Edge, Version(15u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015Classes, + ES2015StickyRegex, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(46u32, 0u32, 0u32)), + (Chrome, Version(49u32, 0u32, 0u32)), (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(33u32, 0u32, 0u32)), + (OperaMobile, Version(36u32, 0u32, 0u32)), (Samsung, Version(5u32, 0u32, 0u32)), - (Node, Version(5u32, 0u32, 0u32)), - (Firefox, Version(45u32, 0u32, 0u32)), + (Node, Version(6u32, 0u32, 0u32)), + (Rhino, Version(1u32, 7u32, 15u32)), + (Firefox, Version(3u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 36u32, 0u32)), - (Opera, Version(33u32, 0u32, 0u32)), + (Electron, Version(0u32, 37u32, 0u32)), + (Opera, Version(36u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), (Edge, Version(13u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015BlockScopedFunctions, + ES2015UnicodeEscapes, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(41u32, 0u32, 0u32)), - (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(28u32, 0u32, 0u32)), - (Samsung, Version(3u32, 4u32, 0u32)), + (Chrome, Version(44u32, 0u32, 0u32)), + (Safari, Version(9u32, 0u32, 0u32)), + (OperaMobile, Version(32u32, 0u32, 0u32)), + (Samsung, Version(4u32, 0u32, 0u32)), (Node, Version(4u32, 0u32, 0u32)), - (Ie, Version(11u32, 0u32, 0u32)), - (Firefox, Version(46u32, 0u32, 0u32)), + (Rhino, Version(1u32, 7u32, 15u32)), + (Firefox, Version(53u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 21u32, 0u32)), - (Opera, Version(28u32, 0u32, 0u32)), - (Ios, Version(10u32, 0u32, 0u32)), + (Electron, Version(0u32, 30u32, 0u32)), + (Opera, Version(31u32, 0u32, 0u32)), + (Ios, Version(9u32, 0u32, 0u32)), (Edge, Version(12u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015ArrowFunctions, + ES2015UnicodeRegex, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(47u32, 0u32, 0u32)), - (Safari, Version(10u32, 0u32, 0u32)), - (OperaMobile, Version(34u32, 0u32, 0u32)), + (Chrome, Version(50u32, 0u32, 0u32)), + (Safari, Version(12u32, 0u32, 0u32)), + (OperaMobile, Version(37u32, 0u32, 0u32)), (Samsung, Version(5u32, 0u32, 0u32)), (Node, Version(6u32, 0u32, 0u32)), - (Rhino, Version(1u32, 7u32, 13u32)), - (Firefox, Version(43u32, 0u32, 0u32)), + (Firefox, Version(46u32, 0u32, 0u32)), + (Deno, Version(1u32, 0u32, 0u32)), + (Electron, Version(1u32, 1u32, 0u32)), + (Opera, Version(37u32, 0u32, 0u32)), + (Ios, Version(12u32, 0u32, 0u32)), + (Edge, Version(13u32, 0u32, 0u32)), + (Es, Version(2015u32, 0, 0)), + ])), + ), + ( + ES2015Spread, + EngineTargets::new(FxHashMap::from_iter([ + (Chrome, Version(46u32, 0u32, 0u32)), + (Safari, Version(10u32, 0u32, 0u32)), + (OperaMobile, Version(33u32, 0u32, 0u32)), + (Samsung, Version(5u32, 0u32, 0u32)), + (Node, Version(5u32, 0u32, 0u32)), + (Firefox, Version(45u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), (Electron, Version(0u32, 36u32, 0u32)), - (Opera, Version(34u32, 0u32, 0u32)), + (Opera, Version(33u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), (Edge, Version(13u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015FunctionName, + ES2015Destructuring, EngineTargets::new(FxHashMap::from_iter([ (Chrome, Version(51u32, 0u32, 0u32)), (Safari, Version(10u32, 0u32, 0u32)), @@ -445,41 +411,75 @@ pub fn features() -> &'static FxHashMap { (Electron, Version(1u32, 2u32, 0u32)), (Opera, Version(38u32, 0u32, 0u32)), (Ios, Version(10u32, 0u32, 0u32)), - (Edge, Version(79u32, 0u32, 0u32)), + (Edge, Version(15u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015Literals, + ES2015BlockScoping, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(44u32, 0u32, 0u32)), - (Safari, Version(9u32, 0u32, 0u32)), - (OperaMobile, Version(32u32, 0u32, 0u32)), - (Samsung, Version(4u32, 0u32, 0u32)), - (Node, Version(4u32, 0u32, 0u32)), - (Rhino, Version(1u32, 7u32, 15u32)), + (Chrome, Version(50u32, 0u32, 0u32)), + (Safari, Version(11u32, 0u32, 0u32)), + (OperaMobile, Version(37u32, 0u32, 0u32)), + (Samsung, Version(5u32, 0u32, 0u32)), + (Node, Version(6u32, 0u32, 0u32)), (Firefox, Version(53u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 30u32, 0u32)), - (Opera, Version(31u32, 0u32, 0u32)), - (Ios, Version(9u32, 0u32, 0u32)), - (Edge, Version(12u32, 0u32, 0u32)), + (Electron, Version(1u32, 1u32, 0u32)), + (Opera, Version(37u32, 0u32, 0u32)), + (Ios, Version(11u32, 0u32, 0u32)), + (Edge, Version(14u32, 0u32, 0u32)), + (Es, Version(2015u32, 0, 0)), + ])), + ), + ( + ES2015TypeofSymbol, + EngineTargets::new(FxHashMap::from_iter([ + (Chrome, Version(38u32, 0u32, 0u32)), + (Safari, Version(9u32, 0u32, 0u32)), + (OperaMobile, Version(25u32, 0u32, 0u32)), + (Samsung, Version(3u32, 0u32, 0u32)), + (Node, Version(0u32, 12u32, 0u32)), + (Rhino, Version(1u32, 7u32, 13u32)), + (Firefox, Version(36u32, 0u32, 0u32)), + (Deno, Version(1u32, 0u32, 0u32)), + (Electron, Version(0u32, 20u32, 0u32)), + (Opera, Version(25u32, 0u32, 0u32)), + (Ios, Version(9u32, 0u32, 0u32)), + (Edge, Version(12u32, 0u32, 0u32)), + (Es, Version(2015u32, 0, 0)), + ])), + ), + ( + ES2015NewTarget, + EngineTargets::new(FxHashMap::from_iter([ + (Chrome, Version(46u32, 0u32, 0u32)), + (Safari, Version(10u32, 0u32, 0u32)), + (OperaMobile, Version(33u32, 0u32, 0u32)), + (Samsung, Version(5u32, 0u32, 0u32)), + (Node, Version(5u32, 0u32, 0u32)), + (Firefox, Version(41u32, 0u32, 0u32)), + (Deno, Version(1u32, 0u32, 0u32)), + (Electron, Version(0u32, 36u32, 0u32)), + (Opera, Version(33u32, 0u32, 0u32)), + (Ios, Version(10u32, 0u32, 0u32)), + (Edge, Version(14u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), ), ( - ES2015TemplateLiterals, + ES2015Regenerator, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(41u32, 0u32, 0u32)), - (Safari, Version(13u32, 0u32, 0u32)), - (OperaMobile, Version(28u32, 0u32, 0u32)), - (Samsung, Version(3u32, 4u32, 0u32)), - (Node, Version(4u32, 0u32, 0u32)), - (Firefox, Version(34u32, 0u32, 0u32)), + (Chrome, Version(50u32, 0u32, 0u32)), + (Safari, Version(10u32, 0u32, 0u32)), + (OperaMobile, Version(37u32, 0u32, 0u32)), + (Samsung, Version(5u32, 0u32, 0u32)), + (Node, Version(6u32, 0u32, 0u32)), + (Firefox, Version(53u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(0u32, 21u32, 0u32)), - (Opera, Version(28u32, 0u32, 0u32)), - (Ios, Version(13u32, 0u32, 0u32)), + (Electron, Version(1u32, 1u32, 0u32)), + (Opera, Version(37u32, 0u32, 0u32)), + (Ios, Version(10u32, 0u32, 0u32)), (Edge, Version(13u32, 0u32, 0u32)), (Es, Version(2015u32, 0, 0)), ])), @@ -520,34 +520,34 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES2018NamedCapturingGroupsRegex, + ES2018AsyncGeneratorFunctions, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(64u32, 0u32, 0u32)), - (Safari, Version(11u32, 1u32, 0u32)), - (OperaMobile, Version(47u32, 0u32, 0u32)), - (Samsung, Version(9u32, 0u32, 0u32)), + (Chrome, Version(63u32, 0u32, 0u32)), + (Safari, Version(12u32, 0u32, 0u32)), + (OperaMobile, Version(46u32, 0u32, 0u32)), + (Samsung, Version(8u32, 0u32, 0u32)), (Node, Version(10u32, 0u32, 0u32)), - (Firefox, Version(78u32, 0u32, 0u32)), + (Firefox, Version(57u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), (Electron, Version(3u32, 0u32, 0u32)), - (Opera, Version(51u32, 0u32, 0u32)), - (Ios, Version(11u32, 3u32, 0u32)), + (Opera, Version(50u32, 0u32, 0u32)), + (Ios, Version(12u32, 0u32, 0u32)), (Edge, Version(79u32, 0u32, 0u32)), (Es, Version(2018u32, 0, 0)), ])), ), ( - ES2018UnicodePropertyRegex, + ES2018ObjectRestSpread, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(64u32, 0u32, 0u32)), + (Chrome, Version(60u32, 0u32, 0u32)), (Safari, Version(11u32, 1u32, 0u32)), - (OperaMobile, Version(47u32, 0u32, 0u32)), - (Samsung, Version(9u32, 0u32, 0u32)), - (Node, Version(10u32, 0u32, 0u32)), - (Firefox, Version(78u32, 0u32, 0u32)), + (OperaMobile, Version(44u32, 0u32, 0u32)), + (Samsung, Version(8u32, 0u32, 0u32)), + (Node, Version(8u32, 3u32, 0u32)), + (Firefox, Version(55u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(3u32, 0u32, 0u32)), - (Opera, Version(51u32, 0u32, 0u32)), + (Electron, Version(2u32, 0u32, 0u32)), + (Opera, Version(47u32, 0u32, 0u32)), (Ios, Version(11u32, 3u32, 0u32)), (Edge, Version(79u32, 0u32, 0u32)), (Es, Version(2018u32, 0, 0)), @@ -572,93 +572,93 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES2018LookbehindRegex, + ES2018UnicodePropertyRegex, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(62u32, 0u32, 0u32)), - (Safari, Version(16u32, 4u32, 0u32)), - (OperaMobile, Version(46u32, 0u32, 0u32)), - (Samsung, Version(8u32, 0u32, 0u32)), - (Node, Version(8u32, 10u32, 0u32)), + (Chrome, Version(64u32, 0u32, 0u32)), + (Safari, Version(11u32, 1u32, 0u32)), + (OperaMobile, Version(47u32, 0u32, 0u32)), + (Samsung, Version(9u32, 0u32, 0u32)), + (Node, Version(10u32, 0u32, 0u32)), (Firefox, Version(78u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), (Electron, Version(3u32, 0u32, 0u32)), - (Opera, Version(49u32, 0u32, 0u32)), - (Ios, Version(16u32, 4u32, 0u32)), + (Opera, Version(51u32, 0u32, 0u32)), + (Ios, Version(11u32, 3u32, 0u32)), (Edge, Version(79u32, 0u32, 0u32)), (Es, Version(2018u32, 0, 0)), ])), ), ( - ES2018ObjectRestSpread, + ES2018NamedCapturingGroupsRegex, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(60u32, 0u32, 0u32)), + (Chrome, Version(64u32, 0u32, 0u32)), (Safari, Version(11u32, 1u32, 0u32)), - (OperaMobile, Version(44u32, 0u32, 0u32)), - (Samsung, Version(8u32, 0u32, 0u32)), - (Node, Version(8u32, 3u32, 0u32)), - (Firefox, Version(55u32, 0u32, 0u32)), + (OperaMobile, Version(47u32, 0u32, 0u32)), + (Samsung, Version(9u32, 0u32, 0u32)), + (Node, Version(10u32, 0u32, 0u32)), + (Firefox, Version(78u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), - (Electron, Version(2u32, 0u32, 0u32)), - (Opera, Version(47u32, 0u32, 0u32)), + (Electron, Version(3u32, 0u32, 0u32)), + (Opera, Version(51u32, 0u32, 0u32)), (Ios, Version(11u32, 3u32, 0u32)), (Edge, Version(79u32, 0u32, 0u32)), (Es, Version(2018u32, 0, 0)), ])), ), ( - ES2018AsyncGeneratorFunctions, + ES2018LookbehindRegex, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(63u32, 0u32, 0u32)), - (Safari, Version(12u32, 0u32, 0u32)), + (Chrome, Version(62u32, 0u32, 0u32)), + (Safari, Version(16u32, 4u32, 0u32)), (OperaMobile, Version(46u32, 0u32, 0u32)), (Samsung, Version(8u32, 0u32, 0u32)), - (Node, Version(10u32, 0u32, 0u32)), - (Firefox, Version(57u32, 0u32, 0u32)), + (Node, Version(8u32, 10u32, 0u32)), + (Firefox, Version(78u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), (Electron, Version(3u32, 0u32, 0u32)), - (Opera, Version(50u32, 0u32, 0u32)), - (Ios, Version(12u32, 0u32, 0u32)), + (Opera, Version(49u32, 0u32, 0u32)), + (Ios, Version(16u32, 4u32, 0u32)), (Edge, Version(79u32, 0u32, 0u32)), (Es, Version(2018u32, 0, 0)), ])), ), ( - ES2018OptionalCatchBinding, + ES2019JsonStrings, EngineTargets::new(FxHashMap::from_iter([ (Chrome, Version(66u32, 0u32, 0u32)), - (Safari, Version(11u32, 1u32, 0u32)), + (Safari, Version(12u32, 0u32, 0u32)), (OperaMobile, Version(47u32, 0u32, 0u32)), (Samsung, Version(9u32, 0u32, 0u32)), (Node, Version(10u32, 0u32, 0u32)), - (Firefox, Version(58u32, 0u32, 0u32)), + (Rhino, Version(1u32, 7u32, 14u32)), + (Firefox, Version(62u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), (Electron, Version(3u32, 0u32, 0u32)), (Opera, Version(53u32, 0u32, 0u32)), - (Ios, Version(11u32, 3u32, 0u32)), + (Ios, Version(12u32, 0u32, 0u32)), (Edge, Version(79u32, 0u32, 0u32)), - (Es, Version(2018u32, 0, 0)), + (Es, Version(2019u32, 0, 0)), ])), ), ( - ES2019JsonStrings, + ES2019OptionalCatchBinding, EngineTargets::new(FxHashMap::from_iter([ (Chrome, Version(66u32, 0u32, 0u32)), - (Safari, Version(12u32, 0u32, 0u32)), + (Safari, Version(11u32, 1u32, 0u32)), (OperaMobile, Version(47u32, 0u32, 0u32)), (Samsung, Version(9u32, 0u32, 0u32)), (Node, Version(10u32, 0u32, 0u32)), - (Rhino, Version(1u32, 7u32, 14u32)), - (Firefox, Version(62u32, 0u32, 0u32)), + (Firefox, Version(58u32, 0u32, 0u32)), (Deno, Version(1u32, 0u32, 0u32)), (Electron, Version(3u32, 0u32, 0u32)), (Opera, Version(53u32, 0u32, 0u32)), - (Ios, Version(12u32, 0u32, 0u32)), + (Ios, Version(11u32, 3u32, 0u32)), (Edge, Version(79u32, 0u32, 0u32)), (Es, Version(2019u32, 0, 0)), ])), ), ( - ES2020OptionalChaining, + ES2019OptionalChaining, EngineTargets::new(FxHashMap::from_iter([ (Chrome, Version(91u32, 0u32, 0u32)), (Safari, Version(13u32, 1u32, 0u32)), @@ -692,19 +692,19 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES2020LogicalAssignmentOperators, + ES2020OptionalChaining, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(85u32, 0u32, 0u32)), - (Safari, Version(14u32, 0u32, 0u32)), - (OperaMobile, Version(60u32, 0u32, 0u32)), - (Samsung, Version(14u32, 0u32, 0u32)), - (Node, Version(15u32, 0u32, 0u32)), - (Firefox, Version(79u32, 0u32, 0u32)), - (Deno, Version(1u32, 2u32, 0u32)), - (Electron, Version(10u32, 0u32, 0u32)), - (Opera, Version(71u32, 0u32, 0u32)), - (Ios, Version(14u32, 0u32, 0u32)), - (Edge, Version(85u32, 0u32, 0u32)), + (Chrome, Version(91u32, 0u32, 0u32)), + (Safari, Version(13u32, 1u32, 0u32)), + (OperaMobile, Version(64u32, 0u32, 0u32)), + (Samsung, Version(16u32, 0u32, 0u32)), + (Node, Version(16u32, 9u32, 0u32)), + (Firefox, Version(74u32, 0u32, 0u32)), + (Deno, Version(1u32, 9u32, 0u32)), + (Electron, Version(13u32, 0u32, 0u32)), + (Opera, Version(77u32, 0u32, 0u32)), + (Ios, Version(13u32, 4u32, 0u32)), + (Edge, Version(91u32, 0u32, 0u32)), (Es, Version(2020u32, 0, 0)), ])), ), @@ -745,36 +745,36 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES2022PrivateMethods, + ES2021LogicalAssignmentOperators, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(84u32, 0u32, 0u32)), - (Safari, Version(15u32, 0u32, 0u32)), + (Chrome, Version(85u32, 0u32, 0u32)), + (Safari, Version(14u32, 0u32, 0u32)), (OperaMobile, Version(60u32, 0u32, 0u32)), (Samsung, Version(14u32, 0u32, 0u32)), - (Node, Version(14u32, 6u32, 0u32)), - (Firefox, Version(90u32, 0u32, 0u32)), - (Deno, Version(1u32, 0u32, 0u32)), + (Node, Version(15u32, 0u32, 0u32)), + (Firefox, Version(79u32, 0u32, 0u32)), + (Deno, Version(1u32, 2u32, 0u32)), (Electron, Version(10u32, 0u32, 0u32)), - (Opera, Version(70u32, 0u32, 0u32)), - (Ios, Version(15u32, 0u32, 0u32)), - (Edge, Version(84u32, 0u32, 0u32)), - (Es, Version(2022u32, 0, 0)), + (Opera, Version(71u32, 0u32, 0u32)), + (Ios, Version(14u32, 0u32, 0u32)), + (Edge, Version(85u32, 0u32, 0u32)), + (Es, Version(2021u32, 0, 0)), ])), ), ( - ES2022ClassProperties, + ES2022ClassStaticBlock, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(98u32, 0u32, 0u32)), - (Safari, Version(16u32, 0u32, 0u32)), - (OperaMobile, Version(53u32, 0u32, 0u32)), - (Samsung, Version(11u32, 0u32, 0u32)), - (Node, Version(12u32, 0u32, 0u32)), - (Firefox, Version(90u32, 0u32, 0u32)), - (Deno, Version(1u32, 18u32, 0u32)), - (Electron, Version(17u32, 0u32, 0u32)), - (Opera, Version(84u32, 0u32, 0u32)), - (Ios, Version(16u32, 0u32, 0u32)), - (Edge, Version(98u32, 0u32, 0u32)), + (Chrome, Version(94u32, 0u32, 0u32)), + (Safari, Version(16u32, 4u32, 0u32)), + (OperaMobile, Version(66u32, 0u32, 0u32)), + (Samsung, Version(17u32, 0u32, 0u32)), + (Node, Version(16u32, 11u32, 0u32)), + (Firefox, Version(93u32, 0u32, 0u32)), + (Deno, Version(1u32, 14u32, 0u32)), + (Electron, Version(15u32, 0u32, 0u32)), + (Opera, Version(80u32, 0u32, 0u32)), + (Ios, Version(16u32, 4u32, 0u32)), + (Edge, Version(94u32, 0u32, 0u32)), (Es, Version(2022u32, 0, 0)), ])), ), @@ -796,19 +796,36 @@ pub fn features() -> &'static FxHashMap { ])), ), ( - ES2022ClassStaticBlock, + ES2022ClassProperties, EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(94u32, 0u32, 0u32)), - (Safari, Version(16u32, 4u32, 0u32)), - (OperaMobile, Version(66u32, 0u32, 0u32)), - (Samsung, Version(17u32, 0u32, 0u32)), - (Node, Version(16u32, 11u32, 0u32)), - (Firefox, Version(93u32, 0u32, 0u32)), - (Deno, Version(1u32, 14u32, 0u32)), - (Electron, Version(15u32, 0u32, 0u32)), - (Opera, Version(80u32, 0u32, 0u32)), - (Ios, Version(16u32, 4u32, 0u32)), - (Edge, Version(94u32, 0u32, 0u32)), + (Chrome, Version(98u32, 0u32, 0u32)), + (Safari, Version(16u32, 0u32, 0u32)), + (OperaMobile, Version(53u32, 0u32, 0u32)), + (Samsung, Version(11u32, 0u32, 0u32)), + (Node, Version(12u32, 0u32, 0u32)), + (Firefox, Version(90u32, 0u32, 0u32)), + (Deno, Version(1u32, 18u32, 0u32)), + (Electron, Version(17u32, 0u32, 0u32)), + (Opera, Version(84u32, 0u32, 0u32)), + (Ios, Version(16u32, 0u32, 0u32)), + (Edge, Version(98u32, 0u32, 0u32)), + (Es, Version(2022u32, 0, 0)), + ])), + ), + ( + ES2022PrivateMethods, + EngineTargets::new(FxHashMap::from_iter([ + (Chrome, Version(84u32, 0u32, 0u32)), + (Safari, Version(15u32, 0u32, 0u32)), + (OperaMobile, Version(60u32, 0u32, 0u32)), + (Samsung, Version(14u32, 0u32, 0u32)), + (Node, Version(14u32, 6u32, 0u32)), + (Firefox, Version(90u32, 0u32, 0u32)), + (Deno, Version(1u32, 0u32, 0u32)), + (Electron, Version(10u32, 0u32, 0u32)), + (Opera, Version(70u32, 0u32, 0u32)), + (Ios, Version(15u32, 0u32, 0u32)), + (Edge, Version(84u32, 0u32, 0u32)), (Es, Version(2022u32, 0, 0)), ])), ), @@ -845,18 +862,6 @@ pub fn features() -> &'static FxHashMap { (Es, Version(2024u32, 0, 0)), ])), ), - ( - ES2025RegexpModifiers, - EngineTargets::new(FxHashMap::from_iter([ - (Chrome, Version(125u32, 0u32, 0u32)), - (Edge, Version(125u32, 0u32, 0u32)), - (Electron, Version(31u32, 0u32, 0u32)), - (Opera, Version(111u32, 0u32, 0u32)), - (Node, Version(23u32, 0u32, 0u32)), - (Firefox, Version(132u32, 0u32, 0u32)), - (Es, Version(2025u32, 0, 0)), - ])), - ), ( ES2025DuplicateNamedCapturingGroupsRegex, EngineTargets::new(FxHashMap::from_iter([ @@ -871,6 +876,18 @@ pub fn features() -> &'static FxHashMap { (Es, Version(2025u32, 0, 0)), ])), ), + ( + ES2025RegexpModifiers, + EngineTargets::new(FxHashMap::from_iter([ + (Chrome, Version(125u32, 0u32, 0u32)), + (Edge, Version(125u32, 0u32, 0u32)), + (Electron, Version(31u32, 0u32, 0u32)), + (Opera, Version(111u32, 0u32, 0u32)), + (Node, Version(23u32, 0u32, 0u32)), + (Firefox, Version(132u32, 0u32, 0u32)), + (Es, Version(2025u32, 0, 0)), + ])), + ), ]) }) } diff --git a/crates/oxc_transformer/tests/integrations/es_target.rs b/crates/oxc_transformer/tests/integrations/es_target.rs index afc1d2fccb6776..2a486456705ac3 100644 --- a/crates/oxc_transformer/tests/integrations/es_target.rs +++ b/crates/oxc_transformer/tests/integrations/es_target.rs @@ -56,7 +56,7 @@ fn target_list_pass() { let result = TransformOptions::from_target(target).unwrap(); assert!(!result.env.es2019.optional_catch_binding); assert!(!result.env.es2020.nullish_coalescing_operator); - assert!(!result.env.es2021.logical_assignment_operators); + assert!(result.env.es2021.logical_assignment_operators); assert!(result.env.es2022.class_static_block); } diff --git a/tasks/compat_data/data.json b/tasks/compat_data/data.json index c7b05419732741..98e252e96647b8 100644 --- a/tasks/compat_data/data.json +++ b/tasks/compat_data/data.json @@ -1,25 +1,25 @@ [ { - "name": "ReservedWords", + "name": "MemberExpressionLiterals", "es": "ES5", - "babel": "transform-reserved-words", + "babel": "transform-member-expression-literals", "features": [ - "Miscellaneous / Unreserved words" + "Object/array literal extensions / Reserved words as property names" ], "targets": { - "chrome": "13", - "opera": "10.50", + "chrome": "7", + "opera": "12", "edge": "12", "firefox": "2", - "safari": "3.1", - "node": "0.6", + "safari": "5.1", + "node": "0.4", "deno": "1", "ie": "9", - "android": "4.4", + "android": "4", "ios": "6", "samsung": "1", "rhino": "1.7.13", - "opera_mobile": "10.1", + "opera_mobile": "12", "electron": "0.20" } }, @@ -48,26 +48,26 @@ } }, { - "name": "MemberExpressionLiterals", + "name": "ReservedWords", "es": "ES5", - "babel": "transform-member-expression-literals", + "babel": "transform-reserved-words", "features": [ - "Object/array literal extensions / Reserved words as property names" + "Miscellaneous / Unreserved words" ], "targets": { - "chrome": "7", - "opera": "12", + "chrome": "13", + "opera": "10.50", "edge": "12", "firefox": "2", - "safari": "5.1", - "node": "0.4", + "safari": "3.1", + "node": "0.6", "deno": "1", "ie": "9", - "android": "4", + "android": "4.4", "ios": "6", "samsung": "1", "rhino": "1.7.13", - "opera_mobile": "12", + "opera_mobile": "10.1", "electron": "0.20" } }, @@ -97,122 +97,130 @@ } }, { - "name": "Regenerator", - "babel": "transform-regenerator", + "name": "TemplateLiterals", + "babel": "transform-template-literals", "features": [ - "generators" + "template literals" ], "es": "ES2015", "targets": { - "chrome": "50", - "opera": "37", + "chrome": "41", + "opera": "28", "edge": "13", - "firefox": "53", - "safari": "10", - "node": "6", + "firefox": "34", + "safari": "13", + "node": "4", "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" + "ios": "13", + "samsung": "3.4", + "opera_mobile": "28", + "electron": "0.21" } }, { - "name": "NewTarget", - "babel": "transform-new-target", + "name": "Literals", + "babel": "transform-literals", "features": [ - "new.target", - "arrow functions / lexical \"new.target\" binding" + "Unicode code point escapes" ], "es": "ES2015", "targets": { - "chrome": "46", - "opera": "33", - "edge": "14", - "firefox": "41", - "safari": "10", - "node": "5", + "chrome": "44", + "opera": "31", + "edge": "12", + "firefox": "53", + "safari": "9", + "node": "4", "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "33", - "electron": "0.36" + "ios": "9", + "samsung": "4", + "rhino": "1.7.15", + "opera_mobile": "32", + "electron": "0.30" } }, { - "name": "TypeofSymbol", - "babel": "transform-typeof-symbol", + "name": "FunctionName", + "babel": "transform-function-name", "features": [ - "Symbol / typeof support" + "function \"name\" property" ], "es": "ES2015", "targets": { - "chrome": "38", - "opera": "25", - "edge": "12", - "firefox": "36", - "safari": "9", - "node": "0.12", + "chrome": "51", + "opera": "38", + "edge": "79", + "firefox": "53", + "safari": "10", + "node": "6.5", "deno": "1", - "ios": "9", - "samsung": "3", - "rhino": "1.7.13", - "opera_mobile": "25", - "electron": "0.20" + "ios": "10", + "samsung": "5", + "opera_mobile": "41", + "electron": "1.2" } }, { - "name": "BlockScoping", - "babel": "transform-block-scoping", + "name": "ArrowFunctions", + "babel": "transform-arrow-functions", "features": [ - "const", - "let", - "generators" + "arrow functions / 0 parameters", + "arrow functions / 1 parameter, no brackets", + "arrow functions / multiple parameters", + "arrow functions / lexical \"this\" binding", + "arrow functions / \"this\" unchanged by call or apply", + "arrow functions / can't be bound, can be curried", + "arrow functions / lexical \"arguments\" binding", + "arrow functions / no line break between params and =>", + "arrow functions / correct precedence", + "arrow functions / no \"prototype\" property" ], "es": "ES2015", "targets": { - "chrome": "50", - "opera": "37", - "edge": "14", - "firefox": "53", - "safari": "11", + "chrome": "47", + "opera": "34", + "edge": "13", + "firefox": "43", + "safari": "10", "node": "6", "deno": "1", - "ios": "11", + "ios": "10", "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" + "rhino": "1.7.13", + "opera_mobile": "34", + "electron": "0.36" } }, { - "name": "Destructuring", - "babel": "transform-destructuring", + "name": "BlockScopedFunctions", + "babel": "transform-block-scoped-functions", "features": [ - "destructuring, assignment", - "destructuring, declarations" + "block-level function declaration" ], "es": "ES2015", "targets": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", + "chrome": "41", + "opera": "28", + "edge": "12", + "firefox": "46", "safari": "10", - "node": "6.5", + "node": "4", "deno": "1", + "ie": "11", "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" + "samsung": "3.4", + "opera_mobile": "28", + "electron": "0.21" } }, { - "name": "Spread", - "babel": "transform-spread", + "name": "Classes", + "babel": "transform-classes", "features": [ - "spread syntax for iterable objects", "class", - "super" + "super", + "arrow functions / lexical \"super\" binding in constructors", + "arrow functions / lexical \"super\" binding in methods" ], "es": "ES2015", "targets": { @@ -230,93 +238,67 @@ } }, { - "name": "UnicodeRegex", - "babel": "transform-unicode-regex", + "name": "ObjectSuper", + "babel": "transform-object-super", "features": [ - "RegExp \"y\" and \"u\" flags / \"u\" flag, case folding", - "RegExp \"y\" and \"u\" flags / \"u\" flag, Unicode code point escapes", - "RegExp \"y\" and \"u\" flags / \"u\" flag, non-BMP Unicode characters", - "RegExp \"y\" and \"u\" flags / \"u\" flag" + "super" ], "es": "ES2015", "targets": { - "chrome": "50", - "opera": "37", + "chrome": "46", + "opera": "33", "edge": "13", - "firefox": "46", - "safari": "12", - "node": "6", + "firefox": "45", + "safari": "10", + "node": "5", "deno": "1", - "ios": "12", + "ios": "10", "samsung": "5", - "opera_mobile": "37", - "electron": "1.1" + "opera_mobile": "33", + "electron": "0.36" } }, { - "name": "UnicodeEscapes", - "babel": "transform-unicode-escapes", + "name": "ShorthandProperties", + "babel": "transform-shorthand-properties", "features": [ - "Unicode code point escapes" + "object literal extensions / shorthand properties" ], "es": "ES2015", "targets": { - "chrome": "44", - "opera": "31", + "chrome": "43", + "opera": "30", "edge": "12", - "firefox": "53", + "firefox": "33", "safari": "9", "node": "4", "deno": "1", "ios": "9", "samsung": "4", - "rhino": "1.7.15", - "opera_mobile": "32", - "electron": "0.30" + "rhino": "1.7.14", + "opera_mobile": "30", + "electron": "0.27" } }, { - "name": "StickyRegex", - "babel": "transform-sticky-regex", + "name": "DuplicateKeys", + "babel": "transform-duplicate-keys", "features": [ - "RegExp \"y\" and \"u\" flags / \"y\" flag, lastIndex", - "RegExp \"y\" and \"u\" flags / \"y\" flag" + "miscellaneous / duplicate property names in strict mode" ], "es": "ES2015", "targets": { - "chrome": "49", - "opera": "36", - "edge": "13", - "firefox": "3", - "safari": "10", - "node": "6", + "chrome": "42", + "opera": "29", + "edge": "12", + "firefox": "34", + "safari": "9", + "node": "4", "deno": "1", - "ios": "10", - "samsung": "5", - "rhino": "1.7.15", - "opera_mobile": "36", - "electron": "0.37" - } - }, - { - "name": "ForOf", - "babel": "transform-for-of", - "features": [ - "for..of loops" - ], - "es": "ES2015", - "targets": { - "chrome": "51", - "opera": "38", - "edge": "15", - "firefox": "53", - "safari": "10", - "node": "6.5", - "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" + "ios": "9", + "samsung": "3.4", + "opera_mobile": "29", + "electron": "0.25" } }, { @@ -341,77 +323,102 @@ } }, { - "name": "DuplicateKeys", - "babel": "transform-duplicate-keys", + "name": "ForOf", + "babel": "transform-for-of", "features": [ - "miscellaneous / duplicate property names in strict mode" + "for..of loops" ], "es": "ES2015", "targets": { - "chrome": "42", - "opera": "29", - "edge": "12", - "firefox": "34", - "safari": "9", - "node": "4", + "chrome": "51", + "opera": "38", + "edge": "15", + "firefox": "53", + "safari": "10", + "node": "6.5", "deno": "1", - "ios": "9", - "samsung": "3.4", - "opera_mobile": "29", - "electron": "0.25" + "ios": "10", + "samsung": "5", + "opera_mobile": "41", + "electron": "1.2" } }, { - "name": "ShorthandProperties", - "babel": "transform-shorthand-properties", + "name": "StickyRegex", + "babel": "transform-sticky-regex", "features": [ - "object literal extensions / shorthand properties" + "RegExp \"y\" and \"u\" flags / \"y\" flag, lastIndex", + "RegExp \"y\" and \"u\" flags / \"y\" flag" ], "es": "ES2015", "targets": { - "chrome": "43", - "opera": "30", + "chrome": "49", + "opera": "36", + "edge": "13", + "firefox": "3", + "safari": "10", + "node": "6", + "deno": "1", + "ios": "10", + "samsung": "5", + "rhino": "1.7.15", + "opera_mobile": "36", + "electron": "0.37" + } + }, + { + "name": "UnicodeEscapes", + "babel": "transform-unicode-escapes", + "features": [ + "Unicode code point escapes" + ], + "es": "ES2015", + "targets": { + "chrome": "44", + "opera": "31", "edge": "12", - "firefox": "33", + "firefox": "53", "safari": "9", "node": "4", "deno": "1", "ios": "9", "samsung": "4", - "rhino": "1.7.14", - "opera_mobile": "30", - "electron": "0.27" + "rhino": "1.7.15", + "opera_mobile": "32", + "electron": "0.30" } }, { - "name": "ObjectSuper", - "babel": "transform-object-super", + "name": "UnicodeRegex", + "babel": "transform-unicode-regex", "features": [ - "super" + "RegExp \"y\" and \"u\" flags / \"u\" flag, case folding", + "RegExp \"y\" and \"u\" flags / \"u\" flag, Unicode code point escapes", + "RegExp \"y\" and \"u\" flags / \"u\" flag, non-BMP Unicode characters", + "RegExp \"y\" and \"u\" flags / \"u\" flag" ], "es": "ES2015", "targets": { - "chrome": "46", - "opera": "33", + "chrome": "50", + "opera": "37", "edge": "13", - "firefox": "45", - "safari": "10", - "node": "5", + "firefox": "46", + "safari": "12", + "node": "6", "deno": "1", - "ios": "10", + "ios": "12", "samsung": "5", - "opera_mobile": "33", - "electron": "0.36" + "opera_mobile": "37", + "electron": "1.1" } }, { - "name": "Classes", - "babel": "transform-classes", + "name": "Spread", + "babel": "transform-spread", "features": [ + "spread syntax for iterable objects", "class", - "super", - "arrow functions / lexical \"super\" binding in constructors", - "arrow functions / lexical \"super\" binding in methods" + "super" ], "es": "ES2015", "targets": { @@ -429,120 +436,113 @@ } }, { - "name": "BlockScopedFunctions", - "babel": "transform-block-scoped-functions", + "name": "Destructuring", + "babel": "transform-destructuring", "features": [ - "block-level function declaration" + "destructuring, assignment", + "destructuring, declarations" ], "es": "ES2015", "targets": { - "chrome": "41", - "opera": "28", - "edge": "12", - "firefox": "46", + "chrome": "51", + "opera": "38", + "edge": "15", + "firefox": "53", "safari": "10", - "node": "4", + "node": "6.5", "deno": "1", - "ie": "11", "ios": "10", - "samsung": "3.4", - "opera_mobile": "28", - "electron": "0.21" + "samsung": "5", + "opera_mobile": "41", + "electron": "1.2" } }, { - "name": "ArrowFunctions", - "babel": "transform-arrow-functions", + "name": "BlockScoping", + "babel": "transform-block-scoping", "features": [ - "arrow functions / 0 parameters", - "arrow functions / 1 parameter, no brackets", - "arrow functions / multiple parameters", - "arrow functions / lexical \"this\" binding", - "arrow functions / \"this\" unchanged by call or apply", - "arrow functions / can't be bound, can be curried", - "arrow functions / lexical \"arguments\" binding", - "arrow functions / no line break between params and =>", - "arrow functions / correct precedence", - "arrow functions / no \"prototype\" property" + "const", + "let", + "generators" ], "es": "ES2015", "targets": { - "chrome": "47", - "opera": "34", - "edge": "13", - "firefox": "43", - "safari": "10", + "chrome": "50", + "opera": "37", + "edge": "14", + "firefox": "53", + "safari": "11", "node": "6", "deno": "1", - "ios": "10", + "ios": "11", "samsung": "5", - "rhino": "1.7.13", - "opera_mobile": "34", - "electron": "0.36" + "opera_mobile": "37", + "electron": "1.1" } }, { - "name": "FunctionName", - "babel": "transform-function-name", + "name": "TypeofSymbol", + "babel": "transform-typeof-symbol", "features": [ - "function \"name\" property" + "Symbol / typeof support" ], "es": "ES2015", "targets": { - "chrome": "51", - "opera": "38", - "edge": "79", - "firefox": "53", - "safari": "10", - "node": "6.5", + "chrome": "38", + "opera": "25", + "edge": "12", + "firefox": "36", + "safari": "9", + "node": "0.12", "deno": "1", - "ios": "10", - "samsung": "5", - "opera_mobile": "41", - "electron": "1.2" + "ios": "9", + "samsung": "3", + "rhino": "1.7.13", + "opera_mobile": "25", + "electron": "0.20" } }, { - "name": "Literals", - "babel": "transform-literals", + "name": "NewTarget", + "babel": "transform-new-target", "features": [ - "Unicode code point escapes" + "new.target", + "arrow functions / lexical \"new.target\" binding" ], "es": "ES2015", "targets": { - "chrome": "44", - "opera": "31", - "edge": "12", - "firefox": "53", - "safari": "9", - "node": "4", + "chrome": "46", + "opera": "33", + "edge": "14", + "firefox": "41", + "safari": "10", + "node": "5", "deno": "1", - "ios": "9", - "samsung": "4", - "rhino": "1.7.15", - "opera_mobile": "32", - "electron": "0.30" + "ios": "10", + "samsung": "5", + "opera_mobile": "33", + "electron": "0.36" } }, { - "name": "TemplateLiterals", - "babel": "transform-template-literals", + "name": "Regenerator", + "babel": "transform-regenerator", "features": [ - "template literals" + "generators" ], "es": "ES2015", "targets": { - "chrome": "41", - "opera": "28", + "chrome": "50", + "opera": "37", "edge": "13", - "firefox": "34", - "safari": "13", - "node": "4", + "firefox": "53", + "safari": "10", + "node": "6", "deno": "1", - "ios": "13", - "samsung": "3.4", - "opera_mobile": "28", - "electron": "0.21" + "ios": "10", + "samsung": "5", + "opera_mobile": "37", + "electron": "1.1" } }, { @@ -589,45 +589,45 @@ } }, { - "name": "NamedCapturingGroupsRegex", - "babel": "transform-named-capturing-groups-regex", + "name": "AsyncGeneratorFunctions", + "babel": "transform-async-generator-functions", "features": [ - "RegExp named capture groups" + "Asynchronous Iterators" ], "es": "ES2018", "targets": { - "chrome": "64", - "opera": "51", + "chrome": "63", + "opera": "50", "edge": "79", - "firefox": "78", - "safari": "11.1", + "firefox": "57", + "safari": "12", "node": "10", "deno": "1", - "ios": "11.3", - "samsung": "9", - "opera_mobile": "47", + "ios": "12", + "samsung": "8", + "opera_mobile": "46", "electron": "3.0" } }, { - "name": "UnicodePropertyRegex", - "babel": "transform-unicode-property-regex", + "name": "ObjectRestSpread", + "babel": "transform-object-rest-spread", "features": [ - "RegExp Unicode Property Escapes / basic" + "object rest/spread properties" ], "es": "ES2018", "targets": { - "chrome": "64", - "opera": "51", + "chrome": "60", + "opera": "47", "edge": "79", - "firefox": "78", + "firefox": "55", "safari": "11.1", - "node": "10", + "node": "8.3", "deno": "1", "ios": "11.3", - "samsung": "9", - "opera_mobile": "47", - "electron": "3.0" + "samsung": "8", + "opera_mobile": "44", + "electron": "2.0" } }, { @@ -641,92 +641,50 @@ "chrome": "62", "opera": "49", "edge": "79", - "firefox": "78", - "safari": "11.1", - "node": "8.10", - "deno": "1", - "ios": "11.3", - "samsung": "8", - "rhino": "1.7.15", - "opera_mobile": "46", - "electron": "3.0" - } - }, - { - "name": "LookbehindRegex", - "babel": null, - "features": [ - "RegExp Lookbehind Assertions" - ], - "es": "ES2018", - "targets": { - "chrome": "62", - "opera": "49", - "edge": "79", - "firefox": "78", - "safari": "16.4", - "node": "8.10", - "deno": "1", - "ios": "16.4", - "samsung": "8", - "opera_mobile": "46", - "electron": "3.0" - } - }, - { - "name": "ObjectRestSpread", - "babel": "transform-object-rest-spread", - "features": [ - "object rest/spread properties" - ], - "es": "ES2018", - "targets": { - "chrome": "60", - "opera": "47", - "edge": "79", - "firefox": "55", + "firefox": "78", "safari": "11.1", - "node": "8.3", + "node": "8.10", "deno": "1", "ios": "11.3", "samsung": "8", - "opera_mobile": "44", - "electron": "2.0" + "rhino": "1.7.15", + "opera_mobile": "46", + "electron": "3.0" } }, { - "name": "AsyncGeneratorFunctions", - "babel": "transform-async-generator-functions", + "name": "UnicodePropertyRegex", + "babel": "transform-unicode-property-regex", "features": [ - "Asynchronous Iterators" + "RegExp Unicode Property Escapes / basic" ], "es": "ES2018", "targets": { - "chrome": "63", - "opera": "50", + "chrome": "64", + "opera": "51", "edge": "79", - "firefox": "57", - "safari": "12", + "firefox": "78", + "safari": "11.1", "node": "10", "deno": "1", - "ios": "12", - "samsung": "8", - "opera_mobile": "46", + "ios": "11.3", + "samsung": "9", + "opera_mobile": "47", "electron": "3.0" } }, { - "name": "OptionalCatchBinding", - "babel": "transform-optional-catch-binding", + "name": "NamedCapturingGroupsRegex", + "babel": "transform-named-capturing-groups-regex", "features": [ - "optional catch binding" + "RegExp named capture groups" ], "es": "ES2018", "targets": { - "chrome": "66", - "opera": "53", + "chrome": "64", + "opera": "51", "edge": "79", - "firefox": "58", + "firefox": "78", "safari": "11.1", "node": "10", "deno": "1", @@ -736,6 +694,27 @@ "electron": "3.0" } }, + { + "name": "LookbehindRegex", + "babel": null, + "features": [ + "RegExp Lookbehind Assertions" + ], + "es": "ES2018", + "targets": { + "chrome": "62", + "opera": "49", + "edge": "79", + "firefox": "78", + "safari": "16.4", + "node": "8.10", + "deno": "1", + "ios": "16.4", + "samsung": "8", + "opera_mobile": "46", + "electron": "3.0" + } + }, { "name": "JsonStrings", "babel": "transform-json-strings", @@ -759,24 +738,24 @@ } }, { - "name": "OptionalChaining", - "babel": "transform-optional-chaining", + "name": "OptionalCatchBinding", + "babel": "transform-optional-catch-binding", "features": [ - "optional chaining operator (?.)" + "optional catch binding" ], "es": "ES2019", "targets": { - "chrome": "91", - "opera": "77", - "edge": "91", - "firefox": "74", - "safari": "13.1", - "node": "16.9", - "deno": "1.9", - "ios": "13.4", - "samsung": "16", - "opera_mobile": "64", - "electron": "13.0" + "chrome": "66", + "opera": "53", + "edge": "79", + "firefox": "58", + "safari": "11.1", + "node": "10", + "deno": "1", + "ios": "11.3", + "samsung": "9", + "opera_mobile": "47", + "electron": "3.0" } }, { @@ -801,24 +780,24 @@ } }, { - "name": "LogicalAssignmentOperators", - "babel": "transform-logical-assignment-operators", + "name": "OptionalChaining", + "babel": "transform-optional-chaining", "features": [ - "Logical Assignment" + "optional chaining operator (?.)" ], "es": "ES2020", "targets": { - "chrome": "85", - "opera": "71", - "edge": "85", - "firefox": "79", - "safari": "14", - "node": "15", - "deno": "1.2", - "ios": "14", - "samsung": "14", - "opera_mobile": "60", - "electron": "10.0" + "chrome": "91", + "opera": "77", + "edge": "91", + "firefox": "74", + "safari": "13.1", + "node": "16.9", + "deno": "1.9", + "ios": "13.4", + "samsung": "16", + "opera_mobile": "64", + "electron": "13.0" } }, { @@ -866,24 +845,66 @@ } }, { - "name": "PrivateMethods", - "babel": "transform-private-methods", + "name": "LogicalAssignmentOperators", + "babel": "transform-logical-assignment-operators", "features": [ - "private class methods" + "Logical Assignment" + ], + "es": "ES2021", + "targets": { + "chrome": "85", + "opera": "71", + "edge": "85", + "firefox": "79", + "safari": "14", + "node": "15", + "deno": "1.2", + "ios": "14", + "samsung": "14", + "opera_mobile": "60", + "electron": "10.0" + } + }, + { + "name": "ClassStaticBlock", + "babel": "transform-class-static-block", + "features": [ + "Class static initialization blocks" ], "es": "ES2022", "targets": { - "chrome": "84", - "opera": "70", - "edge": "84", + "chrome": "94", + "opera": "80", + "edge": "94", + "firefox": "93", + "safari": "16.4", + "node": "16.11", + "deno": "1.14", + "ios": "16.4", + "samsung": "17", + "opera_mobile": "66", + "electron": "15.0" + } + }, + { + "name": "PrivatePropertyInObject", + "babel": "transform-private-property-in-object", + "features": [ + "Ergonomic brand checks for private fields" + ], + "es": "ES2022", + "targets": { + "chrome": "91", + "opera": "77", + "edge": "91", "firefox": "90", "safari": "15", - "node": "14.6", - "deno": "1", + "node": "16.9", + "deno": "1.9", "ios": "15", - "samsung": "14", - "opera_mobile": "60", - "electron": "10.0" + "samsung": "16", + "opera_mobile": "64", + "electron": "13.0" } }, { @@ -912,45 +933,24 @@ } }, { - "name": "PrivatePropertyInObject", - "babel": "transform-private-property-in-object", + "name": "PrivateMethods", + "babel": "transform-private-methods", "features": [ - "Ergonomic brand checks for private fields" + "private class methods" ], "es": "ES2022", "targets": { - "chrome": "91", - "opera": "77", - "edge": "91", + "chrome": "84", + "opera": "70", + "edge": "84", "firefox": "90", "safari": "15", - "node": "16.9", - "deno": "1.9", + "node": "14.6", + "deno": "1", "ios": "15", - "samsung": "16", - "opera_mobile": "64", - "electron": "13.0" - } - }, - { - "name": "ClassStaticBlock", - "babel": "transform-class-static-block", - "features": [ - "Class static initialization blocks" - ], - "es": "ES2022", - "targets": { - "chrome": "94", - "opera": "80", - "edge": "94", - "firefox": "93", - "safari": "16.4", - "node": "16.11", - "deno": "1.14", - "ios": "16.4", - "samsung": "17", - "opera_mobile": "66", - "electron": "15.0" + "samsung": "14", + "opera_mobile": "60", + "electron": "10.0" } }, { @@ -997,22 +997,6 @@ "electron": "24.0" } }, - { - "name": "RegexpModifiers", - "babel": "transform-regexp-modifiers", - "features": [ - "RegExp Pattern Modifiers" - ], - "es": "ES2025", - "targets": { - "chrome": "125", - "opera": "111", - "edge": "125", - "firefox": "132", - "node": "23", - "electron": "31.0" - } - }, { "name": "DuplicateNamedCapturingGroupsRegex", "babel": "transform-duplicate-named-capturing-groups-regex", @@ -1030,5 +1014,21 @@ "ios": "17.4", "electron": "31.0" } + }, + { + "name": "RegexpModifiers", + "babel": "transform-regexp-modifiers", + "features": [ + "RegExp Pattern Modifiers" + ], + "es": "ES2025", + "targets": { + "chrome": "125", + "opera": "111", + "edge": "125", + "firefox": "132", + "node": "23", + "electron": "31.0" + } } ] diff --git a/tasks/compat_data/es-features.js b/tasks/compat_data/es-features.js index 856ba4033e6d79..7e5414a62a271e 100644 --- a/tasks/compat_data/es-features.js +++ b/tasks/compat_data/es-features.js @@ -8,10 +8,12 @@ const f = (es) => (item) => { const es5 = [ { - name: 'ReservedWords', + name: 'MemberExpressionLiterals', es: 'ES5', - babel: 'transform-reserved-words', - features: ['Miscellaneous / Unreserved words'], + babel: 'transform-member-expression-literals', + features: [ + 'Object/array literal extensions / Reserved words as property names', + ], }, { name: 'PropertyLiterals', @@ -22,12 +24,10 @@ const es5 = [ ], }, { - name: 'MemberExpressionLiterals', + name: 'ReservedWords', es: 'ES5', - babel: 'transform-member-expression-literals', - features: [ - 'Object/array literal extensions / Reserved words as property names', - ], + babel: 'transform-reserved-words', + features: ['Miscellaneous / Unreserved words'], }, ].map(f('ES5')); @@ -44,67 +44,60 @@ const es2015 = [ ], }, { - name: 'Regenerator', - babel: 'transform-regenerator', - features: ['generators'], - }, - { - name: 'NewTarget', - babel: 'transform-new-target', - features: ['new.target', 'arrow functions / lexical "new.target" binding'], - }, - { - name: 'TypeofSymbol', - babel: 'transform-typeof-symbol', - features: ['Symbol / typeof support'], - }, - { - name: 'BlockScoping', - babel: 'transform-block-scoping', - features: ['const', 'let', 'generators'], + name: 'TemplateLiterals', + babel: 'transform-template-literals', + features: ['template literals'], }, { - name: 'Destructuring', - babel: 'transform-destructuring', - features: ['destructuring, assignment', 'destructuring, declarations'], + name: 'Literals', + babel: 'transform-literals', + features: ['Unicode code point escapes'], }, { - name: 'Spread', - babel: 'transform-spread', - features: ['spread syntax for iterable objects', 'class', 'super'], + name: 'FunctionName', + babel: 'transform-function-name', + features: ['function "name" property'], }, { - name: 'UnicodeRegex', - babel: 'transform-unicode-regex', + name: 'ArrowFunctions', + babel: 'transform-arrow-functions', features: [ - 'RegExp "y" and "u" flags / "u" flag, case folding', - 'RegExp "y" and "u" flags / "u" flag, Unicode code point escapes', - 'RegExp "y" and "u" flags / "u" flag, non-BMP Unicode characters', - 'RegExp "y" and "u" flags / "u" flag', + 'arrow functions / 0 parameters', + 'arrow functions / 1 parameter, no brackets', + 'arrow functions / multiple parameters', + 'arrow functions / lexical "this" binding', + 'arrow functions / "this" unchanged by call or apply', + "arrow functions / can't be bound, can be curried", + 'arrow functions / lexical "arguments" binding', + 'arrow functions / no line break between params and =>', + 'arrow functions / correct precedence', + 'arrow functions / no "prototype" property', ], }, { - name: 'UnicodeEscapes', - babel: 'transform-unicode-escapes', - features: ['Unicode code point escapes'], + name: 'BlockScopedFunctions', + babel: 'transform-block-scoped-functions', + features: ['block-level function declaration'], }, { - name: 'StickyRegex', - babel: 'transform-sticky-regex', + name: 'Classes', + babel: 'transform-classes', features: [ - 'RegExp "y" and "u" flags / "y" flag, lastIndex', - 'RegExp "y" and "u" flags / "y" flag', + 'class', + 'super', + 'arrow functions / lexical "super" binding in constructors', + 'arrow functions / lexical "super" binding in methods', ], }, { - name: 'ForOf', - babel: 'transform-for-of', - features: ['for..of loops'], + name: 'ObjectSuper', + babel: 'transform-object-super', + features: ['super'], }, { - name: 'ComputedProperties', - babel: 'transform-computed-properties', - features: ['object literal extensions / computed properties'], + name: 'ShorthandProperties', + babel: 'transform-shorthand-properties', + features: ['object literal extensions / shorthand properties'], }, { name: 'DuplicateKeys', @@ -112,60 +105,67 @@ const es2015 = [ features: ['miscellaneous / duplicate property names in strict mode'], }, { - name: 'ShorthandProperties', - babel: 'transform-shorthand-properties', - features: ['object literal extensions / shorthand properties'], + name: 'ComputedProperties', + babel: 'transform-computed-properties', + features: ['object literal extensions / computed properties'], }, { - name: 'ObjectSuper', - babel: 'transform-object-super', - features: ['super'], + name: 'ForOf', + babel: 'transform-for-of', + features: ['for..of loops'], }, { - name: 'Classes', - babel: 'transform-classes', + name: 'StickyRegex', + babel: 'transform-sticky-regex', features: [ - 'class', - 'super', - 'arrow functions / lexical "super" binding in constructors', - 'arrow functions / lexical "super" binding in methods', + 'RegExp "y" and "u" flags / "y" flag, lastIndex', + 'RegExp "y" and "u" flags / "y" flag', ], }, { - name: 'BlockScopedFunctions', - babel: 'transform-block-scoped-functions', - features: ['block-level function declaration'], + name: 'UnicodeEscapes', + babel: 'transform-unicode-escapes', + features: ['Unicode code point escapes'], }, { - name: 'ArrowFunctions', - babel: 'transform-arrow-functions', + name: 'UnicodeRegex', + babel: 'transform-unicode-regex', features: [ - 'arrow functions / 0 parameters', - 'arrow functions / 1 parameter, no brackets', - 'arrow functions / multiple parameters', - 'arrow functions / lexical "this" binding', - 'arrow functions / "this" unchanged by call or apply', - "arrow functions / can't be bound, can be curried", - 'arrow functions / lexical "arguments" binding', - 'arrow functions / no line break between params and =>', - 'arrow functions / correct precedence', - 'arrow functions / no "prototype" property', + 'RegExp "y" and "u" flags / "u" flag, case folding', + 'RegExp "y" and "u" flags / "u" flag, Unicode code point escapes', + 'RegExp "y" and "u" flags / "u" flag, non-BMP Unicode characters', + 'RegExp "y" and "u" flags / "u" flag', ], }, { - name: 'FunctionName', - babel: 'transform-function-name', - features: ['function "name" property'], + name: 'Spread', + babel: 'transform-spread', + features: ['spread syntax for iterable objects', 'class', 'super'], }, { - name: 'Literals', - babel: 'transform-literals', - features: ['Unicode code point escapes'], + name: 'Destructuring', + babel: 'transform-destructuring', + features: ['destructuring, assignment', 'destructuring, declarations'], }, { - name: 'TemplateLiterals', - babel: 'transform-template-literals', - features: ['template literals'], + name: 'BlockScoping', + babel: 'transform-block-scoping', + features: ['const', 'let', 'generators'], + }, + { + name: 'TypeofSymbol', + babel: 'transform-typeof-symbol', + features: ['Symbol / typeof support'], + }, + { + name: 'NewTarget', + babel: 'transform-new-target', + features: ['new.target', 'arrow functions / lexical "new.target" binding'], + }, + { + name: 'Regenerator', + babel: 'transform-regenerator', + features: ['generators'], }, ].map(f('ES2015')); @@ -187,14 +187,14 @@ const es2017 = [ const es2018 = [ { - name: 'NamedCapturingGroupsRegex', - babel: 'transform-named-capturing-groups-regex', - features: ['RegExp named capture groups'], + name: 'AsyncGeneratorFunctions', + babel: 'transform-async-generator-functions', + features: ['Asynchronous Iterators'], }, { - name: 'UnicodePropertyRegex', - babel: 'transform-unicode-property-regex', - features: ['RegExp Unicode Property Escapes / basic'], + name: 'ObjectRestSpread', + babel: 'transform-object-rest-spread', + features: ['object rest/spread properties'], }, { name: 'DotallRegex', @@ -202,24 +202,19 @@ const es2018 = [ features: ['s (dotAll) flag for regular expressions'], }, { - name: 'LookbehindRegex', - babel: null, - features: ['RegExp Lookbehind Assertions'], - }, - { - name: 'ObjectRestSpread', - babel: 'transform-object-rest-spread', - features: ['object rest/spread properties'], + name: 'UnicodePropertyRegex', + babel: 'transform-unicode-property-regex', + features: ['RegExp Unicode Property Escapes / basic'], }, { - name: 'AsyncGeneratorFunctions', - babel: 'transform-async-generator-functions', - features: ['Asynchronous Iterators'], + name: 'NamedCapturingGroupsRegex', + babel: 'transform-named-capturing-groups-regex', + features: ['RegExp named capture groups'], }, { - name: 'OptionalCatchBinding', - babel: 'transform-optional-catch-binding', - features: ['optional catch binding'], + name: 'LookbehindRegex', + babel: null, + features: ['RegExp Lookbehind Assertions'], }, ].map(f('ES2018')); @@ -230,9 +225,9 @@ const es2019 = [ features: ['JSON superset'], }, { - name: 'OptionalChaining', - babel: 'transform-optional-chaining', - features: ['optional chaining operator (?.)'], + name: 'OptionalCatchBinding', + babel: 'transform-optional-catch-binding', + features: ['optional catch binding'], }, ].map(f('ES2019')); @@ -243,9 +238,9 @@ const es2020 = [ features: ['nullish coalescing operator (??)'], }, { - name: 'LogicalAssignmentOperators', - babel: 'transform-logical-assignment-operators', - features: ['Logical Assignment'], + name: 'OptionalChaining', + babel: 'transform-optional-chaining', + features: ['optional chaining operator (?.)'], }, { name: 'BigInt', @@ -260,13 +255,23 @@ const es2021 = [ babel: 'transform-numeric-separator', features: ['numeric separators'], }, + { + name: 'LogicalAssignmentOperators', + babel: 'transform-logical-assignment-operators', + features: ['Logical Assignment'], + }, ].map(f('ES2021')); const es2022 = [ { - name: 'PrivateMethods', - babel: 'transform-private-methods', - features: ['private class methods'], + name: 'ClassStaticBlock', + babel: 'transform-class-static-block', + features: ['Class static initialization blocks'], + }, + { + name: 'PrivatePropertyInObject', + babel: 'transform-private-property-in-object', + features: ['Ergonomic brand checks for private fields'], }, { name: 'ClassProperties', @@ -280,14 +285,9 @@ const es2022 = [ ], }, { - name: 'PrivatePropertyInObject', - babel: 'transform-private-property-in-object', - features: ['Ergonomic brand checks for private fields'], - }, - { - name: 'ClassStaticBlock', - babel: 'transform-class-static-block', - features: ['Class static initialization blocks'], + name: 'PrivateMethods', + babel: 'transform-private-methods', + features: ['private class methods'], }, { name: 'MatchIndicesRegex', @@ -313,16 +313,16 @@ const es2024 = [ ].map(f('ES2024')); const es2025 = [ - { - name: 'RegexpModifiers', - babel: 'transform-regexp-modifiers', - features: ['RegExp Pattern Modifiers'], - }, { name: 'DuplicateNamedCapturingGroupsRegex', babel: 'transform-duplicate-named-capturing-groups-regex', features: ['Duplicate named capturing groups'], }, + { + name: 'RegexpModifiers', + babel: 'transform-regexp-modifiers', + features: ['RegExp Pattern Modifiers'], + }, ].map(f('ES2025')); module.exports = [