Enable external-helpers by default in tests (#12911)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com> Co-authored-by: Babel Bot <babel-bot@users.noreply.github.com>
This commit is contained in:
@@ -11,15 +11,11 @@ var _events = require("events");
|
||||
|
||||
var _binarySerializer = babelHelpers.interopRequireDefault(require("./helpers/binary-serializer"));
|
||||
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
// import ...
|
||||
var Connection = /*#__PURE__*/function (_EventEmitter) {
|
||||
babelHelpers.inherits(Connection, _EventEmitter);
|
||||
|
||||
var _super = _createSuper(Connection);
|
||||
var _super = babelHelpers.createSuper(Connection);
|
||||
|
||||
function Connection(endpoint, joinKey, joinData, roomId) {
|
||||
var _this;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
{
|
||||
"plugins": ["external-helpers"],
|
||||
"presets": [["env", { "targets": { "browsers": "ie 6" } }]]
|
||||
}
|
||||
|
||||
@@ -7,14 +7,10 @@ exports["default"] = void 0;
|
||||
|
||||
var _BaseFoo2 = babelHelpers.interopRequireDefault(require("./BaseFoo"));
|
||||
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var SubFoo = /*#__PURE__*/function (_BaseFoo) {
|
||||
babelHelpers.inherits(SubFoo, _BaseFoo);
|
||||
|
||||
var _super = _createSuper(SubFoo);
|
||||
var _super = babelHelpers.createSuper(SubFoo);
|
||||
|
||||
function SubFoo() {
|
||||
babelHelpers.classCallCheck(this, SubFoo);
|
||||
|
||||
@@ -7,14 +7,10 @@ exports["default"] = void 0;
|
||||
|
||||
var _react = babelHelpers.interopRequireDefault(require("react"));
|
||||
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var RandomComponent = /*#__PURE__*/function (_Component) {
|
||||
babelHelpers.inherits(RandomComponent, _Component);
|
||||
|
||||
var _super = _createSuper(RandomComponent);
|
||||
var _super = babelHelpers.createSuper(RandomComponent);
|
||||
|
||||
function RandomComponent() {
|
||||
babelHelpers.classCallCheck(this, RandomComponent);
|
||||
|
||||
@@ -5,10 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
||||
});
|
||||
exports["default"] = void 0;
|
||||
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var b = function b() {
|
||||
babelHelpers.classCallCheck(this, b);
|
||||
};
|
||||
@@ -16,7 +12,7 @@ var b = function b() {
|
||||
var a1 = /*#__PURE__*/function (_b) {
|
||||
babelHelpers.inherits(a1, _b);
|
||||
|
||||
var _super = _createSuper(a1);
|
||||
var _super = babelHelpers.createSuper(a1);
|
||||
|
||||
function a1() {
|
||||
var _this;
|
||||
@@ -37,7 +33,7 @@ var a1 = /*#__PURE__*/function (_b) {
|
||||
var a2 = /*#__PURE__*/function (_b2) {
|
||||
babelHelpers.inherits(a2, _b2);
|
||||
|
||||
var _super2 = _createSuper(a2);
|
||||
var _super2 = babelHelpers.createSuper(a2);
|
||||
|
||||
function a2() {
|
||||
var _this2;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var Point = /*#__PURE__*/function () {
|
||||
"use strict";
|
||||
|
||||
@@ -23,7 +19,7 @@ var ColorPoint = /*#__PURE__*/function (_Point) {
|
||||
|
||||
babelHelpers.inherits(ColorPoint, _Point);
|
||||
|
||||
var _super = _createSuper(ColorPoint);
|
||||
var _super = babelHelpers.createSuper(ColorPoint);
|
||||
|
||||
function ColorPoint() {
|
||||
var _thisSuper, _thisSuper2, _this;
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var A = /*#__PURE__*/function (_B) {
|
||||
"use strict";
|
||||
|
||||
babelHelpers.inherits(A, _B);
|
||||
|
||||
var _super = _createSuper(A);
|
||||
var _super = babelHelpers.createSuper(A);
|
||||
|
||||
function A() {
|
||||
var _this;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var oldReflect = this.Reflect;
|
||||
var oldHTMLElement = this.HTMLElement;
|
||||
|
||||
@@ -22,7 +18,7 @@ try {
|
||||
|
||||
babelHelpers.inherits(CustomElement, _HTMLElement);
|
||||
|
||||
var _super = _createSuper(CustomElement);
|
||||
var _super = babelHelpers.createSuper(CustomElement);
|
||||
|
||||
function CustomElement() {
|
||||
babelHelpers.classCallCheck(this, CustomElement);
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var x = {
|
||||
Foo: /*#__PURE__*/function (_Foo) {
|
||||
"use strict";
|
||||
|
||||
babelHelpers.inherits(_class, _Foo);
|
||||
|
||||
var _super = _createSuper(_class);
|
||||
var _super = babelHelpers.createSuper(_class);
|
||||
|
||||
function _class() {
|
||||
babelHelpers.classCallCheck(this, _class);
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
var A = function A() {
|
||||
"use strict";
|
||||
|
||||
@@ -13,7 +9,7 @@ var B = /*#__PURE__*/function (_A) {
|
||||
|
||||
babelHelpers.inherits(B, _A);
|
||||
|
||||
var _super = _createSuper(B);
|
||||
var _super = babelHelpers.createSuper(B);
|
||||
|
||||
function B() {
|
||||
var _this;
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
||||
|
||||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
||||
|
||||
var Example = /*#__PURE__*/function () {
|
||||
"use strict";
|
||||
|
||||
@@ -10,7 +6,7 @@ var Example = /*#__PURE__*/function () {
|
||||
var _proto = Example.prototype;
|
||||
|
||||
_proto.test1 = /*#__PURE__*/function () {
|
||||
var _test = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
||||
var _test = babelHelpers.asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_context) {
|
||||
while (1) {
|
||||
switch (_context.prev = _context.next) {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"plugins": ["transform-classes", "external-helpers"]
|
||||
"plugins": ["transform-classes"]
|
||||
}
|
||||
|
||||
@@ -1,41 +1,22 @@
|
||||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
||||
|
||||
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
||||
|
||||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
||||
|
||||
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
||||
|
||||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
||||
|
||||
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var B = function B() {
|
||||
"use strict";
|
||||
|
||||
_classCallCheck(this, B);
|
||||
babelHelpers.classCallCheck(this, B);
|
||||
};
|
||||
|
||||
var A = /*#__PURE__*/function (_B) {
|
||||
"use strict";
|
||||
|
||||
_inherits(A, _B);
|
||||
babelHelpers.inherits(A, _B);
|
||||
|
||||
var _super = _createSuper(A);
|
||||
var _super = babelHelpers.createSuper(A);
|
||||
|
||||
function A(track) {
|
||||
var _this;
|
||||
|
||||
_classCallCheck(this, A);
|
||||
|
||||
babelHelpers.classCallCheck(this, A);
|
||||
if (track !== undefined) _this = _super.call(this, track);else _this = _super.call(this);
|
||||
return _possibleConstructorReturn(_this);
|
||||
return babelHelpers.possibleConstructorReturn(_this);
|
||||
}
|
||||
|
||||
return A;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"plugins": ["external-helpers", "proposal-class-properties"],
|
||||
"plugins": ["proposal-class-properties"],
|
||||
"presets": [
|
||||
["env", { "targets": { "browsers": "ie 6" } }],
|
||||
["react", { "runtime": "classic" }]
|
||||
|
||||
Reference in New Issue
Block a user