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 index f5642866c2bde..30fc5987b448d 100644 --- 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 @@ -1,6 +1,5 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); ({a1} = c1); var _c; -_c = c2, {a2} = _c, b2 = _objectWithoutProperties(_c, ["a2"]), _c; +_c = c2, {a2} = _c, b2 = babelHelpers.objectWithoutProperties(_c, ["a2"]), _c; var _c2; -console.log((_c2 = c3, {a3} = _c2, b3 = _objectWithoutProperties(_c2, ["a3"]), _c2)); +console.log((_c2 = c3, {a3} = _c2, b3 = babelHelpers.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 index 9392f370d44db..aaa87de1dfccb 100644 --- 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 @@ -1,18 +1,15 @@ 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)); + let a34 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); } try {} catch (_ref2) { - let { a1 } = _ref2, b1 = _objectWithoutProperties(_ref2, _excluded); + let { a1 } = _ref2, b1 = babelHelpers.objectWithoutProperties(_ref2, _excluded); } try {} catch (_ref3) { - let { a2, b2 } = _ref3, c2 = _objectWithoutProperties(_ref3, _excluded2); + let { a2, b2 } = _ref3, c2 = babelHelpers.objectWithoutProperties(_ref3, _excluded2); } try {} catch (_ref4) { - let { a2, b2, c2: _ref5 } = _ref4, { c3 } = _ref5, c4 = _objectWithoutProperties(_ref5, _excluded3); + 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/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 index db3b63c1aeaab..3218842ff292e 100644 --- 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 @@ -1,9 +1,7 @@ -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)); + let copy = babelHelpers.extends({}, (babelHelpers.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 index 8cfb0d86e8e16..4e595c3456420 100644 --- 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 @@ -1,4 +1,3 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); -export var { b } = asdf2, c = _objectWithoutProperties(asdf2, ["b"]); +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/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x-array-pattern/output.js index 65388f392eb9d..571504fc8740e 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/snapshots/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/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 index 35868ea38e96b..4fcc5ac39e16e 100644 --- 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 @@ -1,6 +1,5 @@ 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; + _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/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js index d4e3be938a8a8..aa30ed04f2666 100644 --- a/tasks/transform_conformance/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/for-x/output.js +++ b/tasks/transform_conformance/snapshots/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/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 index fe56879c08c49..811b126a948e6 100644 --- 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 @@ -1,11 +1,9 @@ -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)); +}, _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); @@ -13,7 +11,7 @@ key = 1; var _$ = { 2: 2, 3: 3 -}, _key2 = ++key, _key3 = ++key, { [_key2]: y, [_key3]: z } = _$, rest = _objectWithoutProperties(_$, [_key2, _key3].map(_toPropertyKey)); +}, _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; @@ -21,7 +19,7 @@ var _$z; _$z = { 2: "two", z: "zee" -}, {[key]: y, z} = _$z, x = _objectWithoutProperties(_$z, [key, "z"].map(_toPropertyKey)), _$z; +}, {[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/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 index 4cbe0b565eed2..1a868852c75cf 100644 --- 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 @@ -1,7 +1,6 @@ -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"]); +const { foo: { bar: { baz: { a: _ref } } } } = test, { x } = _ref, other = babelHelpers.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 index a9e0b73b4d900..6dd778f93cb88 100644 --- 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 @@ -1,2 +1 @@ -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"]); +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/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 index 19ae884a8b4d9..bcdb772da16c8 100644 --- 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 @@ -1,6 +1,5 @@ -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"]); +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 = _objectWithoutProperties(_ref4, ["h"]), _ref4; +[g, _ref3] = x, _ref4 = _ref3, {h} = _ref4, i = babelHelpers.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 index da9d9429effbb..cf204da61b567 100644 --- 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 @@ -1,6 +1,4 @@ -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 } = {}; + 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/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 index c97cb82b8e94d..141e73869788b 100644 --- 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 @@ -1,6 +1,4 @@ -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) } = {}; + 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/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 index 5d386ee09ab4c..0913d80b73c1b 100644 --- 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 @@ -1,3 +1,2 @@ -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"]); +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/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 index dd8c9ff87ed76..107f2309cb5e5 100644 --- 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 @@ -1,4 +1 @@ -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"]); +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/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 index 9cc00d95472f5..d69dfa38bbee5 100644 --- 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 @@ -1,6 +1,5 @@ -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"]); +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/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/non-string-computed/output.js index 51058298e0d1d..4847f44d47f95 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/snapshots/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/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 index f4e8257795ae7..5c7af9b85403d 100644 --- 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 @@ -1,10 +1,7 @@ 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)); + var _ref = null, x = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); }).toThrow(/null/); expect(() => { - var _ref2 = null, { x } = _ref2, y = _objectWithoutProperties(_ref2, _excluded); + 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/snapshots/babel-plugin-transform-object-rest-spread/test/fixtures/object-rest/object-ref-computed/output.js index 63d3e68376f15..a0d0c8eae73de 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/snapshots/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/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 index 7c8ff6d10141d..b2245680d3785 100644 --- 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 @@ -1,29 +1,26 @@ 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)); + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); }; (_ref2, { a = { Y } }) => { - let { X: Y } = _ref2, R = _objectWithoutProperties(_ref2, _excluded); + let { X: Y } = _ref2, R = babelHelpers.objectWithoutProperties(_ref2, _excluded); }; (a = R, _ref3) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3)); + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref3), _ref3)); }; (_ref4, e, c = 2, a = R, f = q) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4)); + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref4), _ref4)); let q; }; (_ref5, a = f(R)) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5)); + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref5), _ref5)); }; (_ref6, { [R.key]: a = 42 }) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6)); + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref6), _ref6)); }; (_ref7, { a = { R: b } }) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7)); + let R = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref7), _ref7)); }; (_ref8, { a = (R) => R } = { b: (R) => R }) => { - let R = _extends({}, (_objectDestructuringEmpty(_ref8), _ref8)); + let R = babelHelpers.extends({}, (babelHelpers.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 index b0ccf01493c33..2a70422f82337 100644 --- 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 @@ -1,37 +1,34 @@ 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)); + let a34 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref), _ref)); } function a2(_ref2) { - let { a1 } = _ref2, b1 = _objectWithoutProperties(_ref2, _excluded); + let { a1 } = _ref2, b1 = babelHelpers.objectWithoutProperties(_ref2, _excluded); } function a3(_ref3) { - let { a2, b2 } = _ref3, c2 = _objectWithoutProperties(_ref3, _excluded2); + let { a2, b2 } = _ref3, c2 = babelHelpers.objectWithoutProperties(_ref3, _excluded2); } function a4(_ref4, _ref5) { - let { a5 } = _ref5, c5 = _objectWithoutProperties(_ref5, _excluded3); - let { a3 } = _ref4, c3 = _objectWithoutProperties(_ref4, _excluded4); + 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 = _objectWithoutProperties(_ref7, _excluded5), c3 = _objectWithoutProperties(_ref6, _excluded6); + 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 = _objectWithoutProperties(_ref9, _excluded7); + let { a3, b2: _ref9 } = _ref8, { ba1 } = _ref9, ba2 = babelHelpers.objectWithoutProperties(_ref9, _excluded7); } function a7(_ref10 = {}) { - let { a1 = 1 } = _ref10, b1 = _objectWithoutProperties(_ref10, _excluded8); + let { a1 = 1 } = _ref10, b1 = babelHelpers.objectWithoutProperties(_ref10, _excluded8); } function a8([_ref11]) { - let a1 = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11)); + let a1 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref11), _ref11)); } function a9([_ref12]) { - let { a1 } = _ref12, a2 = _objectWithoutProperties(_ref12, _excluded9); + let { a1 } = _ref12, a2 = babelHelpers.objectWithoutProperties(_ref12, _excluded9); } function a10([a1, _ref13]) { - let a2 = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13)); + let a2 = babelHelpers.extends({}, (babelHelpers.objectDestructuringEmpty(_ref13), _ref13)); } function b(a) {} function b2(a, ...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 index bc440ec97077b..987860ba5d503 100644 --- 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 @@ -1,6 +1,4 @@ -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)); +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 = _objectWithoutProperties(_ref2, [_Symbol$for2].map(_toPropertyKey)), _ref2; -if (_ref3 = {}, {[_Symbol$for3]: foo} = _ref3, rest = _objectWithoutProperties(_ref3, [_Symbol$for3].map(_toPropertyKey)), _ref3) {} +_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/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 index dc7f938817f7e..720148c953cb9 100644 --- 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 @@ -1,8 +1,6 @@ -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; + _input = input, {[_ref]: country} = _input, rest = babelHelpers.objectWithoutProperties(_input, [_ref].map(babelHelpers.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 index 4bda99dc05b88..be054b8a04421 100644 --- 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 @@ -1,10 +1,8 @@ -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, [ +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(_toPropertyKey)); +].map(babelHelpers.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 index a9dfac9798f1c..86279ce8a9da3 100644 --- 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 @@ -1,6 +1,5 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); const input = {}; -const { given_name: givenName, "last_name": lastName, [`country`]: country } = input, rest = _objectWithoutProperties(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/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 index 08a8bba8c5b31..4808c49fb4a96 100644 --- 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 @@ -1,36 +1,32 @@ -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"]); +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 = _extends({}, (_objectDestructuringEmpty(_ref12), _ref12)); -const _z16 = z(), { x22: _ref13 = {} } = _z16, { q22 } = _ref13, y22 = _objectWithoutProperties(_ref13, ["q22"]); +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 = _extends({}, (_objectDestructuringEmpty(_ref14), _ref14)); +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 = _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)); +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/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 index cd0a3f8103d88..774c03f747643 100644 --- 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 @@ -1,4 +1,3 @@ -var _objectWithoutProperties = require("@babel/runtime/helpers/objectWithoutProperties"); let _a$d = { a: [ 1, @@ -7,4 +6,4 @@ let _a$d = { 4 ], d: "oyez" -}, { a: [b, ...arrayRest], c = function(...functionRest) {} } = _a$d, objectRest = _objectWithoutProperties(_a$d, ["a", "c"]); +}, { a: [b, ...arrayRest], c = function(...functionRest) {} } = _a$d, objectRest = babelHelpers.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 index 9e3d280920eec..38b4cc23bf707 100644 --- 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 @@ -1,9 +1,8 @@ -var _objectSpread = require("@babel/runtime/helpers/objectSpread2"); var x; var y; var z; -z = _objectSpread({ x }, y); +z = babelHelpers.objectSpread2({ x }, y); z = { x, - w: _objectSpread({}, y) + w: babelHelpers.objectSpread2({}, 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 index 86f069440b271..74d788f8809cb 100644 --- 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 @@ -1,14 +1,13 @@ -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() { +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/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 index 877309de305bc..6068478f83750 100644 --- 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 @@ -1,9 +1,8 @@ -var _objectSpread = require("@babel/runtime/helpers/objectSpread2"); var k = { a: 1, b: 2 }; -var o = _objectSpread(_objectSpread({ a: 3 }, k), {}, { b: k.a++ }); +var o = babelHelpers.objectSpread2(babelHelpers.objectSpread2({ a: 3 }, k), {}, { b: k.a++ }); var pureA = {}; var pureB = {}; var pureC = {}; @@ -12,8 +11,8 @@ var pureE = {}; function impureFunc() { console.log("hello"); } -var output = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, pureA), {}, { +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 = _objectSpread(_objectSpread({}, pureA), {}, { test: "1" }, pureB); +var simpleOutput = babelHelpers.objectSpread2(babelHelpers.objectSpread2({}, 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 index b9b2ab62b9b89..0932c4d404608 100644 --- 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 @@ -1,2 +1 @@ -var _objectSpread = require("@babel/runtime/helpers/objectSpread2"); -var z = _objectSpread({}, x); +var z = babelHelpers.objectSpread2({}, 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 index 53639e1439cc5..7d27022c7b6df 100644 --- 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 @@ -1,8 +1,7 @@ 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 _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 = _objectWithoutProperties(_ref2, _excluded); + let { b } = _ref2, c = babelHelpers.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 index 2bff77c20bd9d..b3ee9f96aa86f 100644 --- 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 @@ -1,6 +1,3 @@ -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(); +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/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 index 01ea9e9a27ee7..5312e4d44d833 100644 --- 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 @@ -1,7 +1,5 @@ -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)); + let object = babelHelpers.extends({}, (babelHelpers.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 index e8e1bd9f0ce70..5c267d8833dc6 100644 --- 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 @@ -1,9 +1,8 @@ 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); + const { a } = obj2, rest = babelHelpers.objectWithoutProperties(obj2, _excluded); console.log(rest); } } = obj1; } } = obj0; diff --git a/tasks/transform_conformance/src/test_case.rs b/tasks/transform_conformance/src/test_case.rs index 3158dadced0ba..f88d230e1192a 100644 --- a/tasks/transform_conformance/src/test_case.rs +++ b/tasks/transform_conformance/src/test_case.rs @@ -390,7 +390,7 @@ test("exec", () => {{ } fn test_snapshot(&self, filtered: bool) { - let result = match self.transform(HelperLoaderMode::Runtime) { + let result = match self.transform(HelperLoaderMode::External) { Ok(code) => code, Err(error) => error, };