From ce761cf51571f70c9378b6b67759bac3af4f4f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 12 Aug 2024 09:29:16 +0900 Subject: [PATCH] chore(es/preset-env): Update core js compat data (#9407) --- .../compat-data/data/plugin-bugfixes.json | 4 +- .../data/@babel/compat-data/data/plugins.json | 24 +++- .../data/core-js-compat/data.json | 127 ++++++++++++++--- .../data/core-js-compat/entries.json | 132 +++++++++++++++++- .../core-js-compat/modules-by-versions.json | 4 + .../swc_ecma_preset_env/src/transform_data.rs | 7 + package.json | 4 +- yarn.lock | 69 +++++---- 8 files changed, 311 insertions(+), 60 deletions(-) mode change 100644 => 100755 crates/swc_ecma_preset_env/data/core-js-compat/data.json mode change 100644 => 100755 crates/swc_ecma_preset_env/data/core-js-compat/entries.json mode change 100644 => 100755 crates/swc_ecma_preset_env/data/core-js-compat/modules-by-versions.json diff --git a/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugin-bugfixes.json b/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugin-bugfixes.json index 55b560213885..82e4e2111f0d 100644 --- a/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugin-bugfixes.json +++ b/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugin-bugfixes.json @@ -111,10 +111,10 @@ "chrome": "74", "opera": "62", "edge": "79", - "safari": "14.1", + "safari": "16", "node": "12", "deno": "1", - "ios": "14.5", + "ios": "16", "samsung": "11", "opera_mobile": "53", "electron": "6.0" diff --git a/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json b/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json index 937ddd4fd939..0b269f84600e 100644 --- a/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json +++ b/crates/swc_ecma_preset_env/data/@babel/compat-data/data/plugins.json @@ -1,4 +1,11 @@ { + "transform-duplicate-named-capturing-groups-regex": { + "chrome": "126", + "edge": "126", + "firefox": "129", + "safari": "17.4", + "electron": "31.0" + }, "transform-unicode-sets-regex": { "chrome": "112", "opera": "98", @@ -28,10 +35,23 @@ "chrome": "74", "opera": "62", "edge": "79", - "safari": "14.1", + "safari": "16", "node": "12", "deno": "1", - "ios": "14.5", + "ios": "16", + "samsung": "11", + "opera_mobile": "53", + "electron": "6.0" + }, + "bugfix/transform-safari-class-field-initializer-scope": { + "chrome": "74", + "opera": "62", + "edge": "79", + "firefox": "69", + "safari": "16", + "node": "12", + "deno": "1", + "ios": "16", "samsung": "11", "opera_mobile": "53", "electron": "6.0" diff --git a/crates/swc_ecma_preset_env/data/core-js-compat/data.json b/crates/swc_ecma_preset_env/data/core-js-compat/data.json old mode 100644 new mode 100755 index c6413a7a31ee..c53e85e7988e --- a/crates/swc_ecma_preset_env/data/core-js-compat/data.json +++ b/crates/swc_ecma_preset_env/data/core-js-compat/data.json @@ -1792,12 +1792,14 @@ "electron": "27.0", "firefox": "119", "firefox-android": "119", + "ios": "18.0", "node": "21.0", "oculus": "30.0", "opera": "103", "opera-android": "78", "opera_mobile": "78", "quest": "30.0", + "safari": "18.0", "samsung": "24.0" }, "es.math.acosh": { @@ -2827,12 +2829,14 @@ "electron": "27.0", "firefox": "119", "firefox-android": "119", + "ios": "18.0", "node": "21.0", "oculus": "30.0", "opera": "103", "opera-android": "78", "opera_mobile": "78", "quest": "30.0", + "safari": "18.0", "samsung": "24.0" }, "es.object.has-own": { @@ -3800,12 +3804,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "es.set.intersection.v2": { "android": "123", @@ -3817,12 +3824,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "es.set.is-disjoint-from.v2": { "android": "123", @@ -3834,12 +3844,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "es.set.is-subset-of.v2": { "android": "123", @@ -3851,12 +3864,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "es.set.is-superset-of.v2": { "android": "123", @@ -3868,12 +3884,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "es.set.symmetric-difference.v2": { "android": "123", @@ -3885,12 +3904,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "es.set.union.v2": { "android": "123", @@ -3902,12 +3924,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "es.string.at-alternative": { "android": "92", @@ -5661,12 +5686,14 @@ "electron": "29.0", "firefox": "115", "firefox-android": "115", + "ios": "18.0", "node": "22.0", "oculus": "32.0", "opera": "107", "opera-android": "81", "opera_mobile": "81", "quest": "32.0", + "safari": "18.0", "samsung": "25.0" }, "esnext.array.at": { @@ -5909,11 +5936,15 @@ "esnext.composite-key": {}, "esnext.composite-symbol": {}, "esnext.data-view.get-float16": { - "deno": "1.43" + "deno": "1.43", + "firefox": "129", + "firefox-android": "129" }, "esnext.data-view.get-uint8-clamped": {}, "esnext.data-view.set-float16": { - "deno": "1.43" + "deno": "1.43", + "firefox": "129", + "firefox-android": "129" }, "esnext.data-view.set-uint8-clamped": {}, "esnext.disposable-stack.constructor": {}, @@ -6207,12 +6238,14 @@ "electron": "27.0", "firefox": "119", "firefox-android": "119", + "ios": "18.0", "node": "21.0", "oculus": "30.0", "opera": "103", "opera-android": "78", "opera_mobile": "78", "quest": "30.0", + "safari": "18.0", "samsung": "24.0" }, "esnext.map.includes": {}, @@ -6232,7 +6265,9 @@ "esnext.math.degrees": {}, "esnext.math.fscale": {}, "esnext.math.f16round": { - "deno": "1.43" + "deno": "1.43", + "firefox": "129", + "firefox-android": "129" }, "esnext.math.iaddh": {}, "esnext.math.imulh": {}, @@ -6282,12 +6317,14 @@ "electron": "27.0", "firefox": "119", "firefox-android": "119", + "ios": "18.0", "node": "21.0", "oculus": "30.0", "opera": "103", "opera-android": "78", "opera_mobile": "78", "quest": "30.0", + "safari": "18.0", "samsung": "24.0" }, "esnext.observable": {}, @@ -6332,7 +6369,14 @@ "safari": "14.0", "samsung": "14.0" }, - "esnext.promise.try": {}, + "esnext.promise.try": { + "android": "128", + "chrome": "128", + "chrome-android": "128", + "edge": "128", + "electron": "32.0", + "opera": "114" + }, "esnext.promise.with-resolvers": { "android": "119", "bun": "0.7.1", @@ -6375,12 +6419,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "esnext.set.difference": {}, "esnext.set.every": {}, @@ -6397,12 +6444,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "esnext.set.intersection": {}, "esnext.set.is-disjoint-from.v2": { @@ -6415,12 +6465,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "esnext.set.is-disjoint-from": {}, "esnext.set.is-subset-of.v2": { @@ -6433,12 +6486,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "esnext.set.is-subset-of": {}, "esnext.set.is-superset-of.v2": { @@ -6451,12 +6507,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "esnext.set.is-superset-of": {}, "esnext.set.join": {}, @@ -6474,12 +6533,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "esnext.set.symmetric-difference": {}, "esnext.set.union.v2": { @@ -6492,12 +6554,15 @@ "electron": "30.0", "firefox": "127", "firefox-android": "127", + "ios": "18.0", "node": "22.0", "oculus": "33.0", "opera": "109", "opera-android": "82", "opera_mobile": "82", - "quest": "33.0" + "quest": "33.0", + "safari": "18.0", + "samsung": "27.0" }, "esnext.set.union": {}, "esnext.string.at": {}, @@ -6590,9 +6655,15 @@ "samsung": "22.0" }, "esnext.symbol.async-dispose": { + "android": "127", "bun": "1.0.23", + "chrome": "127", + "chrome-android": "127", "deno": "1.38", - "node": "20.5.0" + "edge": "127", + "electron": "32.0", + "node": "20.5.0", + "opera": "113" }, "esnext.symbol.custom-matcher": {}, "esnext.symbol.dispose": { @@ -6604,7 +6675,12 @@ "edge": "125", "electron": "31.0", "node": "20.5.0", - "opera": "111" + "oculus": "34.0", + "opera": "111", + "opera-android": "83", + "opera_mobile": "83", + "quest": "34.0", + "samsung": "27.0" }, "esnext.symbol.is-registered-symbol": {}, "esnext.symbol.is-registered": {}, @@ -6752,6 +6828,8 @@ }, "esnext.uint8-array.from-base64": {}, "esnext.uint8-array.from-hex": {}, + "esnext.uint8-array.set-from-base64": {}, + "esnext.uint8-array.set-from-hex": {}, "esnext.uint8-array.to-base64": {}, "esnext.uint8-array.to-hex": {}, "esnext.weak-map.delete-all": {}, @@ -6926,7 +7004,6 @@ "bun": "1.0.22", "chrome": "86", "chrome-android": "86", - "deno": "1.29.3", "edge": "86", "electron": "11.0", "firefox": "31", @@ -7016,8 +7093,14 @@ "electron": "31.0", "firefox": "126", "firefox-android": "126", + "ios": "18.0", "node": "22.0", - "opera": "112" + "oculus": "34.0", + "opera": "112", + "opera-android": "83", + "opera_mobile": "83", + "quest": "34.0", + "safari": "18.0" }, "web.url.to-json": { "android": "71", diff --git a/crates/swc_ecma_preset_env/data/core-js-compat/entries.json b/crates/swc_ecma_preset_env/data/core-js-compat/entries.json old mode 100644 new mode 100755 index d4ee0e062ae1..aff60b698bdd --- a/crates/swc_ecma_preset_env/data/core-js-compat/entries.json +++ b/crates/swc_ecma_preset_env/data/core-js-compat/entries.json @@ -447,6 +447,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", @@ -796,7 +798,9 @@ "esnext.object.group-by", "esnext.promise.all-settled", "esnext.promise.any", + "esnext.promise.try", "esnext.promise.with-resolvers", + "esnext.regexp.escape", "esnext.set.difference.v2", "esnext.set.intersection.v2", "esnext.set.is-disjoint-from.v2", @@ -820,6 +824,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "web.atob", @@ -2213,6 +2219,7 @@ "es.promise.finally", "es.promise.with-resolvers", "es.string.iterator", + "esnext.promise.try", "esnext.promise.with-resolvers", "web.dom-collections.iterator" ], @@ -2238,6 +2245,10 @@ "es.promise", "es.promise.finally" ], + "core-js/actual/promise/try": [ + "es.promise", + "esnext.promise.try" + ], "core-js/actual/promise/with-resolvers": [ "es.promise", "es.promise.with-resolvers", @@ -2316,7 +2327,8 @@ "es.string.match", "es.string.replace", "es.string.search", - "es.string.split" + "es.string.split", + "esnext.regexp.escape" ], "core-js/actual/regexp/constructor": [ "es.regexp.constructor", @@ -2329,6 +2341,9 @@ "es.regexp.dot-all", "es.regexp.exec" ], + "core-js/actual/regexp/escape": [ + "esnext.regexp.escape" + ], "core-js/actual/regexp/flags": [ "es.regexp.flags" ], @@ -2907,6 +2922,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -2988,6 +3005,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3036,6 +3055,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3102,6 +3123,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3150,6 +3173,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3198,6 +3223,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3260,6 +3287,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3278,6 +3307,12 @@ "core-js/actual/typed-array/set": [ "es.typed-array.set" ], + "core-js/actual/typed-array/set-from-base64": [ + "esnext.uint8-array.set-from-base64" + ], + "core-js/actual/typed-array/set-from-hex": [ + "esnext.uint8-array.set-from-hex" + ], "core-js/actual/typed-array/slice": [ "es.typed-array.slice" ], @@ -3359,6 +3394,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3407,6 +3444,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3455,6 +3494,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -3503,6 +3544,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -6290,6 +6333,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", @@ -9044,6 +9089,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9140,6 +9187,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9196,6 +9245,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9276,6 +9327,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9332,6 +9385,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9388,6 +9443,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9458,6 +9515,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9476,6 +9535,12 @@ "core-js/features/typed-array/set": [ "es.typed-array.set" ], + "core-js/features/typed-array/set-from-base64": [ + "esnext.uint8-array.set-from-base64" + ], + "core-js/features/typed-array/set-from-hex": [ + "esnext.uint8-array.set-from-hex" + ], "core-js/features/typed-array/slice": [ "es.typed-array.slice" ], @@ -9565,6 +9630,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9621,6 +9688,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9677,6 +9746,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -9733,6 +9804,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -10306,6 +10379,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", @@ -13060,6 +13135,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13156,6 +13233,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13212,6 +13291,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13292,6 +13373,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13348,6 +13431,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13404,6 +13489,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13474,6 +13561,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13492,6 +13581,12 @@ "core-js/full/typed-array/set": [ "es.typed-array.set" ], + "core-js/full/typed-array/set-from-base64": [ + "esnext.uint8-array.set-from-base64" + ], + "core-js/full/typed-array/set-from-hex": [ + "esnext.uint8-array.set-from-hex" + ], "core-js/full/typed-array/slice": [ "es.typed-array.slice" ], @@ -13581,6 +13676,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13637,6 +13734,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13693,6 +13792,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -13749,6 +13850,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -15281,6 +15384,12 @@ "core-js/modules/esnext.uint8-array.from-hex": [ "esnext.uint8-array.from-hex" ], + "core-js/modules/esnext.uint8-array.set-from-base64": [ + "esnext.uint8-array.set-from-base64" + ], + "core-js/modules/esnext.uint8-array.set-from-hex": [ + "esnext.uint8-array.set-from-hex" + ], "core-js/modules/esnext.uint8-array.to-base64": [ "esnext.uint8-array.to-base64" ], @@ -15587,6 +15696,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", @@ -15613,6 +15724,8 @@ "core-js/proposals/array-buffer-base64": [ "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -18730,6 +18843,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", @@ -18936,6 +19051,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", @@ -19131,6 +19248,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", @@ -19254,6 +19373,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.emplace" @@ -19324,6 +19445,7 @@ "esnext.promise.any", "esnext.promise.try", "esnext.promise.with-resolvers", + "esnext.regexp.escape", "esnext.set.difference.v2", "esnext.set.intersection.v2", "esnext.set.is-disjoint-from.v2", @@ -19347,6 +19469,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -19413,7 +19537,9 @@ "esnext.object.group-by", "esnext.promise.all-settled", "esnext.promise.any", + "esnext.promise.try", "esnext.promise.with-resolvers", + "esnext.regexp.escape", "esnext.set.difference.v2", "esnext.set.intersection.v2", "esnext.set.is-disjoint-from.v2", @@ -19437,6 +19563,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex" ], @@ -19673,6 +19801,8 @@ "esnext.typed-array.with", "esnext.uint8-array.from-base64", "esnext.uint8-array.from-hex", + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex", "esnext.uint8-array.to-base64", "esnext.uint8-array.to-hex", "esnext.weak-map.delete-all", diff --git a/crates/swc_ecma_preset_env/data/core-js-compat/modules-by-versions.json b/crates/swc_ecma_preset_env/data/core-js-compat/modules-by-versions.json old mode 100644 new mode 100755 index 76353dd6a8d8..ff4b2ec48c81 --- a/crates/swc_ecma_preset_env/data/core-js-compat/modules-by-versions.json +++ b/crates/swc_ecma_preset_env/data/core-js-compat/modules-by-versions.json @@ -540,5 +540,9 @@ "esnext.math.sum-precise", "esnext.symbol.custom-matcher", "web.url.parse" + ], + "3.38": [ + "esnext.uint8-array.set-from-base64", + "esnext.uint8-array.set-from-hex" ] } diff --git a/crates/swc_ecma_preset_env/src/transform_data.rs b/crates/swc_ecma_preset_env/src/transform_data.rs index 0e507c7cf8ad..b1d61450bfc7 100644 --- a/crates/swc_ecma_preset_env/src/transform_data.rs +++ b/crates/swc_ecma_preset_env/src/transform_data.rs @@ -22,6 +22,7 @@ impl Feature { } #[derive(Clone, Copy, PartialEq, Eq, StringEnum, Hash)] +#[non_exhaustive] pub enum Feature { /// `transform-template-literals` TemplateLiterals, @@ -166,6 +167,9 @@ pub enum Feature { /// `transform-unicode-sets-regex` UnicodeSetsRegex, + /// `transform-duplicate-named-capturing-groups-regex` + DuplicateNamedCapturingGroupsRegex, // TODO + /// `bugfix/transform-async-arrows-in-class` BugfixAsyncArrowsInClass, @@ -195,6 +199,9 @@ pub enum Feature { /// `bugfix/transform-firefox-class-in-computed-class-key` BugfixTransformFirefoxClassInComputedClassKey, // TODO + + /// `bugfix/transform-safari-class-field-initializer-scope` + BugfixTransformSafariClassFieldInitializerScope, // TODO } pub(crate) static FEATURES: Lazy>>> = diff --git a/package.json b/package.json index 1b2c3dc5a7a0..f25138fafbb7 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "test": "cd ./packages/core && yarn test" }, "devDependencies": { - "@babel/compat-data": "^7.24.7", + "@babel/compat-data": "^7.25.2", "@babel/core": "^7.13.16", "@babel/generator": "^7.18.13", "@babel/plugin-proposal-class-properties": "^7.13.0", @@ -44,7 +44,7 @@ "bootstrap": "^5.2.1", "class-validator": "^0.13.1", "core-js": "^2.6.11", - "core-js-compat": "^3.37.1", + "core-js-compat": "^3.38.0", "cross-env": "^7.0.3", "cspell": "^5.12.3", "expect": "^27.4.2", diff --git a/yarn.lock b/yarn.lock index f7e01b5dd9be..fc1a6795bfd9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -152,10 +152,10 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.24.7": - version: 7.24.7 - resolution: "@babel/compat-data@npm:7.24.7" - checksum: 6edc09152ca51a22c33741c441f33f9475598fa59edc53369edb74b49f4ea4bef1281f5b0ed2b9b67fb66faef2da2069e21c4eef83405d8326e524b301f4e7e2 +"@babel/compat-data@npm:^7.25.2": + version: 7.25.2 + resolution: "@babel/compat-data@npm:7.25.2" + checksum: fd61de9303db3177fc98173571f81f3f551eac5c9f839c05ad02818b11fe77a74daa632abebf7f423fbb4a29976ae9141e0d2bd7517746a0ff3d74cb659ad33a languageName: node linkType: hard @@ -4739,7 +4739,7 @@ __metadata: version: 0.0.0-use.local resolution: "@swc/workspace@workspace:." dependencies: - "@babel/compat-data": "npm:^7.24.7" + "@babel/compat-data": "npm:^7.25.2" "@babel/core": "npm:^7.13.16" "@babel/generator": "npm:^7.18.13" "@babel/plugin-proposal-class-properties": "npm:^7.13.0" @@ -4763,7 +4763,7 @@ __metadata: bootstrap: "npm:^5.2.1" class-validator: "npm:^0.13.1" core-js: "npm:^2.6.11" - core-js-compat: "npm:^3.37.1" + core-js-compat: "npm:^3.38.0" cross-env: "npm:^7.0.3" cspell: "npm:^5.12.3" expect: "npm:^27.4.2" @@ -6627,17 +6627,17 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.23.0": - version: 4.23.1 - resolution: "browserslist@npm:4.23.1" +"browserslist@npm:^4.23.3": + version: 4.23.3 + resolution: "browserslist@npm:4.23.3" dependencies: - caniuse-lite: "npm:^1.0.30001629" - electron-to-chromium: "npm:^1.4.796" - node-releases: "npm:^2.0.14" - update-browserslist-db: "npm:^1.0.16" + caniuse-lite: "npm:^1.0.30001646" + electron-to-chromium: "npm:^1.5.4" + node-releases: "npm:^2.0.18" + update-browserslist-db: "npm:^1.1.0" bin: browserslist: cli.js - checksum: 91da59f70a8e01ece97133670f9857d6d7e96be78e1b7ffa54b869f97d01d01c237612471b595cee41c1ab212e26e536ce0b6716ad1d6c4368a40c222698cac1 + checksum: e266d18c6c6c5becf9a1a7aa264477677b9796387972e8fce34854bb33dc1666194dc28389780e5dc6566e68a95e87ece2ce222e1c4ca93c2b75b61dfebd5f1c languageName: node linkType: hard @@ -6871,10 +6871,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.30001629": - version: 1.0.30001639 - resolution: "caniuse-lite@npm:1.0.30001639" - checksum: c163080e08982de60b37d51130f088e9f8a745533621675694f0b079f53529308168adb0966051139ff71c75af439b2ce150b7142cff15aac421cbfd126bd481 +"caniuse-lite@npm:^1.0.30001646": + version: 1.0.30001651 + resolution: "caniuse-lite@npm:1.0.30001651" + checksum: fe4857b2a91a9cb77993eec9622de68bea0df17c31cb9584ca5c562f64bb3b8fda316d898aa3b1ee3ee9f7d80f6bf13c42acb09d9a56a1a6c64afaf7381472fa languageName: node linkType: hard @@ -7528,12 +7528,12 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.37.1": - version: 3.37.1 - resolution: "core-js-compat@npm:3.37.1" +"core-js-compat@npm:^3.38.0": + version: 3.38.0 + resolution: "core-js-compat@npm:3.38.0" dependencies: - browserslist: "npm:^4.23.0" - checksum: 30c6fdbd9ff179cc53951814689b8aabec106e5de6cddfa7a7feacc96b66d415b8eebcf5ec8f7c68ef35c552fe7d39edb8b15b1ce0f27379a272295b6e937061 + browserslist: "npm:^4.23.3" + checksum: 7ebdca6b305c9c470980e1f7e7a3d759add7cb754bff62926242907ee4d1d4e8bb13f70eb9a7d7769e0f63aec3f4cca83abf60f502286853b45d4b63a01c25ed languageName: node linkType: hard @@ -8331,10 +8331,10 @@ __metadata: languageName: node linkType: hard -"electron-to-chromium@npm:^1.4.796": - version: 1.4.815 - resolution: "electron-to-chromium@npm:1.4.815" - checksum: 84f59b76b1ac16fe1f359720bdaeadcbce34825a7e79e3551ceec6b52d4021e7bd8a56a2cfa4197ba353331df18d0bc2ab449e08c5599eb1b2a7aacaba56f711 +"electron-to-chromium@npm:^1.5.4": + version: 1.5.5 + resolution: "electron-to-chromium@npm:1.5.5" + checksum: 0ca1cb9f16a4a7173b189cc8df29f88f7351056d2e429a4e7c1c7f9ac2edffc0aa43b7fb77d8495d0f0d661a33eda5cfe46679ebee6faf3343013ce63aed59a8 languageName: node linkType: hard @@ -13647,6 +13647,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.18": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: 241e5fa9556f1c12bafb83c6c3e94f8cf3d8f2f8f904906ecef6e10bcaa1d59aa61212d4651bec70052015fc54bd3fdcdbe7fc0f638a17e6685aa586c076ec4e + languageName: node + linkType: hard + "noms@npm:0.0.0": version: 0.0.0 resolution: "noms@npm:0.0.0" @@ -17201,9 +17208,9 @@ __metadata: languageName: node linkType: hard -"update-browserslist-db@npm:^1.0.16": - version: 1.0.16 - resolution: "update-browserslist-db@npm:1.0.16" +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" dependencies: escalade: "npm:^3.1.2" picocolors: "npm:^1.0.1" @@ -17211,7 +17218,7 @@ __metadata: browserslist: ">= 4.21.0" bin: update-browserslist-db: cli.js - checksum: 071bf0b2fb8568db6cd42ee2598ac9b87c794a7229fcbf1b035ae7f883e770c07143f16a5371525d5bcb94b99f9a1b279036142b0195ffd4cf5a0008fc4a500e + checksum: d70b9efeaf4601aadb1a4f6456a7a5d9118e0063d995866b8e0c5e0cf559482671dab6ce7b079f9536b06758a344fbd83f974b965211e1c6e8d1958540b0c24c languageName: node linkType: hard