diff --git a/Gulpfile.mjs b/Gulpfile.mjs index 71c002a691..83fb2ec10e 100644 --- a/Gulpfile.mjs +++ b/Gulpfile.mjs @@ -465,6 +465,7 @@ const libBundles = [ "packages/babel-preset-typescript", "packages/babel-helper-member-expression-to-functions", "packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining", + "packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression", ].map(src => ({ src, format: "cjs", diff --git a/Makefile b/Makefile index 8a55b1876e..65e39af3a8 100644 --- a/Makefile +++ b/Makefile @@ -186,15 +186,17 @@ prepublish: IS_PUBLISH=true $(MAKE) test new-version-checklist: - # @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - # @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - # @echo "!!!!!! !!!!!!" - # @echo "!!!!!! Write any message that should !!!!!!" - # @echo "!!!!!! block the release here !!!!!!" - # @echo "!!!!!! !!!!!!" - # @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - # @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" - # @exit 1 + @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + @echo "!!!!!! !!!!!!" + @echo "!!!!!! packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/index.ts" + @echo "!!!!!! replace \"api.assertVersion()\" to the latest published version" + @echo "!!!!!! packages/babel-preset-env/src/available-plugins.ts:" + @echo "!!!!!! replace minVersion[\"bugfix/transform-v8-spread-parameters-in-optional-chaining\"] to the latest published version" + @echo "!!!!!! !!!!!!" + @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + @echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" + @exit 1 new-version: $(MAKE) new-version-checklist diff --git a/packages/babel-compat-data/data/overlapping-plugins.json b/packages/babel-compat-data/data/overlapping-plugins.json index 51976d9e2f..6ad09e4324 100644 --- a/packages/babel-compat-data/data/overlapping-plugins.json +++ b/packages/babel-compat-data/data/overlapping-plugins.json @@ -3,7 +3,8 @@ "bugfix/transform-async-arrows-in-class" ], "transform-parameters": [ - "bugfix/transform-edge-default-parameters" + "bugfix/transform-edge-default-parameters", + "bugfix/transform-safari-id-destructuring-collision-in-function-expression" ], "transform-function-name": [ "bugfix/transform-edge-function-name" diff --git a/packages/babel-compat-data/data/plugin-bugfixes.json b/packages/babel-compat-data/data/plugin-bugfixes.json index 6e6d3498df..2f2b4d253c 100644 --- a/packages/babel-compat-data/data/plugin-bugfixes.json +++ b/packages/babel-compat-data/data/plugin-bugfixes.json @@ -101,6 +101,16 @@ "rhino": "1.7.13", "electron": "0.37" }, + "bugfix/transform-safari-id-destructuring-collision-in-function-expression": { + "chrome": "49", + "opera": "36", + "edge": "14", + "firefox": "2", + "node": "6", + "samsung": "5", + "rhino": "1.7.13", + "electron": "0.37" + }, "transform-template-literals": { "chrome": "41", "opera": "28", @@ -135,8 +145,10 @@ "electron": "8.0" }, "bugfix/transform-v8-spread-parameters-in-optional-chaining": { + "chrome": "91", "firefox": "74", "safari": "13.1", - "ios": "13.4" + "ios": "13.4", + "electron": "13.0" } } diff --git a/packages/babel-compat-data/data/plugins.json b/packages/babel-compat-data/data/plugins.json index 13b40a3abf..8ae30cf815 100644 --- a/packages/babel-compat-data/data/plugins.json +++ b/packages/babel-compat-data/data/plugins.json @@ -1,11 +1,13 @@ { "proposal-class-static-block": { - "chrome": "91", - "electron": "13.0" + "chrome": "94", + "firefox": "93" }, "proposal-private-property-in-object": { "chrome": "91", "firefox": "90", + "safari": "15", + "ios": "15", "electron": "13.0" }, "proposal-class-properties": { @@ -15,6 +17,7 @@ "firefox": "90", "safari": "14.1", "node": "12", + "ios": "15", "samsung": "11", "electron": "6.0" }, @@ -25,6 +28,8 @@ "firefox": "90", "safari": "15", "node": "14.6", + "ios": "15", + "samsung": "14", "electron": "10.0" }, "proposal-numeric-separator": { @@ -46,6 +51,7 @@ "safari": "14", "node": "15", "ios": "14", + "samsung": "14", "electron": "10.0" }, "proposal-nullish-coalescing-operator": { @@ -60,9 +66,11 @@ "electron": "8.0" }, "proposal-optional-chaining": { + "chrome": "91", "firefox": "74", "safari": "13.1", - "ios": "13.4" + "ios": "13.4", + "electron": "13.0" }, "proposal-json-strings": { "chrome": "66", @@ -91,9 +99,7 @@ "opera": "36", "edge": "18", "firefox": "53", - "safari": "10", "node": "6", - "ios": "10", "samsung": "5", "electron": "0.37" }, @@ -379,7 +385,7 @@ "chrome": "46", "opera": "33", "edge": "14", - "firefox": "45", + "firefox": "41", "safari": "10", "node": "5", "ios": "10", diff --git a/packages/babel-compat-data/scripts/data/plugin-bugfixes.js b/packages/babel-compat-data/scripts/data/plugin-bugfixes.js index 75af0bc4fc..c6cb32795d 100644 --- a/packages/babel-compat-data/scripts/data/plugin-bugfixes.js +++ b/packages/babel-compat-data/scripts/data/plugin-bugfixes.js @@ -31,6 +31,10 @@ module.exports = { ], replaces: "transform-block-scoping", }, + "bugfix/transform-safari-id-destructuring-collision-in-function-expression": { + features: ["destructuring, parameters / duplicate identifier"], + replaces: "transform-parameters", + }, "bugfix/transform-tagged-template-caching": { features: ["template literals / TemplateStrings permanent caching"], replaces: "transform-template-literals", diff --git a/packages/babel-compat-data/scripts/data/plugin-features.js b/packages/babel-compat-data/scripts/data/plugin-features.js index bc1589fa95..59906cc9a0 100644 --- a/packages/babel-compat-data/scripts/data/plugin-features.js +++ b/packages/babel-compat-data/scripts/data/plugin-features.js @@ -18,6 +18,7 @@ const es2015Parameter = { "rest parameters", "destructuring, parameters / aliased defaults, arrow function", "destructuring, parameters / shorthand defaults, arrow function", + "destructuring, parameters / duplicate identifier", ], }, }; diff --git a/packages/babel-compat-data/scripts/download-compat-table.sh b/packages/babel-compat-data/scripts/download-compat-table.sh index 4d4f59f9f4..c0df85dabf 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=63abfe227f4b9c6ef019efbbf059025b537b8511 +COMPAT_TABLE_COMMIT=34b14f8eb016f8f2f3312adf35c53d6364742582 GIT_HEAD=build/compat-table/.git/HEAD if [ -d "build/compat-table" ]; then diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/.npmignore b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/.npmignore new file mode 100644 index 0000000000..f980694583 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/.npmignore @@ -0,0 +1,3 @@ +src +test +*.log diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/README.md b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/README.md new file mode 100644 index 0000000000..ad942ee5c5 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/README.md @@ -0,0 +1,19 @@ +# @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression + +> Rename destructuring parameter to workaround a [Safari bug](https://bugs.webkit.org/show_bug.cgi?id=220517). + +See our website [@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression](https://babeljs.io/docs/en/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression) for more information. + +## Install + +Using npm: + +```sh +npm install --save-dev @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression +``` + +or using yarn: + +```sh +yarn add @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression --dev +``` diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/package.json b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/package.json new file mode 100644 index 0000000000..be7536c520 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/package.json @@ -0,0 +1,40 @@ +{ + "name": "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression", + "version": "0.0.0", + "description": "Rename destructuring parameter to workaround https://bugs.webkit.org/show_bug.cgi?id=220517", + "repository": { + "type": "git", + "url": "https://github.com/babel/babel.git", + "directory": "packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression" + }, + "homepage": "https://babel.dev/docs/en/next/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "main": "./lib/index.js", + "exports": { + ".": [ + "./lib/index.js" + ] + }, + "keywords": [ + "babel-plugin", + "bugfix" + ], + "dependencies": { + "@babel/helper-plugin-utils": "workspace:^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + }, + "devDependencies": { + "@babel/core": "workspace:*", + "@babel/helper-plugin-test-runner": "workspace:*", + "@babel/traverse": "workspace:*" + }, + "engines": { + "node": ">=6.9.0" + }, + "author": "The Babel Team (https://babel.dev/team)" +} diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/index.ts b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/index.ts new file mode 100644 index 0000000000..5144b666bd --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/index.ts @@ -0,0 +1,25 @@ +import { declare } from "@babel/helper-plugin-utils"; +import type { PluginPass } from "@babel/core"; +import type { Visitor } from "@babel/traverse"; +import { shouldTransform } from "./util"; + +export default declare(api => { + api.assertVersion("^7.15.0"); + + return { + name: "plugin-bugfix-safari-id-destructuring-collision-in-function-expression", + + visitor: { + FunctionExpression(path) { + const name = shouldTransform(path); + if (name) { + // Now we have (function a([a]) {}) + const { scope } = path; + // invariant: path.node.id is always an Identifier here + const newParamName = scope.generateUid(name); + scope.rename(name, newParamName); + } + }, + } as Visitor, + }; +}); diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/util.ts b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/util.ts new file mode 100644 index 0000000000..e884f47fd8 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/util.ts @@ -0,0 +1,41 @@ +import type { FunctionExpression } from "@babel/types"; +import type { NodePath } from "@babel/traverse"; + +/** + * Check whether a function expression can be affected by + * https://bugs.webkit.org/show_bug.cgi?id=220517 + * @param path The function expression NodePath + * @returns the name of function id if it should be transformed, otherwise returns false + */ +export function shouldTransform( + path: NodePath, +): string | false { + const { node } = path; + const functionId = node.id; + if (!functionId) return false; + + const name = functionId.name; + // On collision, `getOwnBinding` returns the param binding + // with the id binding be registered as constant violation + const paramNameBinding = path.scope.getOwnBinding(name); + const constantViolations = paramNameBinding.constantViolations; + if (constantViolations.length === 0) { + // the function scope has no such collided bindings + return false; + } + const firstViolation = constantViolations[0]; + + if (firstViolation.node !== node) { + // the violation does not happen in id + // e.g. (function a() { var a; }) + return false; + } + + if (paramNameBinding.identifier === paramNameBinding.path.node) { + // the param binding is a simple parameter + // e.g. (function a(a) {}) + return false; + } + + return name; +} diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/avoid-collision/input.mjs b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/avoid-collision/input.mjs new file mode 100644 index 0000000000..b3276ae166 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/avoid-collision/input.mjs @@ -0,0 +1 @@ +(function a([a, _a]) { a + _a }) diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/avoid-collision/output.mjs b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/avoid-collision/output.mjs new file mode 100644 index 0000000000..7505883df5 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/avoid-collision/output.mjs @@ -0,0 +1,3 @@ +(function a([_a2, _a]) { + _a2 + _a; +}); diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/basic/input.mjs b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/basic/input.mjs new file mode 100644 index 0000000000..963c7c6231 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/basic/input.mjs @@ -0,0 +1,3 @@ +(function a([a]) { a }); +(function a({ ...a }) { a }); +(function a({ a }) { a }); diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/basic/output.mjs b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/basic/output.mjs new file mode 100644 index 0000000000..645676339d --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/basic/basic/output.mjs @@ -0,0 +1,14 @@ +(function a([_a]) { + _a; +}); + +(function a({ ..._a2 +}) { + _a2; +}); + +(function a({ + a: _a3 +}) { + _a3; +}); diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/options.json b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/options.json new file mode 100644 index 0000000000..b6275ce100 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/fixtures/options.json @@ -0,0 +1,3 @@ +{ + "plugins": ["bugfix-safari-id-destructuring-collision-in-function-expression"] +} diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/index.js b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/index.js new file mode 100644 index 0000000000..21a55ce6b5 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/index.js @@ -0,0 +1,3 @@ +import runner from "@babel/helper-plugin-test-runner"; + +runner(import.meta.url); diff --git a/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/util.test.js b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/util.test.js new file mode 100644 index 0000000000..f6e9282e42 --- /dev/null +++ b/packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/test/util.test.js @@ -0,0 +1,56 @@ +import { parseSync, traverse } from "@babel/core"; +import { shouldTransform } from "../src/util.ts"; + +function getPath(input, parserOpts = {}) { + let targetPath; + traverse( + parseSync(input, { + parserOpts, + filename: "example.js", + configFile: false, + }), + { + FunctionExpression(path) { + targetPath = path; + path.stop(); + }, + }, + ); + return targetPath; +} + +describe("shouldTransform", () => { + const positiveCases = [ + "(function a([a]) {})", + "({ b: function a([a]) {} })", + "(function a({a}) {})", + "(function a(...a) {})", + "(function a({ ...a }) {})", + "(function a([a = 1]) {})", + "(function a(b, { a: [,...a] }) {})", + ]; + + const negativeCases = [ + "(function () {})", + "(function a() {})", + "(function a(a) {})", + "(function a() { var a })", + "(function b([a]) { var a })", + "(function b([a]) { function a() {} })", + "(function a(x = a) {})", + "(function a() { var { a } = {}; })", + "(function b([a]) { var { a } = {}; })", + "(function a({ [a]: b }) {})", + ]; + + describe("the following cases should be transformed", () => { + test.each(positiveCases)("%p", input => { + expect(shouldTransform(getPath(input))).toBe("a"); + }); + }); + describe("the following cases should not be transformed", () => { + test.each(negativeCases)("%p", input => { + expect(shouldTransform(getPath(input))).toBe(false); + }); + }); +}); diff --git a/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/test/util.test.js b/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/test/util.test.js index c6937fcc79..89bc17afb5 100644 --- a/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/test/util.test.js +++ b/packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/test/util.test.js @@ -5,15 +5,7 @@ function getPath(input, parserOpts = {}) { let targetPath; traverse( parseSync(input, { - parserOpts: { - plugins: [ - "classPrivateMethods", - "classPrivateProperties", - "classProperties", - ...(parserOpts.plugins || []), - ], - ...parserOpts, - }, + parserOpts, filename: "example.js", configFile: false, }), diff --git a/packages/babel-plugin-transform-react-constant-elements/test/fixtures/integration/issue-7610/output.js b/packages/babel-plugin-transform-react-constant-elements/test/fixtures/integration/issue-7610/output.js index 7b302c8c33..f88cec0562 100644 --- a/packages/babel-plugin-transform-react-constant-elements/test/fixtures/integration/issue-7610/output.js +++ b/packages/babel-plugin-transform-react-constant-elements/test/fixtures/integration/issue-7610/output.js @@ -11,11 +11,12 @@ var _Child2 = babelHelpers.interopRequireDefault(require("./Child")); var _jsxRuntime = require("react/jsx-runtime"); -function MyComponent({ - closeFn -}) { +function MyComponent(_ref) { var _Child; + let { + closeFn + } = _ref; return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Parent.default, { render: () => _Child || (_Child = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Child2.default, { closeFn: closeFn diff --git a/packages/babel-preset-env/package.json b/packages/babel-preset-env/package.json index 2643d6eef3..629b6a23fc 100644 --- a/packages/babel-preset-env/package.json +++ b/packages/babel-preset-env/package.json @@ -20,6 +20,7 @@ "@babel/helper-compilation-targets": "workspace:^7.15.4", "@babel/helper-plugin-utils": "workspace:^7.14.5", "@babel/helper-validator-option": "workspace:^7.14.5", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "workspace:^0.0.0", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "workspace:^7.15.4", "@babel/plugin-proposal-async-generator-functions": "workspace:^7.15.8", "@babel/plugin-proposal-class-properties": "workspace:^7.14.5", diff --git a/packages/babel-preset-env/src/available-plugins.ts b/packages/babel-preset-env/src/available-plugins.ts index 6fca43d542..256467fb97 100644 --- a/packages/babel-preset-env/src/available-plugins.ts +++ b/packages/babel-preset-env/src/available-plugins.ts @@ -68,6 +68,7 @@ import bugfixEdgeFunctionName from "@babel/preset-modules/lib/plugins/transform- import bugfixTaggedTemplateCaching from "@babel/preset-modules/lib/plugins/transform-tagged-template-caching"; import bugfixSafariBlockShadowing from "@babel/preset-modules/lib/plugins/transform-safari-block-shadowing"; import bugfixSafariForShadowing from "@babel/preset-modules/lib/plugins/transform-safari-for-shadowing"; +import bugfixSafariIdDestructuringCollisionInFunctionExpression from "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression"; import bugfixV8SpreadParametersInOptionalChaining from "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining"; export default { @@ -76,6 +77,8 @@ export default { "bugfix/transform-edge-function-name": () => bugfixEdgeFunctionName, "bugfix/transform-safari-block-shadowing": () => bugfixSafariBlockShadowing, "bugfix/transform-safari-for-shadowing": () => bugfixSafariForShadowing, + "bugfix/transform-safari-id-destructuring-collision-in-function-expression": + () => bugfixSafariIdDestructuringCollisionInFunctionExpression, "bugfix/transform-tagged-template-caching": () => bugfixTaggedTemplateCaching, "bugfix/transform-v8-spread-parameters-in-optional-chaining": () => bugfixV8SpreadParametersInOptionalChaining, @@ -147,6 +150,7 @@ export default { }; export const minVersions = { + "bugfix/transform-v8-spread-parameters-in-optional-chaining": "7.15.0", "proposal-class-static-block": "7.12.0", "proposal-private-property-in-object": "7.10.0", }; diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules-no-bugfixes/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules-no-bugfixes/stdout.txt index f240d21088..3ba12d8234 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules-no-bugfixes/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules-no-bugfixes/stdout.txt @@ -16,16 +16,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, node, opera, safari, samsung } - proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } - proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, node, opera, safari < 15, samsung } + proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } + proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 } - proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung } + proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung < 14 } proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 } - proposal-optional-chaining { android, chrome, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } + proposal-optional-chaining { android, chrome < 91, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } proposal-json-strings { android, chrome < 66, edge < 79, firefox < 62, ios < 12, opera < 53, safari < 12, samsung < 9 } proposal-optional-catch-binding { android, chrome < 66, edge < 79, ios < 11.3, opera < 53, safari < 11.1, samsung < 9 } - transform-parameters { edge < 18 } + transform-parameters { edge < 18, ios, safari } proposal-async-generator-functions { android, chrome < 63, edge < 79, ios < 12, opera < 50, safari < 12 } proposal-object-rest-spread { edge < 79, ios < 11.3, safari < 11.1 } transform-dotall-regex { android, chrome < 62, edge < 79, firefox < 78, ios < 11.3, opera < 49, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules/stdout.txt index d8d6d4660d..b672cb3083 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/_esmodules/stdout.txt @@ -16,11 +16,11 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, node, opera, safari, samsung } - proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } - proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, node, opera, safari < 15, samsung } + proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } + proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 } - proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung } + proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung < 14 } proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 } proposal-optional-chaining { android, chrome < 80, edge < 80, firefox < 74, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 } proposal-json-strings { android, chrome < 66, edge < 79, firefox < 62, ios < 12, opera < 53, safari < 12, samsung < 9 } @@ -37,6 +37,7 @@ Using plugins: bugfix/transform-edge-function-name { edge < 79 } bugfix/transform-safari-block-shadowing { ios < 11, safari < 11 } bugfix/transform-safari-for-shadowing { ios < 11, safari < 11 } + bugfix/transform-safari-id-destructuring-collision-in-function-expression { ios, safari } bugfix/transform-tagged-template-caching { ios < 13, safari < 13 } transform-modules-commonjs proposal-dynamic-import diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10-no-bugfixes/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10-no-bugfixes/stdout.txt index bf329043f4..0307904b78 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10-no-bugfixes/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10-no-bugfixes/stdout.txt @@ -8,7 +8,7 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { safari } + proposal-private-property-in-object { safari < 15 } proposal-class-properties { safari < 15 } proposal-private-methods { safari < 15 } proposal-numeric-separator { safari < 13 } @@ -17,6 +17,7 @@ Using plugins: proposal-optional-chaining { safari < 13.1 } proposal-json-strings { safari < 12 } proposal-optional-catch-binding { safari < 11.1 } + transform-parameters { safari } proposal-async-generator-functions { safari < 12 } proposal-object-rest-spread { safari < 11.1 } transform-dotall-regex { safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10/stdout.txt index e3e5063a2d..96df0ef155 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-10/stdout.txt @@ -8,7 +8,7 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { safari } + proposal-private-property-in-object { safari < 15 } proposal-class-properties { safari < 15 } proposal-private-methods { safari < 15 } proposal-numeric-separator { safari < 13 } @@ -28,6 +28,7 @@ Using plugins: proposal-export-namespace-from { safari } bugfix/transform-safari-block-shadowing { safari < 11 } bugfix/transform-safari-for-shadowing { safari < 11 } + bugfix/transform-safari-id-destructuring-collision-in-function-expression { safari } bugfix/transform-tagged-template-caching { safari < 13 } transform-modules-commonjs proposal-dynamic-import diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-11/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-11/stdout.txt index 4bb3bdd946..03b6ace0cd 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-11/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-11/stdout.txt @@ -8,7 +8,7 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { safari } + proposal-private-property-in-object { safari < 15 } proposal-class-properties { safari < 15 } proposal-private-methods { safari < 15 } proposal-numeric-separator { safari < 13 } @@ -24,6 +24,7 @@ Using plugins: transform-named-capturing-groups-regex { safari < 11.1 } transform-unicode-regex { safari < 12 } proposal-export-namespace-from { safari } + bugfix/transform-safari-id-destructuring-collision-in-function-expression { safari } bugfix/transform-tagged-template-caching { safari < 13 } transform-modules-commonjs proposal-dynamic-import diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-9/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-9/stdout.txt index 74e4690906..d4b5d0f25e 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-9/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-block-scoping-safari-9/stdout.txt @@ -8,7 +8,7 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { safari } + proposal-private-property-in-object { safari < 15 } proposal-class-properties { safari < 15 } proposal-private-methods { safari < 15 } proposal-numeric-separator { safari < 13 } diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/input.js b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/input.js new file mode 100644 index 0000000000..6dcde952f9 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/input.js @@ -0,0 +1,5 @@ +(function a(a) {}); + +(function a([a]) {}); + +(function a({a}) {}); diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/options.json b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/options.json new file mode 100644 index 0000000000..c9a4cd0f3f --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/options.json @@ -0,0 +1,15 @@ +{ + "validateLogs": true, + "presets": [ + [ + "env", + { + "debug": true, + "bugfixes": true, + "targets": { + "safari": "15" + } + } + ] + ] +} diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/output.js b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/output.js new file mode 100644 index 0000000000..a0edffd54d --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/output.js @@ -0,0 +1,7 @@ +(function a(a) {}); + +(function a([_a]) {}); + +(function a({ + a: _a2 +}) {}); diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/stdout.txt new file mode 100644 index 0000000000..e66854d27d --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15-no-bugfixes/stdout.txt @@ -0,0 +1,25 @@ +@babel/preset-env: `DEBUG` option + +Using targets: +{ + "safari": "15" +} + +Using modules transform: auto + +Using plugins: + syntax-private-property-in-object + syntax-class-properties + syntax-numeric-separator + syntax-nullish-coalescing-operator + syntax-optional-chaining + syntax-json-strings + syntax-optional-catch-binding + syntax-async-generators + syntax-object-rest-spread + proposal-export-namespace-from { safari } + bugfix/transform-safari-id-destructuring-collision-in-function-expression { safari } + transform-modules-commonjs + proposal-dynamic-import + +Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/input.js b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/input.js new file mode 100644 index 0000000000..6dcde952f9 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/input.js @@ -0,0 +1,5 @@ +(function a(a) {}); + +(function a([a]) {}); + +(function a({a}) {}); diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/options.json b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/options.json new file mode 100644 index 0000000000..280d26a578 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/options.json @@ -0,0 +1,15 @@ +{ + "validateLogs": true, + "presets": [ + [ + "env", + { + "debug": true, + "bugfixes": false, + "targets": { + "safari": "15" + } + } + ] + ] +} diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/output.js b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/output.js new file mode 100644 index 0000000000..61c32ad759 --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/output.js @@ -0,0 +1,11 @@ +(function a(a) {}); + +(function a(_ref) { + let [a] = _ref; +}); + +(function a(_ref2) { + let { + a + } = _ref2; +}); diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/stdout.txt new file mode 100644 index 0000000000..8e2f77f81d --- /dev/null +++ b/packages/babel-preset-env/test/fixtures/bugfixes/safari-id-destructuring-collision-in-function-expression-safari-15/stdout.txt @@ -0,0 +1,25 @@ +@babel/preset-env: `DEBUG` option + +Using targets: +{ + "safari": "15" +} + +Using modules transform: auto + +Using plugins: + syntax-private-property-in-object + syntax-class-properties + syntax-numeric-separator + syntax-nullish-coalescing-operator + syntax-optional-chaining + syntax-json-strings + syntax-optional-catch-binding + transform-parameters { safari } + syntax-async-generators + syntax-object-rest-spread + proposal-export-namespace-from { safari } + transform-modules-commonjs + proposal-dynamic-import + +Using polyfills: No polyfills were added, since the `useBuiltIns` option was not set. diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89-no-bugfixes/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89-no-bugfixes/stdout.txt index 3734c2a754..32d117b89c 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89-no-bugfixes/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89-no-bugfixes/stdout.txt @@ -12,7 +12,7 @@ Using plugins: syntax-class-properties syntax-numeric-separator syntax-nullish-coalescing-operator - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89/stdout.txt b/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89/stdout.txt index 2d6a46f441..6dbd96da14 100644 --- a/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/bugfixes/v8-spread-parameters-in-optional-chaining-chrome-89/stdout.txt @@ -17,7 +17,7 @@ Using plugins: syntax-optional-catch-binding syntax-async-generators syntax-object-rest-spread - bugfix/transform-v8-spread-parameters-in-optional-chaining { chrome } + bugfix/transform-v8-spread-parameters-in-optional-chaining { chrome < 91 } transform-modules-commonjs proposal-dynamic-import proposal-export-namespace-from { } diff --git a/packages/babel-preset-env/test/fixtures/corejs2-babel-7/usage-browserslist-config-ignore/stdout.txt b/packages/babel-preset-env/test/fixtures/corejs2-babel-7/usage-browserslist-config-ignore/stdout.txt index 1b2f4b34ee..8dc078d17b 100644 --- a/packages/babel-preset-env/test/fixtures/corejs2-babel-7/usage-browserslist-config-ignore/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/corejs2-babel-7/usage-browserslist-config-ignore/stdout.txt @@ -16,16 +16,16 @@ Using targets: Using modules transform: false Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, node, opera, safari, samsung } - proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } - proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, node, opera, safari < 15, samsung } + proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } + proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 } - proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung } + proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung < 14 } proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 } - proposal-optional-chaining { android, chrome, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } + proposal-optional-chaining { android, chrome < 91, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } proposal-json-strings { android, chrome < 66, edge < 79, firefox < 62, ios < 12, opera < 53, safari < 12, samsung < 9 } proposal-optional-catch-binding { android, chrome < 66, edge < 79, ios < 11.3, opera < 53, safari < 11.1, samsung < 9 } - transform-parameters { edge < 18 } + transform-parameters { edge < 18, ios, safari } proposal-async-generator-functions { android, chrome < 63, edge < 79, ios < 12, opera < 50, safari < 12 } proposal-object-rest-spread { edge < 79, ios < 11.3, safari < 11.1 } transform-dotall-regex { android, chrome < 62, edge < 79, firefox < 78, ios < 11.3, opera < 49, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/corejs2/usage-browserslist-config-ignore/stdout.txt b/packages/babel-preset-env/test/fixtures/corejs2/usage-browserslist-config-ignore/stdout.txt index 7e92440c4d..cefcc60810 100644 --- a/packages/babel-preset-env/test/fixtures/corejs2/usage-browserslist-config-ignore/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/corejs2/usage-browserslist-config-ignore/stdout.txt @@ -16,16 +16,16 @@ Using targets: Using modules transform: false Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, node, opera, safari, samsung } - proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } - proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, node, opera, safari < 15, samsung } + proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } + proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 } - proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung } + proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung < 14 } proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 } - proposal-optional-chaining { android, chrome, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } + proposal-optional-chaining { android, chrome < 91, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } proposal-json-strings { android, chrome < 66, edge < 79, firefox < 62, ios < 12, opera < 53, safari < 12, samsung < 9 } proposal-optional-catch-binding { android, chrome < 66, edge < 79, ios < 11.3, opera < 53, safari < 11.1, samsung < 9 } - transform-parameters { edge < 18 } + transform-parameters { edge < 18, ios, safari } proposal-async-generator-functions { android, chrome < 63, edge < 79, ios < 12, opera < 50, safari < 12 } proposal-object-rest-spread { edge < 79, ios < 11.3, safari < 11.1 } transform-dotall-regex { android, chrome < 62, edge < 79, firefox < 78, ios < 11.3, opera < 49, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/corejs2/usage-destructuring-params/output.mjs b/packages/babel-preset-env/test/fixtures/corejs2/usage-destructuring-params/output.mjs index 364413b753..01bfd8cde3 100644 --- a/packages/babel-preset-env/test/fixtures/corejs2/usage-destructuring-params/output.mjs +++ b/packages/babel-preset-env/test/fixtures/corejs2/usage-destructuring-params/output.mjs @@ -1,3 +1,5 @@ import "core-js/modules/web.dom.iterable.js"; -function a([b, c]) {} +function a(_ref) { + let [b, c] = _ref; +} diff --git a/packages/babel-preset-env/test/fixtures/corejs3-babel-7/usage-browserslist-config-ignore/stdout.txt b/packages/babel-preset-env/test/fixtures/corejs3-babel-7/usage-browserslist-config-ignore/stdout.txt index bb3f88aca4..27cb2e34d2 100644 --- a/packages/babel-preset-env/test/fixtures/corejs3-babel-7/usage-browserslist-config-ignore/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/corejs3-babel-7/usage-browserslist-config-ignore/stdout.txt @@ -16,16 +16,16 @@ Using targets: Using modules transform: false Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, node, opera, safari, samsung } - proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } - proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, node, opera, safari < 15, samsung } + proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } + proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 } - proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung } + proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung < 14 } proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 } - proposal-optional-chaining { android, chrome, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } + proposal-optional-chaining { android, chrome < 91, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } proposal-json-strings { android, chrome < 66, edge < 79, firefox < 62, ios < 12, opera < 53, safari < 12, samsung < 9 } proposal-optional-catch-binding { android, chrome < 66, edge < 79, ios < 11.3, opera < 53, safari < 11.1, samsung < 9 } - transform-parameters { edge < 18 } + transform-parameters { edge < 18, ios, safari } proposal-async-generator-functions { android, chrome < 63, edge < 79, ios < 12, opera < 50, safari < 12 } proposal-object-rest-spread { edge < 79, ios < 11.3, safari < 11.1 } transform-dotall-regex { android, chrome < 62, edge < 79, firefox < 78, ios < 11.3, opera < 49, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/corejs3/usage-browserslist-config-ignore/stdout.txt b/packages/babel-preset-env/test/fixtures/corejs3/usage-browserslist-config-ignore/stdout.txt index a3836496c0..f9f2715652 100644 --- a/packages/babel-preset-env/test/fixtures/corejs3/usage-browserslist-config-ignore/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/corejs3/usage-browserslist-config-ignore/stdout.txt @@ -16,16 +16,16 @@ Using targets: Using modules transform: false Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, node, opera, safari, samsung } - proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } - proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios, node < 14.6, opera < 70, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, node, opera, safari < 15, samsung } + proposal-class-properties { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } + proposal-private-methods { android, chrome < 84, edge < 84, firefox < 90, ios < 15, node < 14.6, opera < 70, safari < 15, samsung < 14 } proposal-numeric-separator { android, chrome < 75, edge < 79, firefox < 70, ios < 13, opera < 62, safari < 13, samsung < 11 } - proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung } + proposal-logical-assignment-operators { android, chrome < 85, edge < 85, firefox < 79, ios < 14, node < 15, opera < 71, safari < 14, samsung < 14 } proposal-nullish-coalescing-operator { android, chrome < 80, edge < 80, firefox < 72, ios < 13.4, node < 14, opera < 67, safari < 13.1, samsung < 13 } - proposal-optional-chaining { android, chrome, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } + proposal-optional-chaining { android, chrome < 91, edge, firefox < 74, ios < 13.4, node, opera, safari < 13.1, samsung } proposal-json-strings { android, chrome < 66, edge < 79, firefox < 62, ios < 12, opera < 53, safari < 12, samsung < 9 } proposal-optional-catch-binding { android, chrome < 66, edge < 79, ios < 11.3, opera < 53, safari < 11.1, samsung < 9 } - transform-parameters { edge < 18 } + transform-parameters { edge < 18, ios, safari } proposal-async-generator-functions { android, chrome < 63, edge < 79, ios < 12, opera < 50, safari < 12 } proposal-object-rest-spread { edge < 79, ios < 11.3, safari < 11.1 } transform-dotall-regex { android, chrome < 62, edge < 79, firefox < 78, ios < 11.3, opera < 49, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/corejs3/usage-destructuring-params/output.mjs b/packages/babel-preset-env/test/fixtures/corejs3/usage-destructuring-params/output.mjs index 0b8c72fe4c..bb6e54e46a 100644 --- a/packages/babel-preset-env/test/fixtures/corejs3/usage-destructuring-params/output.mjs +++ b/packages/babel-preset-env/test/fixtures/corejs3/usage-destructuring-params/output.mjs @@ -1 +1,3 @@ -function a([b, c]) {} +function a(_ref) { + let [b, c] = _ref; +} diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults-not-ie/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults-not-ie/stdout.txt index deef05de54..7b8fd41699 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults-not-ie/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults-not-ie/stdout.txt @@ -15,15 +15,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, opera, safari, samsung } - proposal-class-properties { firefox < 90, ios, safari < 15, samsung } - proposal-private-methods { firefox < 90, ios, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, opera, safari < 15, samsung } + proposal-class-properties { firefox < 90, ios < 15, safari < 15, samsung < 14 } + proposal-private-methods { firefox < 90, ios < 15, safari < 15, samsung < 14 } syntax-numeric-separator - proposal-logical-assignment-operators { firefox < 79, ios < 14, samsung } + proposal-logical-assignment-operators { firefox < 79, ios < 14, samsung < 14 } syntax-nullish-coalescing-operator - proposal-optional-chaining { android, chrome, edge, opera, samsung } + proposal-optional-chaining { android, chrome < 91, edge, opera, samsung } syntax-json-strings syntax-optional-catch-binding + transform-parameters { ios, safari } syntax-async-generators syntax-object-rest-spread proposal-export-namespace-from { firefox < 80, ios, safari } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults/stdout.txt index 4b34245faa..e2c6f00a28 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-defaults/stdout.txt @@ -16,16 +16,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ie, ios, opera, safari, samsung } - proposal-class-properties { firefox < 90, ie, ios, safari < 15, samsung } - proposal-private-methods { firefox < 90, ie, ios, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ie, ios < 15, opera, safari < 15, samsung } + proposal-class-properties { firefox < 90, ie, ios < 15, safari < 15, samsung < 14 } + proposal-private-methods { firefox < 90, ie, ios < 15, safari < 15, samsung < 14 } proposal-numeric-separator { ie } - proposal-logical-assignment-operators { firefox < 79, ie, ios < 14, samsung } + proposal-logical-assignment-operators { firefox < 79, ie, ios < 14, samsung < 14 } proposal-nullish-coalescing-operator { ie } - proposal-optional-chaining { android, chrome, edge, ie, opera, samsung } + proposal-optional-chaining { android, chrome < 91, edge, ie, opera, samsung } proposal-json-strings { ie } proposal-optional-catch-binding { ie } - transform-parameters { ie } + transform-parameters { ie, ios, safari } proposal-async-generator-functions { ie } proposal-object-rest-spread { ie } transform-dotall-regex { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-last-2-versions-not-ie/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-last-2-versions-not-ie/stdout.txt index c02e47e238..a7b495ce46 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-last-2-versions-not-ie/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/browserslists-last-2-versions-not-ie/stdout.txt @@ -15,15 +15,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, opera, safari, samsung } - proposal-class-properties { firefox < 90, ios, safari < 15, samsung } - proposal-private-methods { firefox < 90, ios, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, opera, safari < 15, samsung } + proposal-class-properties { firefox < 90, ios < 15, safari < 15, samsung < 14 } + proposal-private-methods { firefox < 90, ios < 15, safari < 15, samsung < 14 } syntax-numeric-separator - proposal-logical-assignment-operators { samsung } + proposal-logical-assignment-operators { samsung < 14 } syntax-nullish-coalescing-operator - proposal-optional-chaining { android, chrome, edge, opera, samsung } + proposal-optional-chaining { android, chrome < 91, edge, opera, samsung } syntax-json-strings syntax-optional-catch-binding + transform-parameters { ios, safari } syntax-async-generators syntax-object-rest-spread proposal-export-namespace-from { ios, safari } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-electron/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-electron/stdout.txt index effdad8279..7a7b530f8e 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-electron/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-electron/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { electron < 6.0 } proposal-logical-assignment-operators { electron < 10.0 } proposal-nullish-coalescing-operator { electron < 8.0 } - proposal-optional-chaining { electron } + proposal-optional-chaining { electron < 13.0 } proposal-json-strings { electron < 3.0 } proposal-optional-catch-binding { electron < 3.0 } transform-parameters { electron < 0.37 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-force-all-transforms/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-force-all-transforms/stdout.txt index 0617fd20f3..2c6ac562ec 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-force-all-transforms/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-force-all-transforms/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } transform-parameters { } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-proposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-proposals-chrome-71/stdout.txt index de6e5dc4a0..c324fd05ef 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-proposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-proposals-chrome-71/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-shippedProposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-shippedProposals-chrome-71/stdout.txt index 4af2511633..ec36759cc3 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-shippedProposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-shippedProposals-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-specific-targets/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-specific-targets/stdout.txt index d6927aac80..925c1df68e 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-specific-targets/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-specific-targets/stdout.txt @@ -13,16 +13,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios, safari } - proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } - proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } + proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios < 15, safari < 15 } + proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } + proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } proposal-numeric-separator { chrome < 75, edge < 79, firefox < 70, ie, ios < 13, safari < 13 } proposal-logical-assignment-operators { chrome < 85, edge < 85, firefox < 79, ie, ios < 14, safari < 14 } proposal-nullish-coalescing-operator { chrome < 80, edge < 80, firefox < 72, ie, ios < 13.4, safari < 13.1 } - proposal-optional-chaining { chrome, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } + proposal-optional-chaining { chrome < 91, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } proposal-json-strings { chrome < 66, edge < 79, firefox < 62, ie, ios < 12, safari < 12 } proposal-optional-catch-binding { chrome < 66, edge < 79, firefox < 58, ie, ios < 11.3, safari < 11.1 } - transform-parameters { edge < 18, firefox < 53, ie, ios < 10, safari < 10 } + transform-parameters { edge < 18, firefox < 53, ie, ios, safari } proposal-async-generator-functions { chrome < 63, edge < 79, firefox < 57, ie, ios < 12, safari < 12 } proposal-object-rest-spread { chrome < 60, edge < 79, firefox < 55, ie, ios < 11.3, safari < 11.1 } transform-dotall-regex { chrome < 62, edge < 79, firefox < 78, ie, ios < 11.3, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-decimals/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-decimals/stdout.txt index 825ca2bcf0..2227709fd2 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-decimals/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-decimals/stdout.txt @@ -17,7 +17,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, electron < 6.0, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, electron < 10.0, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, electron < 8.0, ie, node < 14 } - proposal-optional-chaining { chrome, electron, ie, node } + proposal-optional-chaining { chrome < 91, electron < 13.0, ie, node } proposal-json-strings { chrome < 66, electron < 3.0, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, electron < 3.0, ie, node < 10 } transform-parameters { electron < 0.37, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-strings/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-strings/stdout.txt index c14497cc5d..e2b94a9f1c 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-strings/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2-versions-strings/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2/stdout.txt index 0e6a7c94fa..fca48964fa 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-all-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-all-chrome-71/stdout.txt index 4b419c3c6a..c4b7b5ac4d 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-all-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-all-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-electron/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-electron/stdout.txt index ef51d886f4..d3809faea8 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-electron/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-electron/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { electron < 6.0 } proposal-logical-assignment-operators { electron < 10.0 } proposal-nullish-coalescing-operator { electron < 8.0 } - proposal-optional-chaining { electron } + proposal-optional-chaining { electron < 13.0 } proposal-json-strings { electron < 3.0 } proposal-optional-catch-binding { electron < 3.0 } transform-parameters { electron < 0.37 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-chrome-71/stdout.txt index 6fcd4c6065..cb4a642b04 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-proposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-proposals-chrome-71/stdout.txt index 460748f361..96883f5e14 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-proposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-es-proposals-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-force-all-transforms/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-force-all-transforms/stdout.txt index 5de416264c..e415649919 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-force-all-transforms/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-force-all-transforms/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } transform-parameters { } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-proposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-proposals-chrome-71/stdout.txt index cb7cdc0d93..59d6214f2a 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-proposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-proposals-chrome-71/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only-chrome-71/stdout.txt index 12c006098f..c2f1720875 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only/stdout.txt index bcaf2b9968..2f271167ae 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-runtime-only/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-entries-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-entries-chrome-71/stdout.txt index b808eb47fd..c2fae26a8f 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-entries-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-entries-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-targets/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-targets/stdout.txt index 61717b6af3..5d725fdf63 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-targets/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-specific-targets/stdout.txt @@ -13,16 +13,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios, safari } - proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } - proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } + proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios < 15, safari < 15 } + proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } + proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } proposal-numeric-separator { chrome < 75, edge < 79, firefox < 70, ie, ios < 13, safari < 13 } proposal-logical-assignment-operators { chrome < 85, edge < 85, firefox < 79, ie, ios < 14, safari < 14 } proposal-nullish-coalescing-operator { chrome < 80, edge < 80, firefox < 72, ie, ios < 13.4, safari < 13.1 } - proposal-optional-chaining { chrome, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } + proposal-optional-chaining { chrome < 91, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } proposal-json-strings { chrome < 66, edge < 79, firefox < 62, ie, ios < 12, safari < 12 } proposal-optional-catch-binding { chrome < 66, edge < 79, firefox < 58, ie, ios < 11.3, safari < 11.1 } - transform-parameters { edge < 18, firefox < 53, ie, ios < 10, safari < 10 } + transform-parameters { edge < 18, firefox < 53, ie, ios, safari } proposal-async-generator-functions { chrome < 63, edge < 79, firefox < 57, ie, ios < 12, safari < 12 } proposal-object-rest-spread { chrome < 60, edge < 79, firefox < 55, ie, ios < 11.3, safari < 11.1 } transform-dotall-regex { chrome < 62, edge < 79, firefox < 78, ie, ios < 11.3, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-chrome-71/stdout.txt index e19daed812..32071ac4ed 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-samsung-8.2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-samsung-8.2/stdout.txt index 144a910634..c95ea37409 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-samsung-8.2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stable-samsung-8.2/stdout.txt @@ -10,10 +10,10 @@ Using modules transform: auto Using plugins: proposal-class-static-block { samsung } proposal-private-property-in-object { samsung } - proposal-class-properties { samsung } - proposal-private-methods { samsung } + proposal-class-properties { samsung < 14 } + proposal-private-methods { samsung < 14 } proposal-numeric-separator { samsung < 11 } - proposal-logical-assignment-operators { samsung } + proposal-logical-assignment-operators { samsung < 14 } proposal-nullish-coalescing-operator { samsung < 13 } proposal-optional-chaining { samsung } proposal-json-strings { samsung < 9 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stage-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stage-chrome-71/stdout.txt index 31bd6fb4df..5ba7835ef1 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stage-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-stage-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-decimals/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-decimals/stdout.txt index d1a014a75b..257ec45621 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-decimals/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-decimals/stdout.txt @@ -17,7 +17,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, electron < 6.0, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, electron < 10.0, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, electron < 8.0, ie, node < 14 } - proposal-optional-chaining { chrome, electron, ie, node } + proposal-optional-chaining { chrome < 91, electron < 13.0, ie, node } proposal-json-strings { chrome < 66, electron < 3.0, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, electron < 3.0, ie, node < 10 } transform-parameters { electron < 0.37, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.0/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.0/stdout.txt index 5fd6f2fe1d..05cf188a14 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.0/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.0/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.1/stdout.txt index d3b9955808..594f01eb0d 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings-minor-3.1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings/stdout.txt index 0936a57113..a6e8406521 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-versions-strings/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-web-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-web-chrome-71/stdout.txt index 72085bb032..94c1ee9791 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-web-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3-web-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3/stdout.txt index de4f14c5a4..b80eb59a79 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-corejs3/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs-uglify/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs-uglify/stdout.txt index 47fd298711..c22df8bf87 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs-uglify/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs-uglify/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } transform-parameters { } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs/stdout.txt index 0adbf8a7a8..5c598d37ac 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/entry-no-corejs/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-80/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-80/stdout.txt index 9c8b3e4a45..f6e88bd291 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-80/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-80/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } syntax-numeric-separator proposal-logical-assignment-operators { chrome < 85 } syntax-nullish-coalescing-operator - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-84/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-84/stdout.txt index d5ac3a7cb1..803a17ff62 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-84/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/shippedProposals-chrome-84/stdout.txt @@ -8,13 +8,13 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } syntax-class-properties syntax-numeric-separator proposal-logical-assignment-operators { chrome < 85 } syntax-nullish-coalescing-operator - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets-shadowed/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets-shadowed/stdout.txt index 8697044625..e447acf448 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets-shadowed/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets-shadowed/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } proposal-async-generator-functions { chrome < 63 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets/stdout.txt index d36f4b77ee..dc3c6ac88a 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/top-level-targets/stdout.txt @@ -14,7 +14,7 @@ Using plugins: syntax-numeric-separator proposal-logical-assignment-operators { chrome < 85 } syntax-nullish-coalescing-operator - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-1/stdout.txt index b8d1485e6c..e87a6839c1 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-2/stdout.txt index 17a03370cb..80eb250f83 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-1/stdout.txt index 4b93ffc911..4c71bd8337 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-2/stdout.txt index 3c7908bd75..c5fd15cd15 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-1/stdout.txt index 9f36507b03..0d26ebc02f 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-2/stdout.txt index 3704aa6788..93ef88eed5 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-none-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-1/stdout.txt index d3c4e030d1..5c31c318be 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-2/stdout.txt index 13aec3a28e..2d05ab3497 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-1/stdout.txt index c66ae9946d..eae7581a16 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-2/stdout.txt index 7e25a2dbd2..d855c995e1 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-proposals-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-1/stdout.txt index 88ac0f6729..384e806c6f 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-1/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-2/stdout.txt index 675411d5fe..12fd8d9eb3 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-shippedProposals-2/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-with-import/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-with-import/stdout.txt index 2525f79c48..f412c6a8b4 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-with-import/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs2-with-import/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } proposal-async-generator-functions { chrome < 63 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-1/stdout.txt index c8375ed877..f0bc78bded 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-2/stdout.txt index 50cb65436a..5412577f16 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-1/stdout.txt index 87d13e3933..495aa529e7 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-2/stdout.txt index 03f4424675..e75a8b0c85 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-1/stdout.txt index 7a109f19f9..2d2d78794e 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-2/stdout.txt index 7229636e5f..40cf46fba0 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-none-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-1/stdout.txt index ca849297be..225beded64 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-2/stdout.txt index 4c207e9d39..ea8e369bba 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-1/stdout.txt index ee7bec8cd8..2fc4976309 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-2/stdout.txt index 0c2414d35e..ef68e2af91 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-proposals-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-1/stdout.txt index 5cbaafbea4..2e1aacb851 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-1/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-2/stdout.txt index 93cffb8196..5757cf85ee 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-shippedProposals-2/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt index 83f041df2f..793bd1d002 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt index 527e88cb8b..f78778eb92 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt index 1ddaf5f71c..1e47a5bb87 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt index 4a42d3de55..6677f821a8 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-with-import/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-with-import/stdout.txt index e2d164f43c..1960f1fe61 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-with-import/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-corejs3-with-import/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } proposal-async-generator-functions { chrome < 63 } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-1/stdout.txt index 760ddcb846..11fb6610c3 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-2/stdout.txt index 43312d0681..19bf529216 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-1/stdout.txt index e0febec73d..4324613c7d 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-2/stdout.txt index cdf048f9b7..26eaa12be7 100644 --- a/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug-babel-7/usage-no-corejs-none-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie/stdout.txt index deef05de54..7b8fd41699 100644 --- a/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie/stdout.txt @@ -15,15 +15,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, opera, safari, samsung } - proposal-class-properties { firefox < 90, ios, safari < 15, samsung } - proposal-private-methods { firefox < 90, ios, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, opera, safari < 15, samsung } + proposal-class-properties { firefox < 90, ios < 15, safari < 15, samsung < 14 } + proposal-private-methods { firefox < 90, ios < 15, safari < 15, samsung < 14 } syntax-numeric-separator - proposal-logical-assignment-operators { firefox < 79, ios < 14, samsung } + proposal-logical-assignment-operators { firefox < 79, ios < 14, samsung < 14 } syntax-nullish-coalescing-operator - proposal-optional-chaining { android, chrome, edge, opera, samsung } + proposal-optional-chaining { android, chrome < 91, edge, opera, samsung } syntax-json-strings syntax-optional-catch-binding + transform-parameters { ios, safari } syntax-async-generators syntax-object-rest-spread proposal-export-namespace-from { firefox < 80, ios, safari } diff --git a/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults/stdout.txt index 4b34245faa..e2c6f00a28 100644 --- a/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/browserslists-defaults/stdout.txt @@ -16,16 +16,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ie, ios, opera, safari, samsung } - proposal-class-properties { firefox < 90, ie, ios, safari < 15, samsung } - proposal-private-methods { firefox < 90, ie, ios, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ie, ios < 15, opera, safari < 15, samsung } + proposal-class-properties { firefox < 90, ie, ios < 15, safari < 15, samsung < 14 } + proposal-private-methods { firefox < 90, ie, ios < 15, safari < 15, samsung < 14 } proposal-numeric-separator { ie } - proposal-logical-assignment-operators { firefox < 79, ie, ios < 14, samsung } + proposal-logical-assignment-operators { firefox < 79, ie, ios < 14, samsung < 14 } proposal-nullish-coalescing-operator { ie } - proposal-optional-chaining { android, chrome, edge, ie, opera, samsung } + proposal-optional-chaining { android, chrome < 91, edge, ie, opera, samsung } proposal-json-strings { ie } proposal-optional-catch-binding { ie } - transform-parameters { ie } + transform-parameters { ie, ios, safari } proposal-async-generator-functions { ie } proposal-object-rest-spread { ie } transform-dotall-regex { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/browserslists-last-2-versions-not-ie/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/browserslists-last-2-versions-not-ie/stdout.txt index c02e47e238..a7b495ce46 100644 --- a/packages/babel-preset-env/test/fixtures/debug/browserslists-last-2-versions-not-ie/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/browserslists-last-2-versions-not-ie/stdout.txt @@ -15,15 +15,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios, opera, safari, samsung } - proposal-class-properties { firefox < 90, ios, safari < 15, samsung } - proposal-private-methods { firefox < 90, ios, safari < 15, samsung } + proposal-private-property-in-object { android, chrome < 91, edge, firefox < 90, ios < 15, opera, safari < 15, samsung } + proposal-class-properties { firefox < 90, ios < 15, safari < 15, samsung < 14 } + proposal-private-methods { firefox < 90, ios < 15, safari < 15, samsung < 14 } syntax-numeric-separator - proposal-logical-assignment-operators { samsung } + proposal-logical-assignment-operators { samsung < 14 } syntax-nullish-coalescing-operator - proposal-optional-chaining { android, chrome, edge, opera, samsung } + proposal-optional-chaining { android, chrome < 91, edge, opera, samsung } syntax-json-strings syntax-optional-catch-binding + transform-parameters { ios, safari } syntax-async-generators syntax-object-rest-spread proposal-export-namespace-from { ios, safari } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-electron/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-electron/stdout.txt index 7ee6b58ee2..a0325966c2 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-electron/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-electron/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { electron < 6.0 } proposal-logical-assignment-operators { electron < 10.0 } proposal-nullish-coalescing-operator { electron < 8.0 } - proposal-optional-chaining { electron } + proposal-optional-chaining { electron < 13.0 } proposal-json-strings { electron < 3.0 } proposal-optional-catch-binding { electron < 3.0 } transform-parameters { electron < 0.37 } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-force-all-transforms/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-force-all-transforms/stdout.txt index 3a25209804..593d2afccb 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-force-all-transforms/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-force-all-transforms/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } transform-parameters { } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-proposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-proposals-chrome-71/stdout.txt index 87c6208587..62ed74fbde 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-proposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-proposals-chrome-71/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-shippedProposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-shippedProposals-chrome-71/stdout.txt index e928f6277d..d4092d86b7 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-shippedProposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-shippedProposals-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-specific-targets/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-specific-targets/stdout.txt index ff32ed3acd..6b13feeff7 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-specific-targets/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-specific-targets/stdout.txt @@ -13,16 +13,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios, safari } - proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } - proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } + proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios < 15, safari < 15 } + proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } + proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } proposal-numeric-separator { chrome < 75, edge < 79, firefox < 70, ie, ios < 13, safari < 13 } proposal-logical-assignment-operators { chrome < 85, edge < 85, firefox < 79, ie, ios < 14, safari < 14 } proposal-nullish-coalescing-operator { chrome < 80, edge < 80, firefox < 72, ie, ios < 13.4, safari < 13.1 } - proposal-optional-chaining { chrome, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } + proposal-optional-chaining { chrome < 91, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } proposal-json-strings { chrome < 66, edge < 79, firefox < 62, ie, ios < 12, safari < 12 } proposal-optional-catch-binding { chrome < 66, edge < 79, firefox < 58, ie, ios < 11.3, safari < 11.1 } - transform-parameters { edge < 18, firefox < 53, ie, ios < 10, safari < 10 } + transform-parameters { edge < 18, firefox < 53, ie, ios, safari } proposal-async-generator-functions { chrome < 63, edge < 79, firefox < 57, ie, ios < 12, safari < 12 } proposal-object-rest-spread { chrome < 60, edge < 79, firefox < 55, ie, ios < 11.3, safari < 11.1 } transform-dotall-regex { chrome < 62, edge < 79, firefox < 78, ie, ios < 11.3, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-decimals/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-decimals/stdout.txt index 4641d4a1a8..5cc73e8c5c 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-decimals/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-decimals/stdout.txt @@ -17,7 +17,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, electron < 6.0, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, electron < 10.0, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, electron < 8.0, ie, node < 14 } - proposal-optional-chaining { chrome, electron, ie, node } + proposal-optional-chaining { chrome < 91, electron < 13.0, ie, node } proposal-json-strings { chrome < 66, electron < 3.0, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, electron < 3.0, ie, node < 10 } transform-parameters { electron < 0.37, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-strings/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-strings/stdout.txt index 9187c6bdec..141d556792 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-strings/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2-versions-strings/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2/stdout.txt index 738feb756e..675e5638ef 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-all-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-all-chrome-71/stdout.txt index 86780e28f6..15a4065adf 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-all-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-all-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-electron/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-electron/stdout.txt index 95a1a8bb84..571deeed0c 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-electron/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-electron/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { electron < 6.0 } proposal-logical-assignment-operators { electron < 10.0 } proposal-nullish-coalescing-operator { electron < 8.0 } - proposal-optional-chaining { electron } + proposal-optional-chaining { electron < 13.0 } proposal-json-strings { electron < 3.0 } proposal-optional-catch-binding { electron < 3.0 } transform-parameters { electron < 0.37 } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-chrome-71/stdout.txt index 095e58add9..65a7c2b8a5 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-proposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-proposals-chrome-71/stdout.txt index 10ebd6888f..19f1222af1 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-proposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-es-proposals-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-force-all-transforms/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-force-all-transforms/stdout.txt index 60b807fb1d..ff9ebbfa71 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-force-all-transforms/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-force-all-transforms/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } transform-parameters { } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-proposals-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-proposals-chrome-71/stdout.txt index 3ca4c057ef..c6b840160e 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-proposals-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-proposals-chrome-71/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only-chrome-71/stdout.txt index 4f2ac405ec..3993756ff1 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only/stdout.txt index bb650165a2..0159d609d6 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-runtime-only/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-entries-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-entries-chrome-71/stdout.txt index bbf63c9685..b50e558a34 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-entries-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-entries-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-targets/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-targets/stdout.txt index 6a94828387..9ee34e5712 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-targets/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-specific-targets/stdout.txt @@ -13,16 +13,16 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios, safari } - proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } - proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios, safari < 15 } + proposal-private-property-in-object { chrome < 91, edge, firefox < 90, ie, ios < 15, safari < 15 } + proposal-class-properties { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } + proposal-private-methods { chrome < 84, edge < 84, firefox < 90, ie, ios < 15, safari < 15 } proposal-numeric-separator { chrome < 75, edge < 79, firefox < 70, ie, ios < 13, safari < 13 } proposal-logical-assignment-operators { chrome < 85, edge < 85, firefox < 79, ie, ios < 14, safari < 14 } proposal-nullish-coalescing-operator { chrome < 80, edge < 80, firefox < 72, ie, ios < 13.4, safari < 13.1 } - proposal-optional-chaining { chrome, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } + proposal-optional-chaining { chrome < 91, edge, firefox < 74, ie, ios < 13.4, safari < 13.1 } proposal-json-strings { chrome < 66, edge < 79, firefox < 62, ie, ios < 12, safari < 12 } proposal-optional-catch-binding { chrome < 66, edge < 79, firefox < 58, ie, ios < 11.3, safari < 11.1 } - transform-parameters { edge < 18, firefox < 53, ie, ios < 10, safari < 10 } + transform-parameters { edge < 18, firefox < 53, ie, ios, safari } proposal-async-generator-functions { chrome < 63, edge < 79, firefox < 57, ie, ios < 12, safari < 12 } proposal-object-rest-spread { chrome < 60, edge < 79, firefox < 55, ie, ios < 11.3, safari < 11.1 } transform-dotall-regex { chrome < 62, edge < 79, firefox < 78, ie, ios < 11.3, safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-chrome-71/stdout.txt index 896d22856a..d9a700b164 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-samsung-8.2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-samsung-8.2/stdout.txt index 967ce1aa76..31ec647f6a 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-samsung-8.2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stable-samsung-8.2/stdout.txt @@ -10,10 +10,10 @@ Using modules transform: auto Using plugins: proposal-class-static-block { samsung } proposal-private-property-in-object { samsung } - proposal-class-properties { samsung } - proposal-private-methods { samsung } + proposal-class-properties { samsung < 14 } + proposal-private-methods { samsung < 14 } proposal-numeric-separator { samsung < 11 } - proposal-logical-assignment-operators { samsung } + proposal-logical-assignment-operators { samsung < 14 } proposal-nullish-coalescing-operator { samsung < 13 } proposal-optional-chaining { samsung } proposal-json-strings { samsung < 9 } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stage-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stage-chrome-71/stdout.txt index 4741dd6a3a..02329d2b88 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stage-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-stage-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-decimals/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-decimals/stdout.txt index ff364d8b0b..1bc1fc0abd 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-decimals/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-decimals/stdout.txt @@ -17,7 +17,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, electron < 6.0, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, electron < 10.0, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, electron < 8.0, ie, node < 14 } - proposal-optional-chaining { chrome, electron, ie, node } + proposal-optional-chaining { chrome < 91, electron < 13.0, ie, node } proposal-json-strings { chrome < 66, electron < 3.0, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, electron < 3.0, ie, node < 10 } transform-parameters { electron < 0.37, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.0/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.0/stdout.txt index 56db180d33..7ed0a38068 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.0/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.0/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.1/stdout.txt index 09c117ec57..4324263c76 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings-minor-3.1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings/stdout.txt index 90cb24c62e..f89b081084 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-versions-strings/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-web-chrome-71/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-web-chrome-71/stdout.txt index 57c4755987..7f90f42a6d 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-web-chrome-71/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3-web-chrome-71/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3/stdout.txt index d45c1ab777..63895981d7 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-corejs3/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-corejs3/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs-uglify/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs-uglify/stdout.txt index 5a94aeb446..61adee27cb 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs-uglify/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs-uglify/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } transform-parameters { } diff --git a/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs/stdout.txt index 447fde3c40..a539b672ca 100644 --- a/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/entry-no-corejs/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, ie, node < 12.5 } proposal-logical-assignment-operators { chrome < 85, ie, node < 15 } proposal-nullish-coalescing-operator { chrome < 80, ie, node < 14 } - proposal-optional-chaining { chrome, ie, node } + proposal-optional-chaining { chrome < 91, ie, node } proposal-json-strings { chrome < 66, ie, node < 10 } proposal-optional-catch-binding { chrome < 66, ie, node < 10 } transform-parameters { ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-80/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-80/stdout.txt index 9c8b3e4a45..f6e88bd291 100644 --- a/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-80/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-80/stdout.txt @@ -8,14 +8,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } proposal-class-properties { chrome < 84 } proposal-private-methods { chrome < 84 } syntax-numeric-separator proposal-logical-assignment-operators { chrome < 85 } syntax-nullish-coalescing-operator - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-84/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-84/stdout.txt index d5ac3a7cb1..803a17ff62 100644 --- a/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-84/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/shippedProposals-chrome-84/stdout.txt @@ -8,13 +8,13 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91 } + proposal-class-static-block { chrome < 94 } proposal-private-property-in-object { chrome < 91 } syntax-class-properties syntax-numeric-separator proposal-logical-assignment-operators { chrome < 85 } syntax-nullish-coalescing-operator - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/top-level-targets-shadowed/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/top-level-targets-shadowed/stdout.txt index 8697044625..e447acf448 100644 --- a/packages/babel-preset-env/test/fixtures/debug/top-level-targets-shadowed/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/top-level-targets-shadowed/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } proposal-async-generator-functions { chrome < 63 } diff --git a/packages/babel-preset-env/test/fixtures/debug/top-level-targets/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/top-level-targets/stdout.txt index d36f4b77ee..dc3c6ac88a 100644 --- a/packages/babel-preset-env/test/fixtures/debug/top-level-targets/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/top-level-targets/stdout.txt @@ -14,7 +14,7 @@ Using plugins: syntax-numeric-separator proposal-logical-assignment-operators { chrome < 85 } syntax-nullish-coalescing-operator - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-1/stdout.txt index 0856378524..615c0e9881 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-2/stdout.txt index cef6a6a958..9947f5f8be 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-1/stdout.txt index c4fadf755b..9f20df35b9 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-2/stdout.txt index 839a9fedc1..26c2758e63 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-1/stdout.txt index 0ee7561a88..d8e90617dc 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-2/stdout.txt index 4261e219b3..3eacfaaf98 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-none-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-1/stdout.txt index b5f35c7edf..55bdef85d6 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-2/stdout.txt index 49007f7c07..4a207d8d26 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-1/stdout.txt index d2378f9e01..0b44a319b6 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-2/stdout.txt index adaa8d4a13..db72fcfd6a 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-proposals-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-1/stdout.txt index 853f514eca..e96aa762d3 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-1/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-2/stdout.txt index 44eecd410d..e596d5b0b3 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-shippedProposals-2/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-with-import/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-with-import/stdout.txt index 4ae77e3442..45e375ca8b 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-with-import/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs2-with-import/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } proposal-async-generator-functions { chrome < 63 } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-1/stdout.txt index 45d8b9d4eb..017c00a1db 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-2/stdout.txt index 5b5b6849a7..1a0b48f8fa 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-1/stdout.txt index f824e291e8..9be069f758 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-2/stdout.txt index 853289375b..de89f2afe7 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-1/stdout.txt index 50d3052de5..a7cece6c30 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-2/stdout.txt index 447b413dc6..e295e1ca89 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-none-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-1/stdout.txt index a6cb6a5e77..a4046fd220 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-2/stdout.txt index 0107b7623c..9fe613cc3a 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-1/stdout.txt index cd86914bcb..2891ae0826 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-1/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-2/stdout.txt index 1d6d5b7727..bc124c28ad 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-proposals-chrome-71-2/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } syntax-json-strings syntax-optional-catch-binding syntax-async-generators diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-1/stdout.txt index 35a6e28d8f..2c8b2616c3 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-1/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-2/stdout.txt index 5b00ecec42..317bef6821 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-shippedProposals-2/stdout.txt @@ -10,14 +10,14 @@ Using targets: Using modules transform: auto Using plugins: - proposal-class-static-block { chrome < 91, firefox, ie } + proposal-class-static-block { chrome < 94, firefox < 93, ie } proposal-private-property-in-object { chrome < 91, firefox < 90, ie } proposal-class-properties { chrome < 84, firefox < 90, ie } proposal-private-methods { chrome < 84, firefox < 90, ie } proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt index 68cad8a071..c504385825 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt index e49443f64a..bb4c58f06d 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.0-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt index b2e4e4d2bd..af4330c868 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt index 2597406bbd..7da5a5e041 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-versions-strings-minor-3.1-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-with-import/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-with-import/stdout.txt index 61ae70dc52..701f68ba59 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-with-import/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-corejs3-with-import/stdout.txt @@ -14,7 +14,7 @@ Using plugins: proposal-numeric-separator { chrome < 75 } proposal-logical-assignment-operators { chrome < 85 } proposal-nullish-coalescing-operator { chrome < 80 } - proposal-optional-chaining { chrome } + proposal-optional-chaining { chrome < 91 } proposal-json-strings { chrome < 66 } proposal-optional-catch-binding { chrome < 66 } proposal-async-generator-functions { chrome < 63 } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-1/stdout.txt index d35d6e0173..6a43283dc0 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-2/stdout.txt index ff6d4c8263..b42617d902 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-1/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-1/stdout.txt index a8f690918f..fde0ef7665 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-1/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-1/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-2/stdout.txt b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-2/stdout.txt index a9e1a58603..5d6ff0382e 100644 --- a/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-2/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/debug/usage-no-corejs-none-2/stdout.txt @@ -16,7 +16,7 @@ Using plugins: proposal-numeric-separator { chrome < 75, firefox < 70, ie } proposal-logical-assignment-operators { chrome < 85, firefox < 79, ie } proposal-nullish-coalescing-operator { chrome < 80, firefox < 72, ie } - proposal-optional-chaining { chrome, firefox < 74, ie } + proposal-optional-chaining { chrome < 91, firefox < 74, ie } proposal-json-strings { chrome < 66, firefox < 62, ie } proposal-optional-catch-binding { chrome < 66, firefox < 58, ie } transform-parameters { firefox < 53, ie } diff --git a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/safari-10_3-block-scoped/stdout.txt b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/safari-10_3-block-scoped/stdout.txt index bf329043f4..0307904b78 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options-babel-7/safari-10_3-block-scoped/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/preset-options-babel-7/safari-10_3-block-scoped/stdout.txt @@ -8,7 +8,7 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { safari } + proposal-private-property-in-object { safari < 15 } proposal-class-properties { safari < 15 } proposal-private-methods { safari < 15 } proposal-numeric-separator { safari < 13 } @@ -17,6 +17,7 @@ Using plugins: proposal-optional-chaining { safari < 13.1 } proposal-json-strings { safari < 12 } proposal-optional-catch-binding { safari < 11.1 } + transform-parameters { safari } proposal-async-generator-functions { safari < 12 } proposal-object-rest-spread { safari < 11.1 } transform-dotall-regex { safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/preset-options/safari-10_3-block-scoped/stdout.txt b/packages/babel-preset-env/test/fixtures/preset-options/safari-10_3-block-scoped/stdout.txt index bf329043f4..0307904b78 100644 --- a/packages/babel-preset-env/test/fixtures/preset-options/safari-10_3-block-scoped/stdout.txt +++ b/packages/babel-preset-env/test/fixtures/preset-options/safari-10_3-block-scoped/stdout.txt @@ -8,7 +8,7 @@ Using targets: Using modules transform: auto Using plugins: - proposal-private-property-in-object { safari } + proposal-private-property-in-object { safari < 15 } proposal-class-properties { safari < 15 } proposal-private-methods { safari < 15 } proposal-numeric-separator { safari < 13 } @@ -17,6 +17,7 @@ Using plugins: proposal-optional-chaining { safari < 13.1 } proposal-json-strings { safari < 12 } proposal-optional-catch-binding { safari < 11.1 } + transform-parameters { safari } proposal-async-generator-functions { safari < 12 } proposal-object-rest-spread { safari < 11.1 } transform-dotall-regex { safari < 11.1 } diff --git a/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-91/input.js b/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-94/input.js similarity index 100% rename from packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-91/input.js rename to packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-94/input.js diff --git a/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-91/options.json b/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-94/options.json similarity index 64% rename from packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-91/options.json rename to packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-94/options.json index 7b274ea47f..afe73c1885 100644 --- a/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-91/options.json +++ b/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-94/options.json @@ -1,4 +1,4 @@ { - "targets": { "chrome": 91 }, + "targets": { "chrome": 94 }, "presets": [["env", { "shippedProposals": true }]] } diff --git a/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-91/output.js b/packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-94/output.js similarity index 100% rename from packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-91/output.js rename to packages/babel-preset-env/test/fixtures/shipped-proposals/new-class-features-chrome-94/output.js diff --git a/packages/babel-traverse/src/scope/index.ts b/packages/babel-traverse/src/scope/index.ts index d6589580cc..9baaec406c 100644 --- a/packages/babel-traverse/src/scope/index.ts +++ b/packages/babel-traverse/src/scope/index.ts @@ -335,6 +335,14 @@ const collectorVisitor: Visitor = { }, Function(path) { + const params: Array = path.get("params"); + for (const param of params) { + path.scope.registerBinding("param", param); + } + + // Register function expression id after params. When the id + // collides with a function param, the id effectively can't be + // referenced: here we registered it as a constantViolation if ( path.isFunctionExpression() && path.has("id") && @@ -342,11 +350,6 @@ const collectorVisitor: Visitor = { ) { path.scope.registerBinding("local", path.get("id"), path); } - - const params: Array = path.get("params"); - for (const param of params) { - path.scope.registerBinding("param", param); - } }, ClassExpression(path) { @@ -1122,9 +1125,14 @@ export default class Scope { // That is, if a scope path is pattern, its parent must be Function/CatchClause // Spec 9.2.10.28: The closure created by this expression should not have visibility of - // declarations in the function body. If the binding is not a `param`-kind, + // declarations in the function body. If the binding is not a `param`-kind (as function parameters) + // or `local`-kind (as id in function expression), // then it must be defined inside the function body, thus it should be skipped - if (previousPath?.isPattern() && binding.kind !== "param") { + if ( + previousPath?.isPattern() && + binding.kind !== "param" && + binding.kind !== "local" + ) { // do nothing } else { return binding; diff --git a/packages/babel-traverse/test/scope.js b/packages/babel-traverse/test/scope.js index fbe1e15862..5a8ea46d84 100644 --- a/packages/babel-traverse/test/scope.js +++ b/packages/babel-traverse/test/scope.js @@ -432,17 +432,54 @@ describe("scope", () => { ).toBe("_foo3"); }); - it("reference paths", function () { - const path = getIdentifierPath("function square(n) { return n * n}"); - const referencePaths = path.context.scope.bindings.n.referencePaths; - expect(referencePaths).toHaveLength(2); - expect(referencePaths[0].node.loc.start).toEqual({ - line: 1, - column: 28, + describe("reference paths", () => { + it("param referenced in function body", function () { + const path = getIdentifierPath("function square(n) { return n * n}"); + const referencePaths = path.context.scope.bindings.n.referencePaths; + expect(referencePaths).toHaveLength(2); + expect(referencePaths[0].node.loc.start).toEqual({ + line: 1, + column: 28, + }); + expect(referencePaths[1].node.loc.start).toEqual({ + line: 1, + column: 32, + }); }); - expect(referencePaths[1].node.loc.start).toEqual({ - line: 1, - column: 32, + it("id referenced in function body", () => { + const path = getIdentifierPath("(function n(m) { return n })"); + const { referencePaths, identifier } = path.scope.getOwnBinding("n"); + expect(identifier.start).toMatchInlineSnapshot(`10`); + expect(referencePaths).toHaveLength(1); + expect(referencePaths[0].node.start).toMatchInlineSnapshot(`24`); + }); + it("id referenced in param initializer - function expression", () => { + const path = getIdentifierPath("(function n(m = n) {})"); + const { referencePaths, identifier } = path.scope.getOwnBinding("n"); + expect(identifier.start).toMatchInlineSnapshot(`10`); + expect(referencePaths).toHaveLength(1); + expect(referencePaths[0].node.start).toMatchInlineSnapshot(`16`); + }); + it("id referenced in param initializer - function declaration", () => { + const path = getIdentifierPath("function n(m = n) {}"); + const { referencePaths, identifier } = path.scope.getBinding("n"); + expect(identifier.start).toMatchInlineSnapshot(`9`); + expect(referencePaths).toHaveLength(1); + expect(referencePaths[0].node.start).toMatchInlineSnapshot(`15`); + }); + it("param referenced in function body with id collision", () => { + const path = getIdentifierPath("(function n(n) { return n })"); + const { referencePaths, identifier } = path.scope.getOwnBinding("n"); + expect(identifier.start).toMatchInlineSnapshot(`12`); + expect(referencePaths).toHaveLength(1); + expect(referencePaths[0].node.start).toMatchInlineSnapshot(`24`); + }); + it("param referenced in param initializer with id collision", () => { + const path = getIdentifierPath("(function n(n, m = n) {})"); + const { referencePaths, identifier } = path.scope.getOwnBinding("n"); + expect(identifier.start).toMatchInlineSnapshot(`12`); + expect(referencePaths).toHaveLength(1); + expect(referencePaths[0].node.start).toMatchInlineSnapshot(`19`); }); }); diff --git a/tsconfig.json b/tsconfig.json index d7b33b603e..2718a35472 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,6 +27,7 @@ "./packages/babel-helper-validator-option/src/**/*.ts", "./packages/babel-helpers/src/**/*.ts", "./packages/babel-highlight/src/**/*.ts", + "./packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src/**/*.ts", "./packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/src/**/*.ts", "./packages/babel-plugin-proposal-async-do-expressions/src/**/*.ts", "./packages/babel-plugin-syntax-async-do-expressions/src/**/*.ts", @@ -119,6 +120,9 @@ "@babel/highlight": [ "./packages/babel-highlight/src" ], + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": [ + "./packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/src" + ], "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": [ "./packages/babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining/src" ], diff --git a/yarn.lock b/yarn.lock index b451821ea3..df0cdb0bce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1029,6 +1029,19 @@ __metadata: languageName: unknown linkType: soft +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@workspace:^0.0.0, @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@workspace:packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression": + version: 0.0.0-use.local + resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@workspace:packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression" + dependencies: + "@babel/core": "workspace:*" + "@babel/helper-plugin-test-runner": "workspace:*" + "@babel/helper-plugin-utils": "workspace:^7.14.5" + "@babel/traverse": "workspace:*" + peerDependencies: + "@babel/core": ^7.0.0 + languageName: unknown + linkType: soft + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.14.5": version: 7.14.5 resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.14.5" @@ -3205,6 +3218,7 @@ __metadata: "@babel/helper-plugin-test-runner": "workspace:*" "@babel/helper-plugin-utils": "workspace:^7.14.5" "@babel/helper-validator-option": "workspace:^7.14.5" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "workspace:^0.0.0" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "workspace:^7.15.4" "@babel/plugin-proposal-async-generator-functions": "workspace:^7.15.8" "@babel/plugin-proposal-class-properties": "workspace:^7.14.5"