@putout/bundle 3.20.0 → 3.20.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/putout.js +209 -172
- package/bundle/putout.min.js +1 -1
- package/package.json +4 -4
package/bundle/putout.js
CHANGED
|
@@ -10871,7 +10871,7 @@ __export(lib_exports, {
|
|
|
10871
10871
|
return isBlockScoped;
|
|
10872
10872
|
},
|
|
10873
10873
|
isBlockStatement: function() {
|
|
10874
|
-
return isBlockStatement$
|
|
10874
|
+
return isBlockStatement$5;
|
|
10875
10875
|
},
|
|
10876
10876
|
isBooleanLiteral: function() {
|
|
10877
10877
|
return isBooleanLiteral$2;
|
|
@@ -11033,7 +11033,7 @@ __export(lib_exports, {
|
|
|
11033
11033
|
return isExportAllDeclaration;
|
|
11034
11034
|
},
|
|
11035
11035
|
isExportDeclaration: function() {
|
|
11036
|
-
return isExportDeclaration$
|
|
11036
|
+
return isExportDeclaration$4;
|
|
11037
11037
|
},
|
|
11038
11038
|
isExportDefaultDeclaration: function() {
|
|
11039
11039
|
return isExportDefaultDeclaration;
|
|
@@ -11042,7 +11042,7 @@ __export(lib_exports, {
|
|
|
11042
11042
|
return isExportDefaultSpecifier;
|
|
11043
11043
|
},
|
|
11044
11044
|
isExportNamedDeclaration: function() {
|
|
11045
|
-
return isExportNamedDeclaration;
|
|
11045
|
+
return isExportNamedDeclaration$2;
|
|
11046
11046
|
},
|
|
11047
11047
|
isExportNamespaceSpecifier: function() {
|
|
11048
11048
|
return isExportNamespaceSpecifier$1;
|
|
@@ -11219,7 +11219,7 @@ __export(lib_exports, {
|
|
|
11219
11219
|
return isLVal;
|
|
11220
11220
|
},
|
|
11221
11221
|
isLabeledStatement: function() {
|
|
11222
|
-
return isLabeledStatement$
|
|
11222
|
+
return isLabeledStatement$2;
|
|
11223
11223
|
},
|
|
11224
11224
|
isLet: function() {
|
|
11225
11225
|
return isLet;
|
|
@@ -11543,7 +11543,7 @@ __export(lib_exports, {
|
|
|
11543
11543
|
return isTSMethodSignature;
|
|
11544
11544
|
},
|
|
11545
11545
|
isTSModuleBlock: function() {
|
|
11546
|
-
return isTSModuleBlock;
|
|
11546
|
+
return isTSModuleBlock$2;
|
|
11547
11547
|
},
|
|
11548
11548
|
isTSModuleDeclaration: function() {
|
|
11549
11549
|
return isTSModuleDeclaration;
|
|
@@ -13683,7 +13683,7 @@ function isDirectiveLiteral(node, opts) {
|
|
|
13683
13683
|
if (node.type !== "DirectiveLiteral") return false;
|
|
13684
13684
|
return opts == null || shallowEqual(node, opts);
|
|
13685
13685
|
}
|
|
13686
|
-
function isBlockStatement$
|
|
13686
|
+
function isBlockStatement$5(node, opts) {
|
|
13687
13687
|
if (!node) return false;
|
|
13688
13688
|
if (node.type !== "BlockStatement") return false;
|
|
13689
13689
|
return opts == null || shallowEqual(node, opts);
|
|
@@ -13768,7 +13768,7 @@ function isIfStatement$2(node, opts) {
|
|
|
13768
13768
|
if (node.type !== "IfStatement") return false;
|
|
13769
13769
|
return opts == null || shallowEqual(node, opts);
|
|
13770
13770
|
}
|
|
13771
|
-
function isLabeledStatement$
|
|
13771
|
+
function isLabeledStatement$2(node, opts) {
|
|
13772
13772
|
if (!node) return false;
|
|
13773
13773
|
if (node.type !== "LabeledStatement") return false;
|
|
13774
13774
|
return opts == null || shallowEqual(node, opts);
|
|
@@ -13948,7 +13948,7 @@ function isExportDefaultDeclaration(node, opts) {
|
|
|
13948
13948
|
if (node.type !== "ExportDefaultDeclaration") return false;
|
|
13949
13949
|
return opts == null || shallowEqual(node, opts);
|
|
13950
13950
|
}
|
|
13951
|
-
function isExportNamedDeclaration(node, opts) {
|
|
13951
|
+
function isExportNamedDeclaration$2(node, opts) {
|
|
13952
13952
|
if (!node) return false;
|
|
13953
13953
|
if (node.type !== "ExportNamedDeclaration") return false;
|
|
13954
13954
|
return opts == null || shallowEqual(node, opts);
|
|
@@ -14843,7 +14843,7 @@ function isTSModuleDeclaration(node, opts) {
|
|
|
14843
14843
|
if (node.type !== "TSModuleDeclaration") return false;
|
|
14844
14844
|
return opts == null || shallowEqual(node, opts);
|
|
14845
14845
|
}
|
|
14846
|
-
function isTSModuleBlock(node, opts) {
|
|
14846
|
+
function isTSModuleBlock$2(node, opts) {
|
|
14847
14847
|
if (!node) return false;
|
|
14848
14848
|
if (node.type !== "TSModuleBlock") return false;
|
|
14849
14849
|
return opts == null || shallowEqual(node, opts);
|
|
@@ -15600,7 +15600,7 @@ function isImportOrExportDeclaration(node, opts) {
|
|
|
15600
15600
|
}
|
|
15601
15601
|
return opts == null || shallowEqual(node, opts);
|
|
15602
15602
|
}
|
|
15603
|
-
function isExportDeclaration$
|
|
15603
|
+
function isExportDeclaration$4(node, opts) {
|
|
15604
15604
|
if (!node) return false;
|
|
15605
15605
|
switch(node.type){
|
|
15606
15606
|
case "ExportAllDeclaration":
|
|
@@ -25252,7 +25252,7 @@ var TSTYPE_TYPES = FLIPPED_ALIAS_KEYS["TSType"];
|
|
|
25252
25252
|
var TSBASETYPE_TYPES = FLIPPED_ALIAS_KEYS["TSBaseType"];
|
|
25253
25253
|
var MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;
|
|
25254
25254
|
function toBlock(node, parent) {
|
|
25255
|
-
if (isBlockStatement$
|
|
25255
|
+
if (isBlockStatement$5(node)) {
|
|
25256
25256
|
return node;
|
|
25257
25257
|
}
|
|
25258
25258
|
var blockNodes = [];
|
|
@@ -25747,7 +25747,7 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
|
|
|
25747
25747
|
}
|
|
25748
25748
|
continue;
|
|
25749
25749
|
}
|
|
25750
|
-
if (isExportDeclaration$
|
|
25750
|
+
if (isExportDeclaration$4(id) && !isExportAllDeclaration(id)) {
|
|
25751
25751
|
if (isDeclaration(id.declaration)) {
|
|
25752
25752
|
search.push(id.declaration);
|
|
25753
25753
|
}
|
|
@@ -26223,7 +26223,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
26223
26223
|
return true;
|
|
26224
26224
|
}
|
|
26225
26225
|
function isScope(node, parent) {
|
|
26226
|
-
if (isBlockStatement$
|
|
26226
|
+
if (isBlockStatement$5(node) && (isFunction$4(parent) || isCatchClause(parent))) {
|
|
26227
26227
|
return false;
|
|
26228
26228
|
}
|
|
26229
26229
|
if (isPattern(node) && (isFunction$4(parent) || isCatchClause(parent))) {
|
|
@@ -27206,7 +27206,7 @@ var TokContext = function TokContext(token, preserveSpace) {
|
|
|
27206
27206
|
this.token = token;
|
|
27207
27207
|
this.preserveSpace = !!preserveSpace;
|
|
27208
27208
|
};
|
|
27209
|
-
var types$
|
|
27209
|
+
var types$A = {
|
|
27210
27210
|
brace: new TokContext("{"),
|
|
27211
27211
|
j_oTag: new TokContext("<tag"),
|
|
27212
27212
|
j_cTag: new TokContext("</tag"),
|
|
@@ -29445,7 +29445,7 @@ var State$2 = /*#__PURE__*/ function() {
|
|
|
29445
29445
|
__publicField(this, "lastTokEndLoc", null);
|
|
29446
29446
|
__publicField(this, "lastTokStartLoc", null);
|
|
29447
29447
|
__publicField(this, "context", [
|
|
29448
|
-
types$
|
|
29448
|
+
types$A.brace
|
|
29449
29449
|
]);
|
|
29450
29450
|
__publicField(this, "firstInvalidTemplateEscapePos", null);
|
|
29451
29451
|
__publicField(this, "strictErrors", /* @__PURE__ */ new Map());
|
|
@@ -33990,7 +33990,7 @@ var flow$1 = function(superClass) {
|
|
|
33990
33990
|
if (!jsx2.error) return jsx2.node;
|
|
33991
33991
|
var context = this.state.context;
|
|
33992
33992
|
var currentContext = context[context.length - 1];
|
|
33993
|
-
if (currentContext === types$
|
|
33993
|
+
if (currentContext === types$A.j_oTag || currentContext === types$A.j_expr) {
|
|
33994
33994
|
context.pop();
|
|
33995
33995
|
}
|
|
33996
33996
|
}
|
|
@@ -35206,9 +35206,9 @@ var jsx$3 = function(superClass) {
|
|
|
35206
35206
|
switch(this.state.type){
|
|
35207
35207
|
case 5:
|
|
35208
35208
|
node = this.startNode();
|
|
35209
|
-
this.setContext(types$
|
|
35209
|
+
this.setContext(types$A.brace);
|
|
35210
35210
|
this.next();
|
|
35211
|
-
node = this.jsxParseExpressionContainer(node, types$
|
|
35211
|
+
node = this.jsxParseExpressionContainer(node, types$A.j_oTag);
|
|
35212
35212
|
if (node.expression.type === "JSXEmptyExpression") {
|
|
35213
35213
|
this.raise(JsxErrors.AttributeIsEmpty, node);
|
|
35214
35214
|
}
|
|
@@ -35233,7 +35233,7 @@ var jsx$3 = function(superClass) {
|
|
|
35233
35233
|
value: function jsxParseSpreadChild(node) {
|
|
35234
35234
|
this.next();
|
|
35235
35235
|
node.expression = this.parseExpression();
|
|
35236
|
-
this.setContext(types$
|
|
35236
|
+
this.setContext(types$A.j_expr);
|
|
35237
35237
|
this.state.canStartJSXElement = true;
|
|
35238
35238
|
this.expect(8);
|
|
35239
35239
|
return this.finishNode(node, "JSXSpreadChild");
|
|
@@ -35265,11 +35265,11 @@ var jsx$3 = function(superClass) {
|
|
|
35265
35265
|
value: function jsxParseAttribute() {
|
|
35266
35266
|
var node = this.startNode();
|
|
35267
35267
|
if (this.match(5)) {
|
|
35268
|
-
this.setContext(types$
|
|
35268
|
+
this.setContext(types$A.brace);
|
|
35269
35269
|
this.next();
|
|
35270
35270
|
this.expect(21);
|
|
35271
35271
|
node.argument = this.parseMaybeAssignAllowIn();
|
|
35272
|
-
this.setContext(types$
|
|
35272
|
+
this.setContext(types$A.j_oTag);
|
|
35273
35273
|
this.state.canStartJSXElement = true;
|
|
35274
35274
|
this.expect(8);
|
|
35275
35275
|
return this.finishNode(node, "JSXSpreadAttribute");
|
|
@@ -35340,12 +35340,12 @@ var jsx$3 = function(superClass) {
|
|
|
35340
35340
|
case 5:
|
|
35341
35341
|
{
|
|
35342
35342
|
var node2 = this.startNode();
|
|
35343
|
-
this.setContext(types$
|
|
35343
|
+
this.setContext(types$A.brace);
|
|
35344
35344
|
this.next();
|
|
35345
35345
|
if (this.match(21)) {
|
|
35346
35346
|
children.push(this.jsxParseSpreadChild(node2));
|
|
35347
35347
|
} else {
|
|
35348
|
-
children.push(this.jsxParseExpressionContainer(node2, types$
|
|
35348
|
+
children.push(this.jsxParseExpressionContainer(node2, types$A.j_expr));
|
|
35349
35349
|
}
|
|
35350
35350
|
break;
|
|
35351
35351
|
}
|
|
@@ -35420,11 +35420,11 @@ var jsx$3 = function(superClass) {
|
|
|
35420
35420
|
key: "getTokenFromCode",
|
|
35421
35421
|
value: function getTokenFromCode(code2) {
|
|
35422
35422
|
var context = this.curContext();
|
|
35423
|
-
if (context === types$
|
|
35423
|
+
if (context === types$A.j_expr) {
|
|
35424
35424
|
this.jsxReadToken();
|
|
35425
35425
|
return;
|
|
35426
35426
|
}
|
|
35427
|
-
if (context === types$
|
|
35427
|
+
if (context === types$A.j_oTag || context === types$A.j_cTag) {
|
|
35428
35428
|
if (isIdentifierStart2(code2)) {
|
|
35429
35429
|
this.jsxReadWord();
|
|
35430
35430
|
return;
|
|
@@ -35434,7 +35434,7 @@ var jsx$3 = function(superClass) {
|
|
|
35434
35434
|
this.finishToken(144);
|
|
35435
35435
|
return;
|
|
35436
35436
|
}
|
|
35437
|
-
if ((code2 === 34 || code2 === 39) && context === types$
|
|
35437
|
+
if ((code2 === 34 || code2 === 39) && context === types$A.j_oTag) {
|
|
35438
35438
|
this.jsxReadString(code2);
|
|
35439
35439
|
return;
|
|
35440
35440
|
}
|
|
@@ -35452,17 +35452,17 @@ var jsx$3 = function(superClass) {
|
|
|
35452
35452
|
value: function updateContext(prevType) {
|
|
35453
35453
|
var _this_state = this.state, context = _this_state.context, type = _this_state.type;
|
|
35454
35454
|
if (type === 56 && prevType === 143) {
|
|
35455
|
-
context.splice(-2, 2, types$
|
|
35455
|
+
context.splice(-2, 2, types$A.j_cTag);
|
|
35456
35456
|
this.state.canStartJSXElement = false;
|
|
35457
35457
|
} else if (type === 143) {
|
|
35458
|
-
context.push(types$
|
|
35458
|
+
context.push(types$A.j_oTag);
|
|
35459
35459
|
} else if (type === 144) {
|
|
35460
35460
|
var out = context[context.length - 1];
|
|
35461
|
-
if (out === types$
|
|
35461
|
+
if (out === types$A.j_oTag && prevType === 56 || out === types$A.j_cTag) {
|
|
35462
35462
|
context.pop();
|
|
35463
|
-
this.state.canStartJSXElement = context[context.length - 1] === types$
|
|
35463
|
+
this.state.canStartJSXElement = context[context.length - 1] === types$A.j_expr;
|
|
35464
35464
|
} else {
|
|
35465
|
-
this.setContext(types$
|
|
35465
|
+
this.setContext(types$A.j_expr);
|
|
35466
35466
|
this.state.canStartJSXElement = true;
|
|
35467
35467
|
}
|
|
35468
35468
|
} else {
|
|
@@ -37959,7 +37959,7 @@ var typescript$3 = function(superClass) {
|
|
|
37959
37959
|
});
|
|
37960
37960
|
if (node.params.length === 0) {
|
|
37961
37961
|
this.raise(TSErrors.EmptyTypeArguments, node);
|
|
37962
|
-
} else if (!this.state.inType && this.curContext() === types$
|
|
37962
|
+
} else if (!this.state.inType && this.curContext() === types$A.brace) {
|
|
37963
37963
|
this.reScan_lt_gt();
|
|
37964
37964
|
}
|
|
37965
37965
|
this.expect(48);
|
|
@@ -38774,7 +38774,7 @@ var typescript$3 = function(superClass) {
|
|
|
38774
38774
|
if (!jsx2.error) return jsx2.node;
|
|
38775
38775
|
var context = this.state.context;
|
|
38776
38776
|
var currentContext = context[context.length - 1];
|
|
38777
|
-
if (currentContext === types$
|
|
38777
|
+
if (currentContext === types$A.j_oTag || currentContext === types$A.j_expr) {
|
|
38778
38778
|
context.pop();
|
|
38779
38779
|
}
|
|
38780
38780
|
}
|
|
@@ -47902,7 +47902,7 @@ function ThrowStatement(node) {
|
|
|
47902
47902
|
this.word("throw");
|
|
47903
47903
|
printStatementAfterKeyword(this, node.argument);
|
|
47904
47904
|
}
|
|
47905
|
-
function LabeledStatement(node) {
|
|
47905
|
+
function LabeledStatement$1(node) {
|
|
47906
47906
|
this.print(node.label);
|
|
47907
47907
|
this.tokenChar(58);
|
|
47908
47908
|
this.space();
|
|
@@ -50347,7 +50347,7 @@ var generatorFunctions = /* @__PURE__ */ Object.freeze({
|
|
|
50347
50347
|
JSXSpreadAttribute: JSXSpreadAttribute,
|
|
50348
50348
|
JSXSpreadChild: JSXSpreadChild,
|
|
50349
50349
|
JSXText: JSXText$1,
|
|
50350
|
-
LabeledStatement: LabeledStatement,
|
|
50350
|
+
LabeledStatement: LabeledStatement$1,
|
|
50351
50351
|
LogicalExpression: AssignmentExpression$2,
|
|
50352
50352
|
MemberExpression: MemberExpression,
|
|
50353
50353
|
MetaProperty: MetaProperty,
|
|
@@ -52397,15 +52397,15 @@ var cache = /* @__PURE__ */ Object.freeze({
|
|
|
52397
52397
|
return scope$1;
|
|
52398
52398
|
}
|
|
52399
52399
|
});
|
|
52400
|
-
var NOT_LOCAL_BINDING2 = lib_exports.NOT_LOCAL_BINDING, assignmentExpression$3 = lib_exports.assignmentExpression; lib_exports.callExpression; var cloneNode$3 = lib_exports.cloneNode, getBindingIdentifiers$3 = lib_exports.getBindingIdentifiers, identifier$3 = lib_exports.identifier, isArrayExpression3 = lib_exports.isArrayExpression, isBinary3 = lib_exports.isBinary, isCallExpression$12 = lib_exports.isCallExpression, isClass2 = lib_exports.isClass, isClassBody3 = lib_exports.isClassBody, isClassDeclaration3 = lib_exports.isClassDeclaration, isExportAllDeclaration2 = lib_exports.isExportAllDeclaration, isExportDefaultDeclaration3 = lib_exports.isExportDefaultDeclaration, isExportNamedDeclaration$1 = lib_exports.isExportNamedDeclaration, isFunctionDeclaration2 = lib_exports.isFunctionDeclaration, isIdentifier$5$1 = lib_exports.isIdentifier, isImportDeclaration2 = lib_exports.isImportDeclaration, isLiteral$12 = lib_exports.isLiteral, isMemberExpression3 = lib_exports.isMemberExpression, isMethod2 = lib_exports.isMethod, isModuleSpecifier2 = lib_exports.isModuleSpecifier, isNullLiteral2 = lib_exports.isNullLiteral, isObjectExpression3 = lib_exports.isObjectExpression, isProperty2 = lib_exports.isProperty, isPureish2 = lib_exports.isPureish, isRegExpLiteral2 = lib_exports.isRegExpLiteral, isSuper$1 = lib_exports.isSuper, isTaggedTemplateExpression2 = lib_exports.isTaggedTemplateExpression, isTemplateLiteral2 = lib_exports.isTemplateLiteral, isThisExpression2 = lib_exports.isThisExpression, isUnaryExpression2 = lib_exports.isUnaryExpression, isVariableDeclaration$1$1 = lib_exports.isVariableDeclaration, expressionStatement$3 = lib_exports.expressionStatement, matchesPattern$1$1 = lib_exports.matchesPattern; lib_exports.memberExpression; lib_exports.numericLiteral; var toIdentifier2 = lib_exports.toIdentifier, variableDeclaration$1$1 = lib_exports.variableDeclaration, variableDeclarator$1 = lib_exports.variableDeclarator, isRecordExpression2 = lib_exports.isRecordExpression, isTupleExpression2 = lib_exports.isTupleExpression, isObjectProperty2 = lib_exports.isObjectProperty, isTopicReference2 = lib_exports.isTopicReference, isMetaProperty2 = lib_exports.isMetaProperty, isPrivateName2 = lib_exports.isPrivateName, isExportDeclaration2 = lib_exports.isExportDeclaration, buildUndefinedNode$1 = lib_exports.buildUndefinedNode, sequenceExpression$2 = lib_exports.sequenceExpression;
|
|
52400
|
+
var NOT_LOCAL_BINDING2 = lib_exports.NOT_LOCAL_BINDING, assignmentExpression$3 = lib_exports.assignmentExpression; lib_exports.callExpression; var cloneNode$3 = lib_exports.cloneNode, getBindingIdentifiers$3 = lib_exports.getBindingIdentifiers, identifier$3 = lib_exports.identifier, isArrayExpression3 = lib_exports.isArrayExpression, isBinary3 = lib_exports.isBinary, isCallExpression$12 = lib_exports.isCallExpression, isClass2 = lib_exports.isClass, isClassBody3 = lib_exports.isClassBody, isClassDeclaration3 = lib_exports.isClassDeclaration, isExportAllDeclaration2 = lib_exports.isExportAllDeclaration, isExportDefaultDeclaration3 = lib_exports.isExportDefaultDeclaration, isExportNamedDeclaration$1$1 = lib_exports.isExportNamedDeclaration, isFunctionDeclaration2 = lib_exports.isFunctionDeclaration, isIdentifier$5$1 = lib_exports.isIdentifier, isImportDeclaration2 = lib_exports.isImportDeclaration, isLiteral$12 = lib_exports.isLiteral, isMemberExpression3 = lib_exports.isMemberExpression, isMethod2 = lib_exports.isMethod, isModuleSpecifier2 = lib_exports.isModuleSpecifier, isNullLiteral2 = lib_exports.isNullLiteral, isObjectExpression3 = lib_exports.isObjectExpression, isProperty2 = lib_exports.isProperty, isPureish2 = lib_exports.isPureish, isRegExpLiteral2 = lib_exports.isRegExpLiteral, isSuper$1 = lib_exports.isSuper, isTaggedTemplateExpression2 = lib_exports.isTaggedTemplateExpression, isTemplateLiteral2 = lib_exports.isTemplateLiteral, isThisExpression2 = lib_exports.isThisExpression, isUnaryExpression2 = lib_exports.isUnaryExpression, isVariableDeclaration$1$1 = lib_exports.isVariableDeclaration, expressionStatement$3 = lib_exports.expressionStatement, matchesPattern$1$1 = lib_exports.matchesPattern; lib_exports.memberExpression; lib_exports.numericLiteral; var toIdentifier2 = lib_exports.toIdentifier, variableDeclaration$1$1 = lib_exports.variableDeclaration, variableDeclarator$1 = lib_exports.variableDeclarator, isRecordExpression2 = lib_exports.isRecordExpression, isTupleExpression2 = lib_exports.isTupleExpression, isObjectProperty2 = lib_exports.isObjectProperty, isTopicReference2 = lib_exports.isTopicReference, isMetaProperty2 = lib_exports.isMetaProperty, isPrivateName2 = lib_exports.isPrivateName, isExportDeclaration2 = lib_exports.isExportDeclaration, buildUndefinedNode$1 = lib_exports.buildUndefinedNode, sequenceExpression$2 = lib_exports.sequenceExpression;
|
|
52401
52401
|
function gatherNodeParts(node, parts) {
|
|
52402
52402
|
switch(node === null || node === void 0 ? void 0 : node.type){
|
|
52403
52403
|
default:
|
|
52404
52404
|
if (isImportDeclaration2(node) || isExportDeclaration2(node)) {
|
|
52405
52405
|
var _node_specifiers;
|
|
52406
|
-
if ((isExportAllDeclaration2(node) || isExportNamedDeclaration$1(node) || isImportDeclaration2(node)) && node.source) {
|
|
52406
|
+
if ((isExportAllDeclaration2(node) || isExportNamedDeclaration$1$1(node) || isImportDeclaration2(node)) && node.source) {
|
|
52407
52407
|
gatherNodeParts(node.source, parts);
|
|
52408
|
-
} else if ((isExportNamedDeclaration$1(node) || isImportDeclaration2(node)) && ((_node_specifiers = node.specifiers) === null || _node_specifiers === void 0 ? void 0 : _node_specifiers.length)) {
|
|
52408
|
+
} else if ((isExportNamedDeclaration$1$1(node) || isImportDeclaration2(node)) && ((_node_specifiers = node.specifiers) === null || _node_specifiers === void 0 ? void 0 : _node_specifiers.length)) {
|
|
52409
52409
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
52410
52410
|
try {
|
|
52411
52411
|
for(var _iterator = node.specifiers[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -52426,7 +52426,7 @@ function gatherNodeParts(node, parts) {
|
|
|
52426
52426
|
}
|
|
52427
52427
|
}
|
|
52428
52428
|
}
|
|
52429
|
-
} else if ((isExportDefaultDeclaration3(node) || isExportNamedDeclaration$1(node)) && node.declaration) {
|
|
52429
|
+
} else if ((isExportDefaultDeclaration3(node) || isExportNamedDeclaration$1$1(node)) && node.declaration) {
|
|
52430
52430
|
gatherNodeParts(node.declaration, parts);
|
|
52431
52431
|
}
|
|
52432
52432
|
} else if (isModuleSpecifier2(node)) {
|
|
@@ -58171,7 +58171,7 @@ var main = {};
|
|
|
58171
58171
|
|
|
58172
58172
|
var fork = {exports: {}};
|
|
58173
58173
|
|
|
58174
|
-
var types$
|
|
58174
|
+
var types$z = {exports: {}};
|
|
58175
58175
|
|
|
58176
58176
|
var shared = {};
|
|
58177
58177
|
|
|
@@ -58271,12 +58271,12 @@ function requireShared () {
|
|
|
58271
58271
|
return shared;
|
|
58272
58272
|
}
|
|
58273
58273
|
|
|
58274
|
-
types$
|
|
58274
|
+
types$z.exports;
|
|
58275
58275
|
|
|
58276
58276
|
var hasRequiredTypes;
|
|
58277
58277
|
|
|
58278
58278
|
function requireTypes () {
|
|
58279
|
-
if (hasRequiredTypes) return types$
|
|
58279
|
+
if (hasRequiredTypes) return types$z.exports;
|
|
58280
58280
|
hasRequiredTypes = 1;
|
|
58281
58281
|
(function (module, exports) {
|
|
58282
58282
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -59068,8 +59068,8 @@ function requireTypes () {
|
|
|
59068
59068
|
exports.default = typesPlugin;
|
|
59069
59069
|
(0, shared_1.maybeSetModuleExports)(function () { return module; });
|
|
59070
59070
|
|
|
59071
|
-
} (types$
|
|
59072
|
-
return types$
|
|
59071
|
+
} (types$z, types$z.exports));
|
|
59072
|
+
return types$z.exports;
|
|
59073
59073
|
}
|
|
59074
59074
|
|
|
59075
59075
|
var pathVisitor = {exports: {}};
|
|
@@ -78417,9 +78417,9 @@ var fullstore$3 = (value) => {
|
|
|
78417
78417
|
};
|
|
78418
78418
|
};
|
|
78419
78419
|
|
|
78420
|
-
var types$
|
|
78420
|
+
var types$y = {};
|
|
78421
78421
|
|
|
78422
|
-
types$
|
|
78422
|
+
types$y.TYPES = {
|
|
78423
78423
|
TOKEN: 'Token',
|
|
78424
78424
|
NEWLINE: 'Newline',
|
|
78425
78425
|
LINEBREAK: 'Linebreak',
|
|
@@ -78439,7 +78439,7 @@ var arrowFunctionExpression = {};
|
|
|
78439
78439
|
|
|
78440
78440
|
var is$3 = {};
|
|
78441
78441
|
|
|
78442
|
-
const {types: types$
|
|
78442
|
+
const {types: types$x} = bundle;
|
|
78443
78443
|
const {
|
|
78444
78444
|
isStringLiteral: isStringLiteral$9,
|
|
78445
78445
|
isSpreadElement: isSpreadElement$3,
|
|
@@ -78451,7 +78451,7 @@ const {
|
|
|
78451
78451
|
isMemberExpression: isMemberExpression$5,
|
|
78452
78452
|
isArrayExpression: isArrayExpression$4,
|
|
78453
78453
|
isObjectExpression: isObjectExpression$6,
|
|
78454
|
-
} = types$
|
|
78454
|
+
} = types$x;
|
|
78455
78455
|
|
|
78456
78456
|
const isParentProgram$1 = (path) => path.parentPath?.isProgram();
|
|
78457
78457
|
const isParentBlock$3 = (path) => path.parentPath.isBlockStatement();
|
|
@@ -78471,7 +78471,7 @@ const isPrev$1 = (path) => {
|
|
|
78471
78471
|
};
|
|
78472
78472
|
|
|
78473
78473
|
const isNextParent$5 = (path) => isNext$r(path.parentPath);
|
|
78474
|
-
const isLast$
|
|
78474
|
+
const isLast$e = (path) => isParentProgram$1(path) && !isNext$r(path);
|
|
78475
78475
|
|
|
78476
78476
|
is$3.isNextObject = (a) => a.getNextSibling().isObjectExpression();
|
|
78477
78477
|
is$3.isPrevObject = (a) => a.getPrevSibling().isObjectExpression();
|
|
@@ -78483,8 +78483,8 @@ is$3.isPrev = isPrev$1;
|
|
|
78483
78483
|
is$3.isNextParent = isNextParent$5;
|
|
78484
78484
|
is$3.isParentProgram = isParentProgram$1;
|
|
78485
78485
|
is$3.isParentBlock = isParentBlock$3;
|
|
78486
|
-
is$3.isLast = isLast$
|
|
78487
|
-
is$3.isParentLast = (path) => isLast$
|
|
78486
|
+
is$3.isLast = isLast$e;
|
|
78487
|
+
is$3.isParentLast = (path) => isLast$e(path.parentPath);
|
|
78488
78488
|
|
|
78489
78489
|
is$3.isIndented = (path = {}) => {
|
|
78490
78490
|
const {parentPath, node} = path;
|
|
@@ -78600,14 +78600,14 @@ const WATER_MARK_BEFORE = '__putout_newline_before';
|
|
|
78600
78600
|
const WATER_MARK_AFTER = '__putout_newline_after';
|
|
78601
78601
|
|
|
78602
78602
|
mark.markBefore = markBefore$2;
|
|
78603
|
-
mark.markAfter = markAfter$
|
|
78604
|
-
mark.maybeMarkAfter = (a, path) => a && markAfter$
|
|
78603
|
+
mark.markAfter = markAfter$c;
|
|
78604
|
+
mark.maybeMarkAfter = (a, path) => a && markAfter$c(path);
|
|
78605
78605
|
|
|
78606
78606
|
function markBefore$2(path) {
|
|
78607
78607
|
path[WATER_MARK_BEFORE] = true;
|
|
78608
78608
|
}
|
|
78609
78609
|
|
|
78610
|
-
function markAfter$
|
|
78610
|
+
function markAfter$c(path) {
|
|
78611
78611
|
path[WATER_MARK_AFTER] = true;
|
|
78612
78612
|
}
|
|
78613
78613
|
|
|
@@ -78634,7 +78634,7 @@ maybeInsideFn$1.maybeInsideFn = (insideFn, {print, indent}) => {
|
|
|
78634
78634
|
indent.dec();
|
|
78635
78635
|
};
|
|
78636
78636
|
|
|
78637
|
-
const {types: types$
|
|
78637
|
+
const {types: types$w} = bundle;
|
|
78638
78638
|
const {
|
|
78639
78639
|
hasTrailingComment: hasTrailingComment$4,
|
|
78640
78640
|
satisfy: satisfy$4,
|
|
@@ -78650,7 +78650,7 @@ const {
|
|
|
78650
78650
|
isClassProperty,
|
|
78651
78651
|
isTSPropertySignature,
|
|
78652
78652
|
isSpreadElement: isSpreadElement$2,
|
|
78653
|
-
} = types$
|
|
78653
|
+
} = types$w;
|
|
78654
78654
|
|
|
78655
78655
|
const isProperty = satisfy$4([
|
|
78656
78656
|
isObjectProperty$1,
|
|
@@ -78785,7 +78785,7 @@ const {
|
|
|
78785
78785
|
} = bundle.types;
|
|
78786
78786
|
|
|
78787
78787
|
const {
|
|
78788
|
-
isLast: isLast$
|
|
78788
|
+
isLast: isLast$d,
|
|
78789
78789
|
isCoupleLines: isCoupleLines$9,
|
|
78790
78790
|
isNext: isNext$q,
|
|
78791
78791
|
} = is$3;
|
|
@@ -78820,7 +78820,7 @@ const isNewlineAfter = (path) => {
|
|
|
78820
78820
|
if (isMemberExpression$4(parentPath))
|
|
78821
78821
|
return false;
|
|
78822
78822
|
|
|
78823
|
-
return !isLast$
|
|
78823
|
+
return !isLast$d(path) && !isDecorator(path);
|
|
78824
78824
|
};
|
|
78825
78825
|
|
|
78826
78826
|
parseTrailingComments$2.isTrailingIsLeading = isTrailingIsLeading;
|
|
@@ -79057,7 +79057,7 @@ const maybeParensPrint = (print) => ({
|
|
|
79057
79057
|
|
|
79058
79058
|
const maybeParensCondition = ({print, condition}) => ({
|
|
79059
79059
|
...maybeParensPrint(print),
|
|
79060
|
-
condition: (path) => condition(path) || isParens$3(path),
|
|
79060
|
+
condition: (path) => condition?.(path) || isParens$3(path),
|
|
79061
79061
|
});
|
|
79062
79062
|
|
|
79063
79063
|
const {exists: exists$e} = is$3;
|
|
@@ -79099,17 +79099,21 @@ arrowFunctionExpression.ArrowFunctionExpression = maybeParens$d((path, printer,
|
|
|
79099
79099
|
|
|
79100
79100
|
var functionDeclaration = {};
|
|
79101
79101
|
|
|
79102
|
-
const {
|
|
79102
|
+
const {
|
|
79103
|
+
isTSModuleBlock: isTSModuleBlock$1,
|
|
79104
|
+
isBlockStatement: isBlockStatement$4,
|
|
79105
|
+
isExportNamedDeclaration: isExportNamedDeclaration$1,
|
|
79106
|
+
} = bundle.types;
|
|
79107
|
+
|
|
79108
|
+
const {markAfter: markAfter$b} = mark;
|
|
79103
79109
|
const {isNext: isNext$o, isNextParent: isNextParent$4} = is$3;
|
|
79104
79110
|
const {printParams: printParams$b} = params;
|
|
79105
79111
|
|
|
79112
|
+
const isInsideNamedExport$1 = ({parentPath}) => isExportNamedDeclaration$1(parentPath);
|
|
79113
|
+
|
|
79106
79114
|
functionDeclaration.FunctionDeclaration = {
|
|
79107
79115
|
print(path, printer, semantics) {
|
|
79108
|
-
const {
|
|
79109
|
-
print,
|
|
79110
|
-
maybe,
|
|
79111
|
-
indent,
|
|
79112
|
-
} = printer;
|
|
79116
|
+
const {print, maybe} = printer;
|
|
79113
79117
|
|
|
79114
79118
|
const {
|
|
79115
79119
|
async,
|
|
@@ -79117,7 +79121,7 @@ functionDeclaration.FunctionDeclaration = {
|
|
|
79117
79121
|
returnType,
|
|
79118
79122
|
} = path.node;
|
|
79119
79123
|
|
|
79120
|
-
indent();
|
|
79124
|
+
maybe.indent(!isInsideNamedExport$1(path));
|
|
79121
79125
|
maybe.print(async, 'async ');
|
|
79122
79126
|
|
|
79123
79127
|
print('function');
|
|
@@ -79143,12 +79147,17 @@ functionDeclaration.FunctionDeclaration = {
|
|
|
79143
79147
|
afterSatisfy: () => [isNext$o, isNextParent$4, isInsideBlockStatement],
|
|
79144
79148
|
after(path, {write}) {
|
|
79145
79149
|
write.newline();
|
|
79146
|
-
markAfter$
|
|
79150
|
+
markAfter$b(path);
|
|
79147
79151
|
},
|
|
79148
79152
|
};
|
|
79149
79153
|
|
|
79150
79154
|
function isInsideBlockStatement(path) {
|
|
79151
|
-
|
|
79155
|
+
const {parentPath} = path;
|
|
79156
|
+
|
|
79157
|
+
if (isTSModuleBlock$1(parentPath.parentPath))
|
|
79158
|
+
return true;
|
|
79159
|
+
|
|
79160
|
+
if (!isBlockStatement$4(parentPath))
|
|
79152
79161
|
return false;
|
|
79153
79162
|
|
|
79154
79163
|
return !path.node.body.body.length;
|
|
@@ -79370,7 +79379,7 @@ functions$1.ObjectMethod = ObjectMethod$1;
|
|
|
79370
79379
|
|
|
79371
79380
|
var unaryExpressions$1 = {};
|
|
79372
79381
|
|
|
79373
|
-
const {isLast: isLast$
|
|
79382
|
+
const {isLast: isLast$c, isNext: isNext$m} = is$3;
|
|
79374
79383
|
|
|
79375
79384
|
const {maybeParens: maybeParens$b} = maybeParens$e;
|
|
79376
79385
|
|
|
@@ -79390,11 +79399,11 @@ const unaryExpression = maybeParens$b((path, printer) => {
|
|
|
79390
79399
|
unaryExpressions$1.UnaryExpression = unaryExpression;
|
|
79391
79400
|
unaryExpressions$1.UpdateExpression = unaryExpression;
|
|
79392
79401
|
|
|
79393
|
-
unaryExpressions$1.AwaitExpression = (path, {print}) => {
|
|
79402
|
+
unaryExpressions$1.AwaitExpression = maybeParens$b((path, {print}) => {
|
|
79394
79403
|
printUnary(path, 'await', {
|
|
79395
79404
|
print,
|
|
79396
79405
|
});
|
|
79397
|
-
};
|
|
79406
|
+
});
|
|
79398
79407
|
|
|
79399
79408
|
unaryExpressions$1.YieldExpression = maybeParens$b((path, {print, maybe}) => {
|
|
79400
79409
|
const {delegate} = path.node;
|
|
@@ -79413,7 +79422,7 @@ unaryExpressions$1.ThrowStatement = (path, {print, indent, maybe}) => {
|
|
|
79413
79422
|
});
|
|
79414
79423
|
|
|
79415
79424
|
print(';');
|
|
79416
|
-
maybe.print.newline(!isLast$
|
|
79425
|
+
maybe.print.newline(!isLast$c(path));
|
|
79417
79426
|
maybe.print.breakline(isNext$m(path));
|
|
79418
79427
|
};
|
|
79419
79428
|
|
|
@@ -79522,7 +79531,7 @@ memberExpressions$1.MemberExpression = (path, printer) => {
|
|
|
79522
79531
|
|
|
79523
79532
|
const object = path.get('object');
|
|
79524
79533
|
const property = path.get('property');
|
|
79525
|
-
const isParens = object.
|
|
79534
|
+
const isParens = object.isAssignmentExpression();
|
|
79526
79535
|
const {computed} = path.node;
|
|
79527
79536
|
|
|
79528
79537
|
maybe.print(isParens, '(');
|
|
@@ -79628,7 +79637,7 @@ maybeDeclare$6.maybeDeclare = (visit) => (path, printer, semantics) => {
|
|
|
79628
79637
|
|
|
79629
79638
|
const {isFunction: isFunction$3} = bundle.types;
|
|
79630
79639
|
const {isNext: isNext$l} = is$3;
|
|
79631
|
-
const {markAfter: markAfter$
|
|
79640
|
+
const {markAfter: markAfter$a} = mark;
|
|
79632
79641
|
|
|
79633
79642
|
const {maybeDeclare: maybeDeclare$5} = maybeDeclare$6;
|
|
79634
79643
|
const {parseComments: parseComments$5} = comment;
|
|
@@ -79717,7 +79726,7 @@ _class.ClassDeclaration = {
|
|
|
79717
79726
|
|
|
79718
79727
|
if (!isFunctionLike(path) && hasBody(path)) {
|
|
79719
79728
|
write.newline();
|
|
79720
|
-
markAfter$
|
|
79729
|
+
markAfter$a(path);
|
|
79721
79730
|
}
|
|
79722
79731
|
},
|
|
79723
79732
|
};
|
|
@@ -79887,8 +79896,8 @@ const {
|
|
|
79887
79896
|
|
|
79888
79897
|
const {parseComments: parseComments$4} = comment;
|
|
79889
79898
|
const {likeChain} = memberExpressions$1;
|
|
79890
|
-
const {types: types$
|
|
79891
|
-
const {isStringLiteral: isStringLiteral$8} = types$
|
|
79899
|
+
const {types: types$v} = bundle;
|
|
79900
|
+
const {isStringLiteral: isStringLiteral$8} = types$v;
|
|
79892
79901
|
|
|
79893
79902
|
const isBodyOfArrow = (path) => path.parentPath.node.body === path.node;
|
|
79894
79903
|
const isLogical = (path) => path.get('argument').isLogicalExpression();
|
|
@@ -80184,11 +80193,11 @@ function maybePrintTypeAnnotation$3(path, printer) {
|
|
|
80184
80193
|
|
|
80185
80194
|
var moreThenMaxPropertiesLengthInOneLine$1 = {};
|
|
80186
80195
|
|
|
80187
|
-
const {types: types$
|
|
80196
|
+
const {types: types$u} = bundle;
|
|
80188
80197
|
const {
|
|
80189
80198
|
isAssignmentPattern: isAssignmentPattern$1,
|
|
80190
80199
|
isIdentifier: isIdentifier$b,
|
|
80191
|
-
} = types$
|
|
80200
|
+
} = types$u;
|
|
80192
80201
|
|
|
80193
80202
|
moreThenMaxPropertiesLengthInOneLine$1.moreThenMaxPropertiesLengthInOneLine = (path, {maxPropertiesLengthInOneLine}) => {
|
|
80194
80203
|
const {properties} = path.node;
|
|
@@ -80578,11 +80587,11 @@ var operate = {};
|
|
|
80578
80587
|
|
|
80579
80588
|
var getBinding$2 = {};
|
|
80580
80589
|
|
|
80581
|
-
const {types: types$
|
|
80590
|
+
const {types: types$t} = bundle;
|
|
80582
80591
|
const {
|
|
80583
80592
|
isIdentifier: isIdentifier$9,
|
|
80584
80593
|
isMemberExpression: isMemberExpression$3,
|
|
80585
|
-
} = types$
|
|
80594
|
+
} = types$t;
|
|
80586
80595
|
|
|
80587
80596
|
const isString$b = (a) => typeof a === 'string';
|
|
80588
80597
|
|
|
@@ -80609,13 +80618,13 @@ const parseName$1 = (node) => {
|
|
|
80609
80618
|
|
|
80610
80619
|
var isSimple$2 = {};
|
|
80611
80620
|
|
|
80612
|
-
const {types: types$
|
|
80621
|
+
const {types: types$s} = bundle;
|
|
80613
80622
|
const {
|
|
80614
80623
|
isOptionalMemberExpression,
|
|
80615
80624
|
isMemberExpression: isMemberExpression$2,
|
|
80616
80625
|
isIdentifier: isIdentifier$8,
|
|
80617
80626
|
isLiteral: isLiteral$3,
|
|
80618
|
-
} = types$
|
|
80627
|
+
} = types$s;
|
|
80619
80628
|
|
|
80620
80629
|
isSimple$2.isSimple = (a) => {
|
|
80621
80630
|
if (isLiteral$3(a))
|
|
@@ -80632,7 +80641,7 @@ isSimple$2.isSimple = (a) => {
|
|
|
80632
80641
|
|
|
80633
80642
|
var extract$6 = {};
|
|
80634
80643
|
|
|
80635
|
-
const {types: types$
|
|
80644
|
+
const {types: types$r} = bundle;
|
|
80636
80645
|
const {
|
|
80637
80646
|
isArrayExpression: isArrayExpression$3,
|
|
80638
80647
|
isLiteral: isLiteral$2,
|
|
@@ -80647,7 +80656,7 @@ const {
|
|
|
80647
80656
|
isJSXIdentifier: isJSXIdentifier$2,
|
|
80648
80657
|
isTSTypeReference: isTSTypeReference$2,
|
|
80649
80658
|
isTSTypeParameter,
|
|
80650
|
-
} = types$
|
|
80659
|
+
} = types$r;
|
|
80651
80660
|
|
|
80652
80661
|
extract$6.extract = extract$5;
|
|
80653
80662
|
|
|
@@ -81036,13 +81045,13 @@ var properties = {};
|
|
|
81036
81045
|
|
|
81037
81046
|
var traverseProperties$4 = {};
|
|
81038
81047
|
|
|
81039
|
-
const {traverse: traverse$b, types: types$
|
|
81048
|
+
const {traverse: traverse$b, types: types$q} = bundle;
|
|
81040
81049
|
const {extract: extract$3} = extract$6;
|
|
81041
81050
|
|
|
81042
81051
|
const {
|
|
81043
81052
|
isObjectExpression: isObjectExpression$5,
|
|
81044
81053
|
isCallExpression: isCallExpression$3,
|
|
81045
|
-
} = types$
|
|
81054
|
+
} = types$q;
|
|
81046
81055
|
|
|
81047
81056
|
const nodeOrPath = (path) => path.node || path;
|
|
81048
81057
|
|
|
@@ -81179,13 +81188,13 @@ var replaceWithMultiple$2 = {};
|
|
|
81179
81188
|
|
|
81180
81189
|
var maybeBody$2 = {};
|
|
81181
81190
|
|
|
81182
|
-
const {types: types$
|
|
81191
|
+
const {types: types$p} = bundle;
|
|
81183
81192
|
const {
|
|
81184
81193
|
isStatement: isStatement$4,
|
|
81185
81194
|
isBlockStatement: isBlockStatement$3,
|
|
81186
81195
|
BlockStatement: BlockStatement$1,
|
|
81187
81196
|
ExpressionStatement: ExpressionStatement$5,
|
|
81188
|
-
} = types$
|
|
81197
|
+
} = types$p;
|
|
81189
81198
|
|
|
81190
81199
|
maybeBody$2.maybeBody = (path, node) => {
|
|
81191
81200
|
const {parentPath} = path;
|
|
@@ -81206,12 +81215,12 @@ maybeBody$2.maybeBody = (path, node) => {
|
|
|
81206
81215
|
|
|
81207
81216
|
var toExpression$3 = {};
|
|
81208
81217
|
|
|
81209
|
-
const {types: types$
|
|
81218
|
+
const {types: types$o} = bundle;
|
|
81210
81219
|
const {
|
|
81211
81220
|
isExpression: isExpression$1,
|
|
81212
81221
|
ExpressionStatement: ExpressionStatement$4,
|
|
81213
81222
|
toStatement,
|
|
81214
|
-
} = types$
|
|
81223
|
+
} = types$o;
|
|
81215
81224
|
|
|
81216
81225
|
toExpression$3.toExpression = (el) => {
|
|
81217
81226
|
const {type} = el;
|
|
@@ -81288,7 +81297,7 @@ replaceWith$7.replaceWith = replaceWith$5;
|
|
|
81288
81297
|
replaceWith$7.replaceWithMultiple = replaceWithMultiple$1;
|
|
81289
81298
|
replaceWith$7.toExpression = toExpression$1;
|
|
81290
81299
|
|
|
81291
|
-
const {types: types$
|
|
81300
|
+
const {types: types$n} = bundle;
|
|
81292
81301
|
|
|
81293
81302
|
const {getBinding, getBindingPath} = getBinding$2;
|
|
81294
81303
|
const {isSimple: isSimple$1} = isSimple$2;
|
|
@@ -81319,9 +81328,9 @@ const {
|
|
|
81319
81328
|
ExpressionStatement: ExpressionStatement$3,
|
|
81320
81329
|
matchesPattern,
|
|
81321
81330
|
isImportDeclaration: isImportDeclaration$1,
|
|
81322
|
-
isExportDeclaration: isExportDeclaration$
|
|
81331
|
+
isExportDeclaration: isExportDeclaration$3,
|
|
81323
81332
|
isStatement: isStatement$3,
|
|
81324
|
-
} = types$
|
|
81333
|
+
} = types$n;
|
|
81325
81334
|
|
|
81326
81335
|
operate.getBinding = getBinding;
|
|
81327
81336
|
operate.getBindingPath = getBindingPath;
|
|
@@ -81399,7 +81408,7 @@ operate.isESM = (path) => {
|
|
|
81399
81408
|
if (isImportDeclaration$1(node))
|
|
81400
81409
|
return true;
|
|
81401
81410
|
|
|
81402
|
-
if (isExportDeclaration$
|
|
81411
|
+
if (isExportDeclaration$3(node))
|
|
81403
81412
|
return true;
|
|
81404
81413
|
}
|
|
81405
81414
|
|
|
@@ -81703,13 +81712,13 @@ newline.isCurrentNewLine = (path) => {
|
|
|
81703
81712
|
|
|
81704
81713
|
var indent = {};
|
|
81705
81714
|
|
|
81706
|
-
const {types: types$
|
|
81715
|
+
const {types: types$m} = bundle;
|
|
81707
81716
|
const {isIndented} = is$3;
|
|
81708
81717
|
|
|
81709
81718
|
const {
|
|
81710
81719
|
isStringLiteral: isStringLiteral$5,
|
|
81711
81720
|
isArrayExpression: isArrayExpression$1,
|
|
81712
|
-
} = types$
|
|
81721
|
+
} = types$m;
|
|
81713
81722
|
|
|
81714
81723
|
const isInsideArray$1 = (path) => path.parentPath.isArrayExpression();
|
|
81715
81724
|
|
|
@@ -81772,7 +81781,7 @@ isObjectAfterSimple$1.isObjectAfterSimple = (a) => {
|
|
|
81772
81781
|
return SIMPLE_TYPES.includes(type);
|
|
81773
81782
|
};
|
|
81774
81783
|
|
|
81775
|
-
const {types: types$
|
|
81784
|
+
const {types: types$l} = bundle;
|
|
81776
81785
|
const {
|
|
81777
81786
|
isCoupleLines: isCoupleLines$5,
|
|
81778
81787
|
isStringAndIdentifier,
|
|
@@ -81802,7 +81811,7 @@ const {
|
|
|
81802
81811
|
isStringLiteral: isStringLiteral$4,
|
|
81803
81812
|
isIdentifier: isIdentifier$6,
|
|
81804
81813
|
isFunction: isFunction$2,
|
|
81805
|
-
} = types$
|
|
81814
|
+
} = types$l;
|
|
81806
81815
|
|
|
81807
81816
|
const isNextString = (path) => isStringLiteral$4(path.getNextSibling());
|
|
81808
81817
|
const isPrevString = (path) => isStringLiteral$4(path.getPrevSibling());
|
|
@@ -82582,9 +82591,10 @@ var expressions$1 = {
|
|
|
82582
82591
|
|
|
82583
82592
|
var expressionStatement = {};
|
|
82584
82593
|
|
|
82594
|
+
const {isLabeledStatement: isLabeledStatement$1} = bundle.types;
|
|
82585
82595
|
const {
|
|
82586
82596
|
isNext: isNext$k,
|
|
82587
|
-
isLast: isLast$
|
|
82597
|
+
isLast: isLast$b,
|
|
82588
82598
|
isParentBlock: isParentBlock$2,
|
|
82589
82599
|
isParentLast,
|
|
82590
82600
|
isNewlineBetweenSiblings: isNewlineBetweenSiblings$2,
|
|
@@ -82617,9 +82627,11 @@ const shouldBreakline = satisfy$1([
|
|
|
82617
82627
|
isStrictMode,
|
|
82618
82628
|
]);
|
|
82619
82629
|
|
|
82630
|
+
const isInsideLabel = ({parentPath}) => isLabeledStatement$1(parentPath);
|
|
82631
|
+
|
|
82620
82632
|
expressionStatement.ExpressionStatement = {
|
|
82621
|
-
print(path, {
|
|
82622
|
-
indent();
|
|
82633
|
+
print(path, {print, maybe, store}) {
|
|
82634
|
+
maybe.indent(!isInsideLabel(path));
|
|
82623
82635
|
|
|
82624
82636
|
print('__expression');
|
|
82625
82637
|
print(';');
|
|
@@ -82637,13 +82649,13 @@ expressionStatement.ExpressionStatement = {
|
|
|
82637
82649
|
if (satisfyAfter(path))
|
|
82638
82650
|
return true;
|
|
82639
82651
|
|
|
82640
|
-
if (hasTrailingComment$1(path) && isLast$
|
|
82652
|
+
if (hasTrailingComment$1(path) && isLast$b(path))
|
|
82641
82653
|
return true;
|
|
82642
82654
|
|
|
82643
82655
|
return isBeforeElse(path);
|
|
82644
82656
|
},
|
|
82645
82657
|
after(path, {print, maybe, store}) {
|
|
82646
|
-
if (hasTrailingComment$1(path) && isLast$
|
|
82658
|
+
if (hasTrailingComment$1(path) && isLast$b(path) && isCoupleLines$4(path))
|
|
82647
82659
|
print.breakline();
|
|
82648
82660
|
|
|
82649
82661
|
if (hasTrailingComment$1(path) && !isCoupleLines$4(path))
|
|
@@ -82671,7 +82683,7 @@ function isTopParentLast({parentPath}) {
|
|
|
82671
82683
|
if (!nextNext.isIfStatement())
|
|
82672
82684
|
return false;
|
|
82673
82685
|
|
|
82674
|
-
return isLast$
|
|
82686
|
+
return isLast$b(nextNext);
|
|
82675
82687
|
}
|
|
82676
82688
|
|
|
82677
82689
|
function isNotLastBody(path) {
|
|
@@ -82679,7 +82691,7 @@ function isNotLastBody(path) {
|
|
|
82679
82691
|
}
|
|
82680
82692
|
|
|
82681
82693
|
function isNotLastOrParentLast(path) {
|
|
82682
|
-
return !(isLast$
|
|
82694
|
+
return !(isLast$b(path) || isParentLast(path));
|
|
82683
82695
|
}
|
|
82684
82696
|
|
|
82685
82697
|
function isNextUp(path) {
|
|
@@ -82720,7 +82732,7 @@ const {
|
|
|
82720
82732
|
} = is$3;
|
|
82721
82733
|
|
|
82722
82734
|
const {hasPrevNewline: hasPrevNewline$2} = mark;
|
|
82723
|
-
const {isExportDeclaration: isExportDeclaration$
|
|
82735
|
+
const {isExportDeclaration: isExportDeclaration$2} = bundle.types;
|
|
82724
82736
|
const {maybeSpaceAfterKeyword: maybeSpaceAfterKeyword$2} = maybeSpaceAfterKeyword$3;
|
|
82725
82737
|
|
|
82726
82738
|
const {isConcatenation} = concatenate$1;
|
|
@@ -82818,7 +82830,7 @@ variableDeclaration.VariableDeclaration = {
|
|
|
82818
82830
|
after(path, {maybe, store}) {
|
|
82819
82831
|
const wasNewline = store();
|
|
82820
82832
|
|
|
82821
|
-
if (isLast$
|
|
82833
|
+
if (isLast$a(path.parentPath) && !path.parentPath.isBlockStatement() || !isParentBlock$1(path) && !isParentTSModuleBlock(path))
|
|
82822
82834
|
return false;
|
|
82823
82835
|
|
|
82824
82836
|
maybe.print.linebreak(wasNewline);
|
|
@@ -82835,14 +82847,14 @@ function noNextParentBlock(path) {
|
|
|
82835
82847
|
}
|
|
82836
82848
|
|
|
82837
82849
|
function notLastParentExport(path) {
|
|
82838
|
-
if (isLast$
|
|
82850
|
+
if (isLast$a(path.parentPath))
|
|
82839
82851
|
return false;
|
|
82840
82852
|
|
|
82841
82853
|
return path.parentPath.isExportDeclaration();
|
|
82842
82854
|
}
|
|
82843
82855
|
|
|
82844
82856
|
function notLastCoupleLines(path) {
|
|
82845
|
-
if (isLast$
|
|
82857
|
+
if (isLast$a(path))
|
|
82846
82858
|
return false;
|
|
82847
82859
|
|
|
82848
82860
|
return isCoupleLines$3(path);
|
|
@@ -82858,7 +82870,7 @@ function notLastPrevVarNotNextVar(path) {
|
|
|
82858
82870
|
if (path.node.loc?.start.line === prev.node?.loc?.start.line + 2)
|
|
82859
82871
|
return false;
|
|
82860
82872
|
|
|
82861
|
-
return !isLast$
|
|
82873
|
+
return !isLast$a(path) && prev.isVariableDeclaration() && !next.isVariableDeclaration();
|
|
82862
82874
|
}
|
|
82863
82875
|
|
|
82864
82876
|
function isNextCoupleLines(path) {
|
|
@@ -82874,7 +82886,7 @@ function isNextCoupleLines(path) {
|
|
|
82874
82886
|
return isCoupleLines$3(next);
|
|
82875
82887
|
}
|
|
82876
82888
|
|
|
82877
|
-
const isLast$
|
|
82889
|
+
const isLast$a = (path) => path.parentPath?.isProgram() && !isNext$j(path);
|
|
82878
82890
|
|
|
82879
82891
|
function shouldAddNewlineBefore(path) {
|
|
82880
82892
|
if (isFirst$1(path))
|
|
@@ -82891,7 +82903,7 @@ function shouldAddNewlineBefore(path) {
|
|
|
82891
82903
|
if (prevPath.isStatement() && !prevPath.isExpressionStatement() && !prevPath.isBlockStatement())
|
|
82892
82904
|
return false;
|
|
82893
82905
|
|
|
82894
|
-
return !isExportDeclaration$
|
|
82906
|
+
return !isExportDeclaration$2(path.parentPath) && isCoupleLines$3(path);
|
|
82895
82907
|
}
|
|
82896
82908
|
|
|
82897
82909
|
function isFirst$1(path) {
|
|
@@ -82921,7 +82933,7 @@ const isNextAssign = (path) => {
|
|
|
82921
82933
|
|
|
82922
82934
|
var ifStatement = {};
|
|
82923
82935
|
|
|
82924
|
-
const {markAfter: markAfter$
|
|
82936
|
+
const {markAfter: markAfter$9} = mark;
|
|
82925
82937
|
const {exists: exists$6, isNext: isNext$i} = is$3;
|
|
82926
82938
|
|
|
82927
82939
|
const isInside = ({parentPath}) => !parentPath.parentPath.isProgram();
|
|
@@ -83004,7 +83016,7 @@ ifStatement.IfStatement = {
|
|
|
83004
83016
|
afterSatisfy: () => [isNext$i],
|
|
83005
83017
|
after: (path, {print}) => {
|
|
83006
83018
|
print.linebreak();
|
|
83007
|
-
markAfter$
|
|
83019
|
+
markAfter$9(path);
|
|
83008
83020
|
},
|
|
83009
83021
|
};
|
|
83010
83022
|
|
|
@@ -83012,7 +83024,7 @@ var forOfStatement = {};
|
|
|
83012
83024
|
|
|
83013
83025
|
const {
|
|
83014
83026
|
hasPrevNewline: hasPrevNewline$1,
|
|
83015
|
-
markAfter: markAfter$
|
|
83027
|
+
markAfter: markAfter$8,
|
|
83016
83028
|
markBefore,
|
|
83017
83029
|
isMarkedAfter: isMarkedAfter$1,
|
|
83018
83030
|
} = mark;
|
|
@@ -83020,7 +83032,7 @@ const {
|
|
|
83020
83032
|
const {
|
|
83021
83033
|
isFirst,
|
|
83022
83034
|
isNext: isNext$h,
|
|
83023
|
-
isLast: isLast$
|
|
83035
|
+
isLast: isLast$9,
|
|
83024
83036
|
} = is$3;
|
|
83025
83037
|
|
|
83026
83038
|
forOfStatement.ForOfStatement = {
|
|
@@ -83056,7 +83068,7 @@ forOfStatement.ForOfStatement = {
|
|
|
83056
83068
|
print('__body');
|
|
83057
83069
|
|
|
83058
83070
|
const {length} = bodyPath.node.body;
|
|
83059
|
-
maybe.print.newline(!length && !isLast$
|
|
83071
|
+
maybe.print.newline(!length && !isLast$9(path) && !isNext$h(path));
|
|
83060
83072
|
|
|
83061
83073
|
return;
|
|
83062
83074
|
}
|
|
@@ -83071,7 +83083,7 @@ forOfStatement.ForOfStatement = {
|
|
|
83071
83083
|
afterIf: isNext$h,
|
|
83072
83084
|
after(path, {print}) {
|
|
83073
83085
|
print.linebreak();
|
|
83074
|
-
markAfter$
|
|
83086
|
+
markAfter$8(path);
|
|
83075
83087
|
},
|
|
83076
83088
|
};
|
|
83077
83089
|
|
|
@@ -83100,7 +83112,7 @@ getDirectives$2.getDirectives = (path) => !path.node.directives ? [] : path.get(
|
|
|
83100
83112
|
const {
|
|
83101
83113
|
isNext: isNext$g,
|
|
83102
83114
|
isParentProgram,
|
|
83103
|
-
isLast: isLast$
|
|
83115
|
+
isLast: isLast$8,
|
|
83104
83116
|
exists: exists$4,
|
|
83105
83117
|
satisfy,
|
|
83106
83118
|
} = is$3;
|
|
@@ -83109,12 +83121,12 @@ const {
|
|
|
83109
83121
|
isArrowFunctionExpression,
|
|
83110
83122
|
isObjectMethod,
|
|
83111
83123
|
isFunctionDeclaration,
|
|
83112
|
-
isExportDeclaration: isExportDeclaration$
|
|
83124
|
+
isExportDeclaration: isExportDeclaration$1,
|
|
83113
83125
|
isDoWhileStatement,
|
|
83114
83126
|
isBlockStatement: isBlockStatement$2,
|
|
83115
83127
|
} = bundle.types;
|
|
83116
83128
|
|
|
83117
|
-
const {markAfter: markAfter$
|
|
83129
|
+
const {markAfter: markAfter$7} = mark;
|
|
83118
83130
|
const {parseComments: parseComments$3} = comment;
|
|
83119
83131
|
const {insideIfWithNoBody} = insideIfWithNoBody$1;
|
|
83120
83132
|
const {getDirectives: getDirectives$1} = getDirectives$2;
|
|
@@ -83175,7 +83187,7 @@ blockStatement.BlockStatement = {
|
|
|
83175
83187
|
},
|
|
83176
83188
|
after(path, {write}) {
|
|
83177
83189
|
write.newline();
|
|
83178
|
-
markAfter$
|
|
83190
|
+
markAfter$7(path.parentPath);
|
|
83179
83191
|
},
|
|
83180
83192
|
};
|
|
83181
83193
|
|
|
@@ -83230,7 +83242,7 @@ function shouldAddNewlineAfter(path) {
|
|
|
83230
83242
|
if (isLooksLikeInsideFn(path))
|
|
83231
83243
|
return NO_NEWLINE;
|
|
83232
83244
|
|
|
83233
|
-
if (isLast$
|
|
83245
|
+
if (isLast$8(path))
|
|
83234
83246
|
return NO_NEWLINE;
|
|
83235
83247
|
|
|
83236
83248
|
if (isExportFunction(path))
|
|
@@ -83244,7 +83256,7 @@ function isExportFunction(path) {
|
|
|
83244
83256
|
if (!isFunctionDeclaration(path.parentPath))
|
|
83245
83257
|
return false;
|
|
83246
83258
|
|
|
83247
|
-
if (!isExportDeclaration$
|
|
83259
|
+
if (!isExportDeclaration$1(path.parentPath?.parentPath))
|
|
83248
83260
|
return false;
|
|
83249
83261
|
|
|
83250
83262
|
return !isNext$g(path.parentPath?.parentPath);
|
|
@@ -83307,7 +83319,7 @@ const {isJSXElement: isJSXElement$2} = bundle.types;
|
|
|
83307
83319
|
const {
|
|
83308
83320
|
isPrevBody,
|
|
83309
83321
|
noTrailingComment,
|
|
83310
|
-
isLast: isLast$
|
|
83322
|
+
isLast: isLast$7,
|
|
83311
83323
|
} = is$3;
|
|
83312
83324
|
|
|
83313
83325
|
const {hasPrevNewline} = mark;
|
|
@@ -83347,10 +83359,10 @@ returnStatement.ReturnStatement = {
|
|
|
83347
83359
|
if (isInsideIfWithElse(path))
|
|
83348
83360
|
return true;
|
|
83349
83361
|
|
|
83350
|
-
if (isLast$
|
|
83362
|
+
if (isLast$7(path))
|
|
83351
83363
|
return false;
|
|
83352
83364
|
|
|
83353
|
-
if (isLast$
|
|
83365
|
+
if (isLast$7(path.parentPath))
|
|
83354
83366
|
return false;
|
|
83355
83367
|
|
|
83356
83368
|
return noTrailingComment(path);
|
|
@@ -83447,7 +83459,7 @@ var forStatement = {};
|
|
|
83447
83459
|
|
|
83448
83460
|
const {exists: exists$3} = is$3;
|
|
83449
83461
|
|
|
83450
|
-
const {markAfter: markAfter$
|
|
83462
|
+
const {markAfter: markAfter$6} = mark;
|
|
83451
83463
|
|
|
83452
83464
|
forStatement.ForStatement = {
|
|
83453
83465
|
print(path, {print, maybe, indent}) {
|
|
@@ -83487,7 +83499,7 @@ forStatement.ForStatement = {
|
|
|
83487
83499
|
},
|
|
83488
83500
|
after(path, {print}) {
|
|
83489
83501
|
print.linebreak();
|
|
83490
|
-
markAfter$
|
|
83502
|
+
markAfter$6(path);
|
|
83491
83503
|
},
|
|
83492
83504
|
};
|
|
83493
83505
|
|
|
@@ -83574,8 +83586,8 @@ function printAttributes(path, {write, traverse, keyword}) {
|
|
|
83574
83586
|
|
|
83575
83587
|
const {parseImportSpecifiers} = parseImportSpecifiers$1;
|
|
83576
83588
|
|
|
83577
|
-
const {markAfter: markAfter$
|
|
83578
|
-
const {isLast: isLast$
|
|
83589
|
+
const {markAfter: markAfter$5} = mark;
|
|
83590
|
+
const {isLast: isLast$6, isNext: isNext$d} = is$3;
|
|
83579
83591
|
|
|
83580
83592
|
const {
|
|
83581
83593
|
maybePrintAttributes,
|
|
@@ -83679,14 +83691,14 @@ importDeclaration.ImportDeclaration = {
|
|
|
83679
83691
|
print.newline();
|
|
83680
83692
|
},
|
|
83681
83693
|
afterIf(path) {
|
|
83682
|
-
if (isLast$
|
|
83694
|
+
if (isLast$6(path))
|
|
83683
83695
|
return false;
|
|
83684
83696
|
|
|
83685
83697
|
return !path.getNextSibling().isImportDeclaration();
|
|
83686
83698
|
},
|
|
83687
83699
|
after(path, {print}) {
|
|
83688
83700
|
print.newline();
|
|
83689
|
-
markAfter$
|
|
83701
|
+
markAfter$5(path);
|
|
83690
83702
|
},
|
|
83691
83703
|
};
|
|
83692
83704
|
|
|
@@ -83709,17 +83721,17 @@ function parseMaxSpecifiers(imports, semantics) {
|
|
|
83709
83721
|
|
|
83710
83722
|
var exportDeclaration = {};
|
|
83711
83723
|
|
|
83724
|
+
const {isExportNamespaceSpecifier} = bundle.types;
|
|
83725
|
+
const {markAfter: markAfter$4, isMarkedAfter} = mark;
|
|
83712
83726
|
const {
|
|
83713
83727
|
isNewlineBetweenSiblings,
|
|
83714
83728
|
exists: exists$2,
|
|
83715
83729
|
isNext: isNext$c,
|
|
83716
|
-
isLast: isLast$
|
|
83730
|
+
isLast: isLast$5,
|
|
83717
83731
|
} = is$3;
|
|
83718
83732
|
|
|
83719
|
-
const {markAfter: markAfter$2, isMarkedAfter} = mark;
|
|
83720
|
-
const {isExportNamespaceSpecifier} = bundle.types;
|
|
83721
83733
|
const isDeclarationNewline = (path) => isMarkedAfter(path.get('declaration'));
|
|
83722
|
-
const isInsideNamespace = (path) => path.parentPath.isTSModuleBlock();
|
|
83734
|
+
const isInsideNamespace$1 = (path) => path.parentPath.isTSModuleBlock();
|
|
83723
83735
|
|
|
83724
83736
|
const options$2 = {
|
|
83725
83737
|
exports: {
|
|
@@ -83762,7 +83774,7 @@ exportDeclaration.ExportNamedDeclaration = {
|
|
|
83762
83774
|
print(' from ');
|
|
83763
83775
|
print('__source');
|
|
83764
83776
|
print(';');
|
|
83765
|
-
maybe.print.newline(!isLast$
|
|
83777
|
+
maybe.print.newline(!isLast$5(path));
|
|
83766
83778
|
|
|
83767
83779
|
return;
|
|
83768
83780
|
}
|
|
@@ -83802,7 +83814,7 @@ exportDeclaration.ExportNamedDeclaration = {
|
|
|
83802
83814
|
}
|
|
83803
83815
|
|
|
83804
83816
|
write(';');
|
|
83805
|
-
maybe.write.newline(isNext$c(path) || isInsideNamespace(path));
|
|
83817
|
+
maybe.write.newline(isNext$c(path) || isInsideNamespace$1(path));
|
|
83806
83818
|
|
|
83807
83819
|
return;
|
|
83808
83820
|
}
|
|
@@ -83811,7 +83823,7 @@ exportDeclaration.ExportNamedDeclaration = {
|
|
|
83811
83823
|
print('__declaration');
|
|
83812
83824
|
},
|
|
83813
83825
|
afterIf(path) {
|
|
83814
|
-
if (isLast$
|
|
83826
|
+
if (isLast$5(path))
|
|
83815
83827
|
return false;
|
|
83816
83828
|
|
|
83817
83829
|
if (isDeclarationNewline(path))
|
|
@@ -83821,7 +83833,7 @@ exportDeclaration.ExportNamedDeclaration = {
|
|
|
83821
83833
|
},
|
|
83822
83834
|
after(path, {print}) {
|
|
83823
83835
|
print.newline();
|
|
83824
|
-
markAfter$
|
|
83836
|
+
markAfter$4(path);
|
|
83825
83837
|
},
|
|
83826
83838
|
};
|
|
83827
83839
|
|
|
@@ -83843,7 +83855,7 @@ exportAllDeclaration.ExportAllDeclaration = (path, {print}) => {
|
|
|
83843
83855
|
var whileStatement = {};
|
|
83844
83856
|
|
|
83845
83857
|
const {isNext: isNext$b} = is$3;
|
|
83846
|
-
const {markAfter: markAfter$
|
|
83858
|
+
const {markAfter: markAfter$3} = mark;
|
|
83847
83859
|
|
|
83848
83860
|
whileStatement.WhileStatement = {
|
|
83849
83861
|
print(path, {print, indent}) {
|
|
@@ -83867,7 +83879,7 @@ whileStatement.WhileStatement = {
|
|
|
83867
83879
|
},
|
|
83868
83880
|
after(path, {print}) {
|
|
83869
83881
|
print.linebreak();
|
|
83870
|
-
markAfter$
|
|
83882
|
+
markAfter$3(path);
|
|
83871
83883
|
},
|
|
83872
83884
|
};
|
|
83873
83885
|
|
|
@@ -83876,7 +83888,7 @@ var switchStatement = {};
|
|
|
83876
83888
|
const {
|
|
83877
83889
|
isNext: isNext$a,
|
|
83878
83890
|
exists: exists$1,
|
|
83879
|
-
isLast: isLast$
|
|
83891
|
+
isLast: isLast$4,
|
|
83880
83892
|
} = is$3;
|
|
83881
83893
|
|
|
83882
83894
|
const {parseLeadingComments: parseLeadingComments$1} = comment;
|
|
@@ -83940,7 +83952,7 @@ switchStatement.SwitchStatement = {
|
|
|
83940
83952
|
print.indent();
|
|
83941
83953
|
print('}');
|
|
83942
83954
|
|
|
83943
|
-
if (!isNext$a(path) && !isLast$
|
|
83955
|
+
if (!isNext$a(path) && !isLast$4(path))
|
|
83944
83956
|
print.newline();
|
|
83945
83957
|
},
|
|
83946
83958
|
afterSatisfy: () => [isNext$a],
|
|
@@ -84027,8 +84039,8 @@ breakStatement.BreakStatement = {
|
|
|
84027
84039
|
|
|
84028
84040
|
var doWhileStatement = {};
|
|
84029
84041
|
|
|
84030
|
-
const {isLast: isLast$
|
|
84031
|
-
const notLast = (path) => !isLast$
|
|
84042
|
+
const {isLast: isLast$3} = is$3;
|
|
84043
|
+
const notLast = (path) => !isLast$3(path);
|
|
84032
84044
|
|
|
84033
84045
|
doWhileStatement.DoWhileStatement = {
|
|
84034
84046
|
print(path, {print, indent}) {
|
|
@@ -84100,6 +84112,16 @@ continueStatement.ContinueStatement = (path, {indent, print, maybe, write}) => {
|
|
|
84100
84112
|
print.newline();
|
|
84101
84113
|
};
|
|
84102
84114
|
|
|
84115
|
+
var labeledSatement = {};
|
|
84116
|
+
|
|
84117
|
+
labeledSatement.LabeledStatement = (path, {print, indent}) => {
|
|
84118
|
+
indent();
|
|
84119
|
+
print('__label');
|
|
84120
|
+
print(':');
|
|
84121
|
+
print.space();
|
|
84122
|
+
print('__body');
|
|
84123
|
+
};
|
|
84124
|
+
|
|
84103
84125
|
const {ExpressionStatement: ExpressionStatement$1} = expressionStatement;
|
|
84104
84126
|
const {VariableDeclaration} = variableDeclaration;
|
|
84105
84127
|
const {IfStatement} = ifStatement;
|
|
@@ -84121,6 +84143,7 @@ const {BreakStatement} = breakStatement;
|
|
|
84121
84143
|
const {DoWhileStatement} = doWhileStatement;
|
|
84122
84144
|
const {Program} = program;
|
|
84123
84145
|
const {ContinueStatement} = continueStatement;
|
|
84146
|
+
const {LabeledStatement} = labeledSatement;
|
|
84124
84147
|
|
|
84125
84148
|
const {
|
|
84126
84149
|
ExportNamespaceSpecifier,
|
|
@@ -84144,12 +84167,7 @@ var statements$1 = {
|
|
|
84144
84167
|
ForOfStatement,
|
|
84145
84168
|
ReturnStatement,
|
|
84146
84169
|
DebuggerStatement,
|
|
84147
|
-
LabeledStatement
|
|
84148
|
-
print('__label');
|
|
84149
|
-
print(':');
|
|
84150
|
-
print.space();
|
|
84151
|
-
print('__body');
|
|
84152
|
-
},
|
|
84170
|
+
LabeledStatement,
|
|
84153
84171
|
Program,
|
|
84154
84172
|
EmptyStatement(path, {write}) {
|
|
84155
84173
|
write(';');
|
|
@@ -84362,12 +84380,12 @@ function isNewline(path) {
|
|
|
84362
84380
|
var tsTypeAliasDeclaration = {};
|
|
84363
84381
|
|
|
84364
84382
|
const {
|
|
84365
|
-
isLast: isLast$
|
|
84383
|
+
isLast: isLast$2,
|
|
84366
84384
|
isNext: isNext$8,
|
|
84367
84385
|
isNextParent: isNextParent$2,
|
|
84368
84386
|
} = is$3;
|
|
84369
84387
|
|
|
84370
|
-
const {markAfter} = mark;
|
|
84388
|
+
const {markAfter: markAfter$2} = mark;
|
|
84371
84389
|
const {maybeDeclare: maybeDeclare$3} = maybeDeclare$6;
|
|
84372
84390
|
const isNextType = (a) => a.getNextSibling().isTSTypeAliasDeclaration();
|
|
84373
84391
|
const isNextExport = (a) => a.getNextSibling().isExportDeclaration();
|
|
@@ -84392,7 +84410,7 @@ tsTypeAliasDeclaration.TSTypeAliasDeclaration = {
|
|
|
84392
84410
|
print('__typeAnnotation');
|
|
84393
84411
|
print(';');
|
|
84394
84412
|
|
|
84395
|
-
const is = store(isLast$
|
|
84413
|
+
const is = store(isLast$2(path) || isLast$2(path.parentPath));
|
|
84396
84414
|
maybe.print.newline(!is);
|
|
84397
84415
|
}),
|
|
84398
84416
|
afterIf(path, {store}) {
|
|
@@ -84409,14 +84427,14 @@ tsTypeAliasDeclaration.TSTypeAliasDeclaration = {
|
|
|
84409
84427
|
after(path, {print, maybe}) {
|
|
84410
84428
|
maybe.indent(isNextExport(path));
|
|
84411
84429
|
print.newline();
|
|
84412
|
-
markAfter(path);
|
|
84430
|
+
markAfter$2(path);
|
|
84413
84431
|
},
|
|
84414
84432
|
};
|
|
84415
84433
|
|
|
84416
84434
|
var tsMappedType = {};
|
|
84417
84435
|
|
|
84418
|
-
const {types: types$
|
|
84419
|
-
const {isTSConditionalType} = types$
|
|
84436
|
+
const {types: types$k} = bundle;
|
|
84437
|
+
const {isTSConditionalType} = types$k;
|
|
84420
84438
|
|
|
84421
84439
|
tsMappedType.TSMappedType = (path, {print, indent, maybe}) => {
|
|
84422
84440
|
const {
|
|
@@ -84642,19 +84660,23 @@ tsModuleDeclaration.TSModuleBlock = (path, {print, traverse, indent}) => {
|
|
|
84642
84660
|
|
|
84643
84661
|
var tsInterfaceDeclaration = {};
|
|
84644
84662
|
|
|
84663
|
+
const {types: types$j} = bundle;
|
|
84645
84664
|
const {
|
|
84646
84665
|
isTSTypeAliasDeclaration,
|
|
84647
|
-
|
|
84648
|
-
|
|
84666
|
+
isExportNamedDeclaration,
|
|
84667
|
+
isTSModuleBlock,
|
|
84668
|
+
} = types$j;
|
|
84649
84669
|
|
|
84650
84670
|
const {isNext: isNext$5, isNextParent: isNextParent$1} = is$3;
|
|
84651
84671
|
const {maybeDeclare} = maybeDeclare$6;
|
|
84672
|
+
const {markAfter: markAfter$1} = mark;
|
|
84673
|
+
const isInsideNamespace = (path) => isTSModuleBlock(path.parentPath.parentPath);
|
|
84652
84674
|
|
|
84653
84675
|
tsInterfaceDeclaration.TSInterfaceDeclaration = {
|
|
84654
84676
|
print: maybeDeclare((path, {print, maybe}) => {
|
|
84655
|
-
const {node
|
|
84677
|
+
const {node} = path;
|
|
84656
84678
|
|
|
84657
|
-
maybe.indent(!
|
|
84679
|
+
maybe.indent(!isExportNamedDeclaration(path.parentPath));
|
|
84658
84680
|
print('interface ');
|
|
84659
84681
|
print('__id');
|
|
84660
84682
|
|
|
@@ -84670,12 +84692,14 @@ tsInterfaceDeclaration.TSInterfaceDeclaration = {
|
|
|
84670
84692
|
}),
|
|
84671
84693
|
afterSatisfy: () => [isNext$5, isNextParent$1],
|
|
84672
84694
|
after(path, {print}) {
|
|
84673
|
-
print.
|
|
84695
|
+
print.linebreak();
|
|
84696
|
+
const exportNamed = isExportNamedDeclaration(path.parentPath);
|
|
84674
84697
|
|
|
84675
|
-
|
|
84698
|
+
if (exportNamed && isInsideNamespace(path))
|
|
84699
|
+
markAfter$1(path);
|
|
84676
84700
|
|
|
84677
|
-
if (!
|
|
84678
|
-
print.
|
|
84701
|
+
if (!exportNamed && !isTSTypeAliasDeclaration(path))
|
|
84702
|
+
print.newline();
|
|
84679
84703
|
},
|
|
84680
84704
|
};
|
|
84681
84705
|
|
|
@@ -84829,7 +84853,13 @@ tsFunctionType.TSFunctionType = maybeParens$3((path, printer, semantics) => {
|
|
|
84829
84853
|
|
|
84830
84854
|
var tsEnumDeclaration = {};
|
|
84831
84855
|
|
|
84832
|
-
const {
|
|
84856
|
+
const {
|
|
84857
|
+
isNext: isNext$3,
|
|
84858
|
+
isNextParent,
|
|
84859
|
+
isLast: isLast$1,
|
|
84860
|
+
} = is$3;
|
|
84861
|
+
|
|
84862
|
+
const {markAfter} = mark;
|
|
84833
84863
|
|
|
84834
84864
|
tsEnumDeclaration.TSEnumDeclaration = {
|
|
84835
84865
|
beforeIf(path) {
|
|
@@ -84854,11 +84884,18 @@ tsEnumDeclaration.TSEnumDeclaration = {
|
|
|
84854
84884
|
}
|
|
84855
84885
|
|
|
84856
84886
|
indent.dec();
|
|
84887
|
+
indent();
|
|
84857
84888
|
print('}');
|
|
84889
|
+
|
|
84890
|
+
if (isLast$1(path))
|
|
84891
|
+
return;
|
|
84892
|
+
|
|
84893
|
+
print.newline();
|
|
84894
|
+
markAfter(path);
|
|
84858
84895
|
},
|
|
84859
84896
|
afterSatisfy: () => [isNext$3, isNextParent],
|
|
84860
84897
|
after(path, {print}) {
|
|
84861
|
-
print.
|
|
84898
|
+
print.linebreak();
|
|
84862
84899
|
},
|
|
84863
84900
|
};
|
|
84864
84901
|
|
|
@@ -85649,7 +85686,7 @@ function snakeCase(str) {
|
|
|
85649
85686
|
}
|
|
85650
85687
|
|
|
85651
85688
|
const {stringify: stringify$8} = JSON;
|
|
85652
|
-
const {TYPES: TYPES$2} = types$
|
|
85689
|
+
const {TYPES: TYPES$2} = types$y;
|
|
85653
85690
|
const toSnakeCase = justSnakeCase;
|
|
85654
85691
|
|
|
85655
85692
|
const {codeFrameColumns: codeFrameColumns$1} = bundle;
|
|
@@ -85824,7 +85861,7 @@ const {round} = Math;
|
|
|
85824
85861
|
const fullstore$2 = fullstore$3;
|
|
85825
85862
|
const isObject$5 = (a) => a && typeof a === 'object';
|
|
85826
85863
|
const babelTraverse$2 = bundle.traverse;
|
|
85827
|
-
const {TYPES: TYPES$1} = types$
|
|
85864
|
+
const {TYPES: TYPES$1} = types$y;
|
|
85828
85865
|
const baseVisitors = visitors$1;
|
|
85829
85866
|
|
|
85830
85867
|
const {
|