mirror of
https://github.com/swc-project/swc.git
synced 2024-11-23 09:38:16 +03:00
feat(es/codegen): Make the output for empty objects and empty statements pretty (#3171)
This commit is contained in:
parent
e14aa9dab4
commit
52961804d1
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {
|
||||
};
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function(key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
@ -42,8 +41,7 @@ var MyEnum;
|
||||
(function(MyEnum) {
|
||||
MyEnum["x"] = "xxx";
|
||||
MyEnum["y"] = "yyy";
|
||||
})(MyEnum || (MyEnum = {
|
||||
}));
|
||||
})(MyEnum || (MyEnum = {}));
|
||||
let Xpto = ((_class = class Xpto {
|
||||
constructor(){
|
||||
_initializerDefineProperty(this, "value", _descriptor, this);
|
||||
@ -58,6 +56,5 @@ let Xpto = ((_class = class Xpto {
|
||||
initializer: void 0
|
||||
}), _class);
|
||||
function Decorator() {
|
||||
return function(...args) {
|
||||
};
|
||||
return function(...args) {};
|
||||
}
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {
|
||||
};
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function(key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
|
@ -8,13 +8,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -80,8 +80,7 @@ class Shard extends _utils.Emitter {
|
||||
/**
|
||||
* Destroys this shard.
|
||||
* @param {ShardDestroyOptions} [options={}]
|
||||
*/ destroy({ code =1000 , emit =true , log =true , reset =false } = {
|
||||
}) {
|
||||
*/ destroy({ code =1000 , emit =true , log =true , reset =false } = {}) {
|
||||
if (log) {
|
||||
this._debug(`Destroying; Code = ${code}, Resetting? = ${reset ? "yes" : "no"}`);
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {
|
||||
};
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function(key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
|
@ -7,8 +7,7 @@ var _common = require("@nestjs/common");
|
||||
var _appService = require("./app.service");
|
||||
var _createUserDto = require("./dtos/CreateUserDto");
|
||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {
|
||||
};
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function(key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
|
@ -1,8 +1,7 @@
|
||||
"use strict";
|
||||
require("reflect-metadata");
|
||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {
|
||||
};
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function(key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
|
@ -40,8 +40,7 @@ function _foo() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
tmp = baz.bar, ref = tmp === void 0 ? {
|
||||
} : tmp, ref = ref !== null ? ref : _throw(new TypeError("Cannot destructure undefined"));
|
||||
tmp = baz.bar, ref = tmp === void 0 ? {} : tmp, ref = ref !== null ? ref : _throw(new TypeError("Cannot destructure undefined"));
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
|
@ -7,8 +7,7 @@ var _dec = typeof Reflect !== "undefined" && typeof Reflect.metadata === "functi
|
||||
};
|
||||
let MyClass1 = _class = _dec2(_class = _dec1(_class = _dec((_class = // work
|
||||
class MyClass1 {
|
||||
constructor(param1){
|
||||
}
|
||||
constructor(param1){}
|
||||
}) || _class) || _class) || _class) || _class;
|
||||
var _dec3 = typeof Reflect !== "undefined" && typeof Reflect.metadata === "function" && Reflect.metadata("design:paramtypes", [
|
||||
typeof Injected === "undefined" ? Object : Injected,
|
||||
|
@ -87,8 +87,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -15,8 +15,7 @@ function isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
||||
}));
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
@ -145,8 +144,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -49,8 +49,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -49,8 +49,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -49,8 +49,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -49,8 +49,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -49,8 +49,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -49,8 +49,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -20,8 +20,7 @@ exports.ServiceError = ServiceError;
|
||||
Code[Code["timedOut"] = 504] = "timedOut";
|
||||
Code[Code["badRequest"] = 400] = "badRequest";
|
||||
Code[Code["badResponse"] = 422] = "badResponse";
|
||||
})(Code = ServiceError1.Code || (ServiceError1.Code = {
|
||||
}));
|
||||
})(Code = ServiceError1.Code || (ServiceError1.Code = {}));
|
||||
class ServiceNotFound extends ServiceError {
|
||||
constructor(...args){
|
||||
super(...args);
|
||||
@ -37,5 +36,4 @@ exports.ServiceError = ServiceError;
|
||||
};
|
||||
}
|
||||
ServiceError1.toMessageBody = toMessageBody;
|
||||
})(ServiceError || (ServiceError = {
|
||||
}));
|
||||
})(ServiceError || (ServiceError = {}));
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -19,13 +19,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -25,13 +25,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -35,8 +35,7 @@ Vue.component('test', {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
if (this.msg === '') {
|
||||
}
|
||||
if (this.msg === '') {}
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
|
@ -1,4 +1,2 @@
|
||||
var x = function a() {
|
||||
};
|
||||
var y = function a() {
|
||||
};
|
||||
var x = function a() {};
|
||||
var y = function a() {};
|
||||
|
@ -3,13 +3,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -25,8 +25,7 @@ console.log(/*#__PURE__*/ function() {
|
||||
_createClass(_class, [
|
||||
{
|
||||
key: "run",
|
||||
value: function run() {
|
||||
}
|
||||
value: function run() {}
|
||||
}
|
||||
]);
|
||||
return _class;
|
||||
|
@ -25,8 +25,7 @@ console.log(/*#__PURE__*/ function() {
|
||||
_createClass(_class, [
|
||||
{
|
||||
key: "run",
|
||||
value: function run() {
|
||||
}
|
||||
value: function run() {}
|
||||
}
|
||||
]);
|
||||
return _class;
|
||||
|
@ -25,8 +25,7 @@ console.log(/*#__PURE__*/ function() {
|
||||
_createClass(_class, [
|
||||
{
|
||||
key: "run",
|
||||
value: function run() {
|
||||
}
|
||||
value: function run() {}
|
||||
}
|
||||
]);
|
||||
return _class;
|
||||
|
@ -25,8 +25,7 @@ console.log(/*#__PURE__*/ function() {
|
||||
_createClass(_class, [
|
||||
{
|
||||
key: "run",
|
||||
value: function run() {
|
||||
}
|
||||
value: function run() {}
|
||||
}
|
||||
]);
|
||||
return _class;
|
||||
|
@ -8,13 +8,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -8,8 +8,7 @@ import { render } from 'react-dom';
|
||||
import zhCN from 'antd/es/locale/zh_CN';
|
||||
import { Button, ConfigProvider } from 'antd';
|
||||
function App() {
|
||||
var ref = swcHelpers.slicedToArray(useState({
|
||||
}), 2), state = ref[0], setState = ref[1];
|
||||
var ref = swcHelpers.slicedToArray(useState({}), 2), state = ref[0], setState = ref[1];
|
||||
useEffect(function() {
|
||||
swcHelpers.asyncToGenerator(regeneratorRuntime.mark(function _callee() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
@ -39,5 +38,4 @@ function App() {
|
||||
]
|
||||
}));
|
||||
}
|
||||
render(/*#__PURE__*/ _jsx(App, {
|
||||
}), document.getElementById('root'));
|
||||
render(/*#__PURE__*/ _jsx(App, {}), document.getElementById('root'));
|
||||
|
@ -28,13 +28,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -16,8 +16,7 @@ function isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
||||
}));
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -2,8 +2,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
};
|
||||
var _exportNames = {};
|
||||
var _appConfig = _interopRequireWildcard(require("./app.config"));
|
||||
Object.keys(_appConfig).forEach(function(key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
@ -32,13 +31,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -2,8 +2,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
};
|
||||
var _exportNames = {};
|
||||
var _appConfig = _interopRequireWildcard(require("./app.config"));
|
||||
Object.keys(_appConfig).forEach(function(key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
@ -32,13 +31,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -3,6 +3,5 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.bar = void 0;
|
||||
var bar = function() {
|
||||
};
|
||||
var bar = function() {};
|
||||
exports.bar = bar;
|
||||
|
@ -3,6 +3,5 @@ Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.foo = void 0;
|
||||
var foo = function() {
|
||||
};
|
||||
var foo = function() {};
|
||||
exports.foo = foo;
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -2,8 +2,7 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
};
|
||||
var _exportNames = {};
|
||||
var _foo = _interopRequireWildcard(require("./foo"));
|
||||
Object.keys(_foo).forEach(function(key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
@ -32,13 +31,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -71,8 +71,7 @@ _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee1() {
|
||||
promise = new Promise(function(r) {
|
||||
return resolve = r;
|
||||
});
|
||||
iterable = _defineProperty({
|
||||
}, Symbol.asyncIterator, function() {
|
||||
iterable = _defineProperty({}, Symbol.asyncIterator, function() {
|
||||
return {
|
||||
next: function next() {
|
||||
return promise;
|
||||
|
@ -71,8 +71,7 @@ _asyncToGenerator(_regeneratorRuntime.default.mark(function _callee1() {
|
||||
promise = new Promise(function(r) {
|
||||
return resolve = r;
|
||||
});
|
||||
iterable = _defineProperty({
|
||||
}, Symbol.asyncIterator, function() {
|
||||
iterable = _defineProperty({}, Symbol.asyncIterator, function() {
|
||||
return {
|
||||
next: function next() {
|
||||
return promise;
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -1,5 +1,4 @@
|
||||
export function example() {
|
||||
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'click', b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
||||
}, c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
||||
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'click', b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, c = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1;
|
||||
console.log(a, b, c);
|
||||
}
|
||||
|
@ -10,6 +10,5 @@ var keys = {
|
||||
a: 1,
|
||||
b: 2
|
||||
};
|
||||
var controller = {
|
||||
};
|
||||
var controller = {};
|
||||
for(var key in keys)_loop(key);
|
||||
|
@ -1,5 +1,4 @@
|
||||
var obj = {
|
||||
fn: function fn() {
|
||||
}
|
||||
fn: function fn() {}
|
||||
};
|
||||
console.log(obj.fn.name);
|
||||
|
@ -32,8 +32,7 @@ function fn() {
|
||||
}
|
||||
function _fn() {
|
||||
_fn = _asyncToGenerator(function*() {
|
||||
for(const key in {
|
||||
});
|
||||
for(const key in {});
|
||||
});
|
||||
return _fn.apply(this, arguments);
|
||||
}
|
||||
|
@ -32,8 +32,7 @@ function fn() {
|
||||
}
|
||||
function _fn() {
|
||||
_fn = _asyncToGenerator(function*() {
|
||||
for(const key in {
|
||||
});
|
||||
for(const key in {});
|
||||
});
|
||||
return _fn.apply(this, arguments);
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
async function fn() {
|
||||
for(const key in {
|
||||
});
|
||||
for(const key in {});
|
||||
}
|
||||
|
@ -37,8 +37,7 @@ function _fn() {
|
||||
return regeneratorRuntime.wrap(function _callee$(_ctx) {
|
||||
while(1)switch(_ctx.prev = _ctx.next){
|
||||
case 0:
|
||||
for(key in {
|
||||
});
|
||||
for(key in {});
|
||||
case 1:
|
||||
case "end":
|
||||
return _ctx.stop();
|
||||
|
@ -2,5 +2,4 @@ import React from "react";
|
||||
export var Test;
|
||||
(function(Test1) {
|
||||
var content = Test1.content = /*#__PURE__*/ React.createElement("div", null, "Content");
|
||||
})(Test || (Test = {
|
||||
}));
|
||||
})(Test || (Test = {}));
|
||||
|
@ -1,3 +1,2 @@
|
||||
async function f() {
|
||||
}
|
||||
async function f() {}
|
||||
await f();
|
||||
|
@ -48,8 +48,7 @@ function _createClass(Constructor, protoProps, staticProps) {
|
||||
return Constructor;
|
||||
}
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
var key, i;
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
@ -64,10 +63,8 @@ function _objectWithoutProperties(source, excluded) {
|
||||
return target;
|
||||
}
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
var target = {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
for(i = 0; i < sourceKeys.length; i++){
|
||||
|
@ -29,8 +29,7 @@ function _asyncToGenerator(fn) {
|
||||
};
|
||||
}
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
var key, i;
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
@ -45,10 +44,8 @@ function _objectWithoutProperties(source, excluded) {
|
||||
return target;
|
||||
}
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
var target = {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
for(i = 0; i < sourceKeys.length; i++){
|
||||
|
@ -3,5 +3,4 @@ var A;
|
||||
var Foo = A1.Foo = function() {
|
||||
return(/*#__PURE__*/ React.createElement("div", null));
|
||||
};
|
||||
})(A || (A = {
|
||||
}));
|
||||
})(A || (A = {}));
|
||||
|
@ -1,6 +1,5 @@
|
||||
async function test(listings) {
|
||||
for (const listing of listings){
|
||||
}
|
||||
for (const listing of listings){}
|
||||
for (const listing1 of activeAndOpen){
|
||||
const listing11 = await foo(listing1);
|
||||
console.log(listing11);
|
||||
|
@ -1,7 +1,6 @@
|
||||
"use strict";
|
||||
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
|
||||
var desc = {
|
||||
};
|
||||
var desc = {};
|
||||
Object.keys(descriptor).forEach(function(key) {
|
||||
desc[key] = descriptor[key];
|
||||
});
|
||||
@ -60,12 +59,10 @@ function _asyncToGenerator(fn) {
|
||||
var _class, _dec, _dec1, _dec2, _dec3, _dec4, _dec5;
|
||||
let Foo = ((_class = class Foo {
|
||||
fnName1(argName) {
|
||||
return _asyncToGenerator(function*() {
|
||||
})();
|
||||
return _asyncToGenerator(function*() {})();
|
||||
}
|
||||
fnName2(argName = false) {
|
||||
return _asyncToGenerator(function*() {
|
||||
})();
|
||||
return _asyncToGenerator(function*() {})();
|
||||
}
|
||||
}) || _class, _dec = function(target, key) {
|
||||
return Arg('GraphQLArgName', {
|
||||
|
@ -26,8 +26,7 @@ function _templateObject1() {
|
||||
};
|
||||
return data;
|
||||
}
|
||||
function myTag(strings) {
|
||||
}
|
||||
function myTag(strings) {}
|
||||
function f1() {
|
||||
return myTag(_templateObject());
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
var key, i;
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
@ -15,10 +14,8 @@ function _objectWithoutProperties(source, excluded) {
|
||||
return target;
|
||||
}
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
var target = {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
for(i = 0; i < sourceKeys.length; i++){
|
||||
|
@ -1,6 +1,5 @@
|
||||
function _objectWithoutProperties(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = _objectWithoutPropertiesLoose(source, excluded);
|
||||
var key, i;
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
@ -15,10 +14,8 @@ function _objectWithoutProperties(source, excluded) {
|
||||
return target;
|
||||
}
|
||||
function _objectWithoutPropertiesLoose(source, excluded) {
|
||||
if (source == null) return {
|
||||
};
|
||||
var target = {
|
||||
};
|
||||
if (source == null) return {};
|
||||
var target = {};
|
||||
var sourceKeys = Object.keys(source);
|
||||
var key, i;
|
||||
for(i = 0; i < sourceKeys.length; i++){
|
||||
|
@ -5,10 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
||||
exports.default = void 0;
|
||||
var _default = {
|
||||
foo: {
|
||||
func1 (index) {
|
||||
},
|
||||
func2 (index, index1) {
|
||||
}
|
||||
func1 (index) {},
|
||||
func2 (index, index1) {}
|
||||
}
|
||||
};
|
||||
exports.default = _default;
|
||||
|
@ -7,11 +7,9 @@ exports.test2 = exports.test = void 0;
|
||||
function warn() {
|
||||
throw new Error("this should not be called");
|
||||
}
|
||||
const test = {
|
||||
};
|
||||
const test = {};
|
||||
exports.test = test;
|
||||
const test2 = {
|
||||
};
|
||||
const test2 = {};
|
||||
exports.test2 = test2;
|
||||
Object.defineProperty(test, "warn", {
|
||||
get: ()=>warn
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -5,14 +5,11 @@ export var Test;
|
||||
b["Test"] = "1";
|
||||
b["Test2"] = "2";
|
||||
b["Test3"] = "3";
|
||||
})(b = a.testEnum || (a.testEnum = {
|
||||
}));
|
||||
})(b = a.testEnum || (a.testEnum = {}));
|
||||
let c;
|
||||
(function(c) {
|
||||
c["Test"] = "1";
|
||||
c["Test2"] = "2";
|
||||
c["Test3"] = "3";
|
||||
})(c = a.testEnum2 || (a.testEnum2 = {
|
||||
}));
|
||||
})(Test || (Test = {
|
||||
}));
|
||||
})(c = a.testEnum2 || (a.testEnum2 = {}));
|
||||
})(Test || (Test = {}));
|
||||
|
@ -4,5 +4,4 @@ var n;
|
||||
ref = {
|
||||
a: 1
|
||||
}, n1.a = ref.a, ref;
|
||||
})(n || (n = {
|
||||
}));
|
||||
})(n || (n = {}));
|
||||
|
@ -5,5 +5,4 @@ var Foo;
|
||||
a: 1,
|
||||
b: 2
|
||||
}, Foo1.A = ref.a, Foo1.B = ref.b, ref;
|
||||
})(Foo || (Foo = {
|
||||
}));
|
||||
})(Foo || (Foo = {}));
|
||||
|
@ -277,8 +277,7 @@ function _toElementDescriptor(elementObject) {
|
||||
kind: kind,
|
||||
key: key,
|
||||
placement: placement,
|
||||
descriptor: Object.assign({
|
||||
}, descriptor)
|
||||
descriptor: Object.assign({}, descriptor)
|
||||
};
|
||||
if (kind !== "field") {
|
||||
_disallowProperty(elementObject, "initializer", "A method descriptor");
|
||||
@ -447,8 +446,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
@ -482,8 +480,7 @@ var SomeClass = _decorate([], function(_initialize) {
|
||||
dec
|
||||
],
|
||||
key: "someMethod",
|
||||
value: function someMethod() {
|
||||
}
|
||||
value: function someMethod() {}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -4,13 +4,11 @@ function _interopRequireWildcard(obj) {
|
||||
if (obj && obj.__esModule) {
|
||||
return obj;
|
||||
} else {
|
||||
var newObj = {
|
||||
};
|
||||
var newObj = {};
|
||||
if (obj != null) {
|
||||
for(var key in obj){
|
||||
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {
|
||||
};
|
||||
var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
|
||||
if (desc.get || desc.set) {
|
||||
Object.defineProperty(newObj, key, desc);
|
||||
} else {
|
||||
|
@ -14,8 +14,7 @@ function isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
||||
}));
|
||||
Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
@ -107,8 +106,7 @@ function _isNativeReflectConstruct() {
|
||||
if (Reflect.construct.sham) return false;
|
||||
if (typeof Proxy === "function") return true;
|
||||
try {
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
||||
}));
|
||||
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
@ -125,10 +125,8 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
// TODO: remove this workaround when https://bugs.webkit.org/show_bug.cgi?id=187726 is fixed.
|
||||
renderOpts.devOnlyCacheBusterQueryString = renderOpts.dev ? renderOpts.devOnlyCacheBusterQueryString || `?ts=${Date.now()}` : "";
|
||||
// don't modify original query object
|
||||
query = Object.assign({
|
||||
}, query);
|
||||
const { err , dev =false , ampPath ="" , App , Document , pageConfig ={
|
||||
} , Component , buildManifest , fontManifest , reactLoadableManifest , ErrorDebug , getStaticProps , getStaticPaths , getServerSideProps , isDataReq , params , previewProps , basePath , devOnlyCacheBusterQueryString , supportsDynamicHTML , concurrentFeatures , } = renderOpts;
|
||||
query = Object.assign({}, query);
|
||||
const { err , dev =false , ampPath ="" , App , Document , pageConfig ={} , Component , buildManifest , fontManifest , reactLoadableManifest , ErrorDebug , getStaticProps , getStaticPaths , getServerSideProps , isDataReq , params , previewProps , basePath , devOnlyCacheBusterQueryString , supportsDynamicHTML , concurrentFeatures , } = renderOpts;
|
||||
const getFontDefinition = (url)=>{
|
||||
if (fontManifest) {
|
||||
return getFontDefinitionFromManifest(url, fontManifest);
|
||||
@ -136,8 +134,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
return "";
|
||||
};
|
||||
const callMiddleware = async (method, args, props = false)=>{
|
||||
let results = props ? {
|
||||
} : [];
|
||||
let results = props ? {} : [];
|
||||
if (Document[`${method}Middleware`]) {
|
||||
let middlewareFunc = await Document[`${method}Middleware`];
|
||||
middlewareFunc = middlewareFunc.default || middlewareFunc;
|
||||
@ -211,8 +208,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
query = {
|
||||
...query.amp ? {
|
||||
amp: query.amp
|
||||
} : {
|
||||
}
|
||||
} : {}
|
||||
};
|
||||
asPath = `${pathname}${// ensure trailing slash is present for non-dynamic auto-export pages
|
||||
req.url.endsWith("/") && pathname !== "/" && !pageIsDynamic ? "/" : ""}`;
|
||||
@ -252,16 +248,14 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
locales: renderOpts.locales,
|
||||
defaultLocale: renderOpts.defaultLocale,
|
||||
AppTree: (props)=>{
|
||||
return(/*#__PURE__*/ React.createElement(AppContainer, null, /*#__PURE__*/ React.createElement(App, _extends({
|
||||
}, props, {
|
||||
return(/*#__PURE__*/ React.createElement(AppContainer, null, /*#__PURE__*/ React.createElement(App, _extends({}, props, {
|
||||
Component: Component,
|
||||
router: router
|
||||
}))));
|
||||
},
|
||||
defaultGetInitialProps: async (docCtx)=>{
|
||||
const enhanceApp = (AppComp)=>{
|
||||
return (props)=>/*#__PURE__*/ React.createElement(AppComp, _extends({
|
||||
}, props))
|
||||
return (props)=>/*#__PURE__*/ React.createElement(AppComp, _extends({}, props))
|
||||
;
|
||||
};
|
||||
const { html , head } = await docCtx.renderPage({
|
||||
@ -284,8 +278,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
const inAmpMode = isInAmpMode(ampState);
|
||||
const reactLoadableModules = [];
|
||||
let head1 = defaultHead(inAmpMode);
|
||||
let scriptLoader = {
|
||||
};
|
||||
let scriptLoader = {};
|
||||
const nextExport = !isSSG && (renderOpts.nextExport || dev && (isAutoExport || isFallback));
|
||||
const AppContainer = ({ children })=>/*#__PURE__*/ React.createElement(RouterContext.Provider, {
|
||||
value: router
|
||||
@ -299,8 +292,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
updateScripts: (scripts)=>{
|
||||
scriptLoader = scripts;
|
||||
},
|
||||
scripts: {
|
||||
},
|
||||
scripts: {},
|
||||
mountedInstances: new Set()
|
||||
}
|
||||
}, /*#__PURE__*/ React.createElement(LoadableContext.Provider, {
|
||||
@ -409,8 +401,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
// By default, we never revalidate.
|
||||
(data).revalidate = false;
|
||||
}
|
||||
props1.pageProps = Object.assign({
|
||||
}, props1.pageProps, "props" in data ? data.props : undefined);
|
||||
props1.pageProps = Object.assign({}, props1.pageProps, "props" in data ? data.props : undefined);
|
||||
// pass up revalidate and props for export
|
||||
// TODO: change this to a different passing mechanism
|
||||
(renderOpts).revalidate = "revalidate" in data ? data.revalidate : undefined;
|
||||
@ -502,12 +493,10 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
// this fn should throw an error instead of ever returning `false`
|
||||
throw new Error("invariant: getServerSideProps did not return valid props. Please report this.");
|
||||
}
|
||||
props1.pageProps = Object.assign({
|
||||
}, props1.pageProps, data.props);
|
||||
props1.pageProps = Object.assign({}, props1.pageProps, data.props);
|
||||
renderOpts.pageData = props1;
|
||||
}
|
||||
if (!isSSG && !getServerSideProps && process.env.NODE_ENV !== "production" && Object.keys(props1?.pageProps || {
|
||||
}).includes("url")) {
|
||||
if (!isSSG && !getServerSideProps && process.env.NODE_ENV !== "production" && Object.keys(props1?.pageProps || {}).includes("url")) {
|
||||
console.warn(`The prop \`url\` is a reserved prop in Next.js for legacy reasons and will be overridden on page ${pathname}\n` + `See more info here: https://nextjs.org/docs/messages/reserved-page-prop`);
|
||||
}
|
||||
// Avoid rendering page un-necessarily for getServerSideProps data request
|
||||
@ -518,8 +507,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
// We don't call getStaticProps or getServerSideProps while generating
|
||||
// the fallback so make sure to set pageProps to an empty object
|
||||
if (isFallback) {
|
||||
props1.pageProps = {
|
||||
};
|
||||
props1.pageProps = {};
|
||||
}
|
||||
// the response might be finished on the getInitialProps call
|
||||
if (isResSent(res) && !isSSG) return null;
|
||||
@ -562,8 +550,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
*/ const generateStaticHTML = supportsDynamicHTML !== true;
|
||||
const renderDocument = async ()=>{
|
||||
if (Document.getInitialProps) {
|
||||
const renderPage = (options = {
|
||||
})=>{
|
||||
const renderPage = (options = {})=>{
|
||||
if (ctx.err && ErrorDebug) {
|
||||
const html = ReactDOMServer.renderToString(/*#__PURE__*/ React.createElement(ErrorDebug, {
|
||||
error: ctx.err
|
||||
@ -601,8 +588,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
bodyResult: piperFromArray([
|
||||
docProps.html
|
||||
]),
|
||||
documentElement: (htmlProps)=>/*#__PURE__*/ React.createElement(Document, _extends({
|
||||
}, htmlProps, docProps))
|
||||
documentElement: (htmlProps)=>/*#__PURE__*/ React.createElement(Document, _extends({}, htmlProps, docProps))
|
||||
,
|
||||
head: docProps.head,
|
||||
headTags: await headTags(documentCtx),
|
||||
@ -611,8 +597,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
} else {
|
||||
const content = ctx.err && ErrorDebug ? /*#__PURE__*/ React.createElement(ErrorDebug, {
|
||||
error: ctx.err
|
||||
}) : /*#__PURE__*/ React.createElement(AppContainer, null, /*#__PURE__*/ React.createElement(App, _extends({
|
||||
}, props1, {
|
||||
}) : /*#__PURE__*/ React.createElement(AppContainer, null, /*#__PURE__*/ React.createElement(App, _extends({}, props1, {
|
||||
Component: Component,
|
||||
router: router
|
||||
})));
|
||||
@ -645,8 +630,7 @@ export async function renderToHTML(req, res, pathname, query, renderOpts) {
|
||||
}
|
||||
}
|
||||
const hybridAmp = ampState.hybrid;
|
||||
const docComponentsRendered = {
|
||||
};
|
||||
const docComponentsRendered = {};
|
||||
const { assetPrefix , buildId , customServer , defaultLocale , disableOptimizedLoading , domainLocales , locale , locales , runtimeConfig , } = renderOpts;
|
||||
const htmlProps1 = {
|
||||
__NEXT_DATA__: {
|
||||
|
@ -123,8 +123,7 @@ var Router = /*#__PURE__*/ function() {
|
||||
_ctx.next = 18;
|
||||
break;
|
||||
}
|
||||
return _ctx.abrupt("return", new Promise(function() {
|
||||
}));
|
||||
return _ctx.abrupt("return", new Promise(function() {}));
|
||||
case 18:
|
||||
if (!options._h) {
|
||||
this.isSsr = false;
|
||||
@ -242,8 +241,7 @@ var Router = /*#__PURE__*/ function() {
|
||||
routeRegex = getRouteRegex(route);
|
||||
routeMatch = getRouteMatcher(routeRegex)(asPathname);
|
||||
shouldInterpolate = route === asPathname;
|
||||
interpolatedAs = shouldInterpolate ? interpolateAs(route, asPathname, query) : {
|
||||
};
|
||||
interpolatedAs = shouldInterpolate ? interpolateAs(route, asPathname, query) : {};
|
||||
if (!(!routeMatch || shouldInterpolate && !interpolatedAs.result)) {
|
||||
_ctx.next = 79;
|
||||
break;
|
||||
@ -264,8 +262,7 @@ var Router = /*#__PURE__*/ function() {
|
||||
break;
|
||||
case 79:
|
||||
if (shouldInterpolate) {
|
||||
as = formatWithValidation(Object.assign({
|
||||
}, parsedAs1, {
|
||||
as = formatWithValidation(Object.assign({}, parsedAs1, {
|
||||
pathname: interpolatedAs.result,
|
||||
query: omitParmsFromQuery(query, interpolatedAs.params)
|
||||
}));
|
||||
@ -301,8 +298,7 @@ var Router = /*#__PURE__*/ function() {
|
||||
return _ctx.abrupt("return", this.change(method, newUrl, newAs, options));
|
||||
case 95:
|
||||
window.location.href = destination;
|
||||
return _ctx.abrupt("return", new Promise(function() {
|
||||
}));
|
||||
return _ctx.abrupt("return", new Promise(function() {}));
|
||||
case 97:
|
||||
this.isPreview = !!props.__N_PREVIEW;
|
||||
if (!(props.notFound === SSG_DATA_NOT_FOUND)) {
|
||||
|
@ -25,8 +25,7 @@ var Foo = /*#__PURE__*/ function() {
|
||||
_createClass(Foo, [
|
||||
{
|
||||
key: "true",
|
||||
value: function _true() {
|
||||
}
|
||||
value: function _true() {}
|
||||
}
|
||||
]);
|
||||
return Foo;
|
||||
|
@ -1,2 +1 @@
|
||||
export default function() {
|
||||
};
|
||||
export default function() {};
|
||||
|
@ -47,7 +47,6 @@ function _unsupportedIterableToArray(o, minLen) {
|
||||
function Bar() {
|
||||
var ref = _slicedToArray(useState(0), 2), foo = ref[0], setFoo = ref[1];
|
||||
// @refresh reset
|
||||
React.useEffect(function() {
|
||||
});
|
||||
React.useEffect(function() {});
|
||||
return(/*#__PURE__*/ React.createElement("h1", null, foo, " "));
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
import * as swcHelpers from "@swc/helpers";
|
||||
var a = {
|
||||
};
|
||||
var b = swcHelpers["extends"]({
|
||||
}, a);
|
||||
var a = {};
|
||||
var b = swcHelpers["extends"]({}, a);
|
||||
|
@ -8,8 +8,7 @@ var A;
|
||||
}
|
||||
}
|
||||
A1.Point = Point;
|
||||
})(A || (A = {
|
||||
}));
|
||||
})(A || (A = {}));
|
||||
// @filename: test.ts
|
||||
var p;
|
||||
var p = A.Point.Origin;
|
||||
|
@ -1,6 +1,5 @@
|
||||
var A;
|
||||
(A || (A = {
|
||||
})).Point = class {
|
||||
(A || (A = {})).Point = class {
|
||||
constructor(x, y){
|
||||
this.x = x, this.y = y;
|
||||
}
|
||||
|
@ -13,8 +13,7 @@ var A;
|
||||
this.y = y;
|
||||
};
|
||||
A1.Point = Point;
|
||||
})(A || (A = {
|
||||
}));
|
||||
})(A || (A = {}));
|
||||
// @filename: test.ts
|
||||
var p;
|
||||
var p = A.Point.Origin;
|
||||
|
@ -7,5 +7,4 @@ var A;
|
||||
})(this, Point), this.x = x, this.y = y;
|
||||
};
|
||||
A1.Point = Point;
|
||||
}(A || (A = {
|
||||
})), A.Point.Origin, new A.Point(0, 0);
|
||||
}(A || (A = {})), A.Point.Origin, new A.Point(0, 0);
|
||||
|
@ -1,2 +1 @@
|
||||
var v = (a, b)=>{
|
||||
};
|
||||
var v = (a, b)=>{};
|
||||
|
@ -1,2 +1 @@
|
||||
var v = function(a, b) {
|
||||
};
|
||||
var v = function(a, b) {};
|
||||
|
@ -2,30 +2,25 @@
|
||||
class clodule1 {
|
||||
}
|
||||
(function(clodule1) {
|
||||
function f(x) {
|
||||
}
|
||||
})(clodule1 || (clodule1 = {
|
||||
}));
|
||||
function f(x) {}
|
||||
})(clodule1 || (clodule1 = {}));
|
||||
class clodule2 {
|
||||
}
|
||||
(function(clodule2) {
|
||||
var x;
|
||||
class D {
|
||||
}
|
||||
})(clodule2 || (clodule2 = {
|
||||
}));
|
||||
})(clodule2 || (clodule2 = {}));
|
||||
class clodule3 {
|
||||
}
|
||||
(function(clodule31) {
|
||||
var y = clodule31.y = {
|
||||
id: T
|
||||
};
|
||||
})(clodule3 || (clodule3 = {
|
||||
}));
|
||||
})(clodule3 || (clodule3 = {}));
|
||||
class clodule4 {
|
||||
}
|
||||
(function(clodule4) {
|
||||
class D {
|
||||
}
|
||||
})(clodule4 || (clodule4 = {
|
||||
}));
|
||||
})(clodule4 || (clodule4 = {}));
|
||||
|
@ -1,6 +1,5 @@
|
||||
class clodule3 {
|
||||
}
|
||||
(clodule3 || (clodule3 = {
|
||||
})).y = {
|
||||
(clodule3 || (clodule3 = {})).y = {
|
||||
id: T
|
||||
};
|
||||
|
@ -8,10 +8,8 @@ var clodule1 = function clodule1() {
|
||||
_classCallCheck(this, clodule1);
|
||||
};
|
||||
(function(clodule1) {
|
||||
var f = function f(x) {
|
||||
};
|
||||
})(clodule1 || (clodule1 = {
|
||||
}));
|
||||
var f = function f(x) {};
|
||||
})(clodule1 || (clodule1 = {}));
|
||||
var clodule2 = function clodule2() {
|
||||
"use strict";
|
||||
_classCallCheck(this, clodule2);
|
||||
@ -22,8 +20,7 @@ var clodule2 = function clodule2() {
|
||||
"use strict";
|
||||
_classCallCheck(this, D);
|
||||
};
|
||||
})(clodule2 || (clodule2 = {
|
||||
}));
|
||||
})(clodule2 || (clodule2 = {}));
|
||||
var clodule3 = function clodule3() {
|
||||
"use strict";
|
||||
_classCallCheck(this, clodule3);
|
||||
@ -32,8 +29,7 @@ var clodule3 = function clodule3() {
|
||||
var y = clodule3.y = {
|
||||
id: T
|
||||
};
|
||||
})(clodule3 || (clodule3 = {
|
||||
}));
|
||||
})(clodule3 || (clodule3 = {}));
|
||||
var clodule4 = function clodule4() {
|
||||
"use strict";
|
||||
_classCallCheck(this, clodule4);
|
||||
@ -43,5 +39,4 @@ var clodule4 = function clodule4() {
|
||||
"use strict";
|
||||
_classCallCheck(this, D);
|
||||
};
|
||||
})(clodule4 || (clodule4 = {
|
||||
}));
|
||||
})(clodule4 || (clodule4 = {}));
|
||||
|
@ -13,14 +13,12 @@ var clodule1 = function() {
|
||||
"use strict";
|
||||
_classCallCheck(this, D);
|
||||
};
|
||||
}(clodule2 || (clodule2 = {
|
||||
}));
|
||||
}(clodule2 || (clodule2 = {}));
|
||||
var clodule3 = function() {
|
||||
"use strict";
|
||||
_classCallCheck(this, clodule3);
|
||||
};
|
||||
(clodule3 || (clodule3 = {
|
||||
})).y = {
|
||||
(clodule3 || (clodule3 = {})).y = {
|
||||
id: T
|
||||
};
|
||||
var clodule4 = function() {
|
||||
@ -32,5 +30,4 @@ var clodule4 = function() {
|
||||
"use strict";
|
||||
_classCallCheck(this, D);
|
||||
};
|
||||
}(clodule4 || (clodule4 = {
|
||||
}));
|
||||
}(clodule4 || (clodule4 = {}));
|
||||
|
@ -1,11 +1,9 @@
|
||||
class clodule {
|
||||
static fn(id) {
|
||||
}
|
||||
static fn(id) {}
|
||||
}
|
||||
(function(clodule1) {
|
||||
function fn(x, y) {
|
||||
return x;
|
||||
}
|
||||
clodule1.fn = fn;
|
||||
})(clodule || (clodule = {
|
||||
}));
|
||||
})(clodule || (clodule = {}));
|
||||
|
@ -1,8 +1,6 @@
|
||||
class clodule {
|
||||
static fn(id) {
|
||||
}
|
||||
static fn(id) {}
|
||||
}
|
||||
(clodule || (clodule = {
|
||||
})).fn = function(x, y) {
|
||||
(clodule || (clodule = {})).fn = function(x, y) {
|
||||
return x;
|
||||
};
|
||||
|
@ -25,8 +25,7 @@ var clodule = /*#__PURE__*/ function() {
|
||||
_createClass(clodule, null, [
|
||||
{
|
||||
key: "fn",
|
||||
value: function fn(id) {
|
||||
}
|
||||
value: function fn(id) {}
|
||||
}
|
||||
]);
|
||||
return clodule;
|
||||
@ -36,5 +35,4 @@ var clodule = /*#__PURE__*/ function() {
|
||||
return x;
|
||||
};
|
||||
clodule.fn = fn;
|
||||
})(clodule || (clodule = {
|
||||
}));
|
||||
})(clodule || (clodule = {}));
|
||||
|
@ -15,12 +15,10 @@ var clodule = function() {
|
||||
return Constructor = clodule, protoProps = null, staticProps = [
|
||||
{
|
||||
key: "fn",
|
||||
value: function(id) {
|
||||
}
|
||||
value: function(id) {}
|
||||
}
|
||||
], protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), clodule;
|
||||
}();
|
||||
(clodule || (clodule = {
|
||||
})).fn = function(x, y) {
|
||||
(clodule || (clodule = {})).fn = function(x, y) {
|
||||
return x;
|
||||
};
|
||||
|
@ -1,11 +1,9 @@
|
||||
class clodule {
|
||||
static fn(id) {
|
||||
}
|
||||
static fn(id) {}
|
||||
}
|
||||
(function(clodule1) {
|
||||
function fn(x, y) {
|
||||
return x;
|
||||
}
|
||||
clodule1.fn = fn;
|
||||
})(clodule || (clodule = {
|
||||
}));
|
||||
})(clodule || (clodule = {}));
|
||||
|
@ -1,8 +1,6 @@
|
||||
class clodule {
|
||||
static fn(id) {
|
||||
}
|
||||
static fn(id) {}
|
||||
}
|
||||
(clodule || (clodule = {
|
||||
})).fn = function(x, y) {
|
||||
(clodule || (clodule = {})).fn = function(x, y) {
|
||||
return x;
|
||||
};
|
||||
|
@ -25,8 +25,7 @@ var clodule = /*#__PURE__*/ function() {
|
||||
_createClass(clodule, null, [
|
||||
{
|
||||
key: "fn",
|
||||
value: function fn(id) {
|
||||
}
|
||||
value: function fn(id) {}
|
||||
}
|
||||
]);
|
||||
return clodule;
|
||||
@ -36,5 +35,4 @@ var clodule = /*#__PURE__*/ function() {
|
||||
return x;
|
||||
};
|
||||
clodule.fn = fn;
|
||||
})(clodule || (clodule = {
|
||||
}));
|
||||
})(clodule || (clodule = {}));
|
||||
|
@ -15,12 +15,10 @@ var clodule = function() {
|
||||
return Constructor = clodule, protoProps = null, staticProps = [
|
||||
{
|
||||
key: "fn",
|
||||
value: function(id) {
|
||||
}
|
||||
value: function(id) {}
|
||||
}
|
||||
], protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), clodule;
|
||||
}();
|
||||
(clodule || (clodule = {
|
||||
})).fn = function(x, y) {
|
||||
(clodule || (clodule = {})).fn = function(x, y) {
|
||||
return x;
|
||||
};
|
||||
|
@ -8,5 +8,4 @@ class clodule {
|
||||
return clodule.sfn('a');
|
||||
}
|
||||
clodule1.fn = fn;
|
||||
})(clodule || (clodule = {
|
||||
}));
|
||||
})(clodule || (clodule = {}));
|
||||
|
@ -3,7 +3,6 @@ class clodule {
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
(clodule || (clodule = {
|
||||
})).fn = function(x, y) {
|
||||
(clodule || (clodule = {})).fn = function(x, y) {
|
||||
return clodule.sfn("a");
|
||||
};
|
||||
|
@ -37,5 +37,4 @@ var clodule = /*#__PURE__*/ function() {
|
||||
return clodule.sfn('a');
|
||||
};
|
||||
clodule1.fn = fn;
|
||||
})(clodule || (clodule = {
|
||||
}));
|
||||
})(clodule || (clodule = {}));
|
||||
|
@ -26,5 +26,4 @@ var clodule = function() {
|
||||
return clodule.sfn("a");
|
||||
};
|
||||
clodule1.fn = fn;
|
||||
}(clodule || (clodule = {
|
||||
}));
|
||||
}(clodule || (clodule = {}));
|
||||
|
@ -15,8 +15,7 @@ class Point {
|
||||
return null;
|
||||
} //expected duplicate identifier error
|
||||
Point1.Origin = Origin;
|
||||
})(Point || (Point = {
|
||||
}));
|
||||
})(Point || (Point = {}));
|
||||
var A;
|
||||
(function(A1) {
|
||||
class Point2 {
|
||||
@ -37,7 +36,5 @@ var A;
|
||||
return "";
|
||||
} //expected duplicate identifier error
|
||||
Point3.Origin = Origin;
|
||||
})(Point2 = A1.Point || (A1.Point = {
|
||||
}));
|
||||
})(A || (A = {
|
||||
}));
|
||||
})(Point2 = A1.Point || (A1.Point = {}));
|
||||
})(A || (A = {}));
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user