diff --git a/packages/babel-compat-data/data/plugins.json b/packages/babel-compat-data/data/plugins.json index 4919c18021c5..80f2fbfbb396 100644 --- a/packages/babel-compat-data/data/plugins.json +++ b/packages/babel-compat-data/data/plugins.json @@ -5,6 +5,7 @@ "edge": "94", "firefox": "93", "node": "16.11", + "deno": "1.14", "electron": "15.0" }, "proposal-class-static-block": { @@ -23,6 +24,7 @@ "firefox": "90", "safari": "15", "node": "16.9", + "deno": "1.9", "ios": "15", "electron": "13.0" }, @@ -44,6 +46,7 @@ "firefox": "90", "safari": "14.1", "node": "12", + "deno": "1", "ios": "15", "samsung": "11", "electron": "6.0" @@ -67,6 +70,7 @@ "firefox": "90", "safari": "15", "node": "14.6", + "deno": "1", "ios": "15", "samsung": "14", "electron": "10.0" @@ -90,6 +94,7 @@ "firefox": "70", "safari": "13", "node": "12.5", + "deno": "1", "ios": "13", "samsung": "11", "rhino": "1.7.14", @@ -115,6 +120,7 @@ "firefox": "79", "safari": "14", "node": "15", + "deno": "1.2", "ios": "14", "samsung": "14", "electron": "10.0" @@ -138,6 +144,7 @@ "firefox": "72", "safari": "13.1", "node": "14", + "deno": "1", "ios": "13.4", "samsung": "13", "electron": "8.0" @@ -161,6 +168,7 @@ "firefox": "74", "safari": "13.1", "node": "16.9", + "deno": "1.9", "ios": "13.4", "electron": "13.0" }, @@ -182,6 +190,7 @@ "firefox": "62", "safari": "12", "node": "10", + "deno": "1", "ios": "12", "samsung": "9", "rhino": "1.7.14", @@ -207,6 +216,7 @@ "firefox": "58", "safari": "11.1", "node": "10", + "deno": "1", "ios": "11.3", "samsung": "9", "electron": "3.0" @@ -240,6 +250,7 @@ "firefox": "57", "safari": "12", "node": "10", + "deno": "1", "ios": "12", "samsung": "8", "electron": "3.0" @@ -263,6 +274,7 @@ "firefox": "55", "safari": "11.1", "node": "8.3", + "deno": "1", "ios": "11.3", "samsung": "8", "electron": "2.0" @@ -298,6 +310,7 @@ "firefox": "78", "safari": "11.1", "node": "10", + "deno": "1", "ios": "11.3", "samsung": "9", "electron": "3.0" diff --git a/packages/babel-compat-data/scripts/build-data.js b/packages/babel-compat-data/scripts/build-data.js index 3ae6f15979a9..3c8106ac0ce5 100644 --- a/packages/babel-compat-data/scripts/build-data.js +++ b/packages/babel-compat-data/scripts/build-data.js @@ -2,7 +2,7 @@ const path = require("path"); const compatData = require("@mdn/browser-compat-data").javascript; -const { process } = require("./build-modules-support"); +const { process: processData } = require("./build-modules-support"); const { generateData, environments, @@ -10,6 +10,10 @@ const { defineLegacyPluginAliases, } = require("./utils-build-data"); +if (process.cwd().endsWith("scripts")) { + throw new Error("Please run this script from the root of the package"); +} + for (const target of ["plugin", "corejs2-built-in"]) { // We ignore 'overlapping' here, because it's already generated by // built-bugfixes-targets.js which has a complete view over all the @@ -20,7 +24,7 @@ for (const target of ["plugin", "corejs2-built-in"]) { ); if (target === "plugin") { // add export-namespace-from from @mdn/browser-compat-data - const exportNamespaceFromCompatData = process( + const exportNamespaceFromCompatData = processData( compatData.statements.export.namespace ); // the node.js compat data is 12.0, the first node version ships `export *` behind a flag diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/deno-1_0/output.js b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/deno-1_0/output.js index 38ce452f7629..7145fbed83c1 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/deno-1_0/output.js +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/deno-1_0/output.js @@ -1,7 +1,6 @@ "use strict"; var _selfBrandCheck = /*#__PURE__*/new WeakSet(); - // These syntaxes should be transpiled: // static {} / ??= / #self in / C?.#self // The class declaration and the static private property should not be transpiled diff --git a/packages/babel-preset-env/test/fixtures/preset-options/deno-1_0/output.js b/packages/babel-preset-env/test/fixtures/preset-options/deno-1_0/output.js index 12efe69128d1..7145fbed83c1 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/deno-1_0/output.js +++ b/packages/babel-preset-env/test/fixtures/preset-options/deno-1_0/output.js @@ -1,11 +1,10 @@ "use strict"; var _selfBrandCheck = /*#__PURE__*/new WeakSet(); - // These syntaxes should be transpiled: // static {} / ??= / #self in / C?.#self // The class declaration and the static private property should not be transpiled class C { static #self = (_selfBrandCheck.add(this), C); - static #_ = C.#self ?? (C.#self = _selfBrandCheck.has(C?.#self)); + static #_ = C.#self ?? (C.#self = _selfBrandCheck.has(C === null || C === void 0 ? void 0 : C.#self)); }