From 4fd89e8eeda9314cc4e74cd71607e4a7ae4534e5 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Tue, 8 Oct 2024 01:32:06 +0000 Subject: [PATCH] test(transformer): fix indentation in transformer test fixtures (#6346) Unimportant nit. Fix whitespace in the transformer test fixtures. --- .../assign-to-member-expression/output.js | 6 +-- .../test/fixtures/private-properties/input.js | 16 +++---- .../fixtures/private-properties/output.js | 18 +++---- .../output.js | 24 +++++----- .../output.js | 2 +- .../does-not-get-tripped-by-iifes/output.js | 10 ++-- .../emit-full-signatures-option/output.js | 6 +-- .../output.js | 8 ++-- .../output.js | 48 +++++++++---------- .../output.js | 32 ++++++------- .../ignores-complex-definitions/output.js | 8 ++-- .../output.js | 6 +-- .../refresh/ignores-hoc-definitions/output.js | 30 ++++++------ .../output.js | 8 ++-- .../output.js | 22 ++++----- .../output.js | 4 +- .../output.js | 2 +- .../output.js | 2 +- .../output.js | 2 +- .../output.js | 6 +-- .../output.js | 2 +- .../output.js | 2 +- .../output.js | 14 +++--- .../output.js | 12 ++--- .../output.js | 12 ++--- .../output.js | 12 ++--- .../input.tsx | 10 ++-- .../output.js | 6 +-- .../output.js | 2 +- .../test/fixtures/static-children/input.jsx | 12 +++-- .../test/fixtures/static-children/output.js | 14 +++--- .../test/fixtures/unicode/output.js | 2 +- .../fixtures/enum-member-reference/output.js | 8 ++-- .../fixtures/export-elimination/output.ts | 10 ++-- .../options.json | 11 +++-- .../regexp/test/fixtures/igm/options.json | 11 +++-- 36 files changed, 204 insertions(+), 196 deletions(-) diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/assign-to-member-expression/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/assign-to-member-expression/output.js index bdf89dff7dbe5..23f8fc62336b7 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/assign-to-member-expression/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/assign-to-member-expression/output.js @@ -99,11 +99,11 @@ function outer() { var _this4, _this$foo$bar2, _this5, _this6, _fn4$foo$bar$qux2; (_this4 = this), (_this4["prop"] = Math.pow(_this4["prop"], 28)); (_this$foo$bar2 = this.foo.bar), - (_this$foo$bar2["qux"] = Math.pow(_this$foo$bar2["qux"], 29)); + (_this$foo$bar2["qux"] = Math.pow(_this$foo$bar2["qux"], 29)); (_this5 = this), (_this5["prop blah"] = Math.pow(_this5["prop blah"], 30)); (_this6 = this), - (_fn4$foo$bar$qux2 = fn4().foo.bar.qux()), - (_this6[_fn4$foo$bar$qux2] = Math.pow(_this6[_fn4$foo$bar$qux2], 31)); + (_fn4$foo$bar$qux2 = fn4().foo.bar.qux()), + (_this6[_fn4$foo$bar$qux2] = Math.pow(_this6[_fn4$foo$bar$qux2], 31)); } // Underscore var names diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/input.js b/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/input.js index edd5e6d500d02..aecf0368ce12c 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/input.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/input.js @@ -1,11 +1,11 @@ class C { - #p = 1; + #p = 1; - method(obj) { - this.#p **= 1; - obj.#p **= 2; - this.x.y.z.#p **= 3; - obj.x.y.z.#p **= 4; - fn().x.y.z.#p **= 5; - } + method(obj) { + this.#p **= 1; + obj.#p **= 2; + this.x.y.z.#p **= 3; + obj.x.y.z.#p **= 4; + fn().x.y.z.#p **= 5; + } } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/output.js index 6ea277ca60f2f..0f44d358cba8b 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-exponentiation-operator/test/fixtures/private-properties/output.js @@ -1,12 +1,12 @@ class C { - #p = 1; + #p = 1; - method(obj) { - var _this, _this$x$y$z, _obj$x$y$z, _fn$x$y$z; - _this = this, _this.#p = Math.pow(_this.#p, 1); - obj.#p = Math.pow(obj.#p, 2); - _this$x$y$z = this.x.y.z, _this$x$y$z.#p = Math.pow(_this$x$y$z.#p, 3); - _obj$x$y$z = obj.x.y.z, _obj$x$y$z.#p = Math.pow(_obj$x$y$z.#p, 4); - _fn$x$y$z = fn().x.y.z, _fn$x$y$z.#p = Math.pow(_fn$x$y$z.#p, 5); - } + method(obj) { + var _this, _this$x$y$z, _obj$x$y$z, _fn$x$y$z; + _this = this, _this.#p = Math.pow(_this.#p, 1); + obj.#p = Math.pow(obj.#p, 2); + _this$x$y$z = this.x.y.z, _this$x$y$z.#p = Math.pow(_this$x$y$z.#p, 3); + _obj$x$y$z = obj.x.y.z, _obj$x$y$z.#p = Math.pow(_obj$x$y$z.#p, 4); + _fn$x$y$z = fn().x.y.z, _fn$x$y$z.#p = Math.pow(_fn$x$y$z.#p, 5); + } } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/can-handle-implicit-arrow-returns/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/can-handle-implicit-arrow-returns/output.js index bf2d4b49ca4f1..efc1c7a7b30df 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/can-handle-implicit-arrow-returns/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/can-handle-implicit-arrow-returns/output.js @@ -1,32 +1,32 @@ var _s = $RefreshSig$(), _s2 = $RefreshSig$(), _s3 = $RefreshSig$(), _s4 = $RefreshSig$(), _s5 = $RefreshSig$(), _s6 = $RefreshSig$(); export default _s(() => { - _s(); - return useContext(X); + _s(); + return useContext(X); }, "useContext{}"); export const Foo = () => { - _s2(); - return useContext(X); + _s2(); + return useContext(X); }; _s2(Foo, "useContext{}"); _c = Foo; module.exports = _s3(() => { - _s3(); - return useContext(X); + _s3(); + return useContext(X); }, "useContext{}"); const Bar = () => { - _s4(); - return useContext(X); + _s4(); + return useContext(X); }; _s4(Bar, "useContext{}"); _c2 = Bar; const Baz = _s5(memo(_c3 = _s5(() => { - _s5(); - return useContext(X); + _s5(); + return useContext(X); }, "useContext{}")), "useContext{}"); _c4 = Baz; const Qux = () => { - _s6(); - return 0, useContext(X); + _s6(); + return 0, useContext(X); }; _s6(Qux, "useContext{}"); _c5 = Qux; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-consider-require-like-methods-to-be-hocs/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-consider-require-like-methods-to-be-hocs/output.js index e5b23f6644598..b7c6202f2bdc5 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-consider-require-like-methods-to-be-hocs/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-consider-require-like-methods-to-be-hocs/output.js @@ -4,7 +4,7 @@ const B = foo ? require("X") : require("Y"); const C = requireCond(gk, "C"); const D = import("D"); export default function App() { - return _jsxs("div", { children: [_jsx(A, {}), _jsx(B, {}), _jsx(C, {}), _jsx(D, {})] }); + return _jsxs("div", { children: [_jsx(A, {}), _jsx(B, {}), _jsx(C, {}), _jsx(D, {})] }); } _c = App; var _c; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-get-tripped-by-iifes/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-get-tripped-by-iifes/output.js index cb846ec609ffd..54981e2695d01 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-get-tripped-by-iifes/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/does-not-get-tripped-by-iifes/output.js @@ -1,7 +1,7 @@ while (item) { - var _s = $RefreshSig$(); - _s((item) => { - _s(); - useFoo(); - }, "useFoo{}", true)(item); + var _s = $RefreshSig$(); + _s((item) => { + _s(); + useFoo(); + }, "useFoo{}", true)(item); } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/emit-full-signatures-option/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/emit-full-signatures-option/output.js index 15638c1b2282f..83683d8238c57 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/emit-full-signatures-option/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/emit-full-signatures-option/output.js @@ -1,9 +1,9 @@ import { jsx as _jsx } from "react/jsx-runtime"; var _s = $RefreshSig$(); export default function Bar() { - _s(); - useContext(X); - return _jsx(Foo, {}); + _s(); + useContext(X); + return _jsx(Foo, {}); } _s(Bar, "gDsCjeeItUuvgOWf1v4qoK9RF6k="); _c = Bar; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-declarations-calling-hooks/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-declarations-calling-hooks/output.js index c577ac792e5ba..12ed90536d834 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-declarations-calling-hooks/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-declarations-calling-hooks/output.js @@ -1,10 +1,10 @@ import { jsx as _jsx } from "react/jsx-runtime"; var _s = $RefreshSig$(); export default function App() { - _s(); - const [foo, setFoo] = useState(0); - React.useEffect(() => {}); - return _jsx("h1", { children: foo }); + _s(); + const [foo, setFoo] = useState(0); + React.useEffect(() => {}); + return _jsx("h1", { children: foo }); } _s(App, "useState{[foo, setFoo](0)}\\nuseEffect{}"); _c = App; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-expressions-calling-hooks/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-expressions-calling-hooks/output.js index 3a8f74e62c774..643f90be24f2a 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-expressions-calling-hooks/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-signatures-for-function-expressions-calling-hooks/output.js @@ -1,36 +1,36 @@ import { jsx as _jsx } from "react/jsx-runtime"; var _s = $RefreshSig$(), _s2 = $RefreshSig$(); export const A = _s(React.memo(_c2 = _s(React.forwardRef(_c = _s((props, ref) => { - _s(); - const [foo, setFoo] = useState(0); - React.useEffect(() => {}); - return _jsx("h1", { - ref, - children: foo - }); + _s(); + const [foo, setFoo] = useState(0); + React.useEffect(() => {}); + return _jsx("h1", { + ref, + children: foo + }); }, "useState{[foo, setFoo](0)}\\nuseEffect{}")), "useState{[foo, setFoo](0)}\\nuseEffect{}")), "useState{[foo, setFoo](0)}\\nuseEffect{}"); _c3 = A; export const B = _s2(React.memo(_c5 = _s2(React.forwardRef(_c4 = _s2(function(props, ref) { - _s2(); - const [foo, setFoo] = useState(0); - React.useEffect(() => {}); - return _jsx("h1", { - ref, - children: foo - }); + _s2(); + const [foo, setFoo] = useState(0); + React.useEffect(() => {}); + return _jsx("h1", { + ref, + children: foo + }); }, "useState{[foo, setFoo](0)}\\nuseEffect{}")), "useState{[foo, setFoo](0)}\\nuseEffect{}")), "useState{[foo, setFoo](0)}\\nuseEffect{}"); _c6 = B; function hoc() { - var _s3 = $RefreshSig$(); - return _s3(function Inner() { - _s3(); - const [foo, setFoo] = useState(0); - React.useEffect(() => {}); - return _jsx("h1", { - ref, - children: foo - }); - }, "useState{[foo, setFoo](0)}\\nuseEffect{}"); + var _s3 = $RefreshSig$(); + return _s3(function Inner() { + _s3(); + const [foo, setFoo] = useState(0); + React.useEffect(() => {}); + return _jsx("h1", { + ref, + children: foo + }); + }, "useState{[foo, setFoo](0)}\\nuseEffect{}"); } export let C = hoc(); var _c, _c2, _c3, _c4, _c5, _c6; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-valid-signature-for-exotic-ways-to-call-hooks/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-valid-signature-for-exotic-ways-to-call-hooks/output.js index 61f96df3c9edc..d1e65ba821d6a 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-valid-signature-for-exotic-ways-to-call-hooks/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/generates-valid-signature-for-exotic-ways-to-call-hooks/output.js @@ -2,24 +2,24 @@ var _s2 = $RefreshSig$(); import FancyHook from "fancy"; import { jsxs as _jsxs } from "react/jsx-runtime"; export default function App() { - _s2(); - var _s = $RefreshSig$(); - function useFancyState() { - _s(); - const [foo, setFoo] = React.useState(0); - useFancyEffect(); - return foo; - } - _s(useFancyState, "useState{[foo, setFoo](0)}\\nuseFancyEffect{}", true); - const bar = useFancyState(); - const baz = FancyHook.useThing(); - React.useState(); - useThePlatform(); - use(); - return _jsxs("h1", { children: [bar, baz] }); + _s2(); + var _s = $RefreshSig$(); + function useFancyState() { + _s(); + const [foo, setFoo] = React.useState(0); + useFancyEffect(); + return foo; + } + _s(useFancyState, "useState{[foo, setFoo](0)}\\nuseFancyEffect{}", true); + const bar = useFancyState(); + const baz = FancyHook.useThing(); + React.useState(); + useThePlatform(); + use(); + return _jsxs("h1", { children: [bar, baz] }); } _s2(App, "useFancyState{bar}\\nuseThing{baz}\\nuseState{}\\nuseThePlatform{}\\nuse{}", true, function() { - return [FancyHook.useThing]; + return [FancyHook.useThing]; }); _c = App; var _c; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-complex-definitions/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-complex-definitions/output.js index bf9c28ed128d5..b7bafab51b9a5 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-complex-definitions/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-complex-definitions/output.js @@ -1,13 +1,13 @@ import { jsx as _jsx } from "react/jsx-runtime"; let A = foo ? () => { - return _jsx("h1", { children: "Hi" }); + return _jsx("h1", { children: "Hi" }); } : null; const B = function Foo() { - return _jsx("h1", { children: "Hi" }); + return _jsx("h1", { children: "Hi" }); }(); let C = () => () => { - return _jsx("h1", { children: "Hi" }); + return _jsx("h1", { children: "Hi" }); }; let D = bar && (() => { - return _jsx("h1", { children: "Hi" }); + return _jsx("h1", { children: "Hi" }); }); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-higher-order-functions-that-are-not-hocs/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-higher-order-functions-that-are-not-hocs/output.js index 2cda38d31ff9f..e35cd1cdf8d5b 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-higher-order-functions-that-are-not-hocs/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-higher-order-functions-that-are-not-hocs/output.js @@ -1,9 +1,9 @@ const throttledAlert = throttle(function() { - alert("Hi"); + alert("Hi"); }); const TooComplex = function() { - return hello; + return hello; }(() => {}); if (cond) { - const Foo = thing(() => {}); + const Foo = thing(() => {}); } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-hoc-definitions/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-hoc-definitions/output.js index e5af6de56291a..7a43a9cf8ea0e 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-hoc-definitions/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/ignores-hoc-definitions/output.js @@ -1,21 +1,21 @@ import { jsx as _jsx } from "react/jsx-runtime"; let connect = () => { - function Comp() { - const handleClick = () => {}; - return _jsx("h1", { - onClick: handleClick, - children: "Hi" - }); - } - return Comp; + function Comp() { + const handleClick = () => {}; + return _jsx("h1", { + onClick: handleClick, + children: "Hi" + }); + } + return Comp; }; function withRouter() { - return function Child() { - const handleClick = () => {}; - return _jsx("h1", { - onClick: handleClick, - children: "Hi" - }); - }; + return function Child() { + const handleClick = () => {}; + return _jsx("h1", { + onClick: handleClick, + children: "Hi" + }); + }; } ; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures-when-commonjs-target-is-used/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures-when-commonjs-target-is-used/output.js index ae43fecb626ee..7953304328a08 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures-when-commonjs-target-is-used/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures-when-commonjs-target-is-used/output.js @@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); var _hooks = require("./hooks"); var _s = $RefreshSig$(); function App() { - _s(); - const bar = (0, _hooks.useFancyState)(); - return _jsx("h1", { children: bar }); + _s(); + const bar = (0, _hooks.useFancyState)(); + return _jsx("h1", { children: bar }); } _s(App, "useFancyState{bar}", false, function() { - return [_hooks.useFancyState]; + return [_hooks.useFancyState]; }); _c = App; var _c; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures/output.js index 2742a9401bb2a..d20e9b7434f1d 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/includes-custom-hooks-into-the-signatures/output.js @@ -1,26 +1,26 @@ import { jsx as _jsx } from "react/jsx-runtime"; var _s = $RefreshSig$(), _s2 = $RefreshSig$(), _s3 = $RefreshSig$(); function useFancyState() { - _s(); - const [foo, setFoo] = React.useState(0); - useFancyEffect(); - return foo; + _s(); + const [foo, setFoo] = React.useState(0); + useFancyEffect(); + return foo; } _s(useFancyState, "useState{[foo, setFoo](0)}\\nuseFancyEffect{}", false, function() { - return [useFancyEffect]; + return [useFancyEffect]; }); const useFancyEffect = () => { - _s2(); - React.useEffect(() => {}); + _s2(); + React.useEffect(() => {}); }; _s2(useFancyEffect, "useEffect{}"); export default function App() { - _s3(); - const bar = useFancyState(); - return _jsx("h1", { children: bar }); + _s3(); + const bar = useFancyState(); + return _jsx("h1", { children: bar }); } _s3(App, "useFancyState{bar}", false, function() { - return [useFancyState]; + return [useFancyState]; }); _c = App; var _c; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/nested-member-expression-with-hooks/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/nested-member-expression-with-hooks/output.js index 339b6337f0ddc..0c630dcc6aa8b 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/nested-member-expression-with-hooks/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/nested-member-expression-with-hooks/output.js @@ -1,7 +1,7 @@ var _s = $RefreshSig$(); export function Bar() { - _s(); - A.B.C.useHook(); + _s(); + A.B.C.useHook(); } _s(Bar, "useHook{}"); _c = Bar; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-capitalized-identifiers-in-hoc-calls/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-capitalized-identifiers-in-hoc-calls/output.js index 7ccb6117f5f30..62493a3bcd710 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-capitalized-identifiers-in-hoc-calls/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-capitalized-identifiers-in-hoc-calls/output.js @@ -1,6 +1,6 @@ import { jsx as _jsx } from "react/jsx-runtime"; function Foo() { - return _jsx("h1", { children: "Hi" }); + return _jsx("h1", { children: "Hi" }); } _c = Foo; export default _c2 = hoc(Foo); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-jsx-at-definition-site/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-jsx-at-definition-site/output.js index 53c3c42b751a4..2ad3517378486 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-jsx-at-definition-site/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-jsx-at-definition-site/output.js @@ -15,7 +15,7 @@ let Alias1 = A; let Alias2 = A.Foo; const Dict = {}; function Foo() { - return _jsxs("div", { children: [_jsx(A, {}), _jsx(B, {}), _jsx(StyledFactory1, {}), _jsx(StyledFactory2, {}), _jsx(StyledFactory3, {}), _jsx(Alias1, {}), _jsx(Alias2, {}), _jsx(Header, {}), _jsx(Dict.X, {})] }); + return _jsxs("div", { children: [_jsx(A, {}), _jsx(B, {}), _jsx(StyledFactory1, {}), _jsx(StyledFactory2, {}), _jsx(StyledFactory3, {}), _jsx(Alias1, {}), _jsx(Alias2, {}), _jsx(Header, {}), _jsx(Dict.X, {})] }); } _c5 = Foo; const B = hoc(A); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-react-create-element-at-definition-site/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-react-create-element-at-definition-site/output.js index 77b8130cde4fe..c433639df066f 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-react-create-element-at-definition-site/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-identifiers-used-in-react-create-element-at-definition-site/output.js @@ -14,7 +14,7 @@ let Alias1 = A; let Alias2 = A.Foo; const Dict = {}; function Foo() { - return [React.createElement(A), React.createElement(B), React.createElement(StyledFactory1), React.createElement(StyledFactory2), React.createElement(StyledFactory3), React.createElement(Alias1), React.createElement(Alias2), jsx(Header), React.createElement(Dict.X)]; + return [React.createElement(A), React.createElement(B), React.createElement(StyledFactory1), React.createElement(StyledFactory2), React.createElement(StyledFactory3), React.createElement(Alias1), React.createElement(Alias2), jsx(Header), React.createElement(Dict.X)]; } _c5 = Foo; React.createContext(Store); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-1/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-1/output.js index 5f265f0d12dad..92990938734ef 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-1/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-1/output.js @@ -1,14 +1,14 @@ import { jsx as _jsx } from "react/jsx-runtime"; const A = forwardRef(_c = function() { - return _jsx("h1", { children: "Foo" }); + return _jsx("h1", { children: "Foo" }); }); _c2 = A; const B = memo(_c4 = React.forwardRef(_c3 = () => { - return _jsx("h1", { children: "Foo" }); + return _jsx("h1", { children: "Foo" }); })); _c5 = B; export default _c8 = React.memo(_c7 = forwardRef(_c6 = (props, ref) => { - return _jsx("h1", { children: "Foo" }); + return _jsx("h1", { children: "Foo" }); })); var _c, _c2, _c3, _c4, _c5, _c6, _c7, _c8; $RefreshReg$(_c, "A$forwardRef"); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-2/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-2/output.js index 06bd373352804..bfc4dc825f2ae 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-2/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-2/output.js @@ -1,6 +1,6 @@ import { jsx as _jsx } from "react/jsx-runtime"; export default _c3 = React.memo(_c2 = forwardRef(_c = function(props, ref) { - return _jsx("h1", { children: "Foo" }); + return _jsx("h1", { children: "Foo" }); })); var _c, _c2, _c3; $RefreshReg$(_c, "%default%$React.memo$forwardRef"); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-3/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-3/output.js index e60e3964ff792..7736ca12e7037 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-3/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-likely-hocs-with-inline-functions-3/output.js @@ -1,6 +1,6 @@ import { jsx as _jsx } from "react/jsx-runtime"; export default _c3 = React.memo(_c2 = forwardRef(_c = function Named(props, ref) { - return _jsx("h1", { children: "Foo" }); + return _jsx("h1", { children: "Foo" }); })); var _c, _c2, _c3; $RefreshReg$(_c, "%default%$React.memo$forwardRef"); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-function-declarations/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-function-declarations/output.js index 438d336371d2e..af8942f01ec77 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-function-declarations/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-function-declarations/output.js @@ -1,18 +1,18 @@ import { jsx as _jsx } from "react/jsx-runtime"; export function Hello() { - function handleClick() {} - return _jsx("h1", { - onClick: handleClick, - children: "Hi" - }); + function handleClick() {} + return _jsx("h1", { + onClick: handleClick, + children: "Hi" + }); } _c = Hello; export default function Bar() { - return _jsx(Hello, {}); + return _jsx(Hello, {}); } _c2 = Bar; function Baz() { - return _jsx("h1", { children: "OK" }); + return _jsx("h1", { children: "OK" }); } _c3 = Baz; const NotAComp = 'hi'; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-named-arrow-functions/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-named-arrow-functions/output.js index a4a66d9bd9f25..0dbc437a4a763 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-named-arrow-functions/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-exported-named-arrow-functions/output.js @@ -1,16 +1,16 @@ import { jsx as _jsx } from "react/jsx-runtime"; export const Hello = () => { - function handleClick() {} - return _jsx("h1", { - onClick: handleClick, - children: "Hi" - }); + function handleClick() {} + return _jsx("h1", { + onClick: handleClick, + children: "Hi" + }); }; _c = Hello; export let Bar = (props) => _jsx(Hello, {}); _c2 = Bar; export default () => { - return _jsx(Hello, {}); + return _jsx(Hello, {}); }; var _c, _c2; $RefreshReg$(_c, "Hello"); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-arrow-functions/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-arrow-functions/output.js index 87b30e9c6d788..8e94183f01e0d 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-arrow-functions/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-arrow-functions/output.js @@ -1,14 +1,14 @@ import { jsx as _jsx } from "react/jsx-runtime"; let Hello = () => { - const handleClick = () => {}; - return _jsx("h1", { - onClick: handleClick, - children: "Hi" - }); + const handleClick = () => {}; + return _jsx("h1", { + onClick: handleClick, + children: "Hi" + }); }; _c = Hello; const Bar = () => { - return _jsx(Hello, {}); + return _jsx(Hello, {}); }; _c2 = Bar; var Baz = () => _jsx("div", {}); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-function-expressions/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-function-expressions/output.js index a4eab96771d5e..a79a8f6503954 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-function-expressions/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/registers-top-level-variable-declarations-with-function-expressions/output.js @@ -1,14 +1,14 @@ import { jsx as _jsx } from "react/jsx-runtime"; let Hello = function() { - function handleClick() {} - return _jsx("h1", { - onClick: handleClick, - children: "Hi" - }); + function handleClick() {} + return _jsx("h1", { + onClick: handleClick, + children: "Hi" + }); }; _c = Hello; const Bar = function Baz() { - return _jsx(Hello, {}); + return _jsx(Hello, {}); }; _c2 = Bar; function sum() {} diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/supports-typescript-namespace-syntax/input.tsx b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/supports-typescript-namespace-syntax/input.tsx index 24305cb96927d..311c84f8487e5 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/supports-typescript-namespace-syntax/input.tsx +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/supports-typescript-namespace-syntax/input.tsx @@ -1,15 +1,15 @@ namespace Foo { export namespace Bar { - export const A = () => {}; + export const A = () => { }; - function B() {}; + function B() { }; export const B1 = B; } - export const C = () => {}; - export function D() {}; + export const C = () => { }; + export function D() { }; namespace NotExported { - export const E = () => {}; + export const E = () => { }; } } diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-custom-identifiers-for-refresh-reg-and-refresh-sig/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-custom-identifiers-for-refresh-reg-and-refresh-sig/output.js index 70bb54098f68b..6d8c9fbed44f3 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-custom-identifiers-for-refresh-reg-and-refresh-sig/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-custom-identifiers-for-refresh-reg-and-refresh-sig/output.js @@ -1,9 +1,9 @@ import { jsx as _jsx } from "react/jsx-runtime"; var _s = import.meta.refreshSig(); export default function Bar() { - _s(); - useContext(X); - return _jsx(Foo, {}); + _s(); + useContext(X); + return _jsx(Foo, {}); } _s(Bar, "useContext{}"); _c = Bar; diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-original-function-declaration-if-it-get-reassigned/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-original-function-declaration-if-it-get-reassigned/output.js index 3efb26174be87..17d89cdac755c 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-original-function-declaration-if-it-get-reassigned/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/refresh/uses-original-function-declaration-if-it-get-reassigned/output.js @@ -1,6 +1,6 @@ import { jsx as _jsx } from "react/jsx-runtime"; function Hello() { - return _jsx("h1", { children: "Hi" }); + return _jsx("h1", { children: "Hi" }); } _c = Hello; Hello = connect(Hello); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/input.jsx b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/input.jsx index 3b411b163891b..7e89b3c5d1eaf 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/input.jsx +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/input.jsx @@ -1,7 +1,9 @@
- { /* - There is only one child, so the isStaticChildren option should be false. - Please see: https://github.com/facebook/react/blob/206df66e70652e85711c3177ce1a0459609a7771/packages/react/src/jsx/ReactJSXElement.js#L614-L632 - */} + { + /* + There is only one child, so the isStaticChildren option should be false. + Please see: https://github.com/facebook/react/blob/206df66e70652e85711c3177ce1a0459609a7771/packages/react/src/jsx/ReactJSXElement.js#L614-L632 + */ + }
-
\ No newline at end of file + diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/output.js index 0d276859955ca..c3e1731f6d743 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/output.js @@ -1,11 +1,11 @@ var _jsxFileName = "/tests/babel-plugin-transform-react-jsx/test/fixtures/static-children/input.jsx"; import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime"; _jsxDEV("div", { children: _jsxDEV("div", {}, void 0, false, { - fileName: _jsxFileName, - lineNumber: 6, - columnNumber: 3 + fileName: _jsxFileName, + lineNumber: 8, + columnNumber: 3 }, this) }, void 0, false, { - fileName: _jsxFileName, - lineNumber: 1, - columnNumber: 1 -}, this); \ No newline at end of file + fileName: _jsxFileName, + lineNumber: 1, + columnNumber: 1 +}, this); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/unicode/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/unicode/output.js index 92d5b28cb4feb..36e9dd3adb3a6 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/unicode/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-react-jsx/test/fixtures/unicode/output.js @@ -1,4 +1,4 @@ import {jsx as _jsx} from 'react/jsx-runtime'; _jsx('h2', { - children: '🏝️' + children: '🏝️' }); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/enum-member-reference/output.js b/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/enum-member-reference/output.js index a963366508ed9..9cf660a74996a 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/enum-member-reference/output.js +++ b/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/enum-member-reference/output.js @@ -1,7 +1,7 @@ var x = 10; var Foo = function(Foo) { - Foo[Foo['a'] = 10] = 'a'; - Foo[Foo['b'] = 10] = 'b'; - Foo[Foo['c'] = Foo.b + x] = 'c'; - return Foo; + Foo[Foo['a'] = 10] = 'a'; + Foo[Foo['b'] = 10] = 'b'; + Foo[Foo['c'] = Foo.b + x] = 'c'; + return Foo; }(Foo || {}); diff --git a/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/export-elimination/output.ts b/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/export-elimination/output.ts index c15ddb40633e6..b180c8cd27989 100644 --- a/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/export-elimination/output.ts +++ b/tasks/transform_conformance/tests/babel-plugin-transform-typescript/test/fixtures/export-elimination/output.ts @@ -1,15 +1,15 @@ import Im, { Ok } from "a"; -class Foo {} +class Foo { } const Bar = 0; -function Func() {} +function Func() { } let Name; -(function(_Name) { - const Q = _Name.Q = 0; +(function (_Name) { + const Q = _Name.Q = 0; })(Name || (Name = {})); export { Im, Ok, Foo, Bar, Func, Name }; function T() { - return 123; + return 123; } export { T } diff --git a/tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/options.json index ec3370903d9ee..985f623da7f43 100644 --- a/tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/options.json +++ b/tasks/transform_conformance/tests/regexp/test/fixtures/all-regex-plugins-enabled-by-targets/options.json @@ -1,9 +1,12 @@ { "presets": [ - ["env", { - "targets": { - "chrome": "40" + [ + "env", + { + "targets": { + "chrome": "40" + } } - }] + ] ] } diff --git a/tasks/transform_conformance/tests/regexp/test/fixtures/igm/options.json b/tasks/transform_conformance/tests/regexp/test/fixtures/igm/options.json index ec3370903d9ee..985f623da7f43 100644 --- a/tasks/transform_conformance/tests/regexp/test/fixtures/igm/options.json +++ b/tasks/transform_conformance/tests/regexp/test/fixtures/igm/options.json @@ -1,9 +1,12 @@ { "presets": [ - ["env", { - "targets": { - "chrome": "40" + [ + "env", + { + "targets": { + "chrome": "40" + } } - }] + ] ] }