From e0daec9f206151f47584443edf44290dd3e58972 Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Thu, 10 Jun 2021 10:02:22 +0100 Subject: [PATCH 01/10] Add support for rhino as a compilation target --- .../data/corejs2-built-ins.json | 75 +++++++++++++++++++ .../data/plugin-bugfixes.json | 1 + packages/babel-compat-data/data/plugins.json | 4 + .../scripts/download-compat-table.sh | 2 +- .../scripts/utils-build-data.js | 1 + .../src/options.ts | 1 + 6 files changed, 83 insertions(+), 1 deletion(-) diff --git a/packages/babel-compat-data/data/corejs2-built-ins.json b/packages/babel-compat-data/data/corejs2-built-ins.json index 9739da06e2ad..ccd021ca78e9 100644 --- a/packages/babel-compat-data/data/corejs2-built-ins.json +++ b/packages/babel-compat-data/data/corejs2-built-ins.json @@ -8,6 +8,7 @@ "node": "4", "ios": "9", "samsung": "5", + "rhino": "1.7", "electron": "0.31" }, "es6.array.every": { @@ -22,6 +23,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.fill": { @@ -33,6 +35,7 @@ "node": "4", "ios": "8", "samsung": "5", + "rhino": "1.7", "electron": "0.31" }, "es6.array.filter": { @@ -55,6 +58,7 @@ "node": "4", "ios": "8", "samsung": "5", + "rhino": "1.7", "electron": "0.31" }, "es6.array.find-index": { @@ -66,6 +70,7 @@ "node": "4", "ios": "8", "samsung": "5", + "rhino": "1.7", "electron": "0.31" }, "es7.array.flat-map": { @@ -91,6 +96,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.from": { @@ -127,6 +133,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.is-array": { @@ -141,6 +148,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.iterator": { @@ -152,6 +160,7 @@ "node": "10", "ios": "9", "samsung": "9", + "rhino": "1.7", "electron": "3.0" }, "es6.array.last-index-of": { @@ -166,6 +175,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.map": { @@ -188,6 +198,7 @@ "node": "4", "ios": "9", "samsung": "5", + "rhino": "1.7", "electron": "0.31" }, "es6.array.reduce": { @@ -202,6 +213,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.reduce-right": { @@ -216,6 +228,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.slice": { @@ -241,6 +254,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.array.sort": { @@ -253,6 +267,7 @@ "ie": "9", "ios": "12", "samsung": "8", + "rhino": "1.7", "electron": "3.0" }, "es6.array.species": { @@ -278,6 +293,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.date.to-iso-string": { @@ -292,6 +308,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.date.to-json": { @@ -305,6 +322,7 @@ "android": "4", "ios": "10", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.date.to-primitive": { @@ -330,6 +348,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.function.bind": { @@ -344,6 +363,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.function.has-instance": { @@ -368,6 +388,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.map": { @@ -390,6 +411,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.asinh": { @@ -401,6 +423,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.atanh": { @@ -412,6 +435,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.cbrt": { @@ -423,6 +447,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.clz32": { @@ -434,6 +459,7 @@ "node": "0.12", "ios": "9", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.cosh": { @@ -445,6 +471,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.expm1": { @@ -456,6 +483,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.fround": { @@ -467,6 +495,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.hypot": { @@ -478,6 +507,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.imul": { @@ -490,6 +520,7 @@ "android": "4.4", "ios": "7", "samsung": "2", + "rhino": "1.7", "electron": "0.20" }, "es6.math.log1p": { @@ -501,6 +532,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.log10": { @@ -512,6 +544,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.log2": { @@ -523,6 +556,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.sign": { @@ -534,6 +568,7 @@ "node": "0.12", "ios": "9", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.sinh": { @@ -545,6 +580,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.tanh": { @@ -556,6 +592,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.math.trunc": { @@ -567,6 +604,7 @@ "node": "0.12", "ios": "8", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.number.constructor": { @@ -578,6 +616,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.number.epsilon": { @@ -601,6 +640,7 @@ "android": "4.1", "ios": "9", "samsung": "1.5", + "rhino": "1.7", "electron": "0.20" }, "es6.number.is-integer": { @@ -612,6 +652,7 @@ "node": "0.12", "ios": "9", "samsung": "2", + "rhino": "1.7", "electron": "0.20" }, "es6.number.is-nan": { @@ -624,6 +665,7 @@ "android": "4.1", "ios": "9", "samsung": "1.5", + "rhino": "1.7", "electron": "0.20" }, "es6.number.is-safe-integer": { @@ -635,6 +677,7 @@ "node": "0.12", "ios": "9", "samsung": "2", + "rhino": "1.7", "electron": "0.20" }, "es6.number.max-safe-integer": { @@ -646,6 +689,7 @@ "node": "0.12", "ios": "9", "samsung": "2", + "rhino": "1.7", "electron": "0.20" }, "es6.number.min-safe-integer": { @@ -657,6 +701,7 @@ "node": "0.12", "ios": "9", "samsung": "2", + "rhino": "1.7", "electron": "0.20" }, "es6.number.parse-float": { @@ -704,6 +749,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es7.object.define-getter": { @@ -740,6 +786,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.object.define-properties": { @@ -754,6 +801,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es7.object.entries": { @@ -776,6 +824,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es6.object.get-own-property-descriptor": { @@ -787,6 +836,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es7.object.get-own-property-descriptors": { @@ -809,6 +859,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.object.get-prototype-of": { @@ -820,6 +871,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es7.object.lookup-getter": { @@ -853,6 +905,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es6.object.to-string": { @@ -876,6 +929,7 @@ "android": "4.1", "ios": "9", "samsung": "1.5", + "rhino": "1.7", "electron": "0.20" }, "es6.object.is-frozen": { @@ -887,6 +941,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es6.object.is-sealed": { @@ -898,6 +953,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es6.object.is-extensible": { @@ -909,6 +965,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es6.object.keys": { @@ -920,6 +977,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.object.seal": { @@ -931,6 +989,7 @@ "node": "4", "ios": "9", "samsung": "4", + "rhino": "1.7", "electron": "0.30" }, "es6.object.set-prototype-of": { @@ -943,6 +1002,7 @@ "ie": "11", "ios": "9", "samsung": "2", + "rhino": "1.7", "electron": "0.20" }, "es7.object.values": { @@ -1152,6 +1212,7 @@ "node": "6", "ios": "10", "samsung": "5", + "rhino": "1.7", "electron": "1.1" }, "es6.regexp.replace": { @@ -1185,6 +1246,7 @@ "node": "6", "ios": "10", "samsung": "5", + "rhino": "1.7", "electron": "1.1" }, "es6.regexp.to-string": { @@ -1292,6 +1354,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.string.ends-with": { @@ -1303,6 +1366,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.string.fixed": { @@ -1353,6 +1417,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.string.includes": { @@ -1364,6 +1429,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.string.italics": { @@ -1388,6 +1454,7 @@ "node": "0.12", "ios": "9", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "es6.string.link": { @@ -1412,6 +1479,7 @@ "node": "8", "ios": "10", "samsung": "7", + "rhino": "1.7", "electron": "1.7" }, "es7.string.pad-end": { @@ -1423,6 +1491,7 @@ "node": "8", "ios": "10", "samsung": "7", + "rhino": "1.7", "electron": "1.7" }, "es6.string.raw": { @@ -1445,6 +1514,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.string.small": { @@ -1469,6 +1539,7 @@ "node": "4", "ios": "9", "samsung": "3.4", + "rhino": "1.7", "electron": "0.21" }, "es6.string.strike": { @@ -1522,6 +1593,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es7.string.trim-left": { @@ -1533,6 +1605,7 @@ "node": "10", "ios": "12", "samsung": "9", + "rhino": "1.7", "electron": "3.0" }, "es7.string.trim-right": { @@ -1544,6 +1617,7 @@ "node": "10", "ios": "12", "samsung": "9", + "rhino": "1.7", "electron": "3.0" }, "es6.typed.array-buffer": { @@ -1569,6 +1643,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "es6.typed.int8-array": { diff --git a/packages/babel-compat-data/data/plugin-bugfixes.json b/packages/babel-compat-data/data/plugin-bugfixes.json index b1521be394f5..936ab52b0174 100644 --- a/packages/babel-compat-data/data/plugin-bugfixes.json +++ b/packages/babel-compat-data/data/plugin-bugfixes.json @@ -98,6 +98,7 @@ "ie": "11", "ios": "11", "samsung": "5", + "rhino": "1.7", "electron": "0.37" }, "transform-template-literals": { diff --git a/packages/babel-compat-data/data/plugins.json b/packages/babel-compat-data/data/plugins.json index 6a8b47033cfe..04ddcab6d42d 100644 --- a/packages/babel-compat-data/data/plugins.json +++ b/packages/babel-compat-data/data/plugins.json @@ -371,6 +371,7 @@ "node": "0.12", "ios": "9", "samsung": "3", + "rhino": "1.7", "electron": "0.20" }, "transform-new-target": { @@ -407,6 +408,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "transform-property-literals": { @@ -421,6 +423,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "transform-reserved-words": { @@ -435,6 +438,7 @@ "ios": "6", "phantom": "2", "samsung": "1", + "rhino": "1.7", "electron": "0.20" }, "proposal-export-namespace-from": { diff --git a/packages/babel-compat-data/scripts/download-compat-table.sh b/packages/babel-compat-data/scripts/download-compat-table.sh index a0a5f1bbeb8f..528408a90c54 100755 --- a/packages/babel-compat-data/scripts/download-compat-table.sh +++ b/packages/babel-compat-data/scripts/download-compat-table.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -COMPAT_TABLE_COMMIT=e0380f77d240796b06a2a8ab33a99363b6ec7f67 +COMPAT_TABLE_COMMIT=27275586637069f2938521421d78687d612880b4 GIT_HEAD=build/compat-table/.git/HEAD if [ -d "build/compat-table" ]; then diff --git a/packages/babel-compat-data/scripts/utils-build-data.js b/packages/babel-compat-data/scripts/utils-build-data.js index 33e7dca92986..be50cd565441 100644 --- a/packages/babel-compat-data/scripts/utils-build-data.js +++ b/packages/babel-compat-data/scripts/utils-build-data.js @@ -30,6 +30,7 @@ exports.environments = [ "ios", "phantom", "samsung", + "rhino", ]; const compatibilityTests = compatSources.flatMap(data => diff --git a/packages/babel-helper-compilation-targets/src/options.ts b/packages/babel-helper-compilation-targets/src/options.ts index 77f8b8294b21..ef3726849693 100644 --- a/packages/babel-helper-compilation-targets/src/options.ts +++ b/packages/babel-helper-compilation-targets/src/options.ts @@ -10,4 +10,5 @@ export const TargetNames = { android: "android", electron: "electron", samsung: "samsung", + rhino: "rhino", }; From 2a0537c5b6f7f788422f375de7c7aead56a7b56f Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Fri, 11 Jun 2021 10:36:57 +0100 Subject: [PATCH 02/10] Add tests for target: rhino --- .../preset-options-babel-7/rhino1_7/input.mjs | 2 ++ .../preset-options-babel-7/rhino1_7/options.json | 13 +++++++++++++ .../preset-options-babel-7/rhino1_7/output.mjs | 3 +++ .../fixtures/preset-options/rhino-1_7/input.mjs | 2 ++ .../fixtures/preset-options/rhino-1_7/options.json | 13 +++++++++++++ .../fixtures/preset-options/rhino-1_7/output.mjs | 3 +++ 6 files changed, 36 insertions(+) create mode 100644 packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/input.mjs create mode 100644 packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/options.json create mode 100644 packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/output.mjs create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/input.mjs new file mode 100644 index 000000000000..539f11356fae --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/input.mjs @@ -0,0 +1,2 @@ +const a = () => 1; + diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/options.json b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/options.json new file mode 100644 index 000000000000..3e93ed097f95 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/options.json @@ -0,0 +1,13 @@ +{ + "presets": [ + [ + "../../../../lib", + { + "targets": { + "rhino": "1.7" + }, + "modules": false + } + ] + ] +} diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/output.mjs new file mode 100644 index 000000000000..6bf835e390cf --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/output.mjs @@ -0,0 +1,3 @@ +var a = function a() { + return 1; +}; diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs new file mode 100644 index 000000000000..539f11356fae --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs @@ -0,0 +1,2 @@ +const a = () => 1; + diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json new file mode 100644 index 000000000000..3e93ed097f95 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json @@ -0,0 +1,13 @@ +{ + "presets": [ + [ + "../../../../lib", + { + "targets": { + "rhino": "1.7" + }, + "modules": false + } + ] + ] +} diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs new file mode 100644 index 000000000000..12499ad469f0 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs @@ -0,0 +1,3 @@ +var a = function a() { + return 1; +}; From 33f853af462b7b9754be40c13706ecbb321fbe99 Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Mon, 14 Jun 2021 18:02:28 +0100 Subject: [PATCH 03/10] Fix test failing due to whitespace --- .../test/fixtures/preset-options/rhino-1_7/output.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs index 12499ad469f0..6bf835e390cf 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs +++ b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs @@ -1,3 +1,3 @@ var a = function a() { - return 1; + return 1; }; From 01c751e934821b2383239b12732a45920f4349f7 Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Mon, 14 Jun 2021 18:04:09 +0100 Subject: [PATCH 04/10] Keep consistent names for rhino tests in babel 7 and 8 --- .../preset-options-babel-7/{rhino1_7 => rhino-1_7}/input.mjs | 0 .../preset-options-babel-7/{rhino1_7 => rhino-1_7}/options.json | 0 .../preset-options-babel-7/{rhino1_7 => rhino-1_7}/output.mjs | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename packages/babel-preset-env/test/fixtures/preset-options-babel-7/{rhino1_7 => rhino-1_7}/input.mjs (100%) rename packages/babel-preset-env/test/fixtures/preset-options-babel-7/{rhino1_7 => rhino-1_7}/options.json (100%) rename packages/babel-preset-env/test/fixtures/preset-options-babel-7/{rhino1_7 => rhino-1_7}/output.mjs (100%) diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs similarity index 100% rename from packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/input.mjs rename to packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/options.json b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json similarity index 100% rename from packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/options.json rename to packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/output.mjs similarity index 100% rename from packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino1_7/output.mjs rename to packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/output.mjs From aa98b1c0d7e122a20962cce5754c3e0c1edd2a10 Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Mon, 21 Jun 2021 15:02:28 +0100 Subject: [PATCH 05/10] Bump core-js-compat to 3.15.0 --- lib/third-party-libs.js.flow | 2 +- packages/babel-compat-data/package.json | 2 +- packages/babel-preset-env/package.json | 2 +- yarn.lock | 17 ++++++++++++++--- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/third-party-libs.js.flow b/lib/third-party-libs.js.flow index 85f14d259c58..9ce36c6dc427 100644 --- a/lib/third-party-libs.js.flow +++ b/lib/third-party-libs.js.flow @@ -187,7 +187,7 @@ declare module "convert-source-map" { } declare module "core-js-compat/data" { - declare type Target = "node" | "chrome" | "opera" | "edge" | "firefox" | "safari" | "ie" | "ios" | "android" | "electron" | "samsung"; + declare type Target = "node" | "chrome" | "opera" | "edge" | "firefox" | "safari" | "ie" | "ios" | "android" | "electron" | "samsung" | "rhino"; declare module.exports: { [key: string]: { diff --git a/packages/babel-compat-data/package.json b/packages/babel-compat-data/package.json index b426f3bcfefd..eeefd143b401 100644 --- a/packages/babel-compat-data/package.json +++ b/packages/babel-compat-data/package.json @@ -30,7 +30,7 @@ ], "devDependencies": { "@mdn/browser-compat-data": "^3.3.4", - "core-js-compat": "^3.14.0", + "core-js-compat": "^3.15.0", "electron-to-chromium": "^1.3.749" }, "engines": { diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index 5b8d91a87c08..ce7a213a734c 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -87,7 +87,7 @@ "babel-plugin-polyfill-corejs2": "^0.2.2", "babel-plugin-polyfill-corejs3": "^0.2.2", "babel-plugin-polyfill-regenerator": "^0.2.2", - "core-js-compat": "^3.14.0", + "core-js-compat": "^3.15.0", "semver": "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index b234e3ccf50d..d90ebf621320 100644 --- a/yarn.lock +++ b/yarn.lock @@ -160,7 +160,7 @@ __metadata: resolution: "@babel/compat-data@workspace:packages/babel-compat-data" dependencies: "@mdn/browser-compat-data": ^3.3.4 - core-js-compat: ^3.14.0 + core-js-compat: ^3.15.0 electron-to-chromium: ^1.3.749 languageName: unknown linkType: soft @@ -658,6 +658,7 @@ __metadata: resolution: "@babel/helper-module-transforms@condition:BABEL_8_BREAKING?:workspace:^7.14.5#2510a1" dependencies: "@babel/helper-module-transforms-BABEL_8_BREAKING-false": "npm:@babel/helper-module-transforms@workspace:^7.14.5" + checksum: eb4895913562bf398b8bf7e6c68a0380f153f52f2715b3685f9d07e376725227678c2f920dfe0772012dfed655e037534619de86bb9f3284b92555f8bf9d0f42 languageName: node linkType: hard @@ -3253,7 +3254,7 @@ __metadata: babel-plugin-polyfill-corejs2: ^0.2.2 babel-plugin-polyfill-corejs3: ^0.2.2 babel-plugin-polyfill-regenerator: ^0.2.2 - core-js-compat: ^3.14.0 + core-js-compat: ^3.15.0 semver: "condition:BABEL_8_BREAKING ? ^7.3.4 : ^6.3.0" peerDependencies: "@babel/core": ^7.0.0-0 @@ -6832,7 +6833,17 @@ __metadata: languageName: node linkType: hard -"core-js-compat@npm:^3.14.0, core-js-compat@npm:^3.9.0, core-js-compat@npm:^3.9.1": +"core-js-compat@npm:^3.15.0": + version: 3.15.0 + resolution: "core-js-compat@npm:3.15.0" + dependencies: + browserslist: ^4.16.6 + semver: 7.0.0 + checksum: 33117b46696e101db38f0842068c72e7a4a35a1e35028bea721fcc467859b6041a851ec08927f92e34037f12366f73b8994229c77f0de3038b39ab702b5994c1 + languageName: node + linkType: hard + +"core-js-compat@npm:^3.9.0, core-js-compat@npm:^3.9.1": version: 3.14.0 resolution: "core-js-compat@npm:3.14.0" dependencies: From 1b4b37849e4d686e78eb7879727356605ab417fd Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Mon, 21 Jun 2021 15:44:56 +0100 Subject: [PATCH 06/10] Change references to rhino to include patch version --- .../data/corejs2-built-ins.json | 150 +++++++++--------- .../data/plugin-bugfixes.json | 2 +- packages/babel-compat-data/data/plugins.json | 8 +- .../scripts/download-compat-table.sh | 2 +- .../rhino-1_7/options.json | 2 +- .../preset-options/rhino-1_7/options.json | 2 +- 6 files changed, 83 insertions(+), 83 deletions(-) diff --git a/packages/babel-compat-data/data/corejs2-built-ins.json b/packages/babel-compat-data/data/corejs2-built-ins.json index ccd021ca78e9..72c5f3ad7cf6 100644 --- a/packages/babel-compat-data/data/corejs2-built-ins.json +++ b/packages/babel-compat-data/data/corejs2-built-ins.json @@ -8,7 +8,7 @@ "node": "4", "ios": "9", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.every": { @@ -23,7 +23,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.fill": { @@ -35,7 +35,7 @@ "node": "4", "ios": "8", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.filter": { @@ -58,7 +58,7 @@ "node": "4", "ios": "8", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.find-index": { @@ -70,7 +70,7 @@ "node": "4", "ios": "8", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.31" }, "es7.array.flat-map": { @@ -96,7 +96,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.from": { @@ -133,7 +133,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.is-array": { @@ -148,7 +148,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.iterator": { @@ -160,7 +160,7 @@ "node": "10", "ios": "9", "samsung": "9", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "3.0" }, "es6.array.last-index-of": { @@ -175,7 +175,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.map": { @@ -198,7 +198,7 @@ "node": "4", "ios": "9", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.31" }, "es6.array.reduce": { @@ -213,7 +213,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.reduce-right": { @@ -228,7 +228,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.slice": { @@ -254,7 +254,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.array.sort": { @@ -267,7 +267,7 @@ "ie": "9", "ios": "12", "samsung": "8", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "3.0" }, "es6.array.species": { @@ -293,7 +293,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.date.to-iso-string": { @@ -308,7 +308,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.date.to-json": { @@ -322,7 +322,7 @@ "android": "4", "ios": "10", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.date.to-primitive": { @@ -348,7 +348,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.function.bind": { @@ -363,7 +363,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.function.has-instance": { @@ -388,7 +388,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.map": { @@ -411,7 +411,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.asinh": { @@ -423,7 +423,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.atanh": { @@ -435,7 +435,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.cbrt": { @@ -447,7 +447,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.clz32": { @@ -459,7 +459,7 @@ "node": "0.12", "ios": "9", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.cosh": { @@ -471,7 +471,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.expm1": { @@ -483,7 +483,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.fround": { @@ -495,7 +495,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.hypot": { @@ -507,7 +507,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.imul": { @@ -520,7 +520,7 @@ "android": "4.4", "ios": "7", "samsung": "2", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.log1p": { @@ -532,7 +532,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.log10": { @@ -544,7 +544,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.log2": { @@ -556,7 +556,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.sign": { @@ -568,7 +568,7 @@ "node": "0.12", "ios": "9", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.sinh": { @@ -580,7 +580,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.tanh": { @@ -592,7 +592,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.math.trunc": { @@ -604,7 +604,7 @@ "node": "0.12", "ios": "8", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.constructor": { @@ -616,7 +616,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.number.epsilon": { @@ -640,7 +640,7 @@ "android": "4.1", "ios": "9", "samsung": "1.5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.is-integer": { @@ -652,7 +652,7 @@ "node": "0.12", "ios": "9", "samsung": "2", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.is-nan": { @@ -665,7 +665,7 @@ "android": "4.1", "ios": "9", "samsung": "1.5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.is-safe-integer": { @@ -677,7 +677,7 @@ "node": "0.12", "ios": "9", "samsung": "2", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.max-safe-integer": { @@ -689,7 +689,7 @@ "node": "0.12", "ios": "9", "samsung": "2", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.min-safe-integer": { @@ -701,7 +701,7 @@ "node": "0.12", "ios": "9", "samsung": "2", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.number.parse-float": { @@ -749,7 +749,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es7.object.define-getter": { @@ -786,7 +786,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.object.define-properties": { @@ -801,7 +801,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es7.object.entries": { @@ -824,7 +824,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.get-own-property-descriptor": { @@ -836,7 +836,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es7.object.get-own-property-descriptors": { @@ -859,7 +859,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.object.get-prototype-of": { @@ -871,7 +871,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es7.object.lookup-getter": { @@ -905,7 +905,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.to-string": { @@ -929,7 +929,7 @@ "android": "4.1", "ios": "9", "samsung": "1.5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.object.is-frozen": { @@ -941,7 +941,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.is-sealed": { @@ -953,7 +953,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.is-extensible": { @@ -965,7 +965,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.keys": { @@ -977,7 +977,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.object.seal": { @@ -989,7 +989,7 @@ "node": "4", "ios": "9", "samsung": "4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.30" }, "es6.object.set-prototype-of": { @@ -1002,7 +1002,7 @@ "ie": "11", "ios": "9", "samsung": "2", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es7.object.values": { @@ -1212,7 +1212,7 @@ "node": "6", "ios": "10", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "1.1" }, "es6.regexp.replace": { @@ -1246,7 +1246,7 @@ "node": "6", "ios": "10", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "1.1" }, "es6.regexp.to-string": { @@ -1354,7 +1354,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.ends-with": { @@ -1366,7 +1366,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.fixed": { @@ -1417,7 +1417,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.includes": { @@ -1429,7 +1429,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.italics": { @@ -1454,7 +1454,7 @@ "node": "0.12", "ios": "9", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.string.link": { @@ -1479,7 +1479,7 @@ "node": "8", "ios": "10", "samsung": "7", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "1.7" }, "es7.string.pad-end": { @@ -1491,7 +1491,7 @@ "node": "8", "ios": "10", "samsung": "7", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "1.7" }, "es6.string.raw": { @@ -1514,7 +1514,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.small": { @@ -1539,7 +1539,7 @@ "node": "4", "ios": "9", "samsung": "3.4", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.21" }, "es6.string.strike": { @@ -1593,7 +1593,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es7.string.trim-left": { @@ -1605,7 +1605,7 @@ "node": "10", "ios": "12", "samsung": "9", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "3.0" }, "es7.string.trim-right": { @@ -1617,7 +1617,7 @@ "node": "10", "ios": "12", "samsung": "9", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "3.0" }, "es6.typed.array-buffer": { @@ -1643,7 +1643,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "es6.typed.int8-array": { diff --git a/packages/babel-compat-data/data/plugin-bugfixes.json b/packages/babel-compat-data/data/plugin-bugfixes.json index 936ab52b0174..6e6d3498df56 100644 --- a/packages/babel-compat-data/data/plugin-bugfixes.json +++ b/packages/babel-compat-data/data/plugin-bugfixes.json @@ -98,7 +98,7 @@ "ie": "11", "ios": "11", "samsung": "5", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.37" }, "transform-template-literals": { diff --git a/packages/babel-compat-data/data/plugins.json b/packages/babel-compat-data/data/plugins.json index 04ddcab6d42d..a89c1b16f1ce 100644 --- a/packages/babel-compat-data/data/plugins.json +++ b/packages/babel-compat-data/data/plugins.json @@ -371,7 +371,7 @@ "node": "0.12", "ios": "9", "samsung": "3", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "transform-new-target": { @@ -408,7 +408,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "transform-property-literals": { @@ -423,7 +423,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "transform-reserved-words": { @@ -438,7 +438,7 @@ "ios": "6", "phantom": "2", "samsung": "1", - "rhino": "1.7", + "rhino": "1.7.13", "electron": "0.20" }, "proposal-export-namespace-from": { diff --git a/packages/babel-compat-data/scripts/download-compat-table.sh b/packages/babel-compat-data/scripts/download-compat-table.sh index 528408a90c54..4d4f59f9f4c8 100755 --- a/packages/babel-compat-data/scripts/download-compat-table.sh +++ b/packages/babel-compat-data/scripts/download-compat-table.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -COMPAT_TABLE_COMMIT=27275586637069f2938521421d78687d612880b4 +COMPAT_TABLE_COMMIT=63abfe227f4b9c6ef019efbbf059025b537b8511 GIT_HEAD=build/compat-table/.git/HEAD if [ -d "build/compat-table" ]; then diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json index 3e93ed097f95..6f8e26c63cfe 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json @@ -4,7 +4,7 @@ "../../../../lib", { "targets": { - "rhino": "1.7" + "rhino": "1.7.13" }, "modules": false } diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json index 3e93ed097f95..6f8e26c63cfe 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json +++ b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json @@ -4,7 +4,7 @@ "../../../../lib", { "targets": { - "rhino": "1.7" + "rhino": "1.7.13" }, "modules": false } From f9ad8e987905e3c48018dbcf0f5917724331c01c Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Tue, 22 Jun 2021 17:35:35 +0100 Subject: [PATCH 07/10] Update compat table data import --- packages/babel-compat-data/data/plugins.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/babel-compat-data/data/plugins.json b/packages/babel-compat-data/data/plugins.json index a89c1b16f1ce..13b40a3abf67 100644 --- a/packages/babel-compat-data/data/plugins.json +++ b/packages/babel-compat-data/data/plugins.json @@ -211,11 +211,12 @@ "chrome": "47", "opera": "34", "edge": "13", - "firefox": "45", + "firefox": "43", "safari": "10", "node": "6", "ios": "10", "samsung": "5", + "rhino": "1.7.13", "electron": "0.36" }, "transform-block-scoped-functions": { @@ -378,7 +379,7 @@ "chrome": "46", "opera": "33", "edge": "14", - "firefox": "41", + "firefox": "45", "safari": "10", "node": "5", "ios": "10", From 47304dac6af07d7e4a190e86609d7f2ce97df647 Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Tue, 22 Jun 2021 17:36:10 +0100 Subject: [PATCH 08/10] Split transpilation of arrow function features more finely --- .../scripts/data/plugin-features.js | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/babel-compat-data/scripts/data/plugin-features.js b/packages/babel-compat-data/scripts/data/plugin-features.js index 49c687f1bf52..910799f864da 100644 --- a/packages/babel-compat-data/scripts/data/plugin-features.js +++ b/packages/babel-compat-data/scripts/data/plugin-features.js @@ -33,13 +33,30 @@ const es2015 = { features: ['function "name" property'], }, "transform-arrow-functions": { - features: ["arrow functions"], + 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', + ], }, "transform-block-scoped-functions": { features: ["block-level function declaration"], }, "transform-classes": { - features: ["class", "super"], + features: [ + "class", + "super", + 'arrow functions / lexical "super" binding in constructors', + 'arrow functions / lexical "super" binding in methods', + 'arrow functions / lexical "new.target" binding', + ], }, "transform-object-super": { features: ["super"], @@ -91,7 +108,12 @@ const es2015 = { features: ["Symbol / typeof support"], }, "transform-new-target": { - features: ["new.target"], + features: [ + "new.target", + 'arrow functions / lexical "super" binding in constructors', + 'arrow functions / lexical "super" binding in methods', + 'arrow functions / lexical "new.target" binding', + ], }, "transform-regenerator": { features: ["generators"], From 07928a25db38dd664e26718c12a532bea7dc28f4 Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Tue, 22 Jun 2021 17:36:53 +0100 Subject: [PATCH 09/10] Rename rhino fixtures to include the patch number and update to include syntax that is and isn't supported for better testing --- .../test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs | 2 -- .../test/fixtures/preset-options-babel-7/rhino-1_7/output.mjs | 3 --- .../fixtures/preset-options-babel-7/rhino-1_7_13/input.mjs | 2 ++ .../{rhino-1_7 => rhino-1_7_13}/options.json | 0 .../fixtures/preset-options-babel-7/rhino-1_7_13/output.mjs | 1 + .../test/fixtures/preset-options/rhino-1_7/input.mjs | 2 -- .../test/fixtures/preset-options/rhino-1_7/output.mjs | 3 --- .../test/fixtures/preset-options/rhino-1_7_13/input.mjs | 2 ++ .../preset-options/{rhino-1_7 => rhino-1_7_13}/options.json | 0 .../test/fixtures/preset-options/rhino-1_7_13/output.mjs | 1 + 10 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs delete mode 100644 packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/output.mjs create mode 100644 packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/input.mjs rename packages/babel-preset-env/test/fixtures/preset-options-babel-7/{rhino-1_7 => rhino-1_7_13}/options.json (100%) create mode 100644 packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/output.mjs delete mode 100644 packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs delete mode 100644 packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/input.mjs rename packages/babel-preset-env/test/fixtures/preset-options/{rhino-1_7 => rhino-1_7_13}/options.json (100%) create mode 100644 packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/output.mjs diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs deleted file mode 100644 index 539f11356fae..000000000000 --- a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/input.mjs +++ /dev/null @@ -1,2 +0,0 @@ -const a = () => 1; - diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/output.mjs deleted file mode 100644 index 6bf835e390cf..000000000000 --- a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/output.mjs +++ /dev/null @@ -1,3 +0,0 @@ -var a = function a() { - return 1; -}; diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/input.mjs new file mode 100644 index 000000000000..f93701ad12b9 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/input.mjs @@ -0,0 +1,2 @@ +const a = () => `1 + 1 = ${1 + 1}`; + diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/options.json similarity index 100% rename from packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7/options.json rename to packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/options.json diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/output.mjs new file mode 100644 index 000000000000..d1cef0062201 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/rhino-1_7_13/output.mjs @@ -0,0 +1 @@ +var a = () => "1 + 1 = ".concat(1 + 1); diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs deleted file mode 100644 index 539f11356fae..000000000000 --- a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/input.mjs +++ /dev/null @@ -1,2 +0,0 @@ -const a = () => 1; - diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs deleted file mode 100644 index 6bf835e390cf..000000000000 --- a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/output.mjs +++ /dev/null @@ -1,3 +0,0 @@ -var a = function a() { - return 1; -}; diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/input.mjs b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/input.mjs new file mode 100644 index 000000000000..09f50d27486e --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/input.mjs @@ -0,0 +1,2 @@ +const a = () => `1 + 1 = ${1+1}`; + diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/options.json similarity index 100% rename from packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7/options.json rename to packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/options.json diff --git a/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/output.mjs b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/output.mjs new file mode 100644 index 000000000000..d1cef0062201 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/preset-options/rhino-1_7_13/output.mjs @@ -0,0 +1 @@ +var a = () => "1 + 1 = ".concat(1 + 1); From 8ac5af510e07d5afe3227deb3bab399709155836 Mon Sep 17 00:00:00 2001 From: Samuel Gaus Date: Tue, 22 Jun 2021 18:26:42 +0100 Subject: [PATCH 10/10] Only use the relevant features for transform-new-target and transform-classes --- .../babel-compat-data/scripts/data/plugin-features.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/babel-compat-data/scripts/data/plugin-features.js b/packages/babel-compat-data/scripts/data/plugin-features.js index 910799f864da..063877e60a21 100644 --- a/packages/babel-compat-data/scripts/data/plugin-features.js +++ b/packages/babel-compat-data/scripts/data/plugin-features.js @@ -55,7 +55,6 @@ const es2015 = { "super", 'arrow functions / lexical "super" binding in constructors', 'arrow functions / lexical "super" binding in methods', - 'arrow functions / lexical "new.target" binding', ], }, "transform-object-super": { @@ -108,12 +107,7 @@ const es2015 = { features: ["Symbol / typeof support"], }, "transform-new-target": { - features: [ - "new.target", - 'arrow functions / lexical "super" binding in constructors', - 'arrow functions / lexical "super" binding in methods', - 'arrow functions / lexical "new.target" binding', - ], + features: ["new.target", 'arrow functions / lexical "new.target" binding'], }, "transform-regenerator": { features: ["generators"],