diff --git a/.typos.toml b/.typos.toml index 8f2883d57c5480..64c9b75e1f8d3a 100644 --- a/.typos.toml +++ b/.typos.toml @@ -23,7 +23,7 @@ extend-exclude = [ "tasks/prettier_conformance/prettier", "tasks/prettier_conformance/snapshots", "tasks/transform_conformance/tests/**/output.js", - "tasks/transform_conformance/snapshots", + "tasks/transform_conformance/overrides", "npm/oxc-wasm/oxc_wasm.js", ] diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js new file mode 100644 index 00000000000000..30fc5987b448da --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js @@ -0,0 +1,5 @@ +({a1} = c1); +var _c; +_c = c2, {a2} = _c, b2 = babelHelpers.objectWithoutProperties(_c, ["a2"]), _c; +var _c2; +console.log((_c2 = c3, {a3} = _c2, b3 = babelHelpers.objectWithoutProperties(_c2, ["a3"]), _c2)); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/catch-clause/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/catch-clause/output.js new file mode 100644 index 00000000000000..aaa87de1dfccb0 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/catch-clause/output.js @@ -0,0 +1,15 @@ +const _excluded = ["a1"], _excluded2 = ["a2", "b2"], _excluded3 = ["c3"]; +try {} catch (_ref) { + let a34 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); +} +try {} catch (_ref2) { + let { a1 } = _ref2, b1 = babelHelpers.objectWithoutProperties(_ref2, _excluded); +} +try {} catch (_ref3) { + let { a2, b2 } = _ref3, c2 = babelHelpers.objectWithoutProperties(_ref3, _excluded2); +} +try {} catch (_ref4) { + let { a2, b2, c2: _ref5 } = _ref4, { c3 } = _ref5, c4 = babelHelpers.objectWithoutProperties(_ref5, _excluded3); +} +try {} catch (a) {} +try {} catch ({ b }) {} diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/duplicate-decl-bug/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/duplicate-decl-bug/output.js new file mode 100644 index 00000000000000..3218842ff292ec --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/duplicate-decl-bug/output.js @@ -0,0 +1,7 @@ +it("es7.objectRestSpread", () => { + let original = { + a: 1, + b: 2 + }; + let copy = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(original), original)); +}); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.mjs b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.mjs new file mode 100644 index 00000000000000..4e595c3456420b --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.mjs @@ -0,0 +1,3 @@ +export var { b } = asdf2, c = babelHelpers.objectWithoutProperties(asdf2, ["b"]); +export var { bb, cc } = ads; +export var [dd, ee, ...ff] = ads; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-array-pattern/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-array-pattern/output.js similarity index 53% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-array-pattern/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-array-pattern/output.js index 65388f392eb9d5..571504fc8740e7 100644 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-array-pattern/output.js +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-array-pattern/output.js @@ -1,18 +1,17 @@ const _excluded = ["a"], _excluded2 = ["a"], _excluded3 = ["a"]; -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); for (const [_ref] of []) { - let { a } = _ref, b = _objectWithoutProperties(_ref, _excluded); + let { a } = _ref, b = babelHelpers.objectWithoutProperties(_ref, _excluded); } for (var _ref2 of []) { var _ref3; var _ref4; - [_ref3] = _ref2, _ref4 = _ref3, {a} = _ref4, b = _objectWithoutProperties(_ref4, _excluded2), _ref4; + [_ref3] = _ref2, _ref4 = _ref3, {a} = _ref4, b = babelHelpers.objectWithoutProperties(_ref4, _excluded2), _ref4; } async function a() { for await (var _ref5 of []) { var _ref6; var _ref7; - [_ref6] = _ref5, _ref7 = _ref6, {a} = _ref7, b = _objectWithoutProperties(_ref7, _excluded3), _ref7; + [_ref6] = _ref5, _ref7 = _ref6, {a} = _ref7, b = babelHelpers.objectWithoutProperties(_ref7, _excluded3), _ref7; } } for ([{a}] in {}) {} diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-completion-record/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-completion-record/output.js new file mode 100644 index 00000000000000..4fcc5ac39e16ef --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-completion-record/output.js @@ -0,0 +1,5 @@ +const _excluded = ["a"]; +for (var _ref of []) { + var _ref2; + _ref2 = _ref, {a} = _ref2, b = babelHelpers.objectWithoutProperties(_ref2, _excluded), _ref2; +} diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js similarity index 52% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js index d4e3be938a8a83..aa30ed04f26668 100644 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js @@ -1,16 +1,15 @@ const _excluded = ["a"], _excluded2 = ["a"], _excluded3 = ["a"]; -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); for (var _ref of []) { - let { a } = _ref, b = _objectWithoutProperties(_ref, _excluded); + let { a } = _ref, b = babelHelpers.objectWithoutProperties(_ref, _excluded); } for (var _ref2 of []) { var _ref3; - _ref3 = _ref2, {a} = _ref3, b = _objectWithoutProperties(_ref3, _excluded2), _ref3; + _ref3 = _ref2, {a} = _ref3, b = babelHelpers.objectWithoutProperties(_ref3, _excluded2), _ref3; } async function a() { for await (var _ref4 of []) { var _ref5; - _ref5 = _ref4, {a} = _ref5, b = _objectWithoutProperties(_ref5, _excluded3), _ref5; + _ref5 = _ref4, {a} = _ref5, b = babelHelpers.objectWithoutProperties(_ref5, _excluded3), _ref5; } } for ({a} in {}) {} diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/impure-computed/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/impure-computed/output.js new file mode 100644 index 00000000000000..811b126a948e67 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/impure-computed/output.js @@ -0,0 +1,25 @@ +var key, x, y, z; +key = 1; +var _$a = { + 1: 1, + a: 1 +}, _key = key++, { [_key]: y } = _$a, x = babelHelpers.objectWithoutProperties(_$a, [_key].map(babelHelpers.toPropertyKey)); +expect(x).toEqual({ a: 1 }); +expect(key).toBe(2); +expect(y).toBe(1); +key = 1; +var _$ = { + 2: 2, + 3: 3 +}, _key2 = ++key, _key3 = ++key, { [_key2]: y, [_key3]: z } = _$, rest = babelHelpers.objectWithoutProperties(_$, [_key2, _key3].map(babelHelpers.toPropertyKey)); +expect(y).toBe(2); +expect(z).toBe(3); +key = 2; +var _$z; +_$z = { + 2: "two", + z: "zee" +}, {[key]: y, z} = _$z, x = babelHelpers.objectWithoutProperties(_$z, [key, "z"].map(babelHelpers.toPropertyKey)), _$z; +expect(y).toBe("two"); +expect(x).toEqual({}); +expect(z).toBe("zee"); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-2/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-2/output.js new file mode 100644 index 00000000000000..1a868852c75cf6 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-2/output.js @@ -0,0 +1,6 @@ +const test = { foo: { bar: { baz: { a: { + x: 1, + y: 2, + z: 3 +} } } } }; +const { foo: { bar: { baz: { a: _ref } } } } = test, { x } = _ref, other = babelHelpers.objectWithoutProperties(_ref, ["x"]); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array-2/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array-2/output.js new file mode 100644 index 00000000000000..6dd778f93cb88a --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array-2/output.js @@ -0,0 +1 @@ +const [a, [_ref], _ref2, [_ref3, { h: [i, _ref4] }]] = x, { b } = _ref, c = babelHelpers.objectWithoutProperties(_ref, ["b"]), { d } = _ref2, e = babelHelpers.objectWithoutProperties(_ref2, ["d"]), { f } = _ref3, g = babelHelpers.objectWithoutProperties(_ref3, ["f"]), { j } = _ref4, k = babelHelpers.objectWithoutProperties(_ref4, ["j"]); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array/output.js new file mode 100644 index 00000000000000..bcdb772da16c83 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array/output.js @@ -0,0 +1,5 @@ +const [a, _ref] = x, { b } = _ref, c = babelHelpers.objectWithoutProperties(_ref, ["b"]); +let [d, _ref2] = x, { e } = _ref2, f = babelHelpers.objectWithoutProperties(_ref2, ["e"]); +var _ref3; +var _ref4; +[g, _ref3] = x, _ref4 = _ref3, {h} = _ref4, i = babelHelpers.objectWithoutProperties(_ref4, ["h"]), _ref4; diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-computed-key/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-computed-key/output.js new file mode 100644 index 00000000000000..cf204da61b5675 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-computed-key/output.js @@ -0,0 +1,4 @@ +const { [(_ref) => { + let rest = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); + let _ref2 = {}, b = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref2), _ref2)); +}]: a, [(_ref3 = {}, {} = _ref3, d = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref3), _ref3)), _ref3)]: c } = {}; diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-default-value/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-default-value/output.js new file mode 100644 index 00000000000000..141e73869788bc --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-default-value/output.js @@ -0,0 +1,4 @@ +const { a = (_ref) => { + let rest = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); + let _ref2 = {}, b = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref2), _ref2)); +}, c = (_ref3 = {}, {} = _ref3, d = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref3), _ref3)), _ref3) } = {}; diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-literal-property/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-literal-property/output.js new file mode 100644 index 00000000000000..0913d80b73c1b9 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-literal-property/output.js @@ -0,0 +1,2 @@ +let useState = [{ some: 42 }, () => null]; +let { 0: _ref, "2": _ref2, 1: setState } = useState, { numeric } = _ref, rest1 = babelHelpers.objectWithoutProperties(_ref, ["numeric"]), { str } = _ref2, rest2 = babelHelpers.objectWithoutProperties(_ref2, ["str"]); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-order/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-order/output.js new file mode 100644 index 00000000000000..107f2309cb5e5a --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-order/output.js @@ -0,0 +1 @@ +const { a: _ref, b: _ref2 } = obj, bar = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)), baz = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref2), _ref2)), foo = babelHelpers.objectWithoutProperties(obj, ["a", "b"]); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested/output.js new file mode 100644 index 00000000000000..d69dfa38bbee52 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested/output.js @@ -0,0 +1,5 @@ +const defunct = { outer: { inner: { + three: "three", + four: "four" +} } }; +const { outer: { inner: _ref } } = defunct, { three } = _ref, other = babelHelpers.objectWithoutProperties(_ref, ["three"]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/non-string-computed/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/non-string-computed/output.js similarity index 70% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/non-string-computed/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/non-string-computed/output.js index 51058298e0d1d1..4847f44d47f955 100644 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/non-string-computed/output.js +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/non-string-computed/output.js @@ -1,10 +1,8 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -var _toPropertyKey = require("@babel/runtime/helpers/toPropertyKey"); const a = { "3": "three", "foo": "bar" }; -const { [3]: omit } = a, rest = _objectWithoutProperties(a, ["3"]); +const { [3]: omit } = a, rest = babelHelpers.objectWithoutProperties(a, ["3"]); expect(rest).toEqual({ "foo": "bar" }); expect(omit).toBe("three"); const [k1, k2, k3, k4, k5] = [ @@ -23,13 +21,13 @@ const c = { [k4]: "4", [k5]: "5" }; -const { [k1]: v1, [k2]: v2, [k3]: v3, [k4]: v4, [k5]: v5 } = c, vrest = _objectWithoutProperties(c, [ +const { [k1]: v1, [k2]: v2, [k3]: v3, [k4]: v4, [k5]: v5 } = c, vrest = babelHelpers.objectWithoutProperties(c, [ k1, k2, k3, k4, k5 -].map(_toPropertyKey)); +].map(babelHelpers.toPropertyKey)); expect(v1).toBe("1"); expect(v2).toBe("2"); expect(v3).toBe("3"); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/null-destructuring/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/null-destructuring/output.js new file mode 100644 index 00000000000000..5c7af9b85403d0 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/null-destructuring/output.js @@ -0,0 +1,7 @@ +const _excluded = ["x"]; +expect(() => { + var _ref = null, x = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); +}).toThrow(/null/); +expect(() => { + var _ref2 = null, { x } = _ref2, y = babelHelpers.objectWithoutProperties(_ref2, _excluded); +}).toThrow(/null/); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/object-ref-computed/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/object-ref-computed/output.js similarity index 57% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/object-ref-computed/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/object-ref-computed/output.js index 63d3e68376f150..a0d0c8eae73dea 100644 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/object-ref-computed/output.js +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/object-ref-computed/output.js @@ -1,10 +1,9 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); var key, x, y, z; key = 1; var _ = { 1: { a: 1, y: 1 -} }, { [key++]: _ref } = _, { y } = _ref, x = _objectWithoutProperties(_ref, ["y"]); +} }, { [key++]: _ref } = _, { y } = _ref, x = babelHelpers.objectWithoutProperties(_ref, ["y"]); expect(x).toEqual({ a: 1 }); expect(key).toBe(2); expect(y).toBe(1); @@ -18,7 +17,7 @@ var _$ = { y: 2, z: 3 } -}, { [++key]: _ref2, [++key]: _ref3 } = _$, { y } = _ref2, rest_y = _objectWithoutProperties(_ref2, ["y"]), { z } = _ref3, rest_z = _objectWithoutProperties(_ref3, ["z"]); +}, { [++key]: _ref2, [++key]: _ref3 } = _$, { y } = _ref2, rest_y = babelHelpers.objectWithoutProperties(_ref2, ["y"]), { z } = _ref3, rest_z = babelHelpers.objectWithoutProperties(_ref3, ["z"]); expect(y).toBe(2); expect(rest_y).toEqual({ z: 3 }); expect(z).toBe(3); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters-object-rest-used-in-default/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters-object-rest-used-in-default/output.js new file mode 100644 index 00000000000000..b2245680d37859 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters-object-rest-used-in-default/output.js @@ -0,0 +1,26 @@ +const _excluded = ["X"]; +(_ref, a = R) => { + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); +}; +(_ref2, { a = { Y } }) => { + let { X: Y } = _ref2, R = babelHelpers.objectWithoutProperties(_ref2, _excluded); +}; +(a = R, _ref3) => { + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref3), _ref3)); +}; +(_ref4, e, c = 2, a = R, f = q) => { + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref4), _ref4)); + let q; +}; +(_ref5, a = f(R)) => { + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref5), _ref5)); +}; +(_ref6, { [R.key]: a = 42 }) => { + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref6), _ref6)); +}; +(_ref7, { a = { R: b } }) => { + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref7), _ref7)); +}; +(_ref8, { a = (R) => R } = { b: (R) => R }) => { + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref8), _ref8)); +}; diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters/output.js new file mode 100644 index 00000000000000..2a70422f823378 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters/output.js @@ -0,0 +1,35 @@ +const _excluded = ["a1"], _excluded2 = ["a2", "b2"], _excluded3 = ["a5"], _excluded4 = ["a3"], _excluded5 = ["ba1"], _excluded6 = ["a3", "b2"], _excluded7 = ["ba1"], _excluded8 = ["a1"], _excluded9 = ["a1"]; +function a(_ref) { + let a34 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); +} +function a2(_ref2) { + let { a1 } = _ref2, b1 = babelHelpers.objectWithoutProperties(_ref2, _excluded); +} +function a3(_ref3) { + let { a2, b2 } = _ref3, c2 = babelHelpers.objectWithoutProperties(_ref3, _excluded2); +} +function a4(_ref4, _ref5) { + let { a5 } = _ref5, c5 = babelHelpers.objectWithoutProperties(_ref5, _excluded3); + let { a3 } = _ref4, c3 = babelHelpers.objectWithoutProperties(_ref4, _excluded4); +} +function a5(_ref6) { + let { a3, b2: _ref7 } = _ref6, { ba1 } = _ref7, ba2 = babelHelpers.objectWithoutProperties(_ref7, _excluded5), c3 = babelHelpers.objectWithoutProperties(_ref6, _excluded6); +} +function a6(_ref8) { + let { a3, b2: _ref9 } = _ref8, { ba1 } = _ref9, ba2 = babelHelpers.objectWithoutProperties(_ref9, _excluded7); +} +function a7(_ref10 = {}) { + let { a1 = 1 } = _ref10, b1 = babelHelpers.objectWithoutProperties(_ref10, _excluded8); +} +function a8([_ref11]) { + let a1 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref11), _ref11)); +} +function a9([_ref12]) { + let { a1 } = _ref12, a2 = babelHelpers.objectWithoutProperties(_ref12, _excluded9); +} +function a10([a1, _ref13]) { + let a2 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref13), _ref13)); +} +function b(a) {} +function b2(a, ...b) {} +function b3({ b }) {} diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/symbol/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/symbol/output.js new file mode 100644 index 00000000000000..987860ba5d5036 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/symbol/output.js @@ -0,0 +1,4 @@ +let _ref = {}, _Symbol$for = Symbol.for("foo"), { [_Symbol$for]: foo } = _ref, rest = babelHelpers.objectWithoutProperties(_ref, [_Symbol$for].map(babelHelpers.toPropertyKey)); +var _ref2, _Symbol$for2 = Symbol.for("foo"); +_ref2 = {}, {[_Symbol$for2]: foo} = _ref2, rest = babelHelpers.objectWithoutProperties(_ref2, [_Symbol$for2].map(babelHelpers.toPropertyKey)), _ref2; +if (_ref3 = {}, {[_Symbol$for3]: foo} = _ref3, rest = babelHelpers.objectWithoutProperties(_ref3, [_Symbol$for3].map(babelHelpers.toPropertyKey)), _ref3) {} diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-allLiterals-true-no-hoisting/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-allLiterals-true-no-hoisting/output.js new file mode 100644 index 00000000000000..720148c953cb92 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-allLiterals-true-no-hoisting/output.js @@ -0,0 +1,6 @@ +const example = () => { + const input = {}; + const foo = "foo"; + var _input, _ref = `${foo}_bar`; + _input = input, {[_ref]: country} = _input, rest = babelHelpers.objectWithoutProperties(_input, [_ref].map(babelHelpers.toPropertyKey)), _input; +}; diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-false/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-false/output.js new file mode 100644 index 00000000000000..be054b8a04421f --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-false/output.js @@ -0,0 +1,8 @@ +const input = {}; +const _ref = prefix + "state", _ref2 = `${prefix}consents`, { given_name: givenName, "last_name": lastName, [`country`]: country, [_ref]: state, [_ref2]: consents } = input, rest = babelHelpers.objectWithoutProperties(input, [ + "given_name", + "last_name", + `country`, + _ref, + _ref2 +].map(babelHelpers.toPropertyKey)); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-true/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-true/output.js new file mode 100644 index 00000000000000..86279ce8a9da37 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-true/output.js @@ -0,0 +1,6 @@ +const input = {}; +const { given_name: givenName, "last_name": lastName, [`country`]: country } = input, rest = babelHelpers.objectWithoutProperties(input, [ + "given_name", + "last_name", + `country` +]); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/variable-destructuring/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/variable-destructuring/output.js new file mode 100644 index 00000000000000..4808c49fb4a960 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/variable-destructuring/output.js @@ -0,0 +1,32 @@ +const _z = z(), { x15: [ ...{ ...y15 }] } = _z; +let { x: _ref, y: _ref2 } = complex, { a: xa, [d]: f } = _ref, asdf = babelHelpers.objectWithoutProperties(_ref, ["a", d].map(babelHelpers.toPropertyKey)), d = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref2), _ref2)), g = babelHelpers.objectWithoutProperties(complex, ["x", "y"]); +let _z2 = z(), { x4: _ref3 } = _z2, y4 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref3), _ref3)); +let _z3 = z(), { x5: _ref4 } = _z3, { w5 } = _ref4, y5 = babelHelpers.objectWithoutProperties(_ref4, ["w5"]); +let _z4 = z(), { x6: { w6: _ref5 } } = _z4, { a6 } = _ref5, y6 = babelHelpers.objectWithoutProperties(_ref5, ["a6"]); +let _z5 = z(), { x7: { e7, r7 }, q7: { w7: _ref6 } } = _z5, { a7 } = _ref6, y7 = babelHelpers.objectWithoutProperties(_ref6, ["a7"]); +let _z6 = z(), { x8 } = _z6, y8 = babelHelpers.objectWithoutProperties(_z6, ["x8"]); +let _z7 = z(), { x9: { w9: _ref7 }, x10: _ref8 } = _z7, { a9 } = _ref7, y9 = babelHelpers.objectWithoutProperties(_ref7, ["a9"]), { a10 } = _ref8, y10 = babelHelpers.objectWithoutProperties(_ref8, ["a10"]); +let _z8 = z(), { x11: [_ref9] } = _z8, { w11 } = _ref9, z11 = babelHelpers.objectWithoutProperties(_ref9, ["w11"]); +let _z9 = z(), { x12: [{ a12, b12 }, _ref10] } = _z9, { c12 } = _ref10, d12 = babelHelpers.objectWithoutProperties(_ref10, ["c12"]); +let _z10 = z(), { x13: [, _ref11] } = _z10, { c13 } = _ref11, d13 = babelHelpers.objectWithoutProperties(_ref11, ["c13"]); +const _z11 = z(), { x14: [ ...{ q14,...y14 }] } = _z11; +const _z12 = z(), { x15: [ ...{ ...y16 }] } = _z12; +const { x16: [] } = z(); +const [ ...[ ...y17]] = z(); +const _z13 = z(), [ ...{ ...y18 }] = _z13; +const _z14 = z(), [ ...{ a19,...y19 }] = _z14; +const _z15 = z(), { x20: _ref12 = {} } = _z15, y20 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref12), _ref12)); +const _z16 = z(), { x22: _ref13 = {} } = _z16, { q22 } = _ref13, y22 = babelHelpers.objectWithoutProperties(_ref13, ["q22"]); +const [[ ...y23] = []] = z(); +const _z17 = z(), [_ref14 = []] = _z17, y24 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref14), _ref14)); +const { x25: [ ...y25] = [] } = z(); +const { x26: [q26, ...y26] = [] } = z(); +const {} = {}; +const [, , x27] = z(); +const _z18 = z(), { x28: [, , _ref15] } = _z18, y28 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref15), _ref15)); +const _z19 = z(), { x29: [, , _ref16] } = _z19, { q29 } = _ref16, y29 = babelHelpers.objectWithoutProperties(_ref16, ["q29"]); +const _z20 = z(), [, , _ref17] = _z20, { y30 } = _ref17, x30 = babelHelpers.objectWithoutProperties(_ref17, ["y30"]); +const _z21 = z(), [, , _ref18] = _z21, x31 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref18), _ref18)); +const _z22 = z(), { x32: {}, w32: _ref19 } = _z22, y32 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref19), _ref19)); +const _z23 = z(), [, , {}, _ref20] = _z23, q32 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref20), _ref20)); +const _z24 = z(), y33 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_z24), _z24)); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/output.js new file mode 100644 index 00000000000000..774c03f747643f --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/output.js @@ -0,0 +1,9 @@ +let _a$d = { + a: [ + 1, + 2, + 3, + 4 + ], + d: "oyez" +}, { a: [b, ...arrayRest], c = function(...functionRest) {} } = _a$d, objectRest = babelHelpers.objectWithoutProperties(_a$d, ["a", "c"]); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/assignment/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/assignment/output.js new file mode 100644 index 00000000000000..38b4cc23bf707a --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/assignment/output.js @@ -0,0 +1,8 @@ +var x; +var y; +var z; +z = babelHelpers.objectSpread2({ x }, y); +z = { + x, + w: babelHelpers.objectSpread2({}, y) +}; diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/expression/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/expression/output.js new file mode 100644 index 00000000000000..74d788f8809cb3 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/expression/output.js @@ -0,0 +1,13 @@ +var a; +var b; +var c; +var d; +var x; +var y; +babelHelpers.objectSpread2(babelHelpers.objectSpread2(babelHelpers.objectSpread2({ x }, y), {}, { a }, b), {}, { c }); +babelHelpers.objectSpread2({}, Object.prototype); +babelHelpers.objectSpread2({}, { foo: "bar" }); +babelHelpers.objectSpread2(babelHelpers.objectSpread2({}, { foo: "bar" }), { bar: "baz" }); +babelHelpers.objectSpread2({}, { get foo() { + return "foo"; +} }); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/side-effect/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/side-effect/output.js new file mode 100644 index 00000000000000..6068478f837500 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/side-effect/output.js @@ -0,0 +1,18 @@ +var k = { + a: 1, + b: 2 +}; +var o = babelHelpers.objectSpread2(babelHelpers.objectSpread2({ a: 3 }, k), {}, { b: k.a++ }); +var pureA = {}; +var pureB = {}; +var pureC = {}; +var pureD = {}; +var pureE = {}; +function impureFunc() { + console.log("hello"); +} +var output = babelHelpers.objectSpread2(babelHelpers.objectSpread2(babelHelpers.objectSpread2(babelHelpers.objectSpread2(babelHelpers.objectSpread2(babelHelpers.objectSpread2({}, pureA), {}, { + get foo() {}, + get bar() {} +}, pureB), pureC), impureFunc()), pureD), {}, { pureD }); +var simpleOutput = babelHelpers.objectSpread2(babelHelpers.objectSpread2({}, pureA), {}, { test: "1" }, pureB); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/variable-declaration/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/variable-declaration/output.js new file mode 100644 index 00000000000000..0932c4d4046089 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/variable-declaration/output.js @@ -0,0 +1 @@ +var z = babelHelpers.objectSpread2({}, x); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-4904/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-4904/output.js new file mode 100644 index 00000000000000..7d27022c7b6df5 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-4904/output.js @@ -0,0 +1,7 @@ +const _excluded = ["b"]; +const _foo = foo(), { s } = _foo, t = babelHelpers.objectWithoutProperties(_foo, ["s"]); +const _bar = bar(), { s: _ref } = _bar, { q1 } = _ref, q2 = babelHelpers.objectWithoutProperties(_ref, ["q1"]), q3 = babelHelpers.objectWithoutProperties(_bar, ["s"]); +const { a } = foo((_ref2) => { + let { b } = _ref2, c = babelHelpers.objectWithoutProperties(_ref2, _excluded); + console.log(b, c); +}); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-5151/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-5151/output.js new file mode 100644 index 00000000000000..b3ee9f96aa86f1 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-5151/output.js @@ -0,0 +1,3 @@ +const { x } = a, y = babelHelpers.objectWithoutProperties(a, ["x"]), z = foo(y); +const s = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(r), r)), t = foo(s); +var l = foo(), _bar = bar(), { m: _ref } = _bar, { n } = _ref, o = babelHelpers.objectWithoutProperties(_ref, ["n"]), p = babelHelpers.objectWithoutProperties(_bar, ["m"]), q = baz(); diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7304/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7304/output.js new file mode 100644 index 00000000000000..5312e4d44d833e --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7304/output.js @@ -0,0 +1,5 @@ +export default class { + method(_ref) { + let object = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); + } +} diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7388/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7388/output.js new file mode 100644 index 00000000000000..5c267d8833dc62 --- /dev/null +++ b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7388/output.js @@ -0,0 +1,9 @@ +const _excluded = ["a"]; +function fn0(obj0) { + const { fn1 = (obj1 = {}) => { + const { fn2 = (obj2 = {}) => { + const { a } = obj2, rest = babelHelpers.objectWithoutProperties(obj2, _excluded); + console.log(rest); + } } = obj1; + } } = obj0; +} diff --git a/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-8323/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-8323/output.js new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/assignment/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/assignment/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/assignment/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/assignment/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/cast-to-boolean/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/cast-to-boolean/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/cast-to-boolean/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/cast-to-boolean/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/in-function-params/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/in-function-params/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/in-function-params/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/in-function-params/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/memoize/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/memoize/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/memoize/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/memoize/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/optional-eval-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/optional-eval-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/optional-eval-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/optional-eval-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/super-method-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/super-method-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/super-method-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-noDocumentAll/super-method-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/function-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/function-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/function-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/function-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/memoize/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/memoize/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/memoize/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/memoize/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/super-method-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/super-method-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/super-method-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/assumption-pureGetters/super-method-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/assignment/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/assignment/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/assignment/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/assignment/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/cast-to-boolean/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/cast-to-boolean/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/cast-to-boolean/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/cast-to-boolean/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/containers/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/containers/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/containers/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/containers/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/delete-in-function-params/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/delete-in-function-params/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/delete-in-function-params/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/delete-in-function-params/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/delete/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/delete/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/delete/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/delete/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-spread/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-spread/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-spread/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call-spread/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/function-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-function-params/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-method-key/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-var-destructuring/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-var-destructuring/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/in-var-destructuring/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/in-var-destructuring/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/member-access/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/member-access/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/member-access/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/member-access/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/memoize/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/optional-eval-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-expression-containers/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-expression-containers/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-expression-containers/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-expression-containers/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/parenthesized-member-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/super-method-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/unary/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/unary/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/general/unary/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/general/unary/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/loose/cast-to-boolean/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/loose/cast-to-boolean/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/loose/cast-to-boolean/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/loose/cast-to-boolean/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-optional-chaining/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-optional-chaining/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-optional-chaining/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-optional-chaining/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts-and-optional-chaining/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts-and-optional-chaining/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts-and-optional-chaining/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts-and-optional-chaining/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/10959-transform-ts/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/15887/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/15887/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/15887/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/15887/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/7642/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/7642/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/regression/7642/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/regression/7642/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context-in-if/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context-in-if/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context-in-if/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context-in-if/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-call-context/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-function-call-loose/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-function-call-loose/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-function-call-loose/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-function-call-loose/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-in-conditional/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-in-conditional/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-in-conditional/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-in-conditional/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-member-expression/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-member-expression/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-member-expression/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-as-member-expression/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-parenthesized-expression-member-call/output.js b/tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-parenthesized-expression-member-call/output.js similarity index 100% rename from tasks/transform_conformance/snapshots/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-parenthesized-expression-member-call/output.js rename to tasks/transform_conformance/overrides/babel-plugin-transform-optional-chaining/test/fixtures/transparent-expr-wrappers/ts-parenthesized-expression-member-call/output.js diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js deleted file mode 100644 index f5642866c2bde9..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/assignment-expression/output.js +++ /dev/null @@ -1,6 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -({a1} = c1); -var _c; -_c = c2, {a2} = _c, b2 = _objectWithoutProperties(_c, ["a2"]), _c; -var _c2; -console.log((_c2 = c3, {a3} = _c2, b3 = _objectWithoutProperties(_c2, ["a3"]), _c2)); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/catch-clause/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/catch-clause/output.js deleted file mode 100644 index 9392f370d44db2..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/catch-clause/output.js +++ /dev/null @@ -1,18 +0,0 @@ -const _excluded = ["a1"], _excluded2 = ["a2", "b2"], _excluded3 = ["c3"]; -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -try {} catch (_ref) { - let a34 = _extends({}, (_objectDestructuringEmpty(_ref), _ref)); -} -try {} catch (_ref2) { - let { a1 } = _ref2, b1 = _objectWithoutProperties(_ref2, _excluded); -} -try {} catch (_ref3) { - let { a2, b2 } = _ref3, c2 = _objectWithoutProperties(_ref3, _excluded2); -} -try {} catch (_ref4) { - let { a2, b2, c2: _ref5 } = _ref4, { c3 } = _ref5, c4 = _objectWithoutProperties(_ref5, _excluded3); -} -try {} catch (a) {} -try {} catch ({ b }) {} diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/duplicate-decl-bug/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/duplicate-decl-bug/output.js deleted file mode 100644 index db3b63c1aeaab9..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/duplicate-decl-bug/output.js +++ /dev/null @@ -1,9 +0,0 @@ -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -it("es7.objectRestSpread", () => { - let original = { - a: 1, - b: 2 - }; - let copy = _extends({}, (_objectDestructuringEmpty(original), original)); -}); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.mjs b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.mjs deleted file mode 100644 index 8cfb0d86e8e16c..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/export/output.mjs +++ /dev/null @@ -1,4 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -export var { b } = asdf2, c = _objectWithoutProperties(asdf2, ["b"]); -export var { bb, cc } = ads; -export var [dd, ee, ...ff] = ads; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-completion-record/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-completion-record/output.js deleted file mode 100644 index 35868ea38e96b6..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-completion-record/output.js +++ /dev/null @@ -1,6 +0,0 @@ -const _excluded = ["a"]; -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -for (var _ref of []) { - var _ref2; - _ref2 = _ref, {a} = _ref2, b = _objectWithoutProperties(_ref2, _excluded), _ref2; -} diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/impure-computed/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/impure-computed/output.js deleted file mode 100644 index fe56879c08c497..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/impure-computed/output.js +++ /dev/null @@ -1,27 +0,0 @@ -var _toPropertyKey = require("@babel/runtime/helpers/toPropertyKey"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -var key, x, y, z; -key = 1; -var _$a = { - 1: 1, - a: 1 -}, _key = key++, { [_key]: y } = _$a, x = _objectWithoutProperties(_$a, [_key].map(_toPropertyKey)); -expect(x).toEqual({ a: 1 }); -expect(key).toBe(2); -expect(y).toBe(1); -key = 1; -var _$ = { - 2: 2, - 3: 3 -}, _key2 = ++key, _key3 = ++key, { [_key2]: y, [_key3]: z } = _$, rest = _objectWithoutProperties(_$, [_key2, _key3].map(_toPropertyKey)); -expect(y).toBe(2); -expect(z).toBe(3); -key = 2; -var _$z; -_$z = { - 2: "two", - z: "zee" -}, {[key]: y, z} = _$z, x = _objectWithoutProperties(_$z, [key, "z"].map(_toPropertyKey)), _$z; -expect(y).toBe("two"); -expect(x).toEqual({}); -expect(z).toBe("zee"); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-2/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-2/output.js deleted file mode 100644 index 4cbe0b565eed2e..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-2/output.js +++ /dev/null @@ -1,7 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const test = { foo: { bar: { baz: { a: { - x: 1, - y: 2, - z: 3 -} } } } }; -const { foo: { bar: { baz: { a: _ref } } } } = test, { x } = _ref, other = _objectWithoutProperties(_ref, ["x"]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array-2/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array-2/output.js deleted file mode 100644 index a9e0b73b4d9009..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array-2/output.js +++ /dev/null @@ -1,2 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const [a, [_ref], _ref2, [_ref3, { h: [i, _ref4] }]] = x, { b } = _ref, c = _objectWithoutProperties(_ref, ["b"]), { d } = _ref2, e = _objectWithoutProperties(_ref2, ["d"]), { f } = _ref3, g = _objectWithoutProperties(_ref3, ["f"]), { j } = _ref4, k = _objectWithoutProperties(_ref4, ["j"]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array/output.js deleted file mode 100644 index 19ae884a8b4d94..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-array/output.js +++ /dev/null @@ -1,6 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const [a, _ref] = x, { b } = _ref, c = _objectWithoutProperties(_ref, ["b"]); -let [d, _ref2] = x, { e } = _ref2, f = _objectWithoutProperties(_ref2, ["e"]); -var _ref3; -var _ref4; -[g, _ref3] = x, _ref4 = _ref3, {h} = _ref4, i = _objectWithoutProperties(_ref4, ["h"]), _ref4; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-computed-key/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-computed-key/output.js deleted file mode 100644 index da9d9429effbba..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-computed-key/output.js +++ /dev/null @@ -1,6 +0,0 @@ -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -const { [(_ref) => { - let rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref)); - let _ref2 = {}, b = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2)); -}]: a, [(_ref3 = {}, {} = _ref3, d = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3)), _ref3)]: c } = {}; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-default-value/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-default-value/output.js deleted file mode 100644 index c97cb82b8e94d3..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-default-value/output.js +++ /dev/null @@ -1,6 +0,0 @@ -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -const { a = (_ref) => { - let rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref)); - let _ref2 = {}, b = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2)); -}, c = (_ref3 = {}, {} = _ref3, d = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3)), _ref3) } = {}; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-literal-property/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-literal-property/output.js deleted file mode 100644 index 5d386ee09ab4cc..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-literal-property/output.js +++ /dev/null @@ -1,3 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -let useState = [{ some: 42 }, () => null]; -let { 0: _ref, "2": _ref2, 1: setState } = useState, { numeric } = _ref, rest1 = _objectWithoutProperties(_ref, ["numeric"]), { str } = _ref2, rest2 = _objectWithoutProperties(_ref2, ["str"]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-order/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-order/output.js deleted file mode 100644 index dd8c9ff87ed763..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested-order/output.js +++ /dev/null @@ -1,4 +0,0 @@ -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const { a: _ref, b: _ref2 } = obj, bar = _extends({}, (_objectDestructuringEmpty(_ref), _ref)), baz = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2)), foo = _objectWithoutProperties(obj, ["a", "b"]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested/output.js deleted file mode 100644 index 9cc00d95472f59..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/nested/output.js +++ /dev/null @@ -1,6 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const defunct = { outer: { inner: { - three: "three", - four: "four" -} } }; -const { outer: { inner: _ref } } = defunct, { three } = _ref, other = _objectWithoutProperties(_ref, ["three"]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/null-destructuring/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/null-destructuring/output.js deleted file mode 100644 index f4e8257795ae78..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/null-destructuring/output.js +++ /dev/null @@ -1,10 +0,0 @@ -const _excluded = ["x"]; -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -expect(() => { - var _ref = null, x = _extends({}, (_objectDestructuringEmpty(_ref), _ref)); -}).toThrow(/null/); -expect(() => { - var _ref2 = null, { x } = _ref2, y = _objectWithoutProperties(_ref2, _excluded); -}).toThrow(/null/); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters-object-rest-used-in-default/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters-object-rest-used-in-default/output.js deleted file mode 100644 index 7c8ff6d10141db..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters-object-rest-used-in-default/output.js +++ /dev/null @@ -1,29 +0,0 @@ -const _excluded = ["X"]; -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -(_ref, a = R) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref), _ref)); -}; -(_ref2, { a = { Y } }) => { - let { X: Y } = _ref2, R = _objectWithoutProperties(_ref2, _excluded); -}; -(a = R, _ref3) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3)); -}; -(_ref4, e, c = 2, a = R, f = q) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4)); - let q; -}; -(_ref5, a = f(R)) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5)); -}; -(_ref6, { [R.key]: a = 42 }) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6)); -}; -(_ref7, { a = { R: b } }) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7)); -}; -(_ref8, { a = (R) => R } = { b: (R) => R }) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref8), _ref8)); -}; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters/output.js deleted file mode 100644 index b0ccf01493c330..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/parameters/output.js +++ /dev/null @@ -1,38 +0,0 @@ -const _excluded = ["a1"], _excluded2 = ["a2", "b2"], _excluded3 = ["a5"], _excluded4 = ["a3"], _excluded5 = ["ba1"], _excluded6 = ["a3", "b2"], _excluded7 = ["ba1"], _excluded8 = ["a1"], _excluded9 = ["a1"]; -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -function a(_ref) { - let a34 = _extends({}, (_objectDestructuringEmpty(_ref), _ref)); -} -function a2(_ref2) { - let { a1 } = _ref2, b1 = _objectWithoutProperties(_ref2, _excluded); -} -function a3(_ref3) { - let { a2, b2 } = _ref3, c2 = _objectWithoutProperties(_ref3, _excluded2); -} -function a4(_ref4, _ref5) { - let { a5 } = _ref5, c5 = _objectWithoutProperties(_ref5, _excluded3); - let { a3 } = _ref4, c3 = _objectWithoutProperties(_ref4, _excluded4); -} -function a5(_ref6) { - let { a3, b2: _ref7 } = _ref6, { ba1 } = _ref7, ba2 = _objectWithoutProperties(_ref7, _excluded5), c3 = _objectWithoutProperties(_ref6, _excluded6); -} -function a6(_ref8) { - let { a3, b2: _ref9 } = _ref8, { ba1 } = _ref9, ba2 = _objectWithoutProperties(_ref9, _excluded7); -} -function a7(_ref10 = {}) { - let { a1 = 1 } = _ref10, b1 = _objectWithoutProperties(_ref10, _excluded8); -} -function a8([_ref11]) { - let a1 = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11)); -} -function a9([_ref12]) { - let { a1 } = _ref12, a2 = _objectWithoutProperties(_ref12, _excluded9); -} -function a10([a1, _ref13]) { - let a2 = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13)); -} -function b(a) {} -function b2(a, ...b) {} -function b3({ b }) {} diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/symbol/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/symbol/output.js deleted file mode 100644 index bc440ec97077b8..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/symbol/output.js +++ /dev/null @@ -1,6 +0,0 @@ -var _toPropertyKey = require("@babel/runtime/helpers/toPropertyKey"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -let _ref = {}, _Symbol$for = Symbol.for("foo"), { [_Symbol$for]: foo } = _ref, rest = _objectWithoutProperties(_ref, [_Symbol$for].map(_toPropertyKey)); -var _ref2, _Symbol$for2 = Symbol.for("foo"); -_ref2 = {}, {[_Symbol$for2]: foo} = _ref2, rest = _objectWithoutProperties(_ref2, [_Symbol$for2].map(_toPropertyKey)), _ref2; -if (_ref3 = {}, {[_Symbol$for3]: foo} = _ref3, rest = _objectWithoutProperties(_ref3, [_Symbol$for3].map(_toPropertyKey)), _ref3) {} diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-allLiterals-true-no-hoisting/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-allLiterals-true-no-hoisting/output.js deleted file mode 100644 index dc7f938817f7ea..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-allLiterals-true-no-hoisting/output.js +++ /dev/null @@ -1,8 +0,0 @@ -var _toPropertyKey = require("@babel/runtime/helpers/toPropertyKey"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const example = () => { - const input = {}; - const foo = "foo"; - var _input, _ref = `${foo}_bar`; - _input = input, {[_ref]: country} = _input, rest = _objectWithoutProperties(_input, [_ref].map(_toPropertyKey)), _input; -}; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-false/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-false/output.js deleted file mode 100644 index 4bda99dc05b885..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-false/output.js +++ /dev/null @@ -1,10 +0,0 @@ -var _toPropertyKey = require("@babel/runtime/helpers/toPropertyKey"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const input = {}; -const _ref = prefix + "state", _ref2 = `${prefix}consents`, { given_name: givenName, "last_name": lastName, [`country`]: country, [_ref]: state, [_ref2]: consents } = input, rest = _objectWithoutProperties(input, [ - "given_name", - "last_name", - `country`, - _ref, - _ref2 -].map(_toPropertyKey)); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-true/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-true/output.js deleted file mode 100644 index a9dfac9798f1c3..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/template-literal-property-allLiterals-true/output.js +++ /dev/null @@ -1,7 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const input = {}; -const { given_name: givenName, "last_name": lastName, [`country`]: country } = input, rest = _objectWithoutProperties(input, [ - "given_name", - "last_name", - `country` -]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/variable-destructuring/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/variable-destructuring/output.js deleted file mode 100644 index 08a8bba8c5b312..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/variable-destructuring/output.js +++ /dev/null @@ -1,36 +0,0 @@ -var _toPropertyKey = require("@babel/runtime/helpers/toPropertyKey"); -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -const _z = z(), { x15: [ ...{ ...y15 }] } = _z; -let { x: _ref, y: _ref2 } = complex, { a: xa, [d]: f } = _ref, asdf = _objectWithoutProperties(_ref, ["a", d].map(_toPropertyKey)), d = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2)), g = _objectWithoutProperties(complex, ["x", "y"]); -let _z2 = z(), { x4: _ref3 } = _z2, y4 = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3)); -let _z3 = z(), { x5: _ref4 } = _z3, { w5 } = _ref4, y5 = _objectWithoutProperties(_ref4, ["w5"]); -let _z4 = z(), { x6: { w6: _ref5 } } = _z4, { a6 } = _ref5, y6 = _objectWithoutProperties(_ref5, ["a6"]); -let _z5 = z(), { x7: { e7, r7 }, q7: { w7: _ref6 } } = _z5, { a7 } = _ref6, y7 = _objectWithoutProperties(_ref6, ["a7"]); -let _z6 = z(), { x8 } = _z6, y8 = _objectWithoutProperties(_z6, ["x8"]); -let _z7 = z(), { x9: { w9: _ref7 }, x10: _ref8 } = _z7, { a9 } = _ref7, y9 = _objectWithoutProperties(_ref7, ["a9"]), { a10 } = _ref8, y10 = _objectWithoutProperties(_ref8, ["a10"]); -let _z8 = z(), { x11: [_ref9] } = _z8, { w11 } = _ref9, z11 = _objectWithoutProperties(_ref9, ["w11"]); -let _z9 = z(), { x12: [{ a12, b12 }, _ref10] } = _z9, { c12 } = _ref10, d12 = _objectWithoutProperties(_ref10, ["c12"]); -let _z10 = z(), { x13: [, _ref11] } = _z10, { c13 } = _ref11, d13 = _objectWithoutProperties(_ref11, ["c13"]); -const _z11 = z(), { x14: [ ...{ q14,...y14 }] } = _z11; -const _z12 = z(), { x15: [ ...{ ...y16 }] } = _z12; -const { x16: [] } = z(); -const [ ...[ ...y17]] = z(); -const _z13 = z(), [ ...{ ...y18 }] = _z13; -const _z14 = z(), [ ...{ a19,...y19 }] = _z14; -const _z15 = z(), { x20: _ref12 = {} } = _z15, y20 = _extends({}, (_objectDestructuringEmpty(_ref12), _ref12)); -const _z16 = z(), { x22: _ref13 = {} } = _z16, { q22 } = _ref13, y22 = _objectWithoutProperties(_ref13, ["q22"]); -const [[ ...y23] = []] = z(); -const _z17 = z(), [_ref14 = []] = _z17, y24 = _extends({}, (_objectDestructuringEmpty(_ref14), _ref14)); -const { x25: [ ...y25] = [] } = z(); -const { x26: [q26, ...y26] = [] } = z(); -const {} = {}; -const [, , x27] = z(); -const _z18 = z(), { x28: [, , _ref15] } = _z18, y28 = _extends({}, (_objectDestructuringEmpty(_ref15), _ref15)); -const _z19 = z(), { x29: [, , _ref16] } = _z19, { q29 } = _ref16, y29 = _objectWithoutProperties(_ref16, ["q29"]); -const _z20 = z(), [, , _ref17] = _z20, { y30 } = _ref17, x30 = _objectWithoutProperties(_ref17, ["y30"]); -const _z21 = z(), [, , _ref18] = _z21, x31 = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18)); -const _z22 = z(), { x32: {}, w32: _ref19 } = _z22, y32 = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19)); -const _z23 = z(), [, , {}, _ref20] = _z23, q32 = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20)); -const _z24 = z(), y33 = _extends({}, (_objectDestructuringEmpty(_z24), _z24)); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/output.js deleted file mode 100644 index cd0a3f8103d882..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/with-array-rest/output.js +++ /dev/null @@ -1,10 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -let _a$d = { - a: [ - 1, - 2, - 3, - 4 - ], - d: "oyez" -}, { a: [b, ...arrayRest], c = function(...functionRest) {} } = _a$d, objectRest = _objectWithoutProperties(_a$d, ["a", "c"]); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/assignment/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/assignment/output.js deleted file mode 100644 index 9e3d280920eec7..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/assignment/output.js +++ /dev/null @@ -1,9 +0,0 @@ -var _objectSpread = require("@babel/runtime/helpers/objectSpread2"); -var x; -var y; -var z; -z = _objectSpread({ x }, y); -z = { - x, - w: _objectSpread({}, y) -}; diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/expression/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/expression/output.js deleted file mode 100644 index 86f069440b2717..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/expression/output.js +++ /dev/null @@ -1,14 +0,0 @@ -var _objectSpread = require("@babel/runtime/helpers/objectSpread2"); -var a; -var b; -var c; -var d; -var x; -var y; -_objectSpread(_objectSpread(_objectSpread({ x }, y), {}, { a }, b), {}, { c }); -_objectSpread({}, Object.prototype); -_objectSpread({}, { foo: "bar" }); -_objectSpread(_objectSpread({}, { foo: "bar" }), { bar: "baz" }); -_objectSpread({}, { get foo() { - return "foo"; -} }); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/side-effect/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/side-effect/output.js deleted file mode 100644 index 877309de305bcb..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/side-effect/output.js +++ /dev/null @@ -1,19 +0,0 @@ -var _objectSpread = require("@babel/runtime/helpers/objectSpread2"); -var k = { - a: 1, - b: 2 -}; -var o = _objectSpread(_objectSpread({ a: 3 }, k), {}, { b: k.a++ }); -var pureA = {}; -var pureB = {}; -var pureC = {}; -var pureD = {}; -var pureE = {}; -function impureFunc() { - console.log("hello"); -} -var output = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, pureA), {}, { - get foo() {}, - get bar() {} -}, pureB), pureC), impureFunc()), pureD), {}, { pureD }); -var simpleOutput = _objectSpread(_objectSpread({}, pureA), {}, { test: "1" }, pureB); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/variable-declaration/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/variable-declaration/output.js deleted file mode 100644 index b9b2ab62b9b89a..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-spread/variable-declaration/output.js +++ /dev/null @@ -1,2 +0,0 @@ -var _objectSpread = require("@babel/runtime/helpers/objectSpread2"); -var z = _objectSpread({}, x); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-4904/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-4904/output.js deleted file mode 100644 index 53639e1439cc52..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-4904/output.js +++ /dev/null @@ -1,8 +0,0 @@ -const _excluded = ["b"]; -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -const _foo = foo(), { s } = _foo, t = _objectWithoutProperties(_foo, ["s"]); -const _bar = bar(), { s: _ref } = _bar, { q1 } = _ref, q2 = _objectWithoutProperties(_ref, ["q1"]), q3 = _objectWithoutProperties(_bar, ["s"]); -const { a } = foo((_ref2) => { - let { b } = _ref2, c = _objectWithoutProperties(_ref2, _excluded); - console.log(b, c); -}); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-5151/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-5151/output.js deleted file mode 100644 index 2bff77c20bd9dd..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-5151/output.js +++ /dev/null @@ -1,6 +0,0 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -const { x } = a, y = _objectWithoutProperties(a, ["x"]), z = foo(y); -const s = _extends({}, (_objectDestructuringEmpty(r), r)), t = foo(s); -var l = foo(), _bar = bar(), { m: _ref } = _bar, { n } = _ref, o = _objectWithoutProperties(_ref, ["n"]), p = _objectWithoutProperties(_bar, ["m"]), q = baz(); diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7304/output.mjs b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7304/output.mjs deleted file mode 100644 index 01ea9e9a27ee78..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7304/output.mjs +++ /dev/null @@ -1,7 +0,0 @@ -var _objectDestructuringEmpty = require("@babel/runtime/helpers/objectDestructuringEmpty"); -var _extends = require("@babel/runtime/helpers/extends"); -export default class { - method(_ref) { - let object = _extends({}, (_objectDestructuringEmpty(_ref), _ref)); - } -} diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7388/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7388/output.js deleted file mode 100644 index e8e1bd9f0ce703..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-7388/output.js +++ /dev/null @@ -1,10 +0,0 @@ -const _excluded = ["a"]; -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -function fn0(obj0) { - const { fn1 = (obj1 = {}) => { - const { fn2 = (obj2 = {}) => { - const { a } = obj2, rest = _objectWithoutProperties(obj2, _excluded); - console.log(rest); - } } = obj1; - } } = obj0; -} diff --git a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-8323/output.js b/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-8323/output.js deleted file mode 100644 index 500d1bfe5ac8b9..00000000000000 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/regression/gh-8323/output.js +++ /dev/null @@ -1,2 +0,0 @@ - - x Option `loose` is not implemented for object-rest-spread. diff --git a/tasks/transform_conformance/snapshots/babel.snap.md b/tasks/transform_conformance/snapshots/babel.snap.md index 2852eac125101c..196458ef34104a 100644 --- a/tasks/transform_conformance/snapshots/babel.snap.md +++ b/tasks/transform_conformance/snapshots/babel.snap.md @@ -1,6 +1,6 @@ commit: 54a8389f -Passed: 485/846 +Passed: 544/927 # All Passed: * babel-plugin-transform-class-static-block @@ -1037,6 +1037,642 @@ x Output mismatch x Output mismatch +# babel-plugin-transform-optional-chaining (31/45) +* assumption-noDocumentAll/assignment/input.js +Symbol reference IDs mismatch for "_obj$a": +after transform: SymbolId(5): [ReferenceId(9), ReferenceId(10), ReferenceId(11)] +rebuilt : SymbolId(0): [ReferenceId(3), ReferenceId(5)] +Symbol reference IDs mismatch for "_obj$b": +after transform: SymbolId(6): [ReferenceId(14), ReferenceId(15), ReferenceId(16)] +rebuilt : SymbolId(1): [ReferenceId(7), ReferenceId(9)] +Symbol reference IDs mismatch for "_obj$a2": +after transform: SymbolId(7): [ReferenceId(19), ReferenceId(20), ReferenceId(21)] +rebuilt : SymbolId(2): [ReferenceId(12), ReferenceId(14)] +Symbol reference IDs mismatch for "obj": +after transform: SymbolId(0): [ReferenceId(0), ReferenceId(1), ReferenceId(2), ReferenceId(4), ReferenceId(5), ReferenceId(6), ReferenceId(7), ReferenceId(8), ReferenceId(12), ReferenceId(13), ReferenceId(17), ReferenceId(18)] +rebuilt : SymbolId(3): [ReferenceId(0), ReferenceId(1), ReferenceId(2), ReferenceId(4), ReferenceId(6), ReferenceId(8), ReferenceId(11), ReferenceId(13)] + +* assumption-noDocumentAll/cast-to-boolean/input.js +Bindings mismatch: +after transform: ScopeId(25): ["_o$a$b$c$non_existent", "_o$a$b$c$non_existent3", "_o$a$b10", "_o$a$b6", "_o$a$b7", "_o$a$b8", "_o$a$b9", "o"] +rebuilt : ScopeId(25): ["_o$a$b$c$non_existent", "_o$a$b$c$non_existent2", "_o$a$b$c$non_existent3", "_o$a$b10", "_o$a$b6", "_o$a$b7", "_o$a$b8", "_o$a$b9", "o"] +Bindings mismatch: +after transform: ScopeId(26): ["_o$a$b$c$non_existent2"] +rebuilt : ScopeId(26): [] +Symbol scope ID mismatch for "_o$a$b$c$non_existent2": +after transform: SymbolId(31): ScopeId(26) +rebuilt : SymbolId(33): ScopeId(25) + +* assumption-noDocumentAll/in-function-params/input.js +Scope children mismatch: +after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] +rebuilt : ScopeId(0): [ScopeId(1), ScopeId(3), ScopeId(5), ScopeId(7), ScopeId(9)] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "a"] +rebuilt : ScopeId(2): ["_x"] +Scope flags mismatch: +after transform: ScopeId(1): ScopeFlags(Function) +rebuilt : ScopeId(2): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(1): Some(ScopeId(0)) +rebuilt : ScopeId(2): Some(ScopeId(1)) +Bindings mismatch: +after transform: ScopeId(2): ["a", "b"] +rebuilt : ScopeId(4): [] +Scope flags mismatch: +after transform: ScopeId(2): ScopeFlags(Function) +rebuilt : ScopeId(4): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(2): Some(ScopeId(0)) +rebuilt : ScopeId(4): Some(ScopeId(3)) +Bindings mismatch: +after transform: ScopeId(3): ["_a$b", "a", "b"] +rebuilt : ScopeId(6): ["_a$b"] +Scope flags mismatch: +after transform: ScopeId(3): ScopeFlags(Function) +rebuilt : ScopeId(6): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(3): Some(ScopeId(0)) +rebuilt : ScopeId(6): Some(ScopeId(5)) +Bindings mismatch: +after transform: ScopeId(4): ["_a$b2", "a", "b"] +rebuilt : ScopeId(8): ["_a$b2"] +Scope flags mismatch: +after transform: ScopeId(4): ScopeFlags(Function) +rebuilt : ScopeId(8): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(4): Some(ScopeId(0)) +rebuilt : ScopeId(8): Some(ScopeId(7)) +Bindings mismatch: +after transform: ScopeId(5): ["_a$b3", "a", "b"] +rebuilt : ScopeId(10): ["_a$b3"] +Scope flags mismatch: +after transform: ScopeId(5): ScopeFlags(Function) +rebuilt : ScopeId(10): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(5): Some(ScopeId(0)) +rebuilt : ScopeId(10): Some(ScopeId(9)) +Symbol scope ID mismatch for "a": +after transform: SymbolId(1): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(1) +Symbol reference IDs mismatch for "_x": +after transform: SymbolId(14): [ReferenceId(5), ReferenceId(6), ReferenceId(7)] +rebuilt : SymbolId(2): [ReferenceId(0), ReferenceId(2)] +Symbol scope ID mismatch for "a": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(4): ScopeId(3) +Symbol reference IDs mismatch for "a": +after transform: SymbolId(3): [ReferenceId(1), ReferenceId(8), ReferenceId(9)] +rebuilt : SymbolId(4): [ReferenceId(3), ReferenceId(4)] +Symbol scope ID mismatch for "b": +after transform: SymbolId(4): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(3) +Symbol scope ID mismatch for "a": +after transform: SymbolId(6): ScopeId(3) +rebuilt : SymbolId(7): ScopeId(5) +Symbol scope ID mismatch for "b": +after transform: SymbolId(7): ScopeId(3) +rebuilt : SymbolId(8): ScopeId(5) +Symbol reference IDs mismatch for "_a$b": +after transform: SymbolId(15): [ReferenceId(10), ReferenceId(11), ReferenceId(12), ReferenceId(13), ReferenceId(14), ReferenceId(15)] +rebuilt : SymbolId(9): [ReferenceId(5), ReferenceId(7), ReferenceId(8), ReferenceId(9)] +Symbol scope ID mismatch for "a": +after transform: SymbolId(9): ScopeId(4) +rebuilt : SymbolId(11): ScopeId(7) +Symbol scope ID mismatch for "b": +after transform: SymbolId(10): ScopeId(4) +rebuilt : SymbolId(12): ScopeId(7) +Symbol reference IDs mismatch for "_a$b2": +after transform: SymbolId(16): [ReferenceId(16), ReferenceId(17), ReferenceId(18), ReferenceId(19), ReferenceId(20), ReferenceId(21)] +rebuilt : SymbolId(13): [ReferenceId(10), ReferenceId(12), ReferenceId(13), ReferenceId(14)] +Symbol scope ID mismatch for "a": +after transform: SymbolId(12): ScopeId(5) +rebuilt : SymbolId(15): ScopeId(9) +Symbol reference IDs mismatch for "a": +after transform: SymbolId(12): [ReferenceId(4), ReferenceId(22), ReferenceId(23)] +rebuilt : SymbolId(15): [ReferenceId(15), ReferenceId(17)] +Symbol scope ID mismatch for "b": +after transform: SymbolId(13): ScopeId(5) +rebuilt : SymbolId(16): ScopeId(9) +Symbol reference IDs mismatch for "_a$b3": +after transform: SymbolId(17): [ReferenceId(24), ReferenceId(25), ReferenceId(26)] +rebuilt : SymbolId(17): [ReferenceId(16), ReferenceId(18)] + +* assumption-noDocumentAll/memoize/input.js +Symbol reference IDs mismatch for "foo": +after transform: SymbolId(1): [ReferenceId(0), ReferenceId(1), ReferenceId(2), ReferenceId(3), ReferenceId(4), ReferenceId(5), ReferenceId(7), ReferenceId(8), ReferenceId(10), ReferenceId(11), ReferenceId(13), ReferenceId(14), ReferenceId(15), ReferenceId(16), ReferenceId(17), ReferenceId(18), ReferenceId(19), ReferenceId(20), ReferenceId(21), ReferenceId(22), ReferenceId(23), ReferenceId(24), ReferenceId(25), ReferenceId(26), ReferenceId(27), ReferenceId(28), ReferenceId(32), ReferenceId(33), ReferenceId(34), ReferenceId(35), ReferenceId(54), ReferenceId(55), ReferenceId(56), ReferenceId(60), ReferenceId(64), ReferenceId(65), ReferenceId(76), ReferenceId(77)] +rebuilt : SymbolId(1): [ReferenceId(0), ReferenceId(1), ReferenceId(2), ReferenceId(4), ReferenceId(6), ReferenceId(7), ReferenceId(8), ReferenceId(9), ReferenceId(10), ReferenceId(12), ReferenceId(16), ReferenceId(19), ReferenceId(23), ReferenceId(26), ReferenceId(30), ReferenceId(32), ReferenceId(33), ReferenceId(34), ReferenceId(36), ReferenceId(38), ReferenceId(39), ReferenceId(41), ReferenceId(43), ReferenceId(44), ReferenceId(46), ReferenceId(48), ReferenceId(50), ReferenceId(55), ReferenceId(56), ReferenceId(58), ReferenceId(63)] +Symbol reference IDs mismatch for "_foo$bar": +after transform: SymbolId(2): [ReferenceId(29), ReferenceId(30), ReferenceId(31)] +rebuilt : SymbolId(2): [ReferenceId(3), ReferenceId(5)] +Symbol reference IDs mismatch for "_foo$get": +after transform: SymbolId(3): [ReferenceId(36), ReferenceId(37), ReferenceId(38)] +rebuilt : SymbolId(3): [ReferenceId(11), ReferenceId(14)] +Symbol reference IDs mismatch for "_foo$bar2": +after transform: SymbolId(4): [ReferenceId(39), ReferenceId(40), ReferenceId(41)] +rebuilt : SymbolId(4): [ReferenceId(15), ReferenceId(17)] +Symbol reference IDs mismatch for "_foo$bar3": +after transform: SymbolId(5): [ReferenceId(42), ReferenceId(43), ReferenceId(44)] +rebuilt : SymbolId(5): [ReferenceId(18), ReferenceId(21)] +Symbol reference IDs mismatch for "_foo$bar$baz": +after transform: SymbolId(6): [ReferenceId(45), ReferenceId(46), ReferenceId(47)] +rebuilt : SymbolId(6): [ReferenceId(22), ReferenceId(24)] +Symbol reference IDs mismatch for "_foo$bar$baz2": +after transform: SymbolId(7): [ReferenceId(48), ReferenceId(49), ReferenceId(50)] +rebuilt : SymbolId(7): [ReferenceId(25), ReferenceId(28)] +Symbol reference IDs mismatch for "_foo$bar4": +after transform: SymbolId(8): [ReferenceId(51), ReferenceId(52), ReferenceId(53)] +rebuilt : SymbolId(8): [ReferenceId(29), ReferenceId(31)] +Symbol reference IDs mismatch for "_foo$bar5": +after transform: SymbolId(9): [ReferenceId(57), ReferenceId(58), ReferenceId(59)] +rebuilt : SymbolId(9): [ReferenceId(35), ReferenceId(37)] +Symbol reference IDs mismatch for "_foo$bar6": +after transform: SymbolId(10): [ReferenceId(61), ReferenceId(62), ReferenceId(63)] +rebuilt : SymbolId(10): [ReferenceId(40), ReferenceId(42)] +Symbol reference IDs mismatch for "_foo$bar7": +after transform: SymbolId(11): [ReferenceId(66), ReferenceId(67), ReferenceId(68)] +rebuilt : SymbolId(11): [ReferenceId(45), ReferenceId(47)] +Symbol reference IDs mismatch for "_foo$bar8": +after transform: SymbolId(12): [ReferenceId(69), ReferenceId(70), ReferenceId(71), ReferenceId(75)] +rebuilt : SymbolId(12): [ReferenceId(49), ReferenceId(52), ReferenceId(54)] +Symbol reference IDs mismatch for "_foo$bar8$baz": +after transform: SymbolId(13): [ReferenceId(72), ReferenceId(73), ReferenceId(74)] +rebuilt : SymbolId(13): [ReferenceId(51), ReferenceId(53)] +Symbol reference IDs mismatch for "_foo$bar9": +after transform: SymbolId(14): [ReferenceId(78), ReferenceId(79), ReferenceId(80), ReferenceId(84)] +rebuilt : SymbolId(14): [ReferenceId(57), ReferenceId(60), ReferenceId(62)] +Symbol reference IDs mismatch for "_foo$bar9$baz": +after transform: SymbolId(15): [ReferenceId(81), ReferenceId(82), ReferenceId(83)] +rebuilt : SymbolId(15): [ReferenceId(59), ReferenceId(61)] + +* assumption-noDocumentAll/optional-eval-call/input.js +Symbol reference IDs mismatch for "_eval": +after transform: SymbolId(1): [ReferenceId(20), ReferenceId(21), ReferenceId(22)] +rebuilt : SymbolId(0): [ReferenceId(10), ReferenceId(12)] +Symbol reference IDs mismatch for "_eval2": +after transform: SymbolId(2): [ReferenceId(23), ReferenceId(24), ReferenceId(25)] +rebuilt : SymbolId(1): [ReferenceId(13), ReferenceId(15)] +Symbol reference IDs mismatch for "_foo$eval": +after transform: SymbolId(3): [ReferenceId(26), ReferenceId(27), ReferenceId(28)] +rebuilt : SymbolId(2): [ReferenceId(16), ReferenceId(18)] +Symbol reference IDs mismatch for "_eval$foo": +after transform: SymbolId(4): [ReferenceId(30), ReferenceId(31), ReferenceId(32)] +rebuilt : SymbolId(3): [ReferenceId(21), ReferenceId(23)] +Unresolved reference IDs mismatch for "eval": +after transform: [ReferenceId(0), ReferenceId(2), ReferenceId(4), ReferenceId(5), ReferenceId(6), ReferenceId(7), ReferenceId(10), ReferenceId(12), ReferenceId(13), ReferenceId(14), ReferenceId(15), ReferenceId(16), ReferenceId(17), ReferenceId(18), ReferenceId(19), ReferenceId(33)] +rebuilt : [ReferenceId(0), ReferenceId(1), ReferenceId(3), ReferenceId(4), ReferenceId(6), ReferenceId(7), ReferenceId(8), ReferenceId(9), ReferenceId(11), ReferenceId(14), ReferenceId(22), ReferenceId(24)] + +* assumption-noDocumentAll/super-method-call/input.js +Symbol reference IDs mismatch for "_super$method": +after transform: SymbolId(2): [ReferenceId(1), ReferenceId(2), ReferenceId(3)] +rebuilt : SymbolId(2): [ReferenceId(1), ReferenceId(2)] + +* general/cast-to-boolean/input.js +Bindings mismatch: +after transform: ScopeId(25): ["_o$a$b$c$non_existent", "_o$a$b$c$non_existent3", "_o$a$b10", "_o$a$b6", "_o$a$b7", "_o$a$b8", "_o$a$b9", "o"] +rebuilt : ScopeId(25): ["_o$a$b$c$non_existent", "_o$a$b$c$non_existent2", "_o$a$b$c$non_existent3", "_o$a$b10", "_o$a$b6", "_o$a$b7", "_o$a$b8", "_o$a$b9", "o"] +Bindings mismatch: +after transform: ScopeId(26): ["_o$a$b$c$non_existent2"] +rebuilt : ScopeId(26): [] +Symbol scope ID mismatch for "_o$a$b$c$non_existent2": +after transform: SymbolId(31): ScopeId(26) +rebuilt : SymbolId(33): ScopeId(25) + +* general/delete-in-function-params/input.js +Scope children mismatch: +after transform: ScopeId(0): [ScopeId(1)] +rebuilt : ScopeId(0): [ScopeId(1)] +Bindings mismatch: +after transform: ScopeId(1): ["_a", "x"] +rebuilt : ScopeId(2): ["_a"] +Scope flags mismatch: +after transform: ScopeId(1): ScopeFlags(Function) +rebuilt : ScopeId(2): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(1): Some(ScopeId(0)) +rebuilt : ScopeId(2): Some(ScopeId(1)) +Symbol scope ID mismatch for "x": +after transform: SymbolId(1): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(1) + +* general/in-function-params/input.js +Scope children mismatch: +after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] +rebuilt : ScopeId(0): [ScopeId(1), ScopeId(3), ScopeId(5), ScopeId(7), ScopeId(9)] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "a"] +rebuilt : ScopeId(2): ["_x"] +Scope flags mismatch: +after transform: ScopeId(1): ScopeFlags(Function) +rebuilt : ScopeId(2): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(1): Some(ScopeId(0)) +rebuilt : ScopeId(2): Some(ScopeId(1)) +Bindings mismatch: +after transform: ScopeId(2): ["a", "b"] +rebuilt : ScopeId(4): [] +Scope flags mismatch: +after transform: ScopeId(2): ScopeFlags(Function) +rebuilt : ScopeId(4): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(2): Some(ScopeId(0)) +rebuilt : ScopeId(4): Some(ScopeId(3)) +Bindings mismatch: +after transform: ScopeId(3): ["_a$b", "a", "b"] +rebuilt : ScopeId(6): ["_a$b"] +Scope flags mismatch: +after transform: ScopeId(3): ScopeFlags(Function) +rebuilt : ScopeId(6): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(3): Some(ScopeId(0)) +rebuilt : ScopeId(6): Some(ScopeId(5)) +Bindings mismatch: +after transform: ScopeId(4): ["_a$b2", "a", "b"] +rebuilt : ScopeId(8): ["_a$b2"] +Scope flags mismatch: +after transform: ScopeId(4): ScopeFlags(Function) +rebuilt : ScopeId(8): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(4): Some(ScopeId(0)) +rebuilt : ScopeId(8): Some(ScopeId(7)) +Bindings mismatch: +after transform: ScopeId(5): ["_a$b3", "a", "b"] +rebuilt : ScopeId(10): ["_a$b3"] +Scope flags mismatch: +after transform: ScopeId(5): ScopeFlags(Function) +rebuilt : ScopeId(10): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(5): Some(ScopeId(0)) +rebuilt : ScopeId(10): Some(ScopeId(9)) +Symbol scope ID mismatch for "a": +after transform: SymbolId(1): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(1) +Symbol scope ID mismatch for "a": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(4): ScopeId(3) +Symbol scope ID mismatch for "b": +after transform: SymbolId(4): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(3) +Symbol scope ID mismatch for "a": +after transform: SymbolId(6): ScopeId(3) +rebuilt : SymbolId(7): ScopeId(5) +Symbol scope ID mismatch for "b": +after transform: SymbolId(7): ScopeId(3) +rebuilt : SymbolId(8): ScopeId(5) +Symbol scope ID mismatch for "a": +after transform: SymbolId(9): ScopeId(4) +rebuilt : SymbolId(11): ScopeId(7) +Symbol scope ID mismatch for "b": +after transform: SymbolId(10): ScopeId(4) +rebuilt : SymbolId(12): ScopeId(7) +Symbol scope ID mismatch for "a": +after transform: SymbolId(12): ScopeId(5) +rebuilt : SymbolId(15): ScopeId(9) +Symbol scope ID mismatch for "b": +after transform: SymbolId(13): ScopeId(5) +rebuilt : SymbolId(16): ScopeId(9) + +* general/in-function-params-loose/input.js +Scope children mismatch: +after transform: ScopeId(0): [ScopeId(1), ScopeId(2), ScopeId(3), ScopeId(4), ScopeId(5)] +rebuilt : ScopeId(0): [ScopeId(1), ScopeId(3), ScopeId(5), ScopeId(7), ScopeId(9)] +Bindings mismatch: +after transform: ScopeId(1): ["_x", "a"] +rebuilt : ScopeId(2): ["_x"] +Scope flags mismatch: +after transform: ScopeId(1): ScopeFlags(Function) +rebuilt : ScopeId(2): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(1): Some(ScopeId(0)) +rebuilt : ScopeId(2): Some(ScopeId(1)) +Bindings mismatch: +after transform: ScopeId(2): ["a", "b"] +rebuilt : ScopeId(4): [] +Scope flags mismatch: +after transform: ScopeId(2): ScopeFlags(Function) +rebuilt : ScopeId(4): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(2): Some(ScopeId(0)) +rebuilt : ScopeId(4): Some(ScopeId(3)) +Bindings mismatch: +after transform: ScopeId(3): ["_a$b", "a", "b"] +rebuilt : ScopeId(6): ["_a$b"] +Scope flags mismatch: +after transform: ScopeId(3): ScopeFlags(Function) +rebuilt : ScopeId(6): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(3): Some(ScopeId(0)) +rebuilt : ScopeId(6): Some(ScopeId(5)) +Bindings mismatch: +after transform: ScopeId(4): ["_a$b2", "a", "b"] +rebuilt : ScopeId(8): ["_a$b2"] +Scope flags mismatch: +after transform: ScopeId(4): ScopeFlags(Function) +rebuilt : ScopeId(8): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(4): Some(ScopeId(0)) +rebuilt : ScopeId(8): Some(ScopeId(7)) +Bindings mismatch: +after transform: ScopeId(5): ["_a$b3", "a", "b"] +rebuilt : ScopeId(10): ["_a$b3"] +Scope flags mismatch: +after transform: ScopeId(5): ScopeFlags(Function) +rebuilt : ScopeId(10): ScopeFlags(Function | Arrow) +Scope parent mismatch: +after transform: ScopeId(5): Some(ScopeId(0)) +rebuilt : ScopeId(10): Some(ScopeId(9)) +Symbol scope ID mismatch for "a": +after transform: SymbolId(1): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(1) +Symbol scope ID mismatch for "a": +after transform: SymbolId(3): ScopeId(2) +rebuilt : SymbolId(4): ScopeId(3) +Symbol scope ID mismatch for "b": +after transform: SymbolId(4): ScopeId(2) +rebuilt : SymbolId(5): ScopeId(3) +Symbol scope ID mismatch for "a": +after transform: SymbolId(6): ScopeId(3) +rebuilt : SymbolId(7): ScopeId(5) +Symbol scope ID mismatch for "b": +after transform: SymbolId(7): ScopeId(3) +rebuilt : SymbolId(8): ScopeId(5) +Symbol scope ID mismatch for "a": +after transform: SymbolId(9): ScopeId(4) +rebuilt : SymbolId(11): ScopeId(7) +Symbol scope ID mismatch for "b": +after transform: SymbolId(10): ScopeId(4) +rebuilt : SymbolId(12): ScopeId(7) +Symbol scope ID mismatch for "a": +after transform: SymbolId(12): ScopeId(5) +rebuilt : SymbolId(15): ScopeId(9) +Symbol scope ID mismatch for "b": +after transform: SymbolId(13): ScopeId(5) +rebuilt : SymbolId(16): ScopeId(9) + +* loose/cast-to-boolean/input.js +Bindings mismatch: +after transform: ScopeId(25): ["_o$a$b$c$non_existent", "_o$a$b$c$non_existent3", "_o$a$b10", "_o$a$b6", "_o$a$b7", "_o$a$b8", "_o$a$b9", "o"] +rebuilt : ScopeId(25): ["_o$a$b$c$non_existent", "_o$a$b$c$non_existent2", "_o$a$b$c$non_existent3", "_o$a$b10", "_o$a$b6", "_o$a$b7", "_o$a$b8", "_o$a$b9", "o"] +Bindings mismatch: +after transform: ScopeId(26): ["_o$a$b$c$non_existent2"] +rebuilt : ScopeId(26): [] +Symbol scope ID mismatch for "_o$a$b$c$non_existent2": +after transform: SymbolId(31): ScopeId(26) +rebuilt : SymbolId(33): ScopeId(25) + +* transparent-expr-wrappers/ts-as-function-call-loose/input.ts +Unresolved references mismatch: +after transform: ["A", "B", "foo"] +rebuilt : ["foo"] + +* transparent-expr-wrappers/ts-as-member-expression/input.ts +Unresolved references mismatch: +after transform: ["ExampleType", "ExampleType2", "a"] +rebuilt : ["a"] + +* transparent-expr-wrappers/ts-parenthesized-expression-member-call/input.ts +Unresolved references mismatch: +after transform: ["ExampleType", "o"] +rebuilt : ["o"] + + +# babel-plugin-transform-object-rest-spread (28/36) +* object-rest/for-x/input.js +Bindings mismatch: +after transform: ScopeId(0): ["_excluded", "_excluded2", "_excluded3", "_ref", "a", "b"] +rebuilt : ScopeId(0): ["_excluded", "_excluded2", "_excluded3", "_ref", "_ref2", "_ref3", "a"] +Bindings mismatch: +after transform: ScopeId(2): [] +rebuilt : ScopeId(2): ["a", "b"] +Bindings mismatch: +after transform: ScopeId(3): ["_ref2"] +rebuilt : ScopeId(3): [] +Bindings mismatch: +after transform: ScopeId(4): ["_ref3"] +rebuilt : ScopeId(4): [] +Bindings mismatch: +after transform: ScopeId(5): [] +rebuilt : ScopeId(5): ["_ref4", "_ref5"] +Bindings mismatch: +after transform: ScopeId(6): ["_ref4"] +rebuilt : ScopeId(6): [] +Bindings mismatch: +after transform: ScopeId(7): ["_ref5"] +rebuilt : ScopeId(7): [] +Symbol flags mismatch for "a": +after transform: SymbolId(0): SymbolFlags(BlockScopedVariable) +rebuilt : SymbolId(8): SymbolFlags(FunctionScopedVariable) +Symbol span mismatch for "a": +after transform: SymbolId(0): Span { start: 27, end: 28 } +rebuilt : SymbolId(8): Span { start: 86, end: 87 } +Symbol scope ID mismatch for "a": +after transform: SymbolId(0): ScopeId(2) +rebuilt : SymbolId(8): ScopeId(0) +Symbol redeclarations mismatch for "a": +after transform: SymbolId(0): [Span { start: 86, end: 87 }, Span { start: 189, end: 190 }, Span { start: 274, end: 275 }] +rebuilt : SymbolId(8): [Span { start: 189, end: 190 }, Span { start: 274, end: 275 }] +Symbol reference IDs mismatch for "b": +after transform: SymbolId(1): [ReferenceId(1), ReferenceId(3)] +rebuilt : SymbolId(5): [] +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(4): ScopeId(3) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref3": +after transform: SymbolId(5): ScopeId(4) +rebuilt : SymbolId(7): ScopeId(0) +Symbol scope ID mismatch for "_ref4": +after transform: SymbolId(7): ScopeId(6) +rebuilt : SymbolId(9): ScopeId(5) +Symbol scope ID mismatch for "_ref5": +after transform: SymbolId(8): ScopeId(7) +rebuilt : SymbolId(10): ScopeId(5) +Reference symbol mismatch for "b": +after transform: SymbolId(1) "b" +rebuilt : +Reference symbol mismatch for "b": +after transform: SymbolId(1) "b" +rebuilt : +Unresolved references mismatch: +after transform: ["babelHelpers"] +rebuilt : ["b", "babelHelpers"] + +* object-rest/for-x-array-pattern/input.js +Bindings mismatch: +after transform: ScopeId(0): ["_excluded", "_excluded2", "_excluded3", "a"] +rebuilt : ScopeId(0): ["_excluded", "_excluded2", "_excluded3", "_ref2", "_ref3", "_ref4", "a"] +Bindings mismatch: +after transform: ScopeId(3): ["_ref2"] +rebuilt : ScopeId(3): [] +Bindings mismatch: +after transform: ScopeId(4): ["_ref3", "_ref4"] +rebuilt : ScopeId(4): [] +Bindings mismatch: +after transform: ScopeId(5): [] +rebuilt : ScopeId(5): ["_ref5", "_ref6", "_ref7"] +Bindings mismatch: +after transform: ScopeId(6): ["_ref5"] +rebuilt : ScopeId(6): [] +Bindings mismatch: +after transform: ScopeId(7): ["_ref6", "_ref7"] +rebuilt : ScopeId(7): [] +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(5): ScopeId(3) +rebuilt : SymbolId(6): ScopeId(0) +Symbol scope ID mismatch for "_ref3": +after transform: SymbolId(6): ScopeId(4) +rebuilt : SymbolId(7): ScopeId(0) +Symbol scope ID mismatch for "_ref4": +after transform: SymbolId(7): ScopeId(4) +rebuilt : SymbolId(8): ScopeId(0) +Symbol scope ID mismatch for "_ref5": +after transform: SymbolId(9): ScopeId(6) +rebuilt : SymbolId(10): ScopeId(5) +Symbol scope ID mismatch for "_ref6": +after transform: SymbolId(10): ScopeId(7) +rebuilt : SymbolId(11): ScopeId(5) +Symbol scope ID mismatch for "_ref7": +after transform: SymbolId(11): ScopeId(7) +rebuilt : SymbolId(12): ScopeId(5) + +* object-rest/for-x-completion-record/input.js +Bindings mismatch: +after transform: ScopeId(0): ["_excluded"] +rebuilt : ScopeId(0): ["_excluded", "_ref", "_ref2"] +Bindings mismatch: +after transform: ScopeId(1): ["_ref"] +rebuilt : ScopeId(1): [] +Bindings mismatch: +after transform: ScopeId(2): ["_ref2"] +rebuilt : ScopeId(2): [] +Symbol scope ID mismatch for "_ref": +after transform: SymbolId(0): ScopeId(1) +rebuilt : SymbolId(1): ScopeId(0) +Symbol scope ID mismatch for "_ref2": +after transform: SymbolId(1): ScopeId(2) +rebuilt : SymbolId(2): ScopeId(0) + +* object-rest/nested-computed-key/input.js +Bindings mismatch: +after transform: ScopeId(0): ["_ref3", "a", "c"] +rebuilt : ScopeId(0): ["a", "c"] +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Unresolved references mismatch: +after transform: ["babelHelpers", "d"] +rebuilt : ["_ref3", "babelHelpers", "d"] + +* object-rest/nested-default-value/input.js +Bindings mismatch: +after transform: ScopeId(0): ["_ref3", "a", "c"] +rebuilt : ScopeId(0): ["a", "c"] +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Unresolved references mismatch: +after transform: ["babelHelpers", "d"] +rebuilt : ["_ref3", "babelHelpers", "d"] + +* object-rest/parameters-object-rest-used-in-default/input.js +Symbol reference IDs mismatch for "R": +after transform: SymbolId(0): [ReferenceId(0)] +rebuilt : SymbolId(3): [] +Symbol reference IDs mismatch for "Y": +after transform: SymbolId(2): [ReferenceId(1)] +rebuilt : SymbolId(6): [] +Symbol reference IDs mismatch for "R": +after transform: SymbolId(6): [ReferenceId(2)] +rebuilt : SymbolId(10): [] +Symbol reference IDs mismatch for "R": +after transform: SymbolId(7): [ReferenceId(3)] +rebuilt : SymbolId(16): [] +Symbol reference IDs mismatch for "R": +after transform: SymbolId(13): [ReferenceId(6)] +rebuilt : SymbolId(20): [] +Symbol reference IDs mismatch for "R": +after transform: SymbolId(15): [ReferenceId(7)] +rebuilt : SymbolId(23): [] +Reference symbol mismatch for "R": +after transform: SymbolId(0) "R" +rebuilt : +Reference symbol mismatch for "Y": +after transform: SymbolId(2) "Y" +rebuilt : +Reference symbol mismatch for "R": +after transform: SymbolId(6) "R" +rebuilt : +Reference symbol mismatch for "R": +after transform: SymbolId(7) "R" +rebuilt : +Reference symbol mismatch for "R": +after transform: SymbolId(13) "R" +rebuilt : +Reference symbol mismatch for "R": +after transform: SymbolId(15) "R" +rebuilt : +Unresolved references mismatch: +after transform: ["b", "babelHelpers", "f", "q"] +rebuilt : ["R", "Y", "b", "babelHelpers", "f", "q"] + +* object-rest/symbol/input.js +Bindings mismatch: +after transform: ScopeId(0): ["_Symbol$for", "_Symbol$for2", "_Symbol$for3", "_ref", "_ref2", "_ref3", "foo", "rest"] +rebuilt : ScopeId(0): ["_Symbol$for", "_Symbol$for2", "_ref", "_ref2", "foo", "rest"] +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_Symbol$for3": +after transform: SymbolId(7) "_Symbol$for3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Reference symbol mismatch for "_Symbol$for3": +after transform: SymbolId(7) "_Symbol$for3" +rebuilt : +Reference symbol mismatch for "_ref3": +after transform: SymbolId(6) "_ref3" +rebuilt : +Unresolved references mismatch: +after transform: ["Symbol", "babelHelpers"] +rebuilt : ["Symbol", "_Symbol$for3", "_ref3", "babelHelpers"] +Unresolved reference IDs mismatch for "Symbol": +after transform: [ReferenceId(0), ReferenceId(1), ReferenceId(4)] +rebuilt : [ReferenceId(0), ReferenceId(7)] + +* regression/gh-8323/input.js + + x Option `loose` is not implemented for object-rest-spread. + + + # babel-plugin-transform-async-to-generator (10/28) * assumption-ignoreFunctionLength-true/basic/input.mjs diff --git a/tasks/transform_conformance/src/constants.rs b/tasks/transform_conformance/src/constants.rs index 4423ddb4fbdae2..effeab3409625c 100644 --- a/tasks/transform_conformance/src/constants.rs +++ b/tasks/transform_conformance/src/constants.rs @@ -105,6 +105,3 @@ pub const SKIP_TESTS: &[&str] = &[ "babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/remove-unused-excluded-keys-loose", "babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/regression/gh-8323" ]; - -pub const SNAPSHOT_TESTS: &[&str] = - &["babel-plugin-transform-object-rest-spread", "babel-plugin-transform-optional-chaining"]; diff --git a/tasks/transform_conformance/src/lib.rs b/tasks/transform_conformance/src/lib.rs index bf97d8a939d1b7..fa61029ab9a461 100644 --- a/tasks/transform_conformance/src/lib.rs +++ b/tasks/transform_conformance/src/lib.rs @@ -51,6 +51,10 @@ fn snap_root() -> PathBuf { conformance_root().join("snapshots") } +fn override_root() -> PathBuf { + conformance_root().join("overrides") +} + fn oxc_test_root() -> PathBuf { conformance_root().join("tests") } diff --git a/tasks/transform_conformance/src/test_case.rs b/tasks/transform_conformance/src/test_case.rs index 3158dadced0ba5..eddb970b562684 100644 --- a/tasks/transform_conformance/src/test_case.rs +++ b/tasks/transform_conformance/src/test_case.rs @@ -16,9 +16,9 @@ use oxc::{ use oxc_tasks_common::{normalize_path, print_diff_in_terminal, project_root}; use crate::{ - constants::{PLUGINS_NOT_SUPPORTED_YET, SKIP_TESTS, SNAPSHOT_TESTS}, + constants::{PLUGINS_NOT_SUPPORTED_YET, SKIP_TESTS}, driver::Driver, - fixture_root, oxc_test_root, packages_root, snap_root, TestRunnerOptions, + fixture_root, override_root, oxc_test_root, packages_root, TestRunnerOptions, }; #[derive(Debug)] @@ -35,12 +35,19 @@ pub struct TestCase { pub enum TestCaseKind { Conformance, Exec, - Snapshot, } impl TestCase { pub fn new(cwd: &Path, path: &Path) -> Option { - let mut options = BabelOptions::from_test_path(path.parent().unwrap()); + let mut options_directory_path = path.parent().unwrap().to_path_buf(); + // Try to find the override options.json + if let Some(path) = Self::convert_to_override_path(options_directory_path.as_path()) { + if path.join("options.json").exists() { + options_directory_path = path; + } + } + + let mut options = BabelOptions::from_test_path(options_directory_path.as_path()); options.cwd.replace(cwd.to_path_buf()); let transform_options = TransformOptions::try_from(&options); let path = path.to_path_buf(); @@ -59,14 +66,7 @@ impl TestCase { else if path.file_stem().is_some_and(|name| name == "input" || name == "input.d") && path.extension().is_some_and(|ext| VALID_EXTENSIONS.contains(&ext.to_str().unwrap())) { - if path - .strip_prefix(packages_root()) - .is_ok_and(|p| SNAPSHOT_TESTS.iter().any(|t| p.to_string_lossy().starts_with(t))) - { - TestCaseKind::Snapshot - } else { - TestCaseKind::Conformance - } + TestCaseKind::Conformance } else { return None; }; @@ -96,6 +96,28 @@ impl TestCase { source_type } + fn convert_to_override_path(path: &Path) -> Option { + path.strip_prefix(packages_root()).ok().map(|p| override_root().join(p)) + } + + fn get_output_path(&self) -> Option { + let babel_output_path = + self.path.parent().unwrap().read_dir().unwrap().find_map(|entry| { + let path = entry.ok()?.path(); + let file_stem = path.file_stem()?; + (file_stem == "output").then_some(path) + })?; + + // Try to find the override output path + if let Some(output_path) = Self::convert_to_override_path(&babel_output_path) { + if output_path.exists() { + return Some(output_path); + } + } + + Some(babel_output_path) + } + pub fn skip_test_case(&self) -> bool { let options = &self.options; @@ -203,17 +225,12 @@ impl TestCase { self.test_exec(filtered); } } - TestCaseKind::Snapshot => self.test_snapshot(filtered), } } /// Test conformance by comparing the parsed babel code and transformed code. fn test_conformance(&mut self, filtered: bool) { - let output_path = self.path.parent().unwrap().read_dir().unwrap().find_map(|entry| { - let path = entry.ok()?.path(); - let file_stem = path.file_stem()?; - (file_stem == "output").then_some(path) - }); + let output_path = self.get_output_path(); let allocator = Allocator::default(); let input = fs::read_to_string(&self.path).unwrap(); @@ -388,29 +405,6 @@ test("exec", () => {{ }})"# ) } - - fn test_snapshot(&self, filtered: bool) { - let result = match self.transform(HelperLoaderMode::Runtime) { - Ok(code) => code, - Err(error) => error, - }; - let mut path = snap_root().join(self.path.strip_prefix(packages_root()).unwrap()); - path.set_file_name("output"); - let input_extension = self.path.extension().unwrap().to_str().unwrap(); - let extension = - input_extension.chars().map(|c| if c == 't' { 'j' } else { c }).collect::(); - path.set_extension(extension); - if filtered { - println!("Input path: {:?}", &self.path); - println!("Output path: {path:?}"); - println!("Input:\n{}\n", fs::read_to_string(&self.path).unwrap()); - println!("Output:\n{result}\n"); - } - if fs::write(&path, &result).is_err() { - fs::create_dir_all(path.parent().unwrap()).unwrap(); - fs::write(path, &result).unwrap(); - } - } } fn get_babel_error(error: &str) -> String { diff --git a/tasks/transform_conformance/update_fixtures.js b/tasks/transform_conformance/update_fixtures.js index 8b9a61c220acd6..9f5b9166152c1b 100644 --- a/tasks/transform_conformance/update_fixtures.js +++ b/tasks/transform_conformance/update_fixtures.js @@ -13,8 +13,7 @@ // (or maybe don't - what does this option mean?) import { transformFileAsync } from '@babel/core'; -import assert from 'assert'; -import { copyFile, readdir, readFile, rename, writeFile } from 'fs/promises'; +import { readdir, readFile, rename, writeFile } from 'fs/promises'; import { extname, join as pathJoin } from 'path'; const PACKAGES = [ @@ -28,7 +27,10 @@ const FILTER_OUT_PLUGINS = [ 'transform-destructuring', ]; -const PACKAGES_PATH = pathJoin(import.meta.dirname, '../coverage/babel/packages'); +const PACKAGES_PATH = pathJoin( + import.meta.dirname, + '../coverage/babel/packages', +); const OVERRIDES_PATH = pathJoin(import.meta.dirname, 'overrides'); // Copied from `@babel/helper-transform-fixture-test-runner` @@ -52,7 +54,12 @@ async function updateDir(dirPath, options, hasChangedOptions) { const dirFiles = []; const filenames = { options: null, input: null, output: null, exec: null }; - const overrides = { options: false, input: false, output: false, exec: false }; + const overrides = { + options: false, + input: false, + output: false, + exec: false, + }; // Find files in dir for (const file of files) { @@ -66,44 +73,6 @@ async function updateDir(dirPath, options, hasChangedOptions) { } } - // Find override files - const overridesDirPath = pathJoin(`${OVERRIDES_PATH}${dirPath.slice(PACKAGES_PATH.length)}`); - let overrideFiles; - try { - overrideFiles = await readdir(overridesDirPath, { withFileTypes: true }); - } catch (err) { - if (err?.code !== 'ENOENT') throw err; - } - - if (overrideFiles) { - for (const file of overrideFiles) { - if (file.isDirectory()) continue; - - const filename = file.name; - // `reason.txt` files are to document why override is used - if (filename === 'reason.txt') continue; - - const ext = extname(filename), - type = filename.slice(0, -ext.length), - path = pathJoin(overridesDirPath, filename); - - assert(Object.hasOwn(overrides, type), `Unexpected override file: ${path}`); - - const originalPath = pathJoin(dirPath, filename); - if (filenames[type]) { - const originalFilename = filenames[type]; - assert(originalFilename === filename, `Unmatched override file: ${path} (original: ${originalFilename})`); - await backupFile(originalPath); - } - - filenames[type] = filename; - overrides[type] = true; - if (type === 'options') hasChangedOptions = true; - - await copyFile(path, originalPath); - } - } - // Update options, save to file, and merge options with parent if (filenames.options) { const path = pathJoin(dirPath, filenames.options); @@ -117,7 +86,11 @@ async function updateDir(dirPath, options, hasChangedOptions) { } // Run Babel with updated options/input - if (filenames.output && (hasChangedOptions || overrides.input) && !overrides.output) { + if ( + filenames.output && + (hasChangedOptions || overrides.input) && + !overrides.output + ) { const inputPath = pathJoin(dirPath, filenames.input), outputPath = pathJoin(dirPath, filenames.output); await backupFile(outputPath); @@ -165,7 +138,12 @@ function updateOptions(options) { * @returns {undefined} */ async function transform(inputPath, outputPath, options) { - options = { ...options, configFile: false, babelrc: false, cwd: import.meta.dirname }; + options = { + ...options, + configFile: false, + babelrc: false, + cwd: import.meta.dirname, + }; delete options.SKIP_babel7plugins_babel8core; delete options.minNodeVersion; @@ -179,9 +157,11 @@ async function transform(inputPath, outputPath, options) { return plugin; } - if (options.presets) options.presets = options.presets.map(preset => prefixName(preset, 'preset')); + if (options.presets) { + options.presets = options.presets.map((preset) => prefixName(preset, 'preset')); + } - options.plugins = (options.plugins || []).map(plugin => prefixName(plugin, 'plugin')); + options.plugins = (options.plugins || []).map((plugin) => prefixName(plugin, 'plugin')); let addExternalHelpersPlugin = true; if (Object.hasOwn(options, 'externalHelpers')) { @@ -190,7 +170,10 @@ async function transform(inputPath, outputPath, options) { } if (addExternalHelpersPlugin) { - options.plugins.push(['@babel/plugin-external-helpers', { helperVersion: EXTERNAL_HELPERS_VERSION }]); + options.plugins.push([ + '@babel/plugin-external-helpers', + { helperVersion: EXTERNAL_HELPERS_VERSION }, + ]); } const { code } = await transformFileAsync(inputPath, options);