diff --git a/Gulpfile.mjs b/Gulpfile.mjs index 71c002a69120..83fb2ec10e1a 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 8a55b1876e31..65e39af3a844 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 51976d9e2f43..6ad09e432450 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 6e6d3498df56..2f2b4d253c9c 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 13b40a3abf67..8ae30cf81561 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 75af0bc4fc0c..c6cb32795dd1 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 bc1589fa9514..59906cc9a096 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 4d4f59f9f4c8..c0df85dabf1d 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 000000000000..f9806945836e --- /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 000000000000..ad942ee5c502 --- /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 000000000000..be7536c52029 --- /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 000000000000..5144b666bd03 --- /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 000000000000..e884f47fd85a --- /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 000000000000..b3276ae16669 --- /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 000000000000..7505883df5fb --- /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 000000000000..963c7c62319b --- /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 000000000000..645676339d2f --- /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 000000000000..b6275ce1003a --- /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 000000000000..21a55ce6b5e7 --- /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 000000000000..f6e9282e42fa --- /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 c6937fcc798e..89bc17afb5d7 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 7b302c8c3378..f88cec0562c4 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 2643d6eef32f..629b6a23fc49 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 6fca43d54269..256467fb974c 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 f240d2108874..3ba12d823441 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 d8d6d4660d6f..b672cb308340 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 bf329043f484..0307904b785f 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 e3e5063a2de2..96df0ef155da 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 4bb3bdd946fd..03b6ace0cd4d 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 74e4690906ea..d4b5d0f25e8a 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 000000000000..6dcde952f952 --- /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 000000000000..c9a4cd0f3f24 --- /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 000000000000..a0edffd54da5 --- /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 000000000000..e66854d27d79 --- /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 000000000000..6dcde952f952 --- /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 000000000000..280d26a578ac --- /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 000000000000..61c32ad759b4 --- /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 000000000000..8e2f77f81dd8 --- /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 3734c2a7545b..32d117b89cd5 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 2d6a46f441af..6dbd96da140e 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 1b2f4b34ee63..8dc078d17bb7 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 7e92440c4dab..cefcc6081058 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 364413b75309..01bfd8cde348 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 bb3f88aca4dc..27cb2e34d216 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 a3836496c061..f9f2715652da 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 0b8c72fe4c58..bb6e54e46a4c 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 deef05de540f..7b8fd4169966 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 4b34245faa62..e2c6f00a28e6 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 c02e47e238b7..a7b495ce4651 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 effdad827953..7a7b530f8e46 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 0617fd20f350..2c6ac562ec44 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 de6e5dc4a05d..c324fd05ef20 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 4af2511633a2..ec36759cc3ca 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 d6927aac8010..925c1df68e00 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 825ca2bcf01b..2227709fd290 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 c14497cc5d6e..e2b94a9f1c6e 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 0e6a7c94fa9d..fca48964fa97 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 4b419c3c6ae0..c4b7b5ac4d64 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 ef51d886f406..d3809faea882 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 6fcd4c60653d..cb4a642b04be 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 460748f361b4..96883f5e14fb 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 5de416264cb3..e415649919c9 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 cb7cdc0d93cc..59d6214f2ad0 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 12c006098f55..c2f172087535 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 bcaf2b996888..2f271167ae24 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 b808eb47fd00..c2fae26a8f06 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 61717b6af32d..5d725fdf635f 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 e19daed812c0..32071ac4ed36 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 144a91063405..c95ea3740934 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 31bd6fb4df92..5ba7835ef11c 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 d1a014a75b99..257ec45621a2 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 5fd6f2fe1ddd..05cf188a14e3 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 d3b9955808d7..594f01eb0d03 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 0936a57113a0..a6e840652118 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 72085bb03229..94c1ee97917f 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 de4f14c5a4bc..b80eb59a7958 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 47fd298711f7..c22df8bf874a 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 0adbf8a7a8b6..5c598d37ac91 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 9c8b3e4a4534..f6e88bd291a2 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 d5ac3a7cb181..803a17ff62a2 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 8697044625e4..e447acf44887 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 d36f4b77ee18..dc3c6ac88ac4 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 b8d1485e6cd8..e87a6839c17d 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 17a03370cbc4..80eb250f830c 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 4b93ffc91175..4c71bd83379e 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 3c7908bd7500..c5fd15cd1519 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 9f36507b0385..0d26ebc02f08 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 3704aa6788f5..93ef88eed5f7 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 d3c4e030d1a4..5c31c318beb7 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 13aec3a28e1b..2d05ab3497c2 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 c66ae9946d78..eae7581a168b 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 7e25a2dbd20e..d855c995e1d0 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 88ac0f672976..384e806c6feb 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 675411d5fe82..12fd8d9eb35c 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 2525f79c48ec..f412c6a8b487 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 c8375ed8770b..f0bc78bdedbc 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 50cb65436af5..5412577f163f 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 87d13e39336e..495aa529e778 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 03f4424675e9..e75a8b0c8530 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 7a109f19f96f..2d2d78794ec8 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 7229636e5f56..40cf46fba017 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 ca849297bec5..225beded647f 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 4c207e9d39ff..ea8e369bba58 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 ee7bec8cd87d..2fc4976309c9 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 0c2414d35e97..ef68e2af91f6 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 5cbaafbea4e5..2e1aacb851f0 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 93cffb8196ea..5757cf85eea3 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 83f041df2f57..793bd1d002d1 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 527e88cb8b5b..f78778eb9217 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 1ddaf5f71cc6..1e47a5bb8716 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 4a42d3de5589..6677f821a8fb 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 e2d164f43c0f..1960f1fe6165 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 760ddcb8467f..11fb6610c376 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 43312d068160..19bf529216dc 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 e0febec73d5c..4324613c7d46 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 cdf048f9b74e..26eaa12be79d 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 deef05de540f..7b8fd4169966 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 4b34245faa62..e2c6f00a28e6 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 c02e47e238b7..a7b495ce4651 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 7ee6b58ee2be..a0325966c212 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 3a2520980404..593d2afccbbb 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 87c62085875b..62ed74fbdee3 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 e928f6277d2b..d4092d86b78f 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 ff32ed3acdca..6b13feeff737 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 4641d4a1a8fd..5cc73e8c5c03 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 9187c6bdecdf..141d55679290 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 738feb756e98..675e5638efac 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 86780e28f6c1..15a4065adf9d 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 95a1a8bb84bf..571deeed0ca8 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 095e58add989..65a7c2b8a58c 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 10ebd6888f26..19f1222af1be 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 60b807fb1d85..ff9ebbfa71f7 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 3ca4c057efa6..c6b840160e87 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 4f2ac405ec43..3993756ff1d5 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 bb650165a20c..0159d609d65a 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 bbf63c9685fb..b50e558a34b9 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 6a9482838792..9ee34e571202 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 896d22856a9f..d9a700b16405 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 967ce1aa764d..31ec647f6ac3 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 4741dd6a3a56..02329d2b88cd 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 ff364d8b0bdd..1bc1fc0abdbc 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 56db180d330c..7ed0a3806817 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 09c117ec5731..4324263c7603 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 90cb24c62e7c..f89b08108454 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 57c4755987fd..7f90f42a6d75 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 d45c1ab777a0..63895981d747 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 5a94aeb44653..61adee27cb01 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 447fde3c40f5..a539b672ca82 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 9c8b3e4a4534..f6e88bd291a2 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 d5ac3a7cb181..803a17ff62a2 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 8697044625e4..e447acf44887 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 d36f4b77ee18..dc3c6ac88ac4 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 085637852410..615c0e9881ee 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 cef6a6a95853..9947f5f8be5b 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 c4fadf755b09..9f20df35b98e 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 839a9fedc15d..26c2758e638c 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 0ee7561a8824..d8e90617dca4 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 4261e219b3fc..3eacfaaf98cc 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 b5f35c7edfb4..55bdef85d6fb 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 49007f7c07a8..4a207d8d26c2 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 d2378f9e0159..0b44a319b605 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 adaa8d4a1388..db72fcfd6a01 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 853f514eca58..e96aa762d397 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 44eecd410dd3..e596d5b0b3cc 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 4ae77e3442e5..45e375ca8b68 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 45d8b9d4eb57..017c00a1dbef 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 5b5b6849a743..1a0b48f8fae4 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 f824e291e895..9be069f758d9 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 853289375b61..de89f2afe762 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 50d3052de530..a7cece6c30bd 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 447b413dc670..e295e1ca8968 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 a6cb6a5e77ab..a4046fd2207f 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 0107b7623c25..9fe613cc3af5 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 cd86914bcb1d..2891ae0826b4 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 1d6d5b772734..bc124c28ade8 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 35a6e28d8fca..2c8b2616c3eb 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 5b00ecec42a5..317bef68210c 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 68cad8a0710b..c50438582544 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 e49443f64aeb..bb4c58f06d08 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 b2e4e4d2bd4f..af4330c868e2 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 2597406bbd3b..7da5a5e041c5 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 61ae70dc5243..701f68ba599e 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 d35d6e01737a..6a43283dc03e 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 ff6d4c8263c4..b42617d902cd 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 a8f690918f87..fde0ef7665d1 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 a9e1a5860310..5d6ff0382e4d 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 bf329043f484..0307904b785f 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 bf329043f484..0307904b785f 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 7b274ea47f8f..afe73c188599 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 d6589580cc9b..9baaec406c5a 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 fbe1e1586272..5a8ea46d84d4 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, - }); - expect(referencePaths[1].node.loc.start).toEqual({ - line: 1, - column: 32, + 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, + }); + }); + 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 d7b33b603e07..2718a354726f 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 b451821ea3e2..df0cdb0bceba 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"