Skip to content

Commit

Permalink
fix(swc): Fix tests (#2707)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Nov 10, 2021
1 parent 4863bee commit a90fae5
Show file tree
Hide file tree
Showing 803 changed files with 26,054 additions and 6,587 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
# We explicitly do this to cache properly.
- name: Install Rust
uses: actions-rs/toolchain@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,31 @@ function _toConsumableArray(arr) {
var _typeof = function(obj) {
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
};
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 _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);
};
}
var A = // @target: es6
/*#__PURE__*/ function() {
"use strict";
Expand All @@ -202,9 +227,10 @@ var A = // @target: es6
var B = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B, A);
var _super1 = _createSuper(B);
function B() {
_classCallCheck(this, B);
return _possibleConstructorReturn(this, _getPrototypeOf(B).apply(this, arguments));
return _super1.apply(this, arguments);
}
_createClass(B, [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,7 @@ var A = function() {
]), A;
}(), B = function(A) {
"use strict";
function B() {
var self, call, obj;
return _classCallCheck(this, B), self = this, call = _getPrototypeOf(B).apply(this, arguments), call && ("object" == ((obj = call) && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj) || "function" == typeof call) ? call : (function(self) {
if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
})(self);
}
return !function(subClass, superClass) {
!function(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function");
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
Expand All @@ -128,7 +121,35 @@ var A = function() {
configurable: !0
}
}), superClass && _setPrototypeOf(subClass, superClass);
}(B, A), _createClass(B, [
}(B, A);
var _super1 = function(Derived) {
var hasNativeReflectConstruct = function() {
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
if (Reflect.construct.sham) return !1;
if ("function" == typeof Proxy) return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
})), !0;
} catch (e) {
return !1;
}
}();
return function() {
var obj, self, call, result, Super = _getPrototypeOf(Derived);
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else result = Super.apply(this, arguments);
return self = this, (call = result) && ("object" == ((obj = call) && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj) || "function" == typeof call) ? call : (function(self) {
if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
})(self);
};
}(B);
function B() {
return _classCallCheck(this, B), _super1.apply(this, arguments);
}
return _createClass(B, [
{
key: "simple",
value: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,31 @@ function _toConsumableArray(arr) {
var _typeof = function(obj) {
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
};
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 _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);
};
}
var A = // @target: es2017
// @noEmitHelpers: true
/*#__PURE__*/ function() {
Expand All @@ -203,9 +228,10 @@ var A = // @target: es2017
var B = /*#__PURE__*/ function(A) {
"use strict";
_inherits(B, A);
var _super = _createSuper(B);
function B() {
_classCallCheck(this, B);
return _possibleConstructorReturn(this, _getPrototypeOf(B).apply(this, arguments));
return _super.apply(this, arguments);
}
_createClass(B, [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,7 @@ var A = function() {
]), A;
}(), B = function(A) {
"use strict";
function B() {
var self, call, obj;
return _classCallCheck(this, B), self = this, call = _getPrototypeOf(B).apply(this, arguments), call && ("object" == ((obj = call) && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj) || "function" == typeof call) ? call : (function(self) {
if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
})(self);
}
return !function(subClass, superClass) {
!function(subClass, superClass) {
if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function");
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
Expand All @@ -128,7 +121,35 @@ var A = function() {
configurable: !0
}
}), superClass && _setPrototypeOf(subClass, superClass);
}(B, A), _createClass(B, [
}(B, A);
var _super = function(Derived) {
var hasNativeReflectConstruct = function() {
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
if (Reflect.construct.sham) return !1;
if ("function" == typeof Proxy) return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
})), !0;
} catch (e) {
return !1;
}
}();
return function() {
var obj, self, call, result, Super = _getPrototypeOf(Derived);
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else result = Super.apply(this, arguments);
return self = this, (call = result) && ("object" == ((obj = call) && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj) || "function" == typeof call) ? call : (function(self) {
if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
})(self);
};
}(B);
function B() {
return _classCallCheck(this, B), _super.apply(this, arguments);
}
return _createClass(B, [
{
key: "simple",
value: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,31 @@ function _setPrototypeOf(o, p) {
var _typeof = function(obj) {
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
};
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 _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 _func() {
_func = _asyncToGenerator(regeneratorRuntime.mark(function _callee() {
var D;
Expand All @@ -83,9 +108,10 @@ function _func() {
_ctx.t0 = /*#__PURE__*/ function(_super) {
"use strict";
_inherits(D, _super);
var _super1 = _createSuper(D);
function D() {
_classCallCheck(this, D);
return _possibleConstructorReturn(this, _getPrototypeOf(D).apply(this, arguments));
return _super1.apply(this, arguments);
}
return D;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,35 @@ function _inherits(subClass, superClass) {
}
}), superClass && _setPrototypeOf(subClass, superClass);
}
function _possibleConstructorReturn(self, call) {
return call && ("object" === _typeof(call) || "function" == typeof call) ? call : (function(self) {
if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
})(self);
}
function _setPrototypeOf(o, p) {
return _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
return o.__proto__ = p, o;
}, _setPrototypeOf(o, p);
}
var _typeof = function(obj) {
return obj && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj;
};
function _createSuper(Derived) {
var hasNativeReflectConstruct = function() {
if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
if (Reflect.construct.sham) return !1;
if ("function" == typeof Proxy) return !0;
try {
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
})), !0;
} catch (e) {
return !1;
}
}();
return function() {
var obj, self, call, result, Super = _getPrototypeOf(Derived);
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else result = Super.apply(this, arguments);
return self = this, (call = result) && ("object" == ((obj = call) && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj) || "function" == typeof call) ? call : (function(self) {
if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
})(self);
};
}
function _func() {
return (_func = (function(fn) {
return function() {
Expand All @@ -62,10 +77,12 @@ function _func() {
case 0:
return _ctx.t0 = function(_super) {
"use strict";
_inherits(D, _super);
var _super1 = _createSuper(D);
function D() {
return _classCallCheck(this, D), _possibleConstructorReturn(this, _getPrototypeOf(D).apply(this, arguments));
return _classCallCheck(this, D), _super1.apply(this, arguments);
}
return _inherits(D, _super), D;
return D;
}, _ctx.next = 3, p;
case 3:
_ctx.t1 = _ctx.sent, D = (0, _ctx.t0)(_ctx.t1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,42 @@ function _wrapNativeSuper(Class) {
};
return _wrapNativeSuper(Class);
}
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 _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);
};
}
// @target: es5
// @lib: es5,es2015.promise
// @module: commonjs
// @filename: task.ts
export var Task = /*#__PURE__*/ function(Promise) {
"use strict";
_inherits(Task, Promise);
var _super = _createSuper(Task);
function Task() {
_classCallCheck(this, Task);
return _possibleConstructorReturn(this, _getPrototypeOf(Task).apply(this, arguments));
return _super.apply(this, arguments);
}
return Task;
}(_wrapNativeSuper(Promise));
Expand Down
Loading

0 comments on commit a90fae5

Please sign in to comment.