@putout/bundle 4.4.1 → 4.4.3
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 +284 -234
- package/bundle/putout.min.js +7 -7
- package/package.json +2 -2
package/bundle/putout.js
CHANGED
|
@@ -178,15 +178,15 @@ var versions = {};
|
|
|
178
178
|
var release = {};
|
|
179
179
|
var config = {};
|
|
180
180
|
|
|
181
|
-
function noop$
|
|
181
|
+
function noop$9() {}
|
|
182
182
|
|
|
183
|
-
var on = noop$
|
|
184
|
-
var addListener = noop$
|
|
185
|
-
var once$y = noop$
|
|
186
|
-
var off = noop$
|
|
187
|
-
var removeListener = noop$
|
|
188
|
-
var removeAllListeners = noop$
|
|
189
|
-
var emit = noop$
|
|
183
|
+
var on = noop$9;
|
|
184
|
+
var addListener = noop$9;
|
|
185
|
+
var once$y = noop$9;
|
|
186
|
+
var off = noop$9;
|
|
187
|
+
var removeListener = noop$9;
|
|
188
|
+
var removeAllListeners = noop$9;
|
|
189
|
+
var emit = noop$9;
|
|
190
190
|
|
|
191
191
|
function binding(name) {
|
|
192
192
|
throw new Error('process.binding is not supported');
|
|
@@ -5797,7 +5797,7 @@ __export$1(lib_exports$1, {
|
|
|
5797
5797
|
isArrayPattern: () => isArrayPattern$1,
|
|
5798
5798
|
isArrayTypeAnnotation: () => isArrayTypeAnnotation$1,
|
|
5799
5799
|
isArrowFunctionExpression: () => isArrowFunctionExpression$b,
|
|
5800
|
-
isAssignmentExpression: () => isAssignmentExpression$
|
|
5800
|
+
isAssignmentExpression: () => isAssignmentExpression$g,
|
|
5801
5801
|
isAssignmentPattern: () => isAssignmentPattern$b,
|
|
5802
5802
|
isAwaitExpression: () => isAwaitExpression$6,
|
|
5803
5803
|
isBigIntLiteral: () => isBigIntLiteral$1,
|
|
@@ -5869,7 +5869,7 @@ __export$1(lib_exports$1, {
|
|
|
5869
5869
|
isExportNamespaceSpecifier: () => isExportNamespaceSpecifier$6,
|
|
5870
5870
|
isExportSpecifier: () => isExportSpecifier$2,
|
|
5871
5871
|
isExpression: () => isExpression$5,
|
|
5872
|
-
isExpressionStatement: () => isExpressionStatement$
|
|
5872
|
+
isExpressionStatement: () => isExpressionStatement$w,
|
|
5873
5873
|
isExpressionWrapper: () => isExpressionWrapper$1,
|
|
5874
5874
|
isFile: () => isFile$7,
|
|
5875
5875
|
isFlow: () => isFlow$1,
|
|
@@ -7758,7 +7758,7 @@ function isArrayExpression$C(node, opts) {
|
|
|
7758
7758
|
return opts == null || shallowEqual$1(node, opts);
|
|
7759
7759
|
}
|
|
7760
7760
|
|
|
7761
|
-
function isAssignmentExpression$
|
|
7761
|
+
function isAssignmentExpression$g(node, opts) {
|
|
7762
7762
|
if (!node)
|
|
7763
7763
|
return false;
|
|
7764
7764
|
|
|
@@ -7898,7 +7898,7 @@ function isEmptyStatement$1(node, opts) {
|
|
|
7898
7898
|
return opts == null || shallowEqual$1(node, opts);
|
|
7899
7899
|
}
|
|
7900
7900
|
|
|
7901
|
-
function isExpressionStatement$
|
|
7901
|
+
function isExpressionStatement$w(node, opts) {
|
|
7902
7902
|
if (!node)
|
|
7903
7903
|
return false;
|
|
7904
7904
|
|
|
@@ -21672,7 +21672,7 @@ function toComputedKey$1(node, key = node.key || node.property) {
|
|
|
21672
21672
|
}
|
|
21673
21673
|
|
|
21674
21674
|
function toExpression$5(node) {
|
|
21675
|
-
if (isExpressionStatement$
|
|
21675
|
+
if (isExpressionStatement$w(node)) {
|
|
21676
21676
|
node = node.expression;
|
|
21677
21677
|
}
|
|
21678
21678
|
|
|
@@ -21826,7 +21826,7 @@ function toStatement$2(node, ignore) {
|
|
|
21826
21826
|
} else if (isFunction$s(node)) {
|
|
21827
21827
|
mustHaveId = true;
|
|
21828
21828
|
newType = 'FunctionDeclaration';
|
|
21829
|
-
} else if (isAssignmentExpression$
|
|
21829
|
+
} else if (isAssignmentExpression$g(node)) {
|
|
21830
21830
|
return expressionStatement$e(node);
|
|
21831
21831
|
}
|
|
21832
21832
|
|
|
@@ -22051,7 +22051,7 @@ function getBindingIdentifiers$4(node, duplicates, outerOnly, newBindingsOnly) {
|
|
|
22051
22051
|
if (!id)
|
|
22052
22052
|
continue;
|
|
22053
22053
|
|
|
22054
|
-
if (newBindingsOnly && (isAssignmentExpression$
|
|
22054
|
+
if (newBindingsOnly && (isAssignmentExpression$g(id) || isUnaryExpression$6(id) || isUpdateExpression$1(id))) {
|
|
22055
22055
|
continue;
|
|
22056
22056
|
}
|
|
22057
22057
|
|
|
@@ -22205,7 +22205,7 @@ function getFunctionName$1(node, parent) {
|
|
|
22205
22205
|
prefix2 = 'set ';
|
|
22206
22206
|
} else if (isVariableDeclarator$l(parent, {init: node})) {
|
|
22207
22207
|
id = parent.id;
|
|
22208
|
-
} else if (isAssignmentExpression$
|
|
22208
|
+
} else if (isAssignmentExpression$g(parent, {operator: '=', right: node})) {
|
|
22209
22209
|
id = parent.left;
|
|
22210
22210
|
}
|
|
22211
22211
|
|
|
@@ -23513,7 +23513,7 @@ var TokContext$1 = class TokContext {
|
|
|
23513
23513
|
}
|
|
23514
23514
|
};
|
|
23515
23515
|
|
|
23516
|
-
var types$
|
|
23516
|
+
var types$3v = {
|
|
23517
23517
|
brace: new TokContext$1('{'),
|
|
23518
23518
|
j_oTag: new TokContext$1('<tag'),
|
|
23519
23519
|
j_cTag: new TokContext$1('</tag'),
|
|
@@ -26032,7 +26032,7 @@ var flow$1 = (superClass) => class FlowParserMixin extends superClass {
|
|
|
26032
26032
|
}
|
|
26033
26033
|
|
|
26034
26034
|
flowInTopLevelContext(cb) {
|
|
26035
|
-
if (this.curContext() !== types$
|
|
26035
|
+
if (this.curContext() !== types$3v.brace) {
|
|
26036
26036
|
const oldContext = this.state.context;
|
|
26037
26037
|
|
|
26038
26038
|
this.state.context = [oldContext[0]];
|
|
@@ -26076,7 +26076,7 @@ var flow$1 = (superClass) => class FlowParserMixin extends superClass {
|
|
|
26076
26076
|
});
|
|
26077
26077
|
this.state.inType = oldInType;
|
|
26078
26078
|
|
|
26079
|
-
if (!this.state.inType && this.curContext() === types$
|
|
26079
|
+
if (!this.state.inType && this.curContext() === types$3v.brace) {
|
|
26080
26080
|
this.reScan_lt_gt();
|
|
26081
26081
|
}
|
|
26082
26082
|
|
|
@@ -27696,7 +27696,7 @@ var flow$1 = (superClass) => class FlowParserMixin extends superClass {
|
|
|
27696
27696
|
|
|
27697
27697
|
const currentContext = context[context.length - 1];
|
|
27698
27698
|
|
|
27699
|
-
if (currentContext === types$
|
|
27699
|
+
if (currentContext === types$3v.j_oTag || currentContext === types$3v.j_expr) {
|
|
27700
27700
|
context.pop();
|
|
27701
27701
|
}
|
|
27702
27702
|
}
|
|
@@ -28989,9 +28989,9 @@ var jsx$b = (superClass) => class JSXParserMixin extends superClass {
|
|
|
28989
28989
|
switch(this.state.type) {
|
|
28990
28990
|
case 5:
|
|
28991
28991
|
node = this.startNode();
|
|
28992
|
-
this.setContext(types$
|
|
28992
|
+
this.setContext(types$3v.brace);
|
|
28993
28993
|
this.next();
|
|
28994
|
-
node = this.jsxParseExpressionContainer(node, types$
|
|
28994
|
+
node = this.jsxParseExpressionContainer(node, types$3v.j_oTag);
|
|
28995
28995
|
|
|
28996
28996
|
if (node.expression.type === 'JSXEmptyExpression') {
|
|
28997
28997
|
this.raise(JsxErrors$1.AttributeIsEmpty, node);
|
|
@@ -29016,7 +29016,7 @@ var jsx$b = (superClass) => class JSXParserMixin extends superClass {
|
|
|
29016
29016
|
jsxParseSpreadChild(node) {
|
|
29017
29017
|
this.next();
|
|
29018
29018
|
node.expression = this.parseExpression();
|
|
29019
|
-
this.setContext(types$
|
|
29019
|
+
this.setContext(types$3v.j_expr);
|
|
29020
29020
|
this.state.canStartJSXElement = true;
|
|
29021
29021
|
this.expect(8);
|
|
29022
29022
|
return this.finishNode(node, 'JSXSpreadChild');
|
|
@@ -29046,11 +29046,11 @@ var jsx$b = (superClass) => class JSXParserMixin extends superClass {
|
|
|
29046
29046
|
const node = this.startNode();
|
|
29047
29047
|
|
|
29048
29048
|
if (this.match(5)) {
|
|
29049
|
-
this.setContext(types$
|
|
29049
|
+
this.setContext(types$3v.brace);
|
|
29050
29050
|
this.next();
|
|
29051
29051
|
this.expect(21);
|
|
29052
29052
|
node.argument = this.parseMaybeAssignAllowIn();
|
|
29053
|
-
this.setContext(types$
|
|
29053
|
+
this.setContext(types$3v.j_oTag);
|
|
29054
29054
|
this.state.canStartJSXElement = true;
|
|
29055
29055
|
this.expect(8);
|
|
29056
29056
|
return this.finishNode(node, 'JSXSpreadAttribute');
|
|
@@ -29124,13 +29124,13 @@ var jsx$b = (superClass) => class JSXParserMixin extends superClass {
|
|
|
29124
29124
|
|
|
29125
29125
|
case 5: {
|
|
29126
29126
|
const node2 = this.startNode();
|
|
29127
|
-
this.setContext(types$
|
|
29127
|
+
this.setContext(types$3v.brace);
|
|
29128
29128
|
this.next();
|
|
29129
29129
|
|
|
29130
29130
|
if (this.match(21)) {
|
|
29131
29131
|
children.push(this.jsxParseSpreadChild(node2));
|
|
29132
29132
|
} else {
|
|
29133
|
-
children.push(this.jsxParseExpressionContainer(node2, types$
|
|
29133
|
+
children.push(this.jsxParseExpressionContainer(node2, types$3v.j_expr));
|
|
29134
29134
|
}
|
|
29135
29135
|
|
|
29136
29136
|
break;
|
|
@@ -29206,12 +29206,12 @@ var jsx$b = (superClass) => class JSXParserMixin extends superClass {
|
|
|
29206
29206
|
getTokenFromCode(code2) {
|
|
29207
29207
|
const context = this.curContext();
|
|
29208
29208
|
|
|
29209
|
-
if (context === types$
|
|
29209
|
+
if (context === types$3v.j_expr) {
|
|
29210
29210
|
this.jsxReadToken();
|
|
29211
29211
|
return;
|
|
29212
29212
|
}
|
|
29213
29213
|
|
|
29214
|
-
if (context === types$
|
|
29214
|
+
if (context === types$3v.j_oTag || context === types$3v.j_cTag) {
|
|
29215
29215
|
if (isIdentifierStart2$1(code2)) {
|
|
29216
29216
|
this.jsxReadWord();
|
|
29217
29217
|
return;
|
|
@@ -29223,7 +29223,7 @@ var jsx$b = (superClass) => class JSXParserMixin extends superClass {
|
|
|
29223
29223
|
return;
|
|
29224
29224
|
}
|
|
29225
29225
|
|
|
29226
|
-
if ((code2 === 34 || code2 === 39) && context === types$
|
|
29226
|
+
if ((code2 === 34 || code2 === 39) && context === types$3v.j_oTag) {
|
|
29227
29227
|
this.jsxReadString(code2);
|
|
29228
29228
|
return;
|
|
29229
29229
|
}
|
|
@@ -29242,18 +29242,18 @@ var jsx$b = (superClass) => class JSXParserMixin extends superClass {
|
|
|
29242
29242
|
const {context, type} = this.state;
|
|
29243
29243
|
|
|
29244
29244
|
if (type === 56 && prevType === 143) {
|
|
29245
|
-
context.splice(-2, 2, types$
|
|
29245
|
+
context.splice(-2, 2, types$3v.j_cTag);
|
|
29246
29246
|
this.state.canStartJSXElement = false;
|
|
29247
29247
|
} else if (type === 143) {
|
|
29248
|
-
context.push(types$
|
|
29248
|
+
context.push(types$3v.j_oTag);
|
|
29249
29249
|
} else if (type === 144) {
|
|
29250
29250
|
const out = context[context.length - 1];
|
|
29251
29251
|
|
|
29252
|
-
if (out === types$
|
|
29252
|
+
if (out === types$3v.j_oTag && prevType === 56 || out === types$3v.j_cTag) {
|
|
29253
29253
|
context.pop();
|
|
29254
|
-
this.state.canStartJSXElement = context[context.length - 1] === types$
|
|
29254
|
+
this.state.canStartJSXElement = context[context.length - 1] === types$3v.j_expr;
|
|
29255
29255
|
} else {
|
|
29256
|
-
this.setContext(types$
|
|
29256
|
+
this.setContext(types$3v.j_expr);
|
|
29257
29257
|
this.state.canStartJSXElement = true;
|
|
29258
29258
|
}
|
|
29259
29259
|
} else {
|
|
@@ -29732,7 +29732,7 @@ var State$3 = class _State {
|
|
|
29732
29732
|
__publicField$1(this, 'end', 0);
|
|
29733
29733
|
__publicField$1(this, 'lastTokEndLoc', null);
|
|
29734
29734
|
__publicField$1(this, 'lastTokStartLoc', null);
|
|
29735
|
-
__publicField$1(this, 'context', [types$
|
|
29735
|
+
__publicField$1(this, 'context', [types$3v.brace]);
|
|
29736
29736
|
__publicField$1(this, 'firstInvalidTemplateEscapePos', null);
|
|
29737
29737
|
__publicField$1(this, 'strictErrors', /* @__PURE__ */new Map());
|
|
29738
29738
|
__publicField$1(this, 'tokensLength', 0);
|
|
@@ -34254,7 +34254,7 @@ var typescript$c = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
34254
34254
|
}
|
|
34255
34255
|
|
|
34256
34256
|
tsInTopLevelContext(cb) {
|
|
34257
|
-
if (this.curContext() !== types$
|
|
34257
|
+
if (this.curContext() !== types$3v.brace) {
|
|
34258
34258
|
const oldContext = this.state.context;
|
|
34259
34259
|
|
|
34260
34260
|
this.state.context = [oldContext[0]];
|
|
@@ -34686,7 +34686,7 @@ var typescript$c = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
34686
34686
|
|
|
34687
34687
|
if (node.params.length === 0) {
|
|
34688
34688
|
this.raise(TSErrors$1.EmptyTypeArguments, node);
|
|
34689
|
-
} else if (!this.state.inType && this.curContext() === types$
|
|
34689
|
+
} else if (!this.state.inType && this.curContext() === types$3v.brace) {
|
|
34690
34690
|
this.reScan_lt_gt();
|
|
34691
34691
|
}
|
|
34692
34692
|
|
|
@@ -35539,7 +35539,7 @@ var typescript$c = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
35539
35539
|
|
|
35540
35540
|
const currentContext = context[context.length - 1];
|
|
35541
35541
|
|
|
35542
|
-
if (currentContext === types$
|
|
35542
|
+
if (currentContext === types$3v.j_oTag || currentContext === types$3v.j_expr) {
|
|
35543
35543
|
context.pop();
|
|
35544
35544
|
}
|
|
35545
35545
|
}
|
|
@@ -56268,9 +56268,9 @@ var fullstore$7 = (value) => {
|
|
|
56268
56268
|
};
|
|
56269
56269
|
};
|
|
56270
56270
|
|
|
56271
|
-
var types$
|
|
56271
|
+
var types$3u = {};
|
|
56272
56272
|
|
|
56273
|
-
types$
|
|
56273
|
+
types$3u.TYPES = {
|
|
56274
56274
|
TOKEN: 'Token',
|
|
56275
56275
|
NEWLINE: 'Newline',
|
|
56276
56276
|
LINEBREAK: 'Linebreak',
|
|
@@ -56290,7 +56290,7 @@ var arrowFunctionExpression$5 = {};
|
|
|
56290
56290
|
|
|
56291
56291
|
var is$8 = {};
|
|
56292
56292
|
|
|
56293
|
-
const {types: types$
|
|
56293
|
+
const {types: types$3t} = bundle$1;
|
|
56294
56294
|
const {
|
|
56295
56295
|
isStringLiteral: isStringLiteral$y,
|
|
56296
56296
|
isIdentifier: isIdentifier$M,
|
|
@@ -56302,7 +56302,7 @@ const {
|
|
|
56302
56302
|
isArrayExpression: isArrayExpression$B,
|
|
56303
56303
|
isObjectExpression: isObjectExpression$s,
|
|
56304
56304
|
isLabeledStatement: isLabeledStatement$6,
|
|
56305
|
-
} = types$
|
|
56305
|
+
} = types$3t;
|
|
56306
56306
|
|
|
56307
56307
|
const isParentProgram$9 = (path) => path.parentPath?.isProgram();
|
|
56308
56308
|
const isParentBlock$j = (path) => path.parentPath.isBlockStatement();
|
|
@@ -56606,7 +56606,7 @@ commentsPrinter$4.printTrailingComments = (path, printer, semantics, {currentTra
|
|
|
56606
56606
|
}
|
|
56607
56607
|
};
|
|
56608
56608
|
|
|
56609
|
-
const {types: types$
|
|
56609
|
+
const {types: types$3s} = bundle$1;
|
|
56610
56610
|
const {
|
|
56611
56611
|
hasTrailingComment: hasTrailingComment$t,
|
|
56612
56612
|
satisfy: satisfy$j,
|
|
@@ -56632,7 +56632,7 @@ const {
|
|
|
56632
56632
|
isBinaryExpression: isBinaryExpression$a,
|
|
56633
56633
|
isClassMethod: isClassMethod$6,
|
|
56634
56634
|
isDecorator: isDecorator$a,
|
|
56635
|
-
} = types$
|
|
56635
|
+
} = types$3s;
|
|
56636
56636
|
|
|
56637
56637
|
const isProperty$5 = satisfy$j([
|
|
56638
56638
|
isObjectProperty$f,
|
|
@@ -56884,7 +56884,7 @@ function build$4(path) {
|
|
|
56884
56884
|
return prop;
|
|
56885
56885
|
}
|
|
56886
56886
|
|
|
56887
|
-
const {types: types$
|
|
56887
|
+
const {types: types$3r} = bundle$1;
|
|
56888
56888
|
const {chain: chain$j} = chain$k;
|
|
56889
56889
|
const {satisfy: satisfy$i} = is$8;
|
|
56890
56890
|
|
|
@@ -56893,7 +56893,7 @@ const {
|
|
|
56893
56893
|
isIfStatement: isIfStatement$e,
|
|
56894
56894
|
isCallExpression: isCallExpression$B,
|
|
56895
56895
|
isIdentifier: isIdentifier$L,
|
|
56896
|
-
} = types$
|
|
56896
|
+
} = types$3r;
|
|
56897
56897
|
|
|
56898
56898
|
const isArgOfCall$4 = (path) => path.parentPath?.isCallExpression() && path.parentPath.get('arguments.0') === path;
|
|
56899
56899
|
const isCall$5 = (a) => a.type === 'CallExpression';
|
|
@@ -56966,7 +56966,7 @@ const isIfUp$4 = (path) => {
|
|
|
56966
56966
|
return is;
|
|
56967
56967
|
};
|
|
56968
56968
|
|
|
56969
|
-
const {types: types$
|
|
56969
|
+
const {types: types$3q} = bundle$1;
|
|
56970
56970
|
|
|
56971
56971
|
const {
|
|
56972
56972
|
isLast: isLast$Y,
|
|
@@ -56984,9 +56984,9 @@ const {
|
|
|
56984
56984
|
const {
|
|
56985
56985
|
isDecorator: isDecorator$9,
|
|
56986
56986
|
isMemberExpression: isMemberExpression$r,
|
|
56987
|
-
isExpressionStatement: isExpressionStatement$
|
|
56987
|
+
isExpressionStatement: isExpressionStatement$v,
|
|
56988
56988
|
isCallExpression: isCallExpression$A,
|
|
56989
|
-
} = types$
|
|
56989
|
+
} = types$3q;
|
|
56990
56990
|
|
|
56991
56991
|
const hasBody$9 = (path) => {
|
|
56992
56992
|
if (path.isTSModuleDeclaration())
|
|
@@ -57129,7 +57129,7 @@ parseTrailingComments$e.parseTrailingComments = (path, printer, semantics, {curr
|
|
|
57129
57129
|
function isPrevCall$4(path) {
|
|
57130
57130
|
const prev = path.getPrevSibling();
|
|
57131
57131
|
|
|
57132
|
-
if (isExpressionStatement$
|
|
57132
|
+
if (isExpressionStatement$v(prev))
|
|
57133
57133
|
return false;
|
|
57134
57134
|
|
|
57135
57135
|
const {expression} = path.node;
|
|
@@ -57189,7 +57189,7 @@ comment$4.parseComments = parseComments$H;
|
|
|
57189
57189
|
|
|
57190
57190
|
const {parseComments: parseComments$G} = comment$4;
|
|
57191
57191
|
|
|
57192
|
-
const noop$
|
|
57192
|
+
const noop$8 = () => {};
|
|
57193
57193
|
const parseParams$4 = (path) => path.get('params');
|
|
57194
57194
|
|
|
57195
57195
|
params$4.printParams = (path, printer, semantics, customization = {}) => {
|
|
@@ -57205,8 +57205,8 @@ params$4.printParams = (path, printer, semantics, customization = {}) => {
|
|
|
57205
57205
|
braceOpen = '(',
|
|
57206
57206
|
braceClose = ')',
|
|
57207
57207
|
printSpace = print.space,
|
|
57208
|
-
printAfterOpen = noop$
|
|
57209
|
-
printBeforeClose = noop$
|
|
57208
|
+
printAfterOpen = noop$8,
|
|
57209
|
+
printBeforeClose = noop$8,
|
|
57210
57210
|
} = customization;
|
|
57211
57211
|
|
|
57212
57212
|
if (typeParameters)
|
|
@@ -57280,7 +57280,7 @@ maybeParens$1a.maybeParens = (print) => {
|
|
|
57280
57280
|
if (isFn$e(print))
|
|
57281
57281
|
return maybeParensPrint$4(print);
|
|
57282
57282
|
|
|
57283
|
-
return maybeParensCondition$
|
|
57283
|
+
return maybeParensCondition$5(print);
|
|
57284
57284
|
};
|
|
57285
57285
|
|
|
57286
57286
|
const maybeParensPrint$4 = (print) => ({
|
|
@@ -57294,9 +57294,16 @@ const maybeParensPrint$4 = (print) => ({
|
|
|
57294
57294
|
},
|
|
57295
57295
|
});
|
|
57296
57296
|
|
|
57297
|
-
const maybeParensCondition$
|
|
57297
|
+
const maybeParensCondition$5 = ({print, condition, checkParens = true}) => ({
|
|
57298
57298
|
...maybeParensPrint$4(print),
|
|
57299
|
-
condition: (path
|
|
57299
|
+
condition: (path, print, semantics) => {
|
|
57300
|
+
const is = condition?.(path, print, semantics);
|
|
57301
|
+
|
|
57302
|
+
if (!checkParens)
|
|
57303
|
+
return is;
|
|
57304
|
+
|
|
57305
|
+
return is || isParens$j(path);
|
|
57306
|
+
},
|
|
57300
57307
|
});
|
|
57301
57308
|
|
|
57302
57309
|
const {exists: exists$1a} = is$8;
|
|
@@ -57338,7 +57345,7 @@ arrowFunctionExpression$5.ArrowFunctionExpression = maybeParens$19((path, printe
|
|
|
57338
57345
|
|
|
57339
57346
|
var functionDeclaration$5 = {};
|
|
57340
57347
|
|
|
57341
|
-
const {types: types$
|
|
57348
|
+
const {types: types$3p} = bundle$1;
|
|
57342
57349
|
const {markAfter: markAfter$W} = mark$4;
|
|
57343
57350
|
const {isNext: isNext$1_, isNextParent: isNextParent$s} = is$8;
|
|
57344
57351
|
const {printParams: printParams$$} = params$4;
|
|
@@ -57347,14 +57354,14 @@ const not$4 = (fn) => (...a) => !fn(...a);
|
|
|
57347
57354
|
const notInsideExportDefaultWithBody$4 = not$4(isInsideExportDefaultWithBody$4);
|
|
57348
57355
|
|
|
57349
57356
|
const {
|
|
57350
|
-
isAssignmentExpression: isAssignmentExpression$
|
|
57357
|
+
isAssignmentExpression: isAssignmentExpression$f,
|
|
57351
57358
|
isTSModuleBlock: isTSModuleBlock$c,
|
|
57352
57359
|
isBlockStatement: isBlockStatement$n,
|
|
57353
57360
|
isExportNamedDeclaration: isExportNamedDeclaration$b,
|
|
57354
|
-
isExpressionStatement: isExpressionStatement$
|
|
57361
|
+
isExpressionStatement: isExpressionStatement$u,
|
|
57355
57362
|
isFunctionDeclaration: isFunctionDeclaration$f,
|
|
57356
57363
|
isExportDefaultDeclaration: isExportDefaultDeclaration$5,
|
|
57357
|
-
} = types$
|
|
57364
|
+
} = types$3p;
|
|
57358
57365
|
|
|
57359
57366
|
const isInsideNamedExport$9 = ({parentPath}) => isExportNamedDeclaration$b(parentPath);
|
|
57360
57367
|
|
|
@@ -57409,10 +57416,10 @@ const isNextFunction$4 = (path) => {
|
|
|
57409
57416
|
const isNextAssign$9 = (path) => {
|
|
57410
57417
|
const next = path.getNextSibling();
|
|
57411
57418
|
|
|
57412
|
-
if (!isExpressionStatement$
|
|
57419
|
+
if (!isExpressionStatement$u(next))
|
|
57413
57420
|
return false;
|
|
57414
57421
|
|
|
57415
|
-
return isAssignmentExpression$
|
|
57422
|
+
return isAssignmentExpression$f(next.node.expression);
|
|
57416
57423
|
};
|
|
57417
57424
|
|
|
57418
57425
|
function isInsideBlockStatement$4(path) {
|
|
@@ -57502,7 +57509,7 @@ kind$4.printKind = (path, {write}) => {
|
|
|
57502
57509
|
var printFunctionParams$9 = {};
|
|
57503
57510
|
|
|
57504
57511
|
const {printParams: printParams$_} = params$4;
|
|
57505
|
-
const {hasLeadingComment: hasLeadingComment$
|
|
57512
|
+
const {hasLeadingComment: hasLeadingComment$c} = is$8;
|
|
57506
57513
|
|
|
57507
57514
|
const isAllParamsHasLeadingComments$4 = (path) => {
|
|
57508
57515
|
const params = path.get('params');
|
|
@@ -57518,7 +57525,7 @@ const isAllParamsHasLeadingComments$4 = (path) => {
|
|
|
57518
57525
|
const [firstDecorator] = decorators;
|
|
57519
57526
|
++decoratorsCount;
|
|
57520
57527
|
|
|
57521
|
-
if (hasLeadingComment$
|
|
57528
|
+
if (hasLeadingComment$c(firstDecorator))
|
|
57522
57529
|
++commentsCount;
|
|
57523
57530
|
}
|
|
57524
57531
|
|
|
@@ -57859,7 +57866,7 @@ maybeDeclare$y.maybeDeclare = (visit) => (path, printer, semantics) => {
|
|
|
57859
57866
|
visit(path, printer, semantics);
|
|
57860
57867
|
};
|
|
57861
57868
|
|
|
57862
|
-
const {types: types$
|
|
57869
|
+
const {types: types$3o} = bundle$1;
|
|
57863
57870
|
|
|
57864
57871
|
const {isNext: isNext$1X} = is$8;
|
|
57865
57872
|
const {markAfter: markAfter$V} = mark$4;
|
|
@@ -57875,7 +57882,7 @@ const isInsideTSModuleBlock = (path) => {
|
|
|
57875
57882
|
const {
|
|
57876
57883
|
isFunction: isFunction$r,
|
|
57877
57884
|
isTSModuleBlock: isTSModuleBlock$b,
|
|
57878
|
-
} = types$
|
|
57885
|
+
} = types$3o;
|
|
57879
57886
|
|
|
57880
57887
|
const isInsideExport$4 = ({parentPath}) => parentPath.isExportDeclaration();
|
|
57881
57888
|
const isFunctionLike$4 = (path) => isFunction$r(path.parentPath.parentPath);
|
|
@@ -58040,16 +58047,16 @@ function tooLong$9(args) {
|
|
|
58040
58047
|
|
|
58041
58048
|
var newExpression$5 = {};
|
|
58042
58049
|
|
|
58043
|
-
const {types: types$
|
|
58050
|
+
const {types: types$3n} = bundle$1;
|
|
58044
58051
|
const {exists: exists$17} = is$8;
|
|
58045
58052
|
const {isMarkedAfter: isMarkedAfter$i} = mark$4;
|
|
58046
58053
|
|
|
58047
58054
|
const {
|
|
58048
|
-
isExpressionStatement: isExpressionStatement$
|
|
58055
|
+
isExpressionStatement: isExpressionStatement$t,
|
|
58049
58056
|
isMemberExpression: isMemberExpression$q,
|
|
58050
|
-
} = types$
|
|
58057
|
+
} = types$3n;
|
|
58051
58058
|
|
|
58052
|
-
const isInsideExpressionStatement$4 = ({parentPath}) => isExpressionStatement$
|
|
58059
|
+
const isInsideExpressionStatement$4 = ({parentPath}) => isExpressionStatement$t(parentPath);
|
|
58053
58060
|
const notFirst$4 = ({parentPath}) => exists$17(parentPath.getPrevSibling());
|
|
58054
58061
|
const isInsideMember$4 = ({parentPath}) => isMemberExpression$q(parentPath);
|
|
58055
58062
|
|
|
@@ -58126,8 +58133,8 @@ var objectExpression$7 = {};
|
|
|
58126
58133
|
|
|
58127
58134
|
var isInsideTuple$9 = {};
|
|
58128
58135
|
|
|
58129
|
-
const {types: types$
|
|
58130
|
-
const {isArrayExpression: isArrayExpression$A} = types$
|
|
58136
|
+
const {types: types$3m} = bundle$1;
|
|
58137
|
+
const {isArrayExpression: isArrayExpression$A} = types$3m;
|
|
58131
58138
|
|
|
58132
58139
|
const TYPES$g = [
|
|
58133
58140
|
'NullLiteral',
|
|
@@ -58151,12 +58158,12 @@ isInsideTuple$9.isInsideTuple = (path) => {
|
|
|
58151
58158
|
|
|
58152
58159
|
var isThirdObjectInsideArray$9 = {};
|
|
58153
58160
|
|
|
58154
|
-
const {types: types$
|
|
58161
|
+
const {types: types$3l} = bundle$1;
|
|
58155
58162
|
const {
|
|
58156
58163
|
isArrayExpression: isArrayExpression$z,
|
|
58157
58164
|
isCallExpression: isCallExpression$z,
|
|
58158
58165
|
isIdentifier: isIdentifier$K,
|
|
58159
|
-
} = types$
|
|
58166
|
+
} = types$3l;
|
|
58160
58167
|
|
|
58161
58168
|
isThirdObjectInsideArray$9.isThirdObjectInsideArray = ({parentPath}) => {
|
|
58162
58169
|
if (!isArrayExpression$z(parentPath))
|
|
@@ -58167,7 +58174,7 @@ isThirdObjectInsideArray$9.isThirdObjectInsideArray = ({parentPath}) => {
|
|
|
58167
58174
|
return isCallExpression$z(second) && !!isIdentifier$K(second);
|
|
58168
58175
|
};
|
|
58169
58176
|
|
|
58170
|
-
const {types: types$
|
|
58177
|
+
const {types: types$3k} = bundle$1;
|
|
58171
58178
|
const {
|
|
58172
58179
|
isCoupleLines: isCoupleLines$L,
|
|
58173
58180
|
isForOf: isForOf$j,
|
|
@@ -58175,7 +58182,7 @@ const {
|
|
|
58175
58182
|
noTrailingComment: noTrailingComment$e,
|
|
58176
58183
|
isNewlineBetweenSiblings: isNewlineBetweenSiblings$i,
|
|
58177
58184
|
noLeadingComment: noLeadingComment$4,
|
|
58178
|
-
hasLeadingComment: hasLeadingComment$
|
|
58185
|
+
hasLeadingComment: hasLeadingComment$b,
|
|
58179
58186
|
exists: exists$16,
|
|
58180
58187
|
} = is$8;
|
|
58181
58188
|
|
|
@@ -58187,7 +58194,7 @@ const {isThirdObjectInsideArray: isThirdObjectInsideArray$8} = isThirdObjectInsi
|
|
|
58187
58194
|
const {
|
|
58188
58195
|
isStringLiteral: isStringLiteral$x,
|
|
58189
58196
|
isArrayExpression: isArrayExpression$y,
|
|
58190
|
-
} = types$
|
|
58197
|
+
} = types$3k;
|
|
58191
58198
|
|
|
58192
58199
|
const isBodyOfArrow$4 = (path) => path.parentPath.node.body === path.node;
|
|
58193
58200
|
const isLogical$4 = (path) => path.get('argument').isLogicalExpression();
|
|
@@ -58302,7 +58309,7 @@ const hasNextLeadingComment$4 = (path) => {
|
|
|
58302
58309
|
if (!exists$16(next))
|
|
58303
58310
|
return false;
|
|
58304
58311
|
|
|
58305
|
-
return hasLeadingComment$
|
|
58312
|
+
return hasLeadingComment$b(next);
|
|
58306
58313
|
};
|
|
58307
58314
|
|
|
58308
58315
|
const notLastArgInsideCall$4 = (path) => {
|
|
@@ -58353,12 +58360,12 @@ var objectProperty$8 = {};
|
|
|
58353
58360
|
|
|
58354
58361
|
var concatenate$9 = {};
|
|
58355
58362
|
|
|
58356
|
-
const {types: types$
|
|
58363
|
+
const {types: types$3j} = bundle$1;
|
|
58357
58364
|
const {
|
|
58358
58365
|
isStringLiteral: isStringLiteral$w,
|
|
58359
58366
|
isTemplateLiteral: isTemplateLiteral$8,
|
|
58360
58367
|
isBinaryExpression: isBinaryExpression$9,
|
|
58361
|
-
} = types$
|
|
58368
|
+
} = types$3j;
|
|
58362
58369
|
|
|
58363
58370
|
const isStringLike$4 = (a) => {
|
|
58364
58371
|
if (isStringLiteral$w(a))
|
|
@@ -58405,11 +58412,11 @@ concatenate$9.concatenate = (path, {print, indent}) => {
|
|
|
58405
58412
|
indent.dec();
|
|
58406
58413
|
};
|
|
58407
58414
|
|
|
58408
|
-
const {types: types$
|
|
58415
|
+
const {types: types$3i} = bundle$1;
|
|
58409
58416
|
const {isConcatenation: isConcatenation$e} = concatenate$9;
|
|
58410
58417
|
const {isOneLine: isOneLine$8} = objectExpression$7;
|
|
58411
58418
|
const {printKey: printKey$A} = printKey$D;
|
|
58412
|
-
const {isTSImportType: isTSImportType$5} = types$
|
|
58419
|
+
const {isTSImportType: isTSImportType$5} = types$3i;
|
|
58413
58420
|
const isInsideTSImportType$4 = ({parentPath}) => isTSImportType$5(parentPath.parentPath);
|
|
58414
58421
|
|
|
58415
58422
|
objectProperty$8.ObjectProperty = (path, printer, semantics) => {
|
|
@@ -58463,11 +58470,11 @@ moreThenMaxPropertiesInOneLine$9.moreThenMaxPropertiesInOneLine = (path, {maxPro
|
|
|
58463
58470
|
|
|
58464
58471
|
var maybeTypeAnnotation$o = {};
|
|
58465
58472
|
|
|
58466
|
-
const {types: types$
|
|
58473
|
+
const {types: types$3h} = bundle$1;
|
|
58467
58474
|
const {
|
|
58468
58475
|
isMemberExpression: isMemberExpression$p,
|
|
58469
58476
|
isSequenceExpression: isSequenceExpression$6,
|
|
58470
|
-
} = types$
|
|
58477
|
+
} = types$3h;
|
|
58471
58478
|
|
|
58472
58479
|
maybeTypeAnnotation$o.maybePrintTypeAnnotation = maybePrintTypeAnnotation$j;
|
|
58473
58480
|
|
|
@@ -58498,11 +58505,11 @@ function maybePrintTypeAnnotation$j(path, printer) {
|
|
|
58498
58505
|
|
|
58499
58506
|
var moreThenMaxPropertiesLengthInOneLine$9 = {};
|
|
58500
58507
|
|
|
58501
|
-
const {types: types$
|
|
58508
|
+
const {types: types$3g} = bundle$1;
|
|
58502
58509
|
const {
|
|
58503
58510
|
isAssignmentPattern: isAssignmentPattern$a,
|
|
58504
58511
|
isIdentifier: isIdentifier$J,
|
|
58505
|
-
} = types$
|
|
58512
|
+
} = types$3g;
|
|
58506
58513
|
|
|
58507
58514
|
function getLength$4(left, right) {
|
|
58508
58515
|
if (isIdentifier$J(left) && isIdentifier$J(right))
|
|
@@ -58539,7 +58546,7 @@ moreThenMaxPropertiesLengthInOneLine$9.moreThenMaxPropertiesLengthInOneLine = (p
|
|
|
58539
58546
|
return false;
|
|
58540
58547
|
};
|
|
58541
58548
|
|
|
58542
|
-
const {types: types$
|
|
58549
|
+
const {types: types$3f} = bundle$1;
|
|
58543
58550
|
const {wrongShorthand: wrongShorthand$4} = wrongShortand$4;
|
|
58544
58551
|
|
|
58545
58552
|
const {
|
|
@@ -58563,7 +58570,7 @@ const {
|
|
|
58563
58570
|
isObjectPattern: isObjectPattern$7,
|
|
58564
58571
|
isForOfStatement: isForOfStatement$9,
|
|
58565
58572
|
isVariableDeclaration: isVariableDeclaration$g,
|
|
58566
|
-
} = types$
|
|
58573
|
+
} = types$3f;
|
|
58567
58574
|
|
|
58568
58575
|
const isInsideFn$4 = (path) => {
|
|
58569
58576
|
if (isFunction$q(path.parentPath))
|
|
@@ -58900,70 +58907,69 @@ classProperty$5.ClassAccessorProperty = (path, printer, semantics) => {
|
|
|
58900
58907
|
|
|
58901
58908
|
var assignmentExpression$5 = {exports: {}};
|
|
58902
58909
|
|
|
58903
|
-
var
|
|
58904
|
-
|
|
58905
|
-
const {hasLeadingComment: hasLeadingComment$9} = is$8;
|
|
58906
|
-
const {isParens: isParens$h} = maybeParens$1a;
|
|
58910
|
+
var maybeParensCondition$4 = {};
|
|
58907
58911
|
|
|
58908
|
-
|
|
58909
|
-
maybeWriteBrace$i(path, printer, semantics, {
|
|
58910
|
-
brace: '(',
|
|
58911
|
-
});
|
|
58912
|
-
};
|
|
58912
|
+
const {hasLeadingComment: hasLeadingComment$a} = is$8;
|
|
58913
58913
|
|
|
58914
|
-
|
|
58915
|
-
maybeWriteBrace$i(path, printer, semantics, {
|
|
58916
|
-
brace: ')',
|
|
58917
|
-
});
|
|
58918
|
-
};
|
|
58914
|
+
const {isParens: isParens$h} = maybeParens$1a;
|
|
58919
58915
|
|
|
58920
|
-
|
|
58916
|
+
maybeParensCondition$4.condition = (path, printer, semantics) => {
|
|
58921
58917
|
const {parentPath} = path;
|
|
58922
58918
|
const {type} = parentPath;
|
|
58923
58919
|
const {roundBraces} = semantics;
|
|
58924
|
-
const {write} = printer;
|
|
58925
|
-
|
|
58926
|
-
if (path.node.left.type === 'ObjectPattern') {
|
|
58927
|
-
write(brace);
|
|
58928
|
-
return;
|
|
58929
|
-
}
|
|
58930
58920
|
|
|
58931
|
-
if (type === '
|
|
58932
|
-
|
|
58933
|
-
return;
|
|
58934
|
-
}
|
|
58921
|
+
if (path.node.left.type === 'ObjectPattern')
|
|
58922
|
+
return true;
|
|
58935
58923
|
|
|
58936
|
-
if (type === '
|
|
58937
|
-
|
|
58938
|
-
return;
|
|
58939
|
-
}
|
|
58924
|
+
if (type === 'LogicalExpression')
|
|
58925
|
+
return true;
|
|
58940
58926
|
|
|
58941
|
-
if (type === '
|
|
58942
|
-
|
|
58943
|
-
return;
|
|
58944
|
-
}
|
|
58927
|
+
if (type === 'BinaryExpression')
|
|
58928
|
+
return true;
|
|
58945
58929
|
|
|
58946
|
-
if (
|
|
58947
|
-
return;
|
|
58930
|
+
if (type === 'UnaryExpression')
|
|
58931
|
+
return true;
|
|
58948
58932
|
|
|
58949
|
-
if (!
|
|
58950
|
-
return;
|
|
58933
|
+
if (!roundBraces.assign && !hasLeadingComment$a(path))
|
|
58934
|
+
return false;
|
|
58951
58935
|
|
|
58952
|
-
|
|
58953
|
-
}
|
|
58936
|
+
return isParens$h(path);
|
|
58937
|
+
};
|
|
58954
58938
|
|
|
58955
58939
|
var assignmentExpressionComments = {};
|
|
58956
58940
|
|
|
58957
|
-
const {types: types$
|
|
58958
|
-
const {hasLeadingComment: hasLeadingComment$
|
|
58959
|
-
const {isReturnStatement: isReturnStatement$b} = types$
|
|
58941
|
+
const {types: types$3e} = bundle$1;
|
|
58942
|
+
const {hasLeadingComment: hasLeadingComment$9} = is$8;
|
|
58943
|
+
const {isReturnStatement: isReturnStatement$b} = types$3e;
|
|
58944
|
+
|
|
58945
|
+
assignmentExpressionComments.printLeadingCommentLine = (path, printer, semantics, {printComment, isLast}) => {
|
|
58946
|
+
const {parentPath} = path;
|
|
58947
|
+
const {print, maybe} = printer;
|
|
58948
|
+
|
|
58949
|
+
if (isReturnStatement$b(parentPath))
|
|
58950
|
+
return;
|
|
58951
|
+
|
|
58952
|
+
maybe.print.breakline(!isLast);
|
|
58953
|
+
printComment();
|
|
58954
|
+
print.breakline();
|
|
58955
|
+
};
|
|
58960
58956
|
|
|
58961
|
-
assignmentExpressionComments.
|
|
58957
|
+
assignmentExpressionComments.printLeadingCommentBlock = (path, printer, semantics, {printComment}) => {
|
|
58958
|
+
const {parentPath} = path;
|
|
58959
|
+
const {print} = printer;
|
|
58960
|
+
|
|
58961
|
+
if (isReturnStatement$b(parentPath))
|
|
58962
|
+
return;
|
|
58963
|
+
|
|
58964
|
+
printComment();
|
|
58965
|
+
print.indent();
|
|
58966
|
+
};
|
|
58962
58967
|
|
|
58963
58968
|
assignmentExpressionComments.maybeInsideReturnWithCommentStart = (path, {print, indent}) => {
|
|
58964
58969
|
const {parentPath} = path;
|
|
58970
|
+
const is = isReturnStatement$b(parentPath);
|
|
58965
58971
|
|
|
58966
|
-
if (
|
|
58972
|
+
if (is && hasLeadingComment$9(path)) {
|
|
58967
58973
|
indent.inc();
|
|
58968
58974
|
const {leadingComments} = path.node;
|
|
58969
58975
|
|
|
@@ -58981,74 +58987,81 @@ assignmentExpressionComments.maybeInsideReturnWithCommentStart = (path, {print,
|
|
|
58981
58987
|
|
|
58982
58988
|
assignmentExpressionComments.maybeInsideReturnWithCommentEnd = (path, {print, indent}) => {
|
|
58983
58989
|
const {parentPath} = path;
|
|
58990
|
+
const is = isReturnStatement$b(parentPath);
|
|
58984
58991
|
|
|
58985
|
-
if (!
|
|
58992
|
+
if (!is || !hasLeadingComment$9(path))
|
|
58986
58993
|
return;
|
|
58987
58994
|
|
|
58988
58995
|
indent.dec();
|
|
58989
58996
|
print.breakline();
|
|
58990
58997
|
};
|
|
58991
58998
|
|
|
58992
|
-
|
|
58999
|
+
var printSeparator = {};
|
|
58993
59000
|
|
|
58994
|
-
|
|
59001
|
+
const {types: types$3d} = bundle$1;
|
|
59002
|
+
const {
|
|
59003
|
+
isAssignmentExpression: isAssignmentExpression$e,
|
|
59004
|
+
isExpressionStatement: isExpressionStatement$s,
|
|
59005
|
+
} = types$3d;
|
|
58995
59006
|
|
|
58996
|
-
|
|
58997
|
-
|
|
58998
|
-
|
|
58999
|
-
|
|
59007
|
+
printSeparator.printSeparator = (path, {print}) => {
|
|
59008
|
+
if (isMultiline$4(path))
|
|
59009
|
+
print.breakline();
|
|
59010
|
+
else
|
|
59011
|
+
print.space();
|
|
59012
|
+
};
|
|
59013
|
+
|
|
59014
|
+
function isMultiline$4(path) {
|
|
59015
|
+
const {right} = path.node;
|
|
59016
|
+
|
|
59017
|
+
if (!path.parentPath.find(isExpressionStatement$s))
|
|
59018
|
+
return false;
|
|
59019
|
+
|
|
59020
|
+
return isAssignmentExpression$e(right);
|
|
59021
|
+
}
|
|
59022
|
+
|
|
59023
|
+
(function (module) {
|
|
59024
|
+
|
|
59025
|
+
const {condition} = maybeParensCondition$4;
|
|
59000
59026
|
|
|
59001
59027
|
const {
|
|
59002
59028
|
printLeadingCommentLine,
|
|
59003
59029
|
maybeInsideReturnWithCommentEnd,
|
|
59004
59030
|
maybeInsideReturnWithCommentStart,
|
|
59031
|
+
printLeadingCommentBlock,
|
|
59005
59032
|
} = assignmentExpressionComments;
|
|
59006
59033
|
|
|
59007
|
-
const {
|
|
59008
|
-
|
|
59009
|
-
isAssignmentExpression,
|
|
59010
|
-
} = types;
|
|
59034
|
+
const {maybeParens} = maybeParens$1a;
|
|
59035
|
+
const {printSeparator: printSeparator$1} = printSeparator;
|
|
59011
59036
|
|
|
59012
59037
|
const isInsideBlock = ({parentPath}) => /BlockStatement|Program/.test(parentPath.type);
|
|
59013
59038
|
|
|
59014
|
-
module.exports.AssignmentExpression = (
|
|
59015
|
-
|
|
59016
|
-
|
|
59017
|
-
|
|
59018
|
-
|
|
59019
|
-
|
|
59020
|
-
|
|
59021
|
-
|
|
59022
|
-
|
|
59023
|
-
|
|
59024
|
-
|
|
59025
|
-
if (isMultiline(path))
|
|
59026
|
-
print.breakline();
|
|
59027
|
-
else
|
|
59039
|
+
module.exports.AssignmentExpression = maybeParens({
|
|
59040
|
+
checkParens: false,
|
|
59041
|
+
condition,
|
|
59042
|
+
print(path, printer) {
|
|
59043
|
+
const {print} = printer;
|
|
59044
|
+
const {operator} = path.node;
|
|
59045
|
+
|
|
59046
|
+
maybeInsideReturnWithCommentStart(path, printer);
|
|
59047
|
+
|
|
59048
|
+
print('__left');
|
|
59028
59049
|
print.space();
|
|
59029
|
-
|
|
59030
|
-
|
|
59031
|
-
|
|
59032
|
-
|
|
59033
|
-
|
|
59034
|
-
|
|
59035
|
-
|
|
59036
|
-
|
|
59037
|
-
|
|
59038
|
-
|
|
59039
|
-
|
|
59040
|
-
};
|
|
59050
|
+
print(operator);
|
|
59051
|
+
printSeparator$1(path, printer);
|
|
59052
|
+
print('__right');
|
|
59053
|
+
|
|
59054
|
+
if (isInsideBlock(path)) {
|
|
59055
|
+
print(';');
|
|
59056
|
+
print.breakline();
|
|
59057
|
+
}
|
|
59058
|
+
|
|
59059
|
+
maybeInsideReturnWithCommentEnd(path, printer);
|
|
59060
|
+
},
|
|
59061
|
+
});
|
|
59041
59062
|
|
|
59042
59063
|
module.exports.AssignmentExpression.printLeadingCommentLine = printLeadingCommentLine;
|
|
59043
|
-
|
|
59044
|
-
function isMultiline(path) {
|
|
59045
|
-
const {right} = path.node;
|
|
59046
|
-
|
|
59047
|
-
if (!path.parentPath.find(isExpressionStatement))
|
|
59048
|
-
return false;
|
|
59049
|
-
|
|
59050
|
-
return isAssignmentExpression(right);
|
|
59051
|
-
}
|
|
59064
|
+
module.exports.AssignmentExpression.printLeadingCommentBlock = printLeadingCommentBlock;
|
|
59052
59065
|
} (assignmentExpression$5));
|
|
59053
59066
|
|
|
59054
59067
|
var assignmentExpressionExports = assignmentExpression$5.exports;
|
|
@@ -60650,71 +60663,108 @@ spreadElement$5.SpreadElement = (path, printer) => {
|
|
|
60650
60663
|
print(',');
|
|
60651
60664
|
};
|
|
60652
60665
|
|
|
60653
|
-
var sequenceExpression$5 = {};
|
|
60666
|
+
var sequenceExpression$5 = {exports: {}};
|
|
60654
60667
|
|
|
60655
|
-
var maybeWriteBrace$
|
|
60656
|
-
|
|
60657
|
-
maybeWriteBrace$h.maybeWriteLeftBrace = (path, printer, semantics) => {
|
|
60658
|
-
maybeWriteBrace$g(path, printer, semantics, {
|
|
60659
|
-
brace: '(',
|
|
60660
|
-
});
|
|
60661
|
-
};
|
|
60662
|
-
|
|
60663
|
-
maybeWriteBrace$h.maybeWriteRightBrace = (path, printer, semantics) => {
|
|
60664
|
-
maybeWriteBrace$g(path, printer, semantics, {
|
|
60665
|
-
brace: ')',
|
|
60666
|
-
});
|
|
60667
|
-
};
|
|
60668
|
+
var maybeWriteBrace$g = {};
|
|
60668
60669
|
|
|
60669
|
-
|
|
60670
|
+
maybeWriteBrace$g.condition = (path, printer, semantics) => {
|
|
60670
60671
|
const {parentPath} = path;
|
|
60671
60672
|
const {type} = parentPath;
|
|
60672
60673
|
const {roundBraces} = semantics;
|
|
60673
|
-
const {write} = printer;
|
|
60674
|
-
|
|
60675
|
-
if (type === 'ArrowFunctionExpression') {
|
|
60676
|
-
write(brace);
|
|
60677
|
-
return;
|
|
60678
|
-
}
|
|
60679
60674
|
|
|
60680
|
-
if (type === '
|
|
60681
|
-
|
|
60682
|
-
return;
|
|
60683
|
-
}
|
|
60675
|
+
if (type === 'ArrowFunctionExpression')
|
|
60676
|
+
return true;
|
|
60684
60677
|
|
|
60685
|
-
if (type === '
|
|
60686
|
-
|
|
60687
|
-
return;
|
|
60688
|
-
}
|
|
60678
|
+
if (type === 'ConditionalExpression' && path !== parentPath.get('test'))
|
|
60679
|
+
return true;
|
|
60689
60680
|
|
|
60690
|
-
if (
|
|
60691
|
-
return;
|
|
60681
|
+
if (type === 'LogicalExpression')
|
|
60682
|
+
return true;
|
|
60692
60683
|
|
|
60693
|
-
|
|
60694
|
-
}
|
|
60684
|
+
return roundBraces.sequence;
|
|
60685
|
+
};
|
|
60695
60686
|
|
|
60696
|
-
|
|
60697
|
-
maybeWriteLeftBrace: maybeWriteLeftBrace$4,
|
|
60698
|
-
maybeWriteRightBrace: maybeWriteRightBrace$4,
|
|
60699
|
-
} = maybeWriteBrace$h;
|
|
60687
|
+
var sequenceExpressionComments = {};
|
|
60700
60688
|
|
|
60701
|
-
|
|
60702
|
-
|
|
60703
|
-
|
|
60704
|
-
|
|
60705
|
-
|
|
60706
|
-
|
|
60707
|
-
|
|
60708
|
-
|
|
60709
|
-
|
|
60710
|
-
|
|
60711
|
-
|
|
60712
|
-
|
|
60689
|
+
const {hasLeadingComment: hasLeadingComment$8} = is$8;
|
|
60690
|
+
const noop$7 = () => {};
|
|
60691
|
+
|
|
60692
|
+
sequenceExpressionComments.printLeadingCommentLine = noop$7;
|
|
60693
|
+
sequenceExpressionComments.printLeadingCommentBlock = noop$7;
|
|
60694
|
+
|
|
60695
|
+
sequenceExpressionComments.maybePrintComments = (path, {print}) => {
|
|
60696
|
+
if (hasLeadingComment$8(path)) {
|
|
60697
|
+
const {leadingComments} = path.node;
|
|
60698
|
+
|
|
60699
|
+
for (const {type, value} of leadingComments) {
|
|
60700
|
+
if (type === 'CommentLine')
|
|
60701
|
+
print(`//${value}`);
|
|
60702
|
+
else
|
|
60703
|
+
print(`/*${value}*/`);
|
|
60704
|
+
|
|
60705
|
+
print.breakline();
|
|
60706
|
+
}
|
|
60713
60707
|
}
|
|
60714
|
-
|
|
60715
|
-
maybeWriteRightBrace$4(path, printer, semantics);
|
|
60716
60708
|
};
|
|
60717
60709
|
|
|
60710
|
+
(function (module) {
|
|
60711
|
+
|
|
60712
|
+
const {hasLeadingComment} = is$8;
|
|
60713
|
+
const {maybeParens} = maybeParens$1a;
|
|
60714
|
+
const {condition} = maybeWriteBrace$g;
|
|
60715
|
+
|
|
60716
|
+
const {
|
|
60717
|
+
maybePrintComments,
|
|
60718
|
+
printLeadingCommentLine,
|
|
60719
|
+
printLeadingCommentBlock,
|
|
60720
|
+
} = sequenceExpressionComments;
|
|
60721
|
+
|
|
60722
|
+
module.exports.SequenceExpression = maybeParens({
|
|
60723
|
+
checkParens: false,
|
|
60724
|
+
condition,
|
|
60725
|
+
print(path, printer) {
|
|
60726
|
+
const {
|
|
60727
|
+
write,
|
|
60728
|
+
traverse,
|
|
60729
|
+
indent,
|
|
60730
|
+
maybe,
|
|
60731
|
+
} = printer;
|
|
60732
|
+
|
|
60733
|
+
const expressions = path.get('expressions');
|
|
60734
|
+
const n = expressions.length - 1;
|
|
60735
|
+
|
|
60736
|
+
const withComment = hasLeadingComment(path);
|
|
60737
|
+
|
|
60738
|
+
if (withComment) {
|
|
60739
|
+
indent.inc();
|
|
60740
|
+
write.breakline();
|
|
60741
|
+
maybePrintComments(path, printer);
|
|
60742
|
+
}
|
|
60743
|
+
|
|
60744
|
+
for (const [index, expression] of expressions.entries()) {
|
|
60745
|
+
traverse(expression);
|
|
60746
|
+
|
|
60747
|
+
if (index < n) {
|
|
60748
|
+
write(',');
|
|
60749
|
+
maybe.write.space(!withComment);
|
|
60750
|
+
maybe.print.breakline(withComment);
|
|
60751
|
+
}
|
|
60752
|
+
}
|
|
60753
|
+
|
|
60754
|
+
if (withComment) {
|
|
60755
|
+
indent.dec();
|
|
60756
|
+
write.breakline();
|
|
60757
|
+
}
|
|
60758
|
+
},
|
|
60759
|
+
});
|
|
60760
|
+
|
|
60761
|
+
module.exports.SequenceExpression.printLeadingCommentLine = printLeadingCommentLine;
|
|
60762
|
+
module.exports.SequenceExpression.printLeadingCommentBlock = printLeadingCommentBlock;
|
|
60763
|
+
} (sequenceExpression$5));
|
|
60764
|
+
|
|
60765
|
+
var sequenceExpressionExports = sequenceExpression$5.exports;
|
|
60766
|
+
sequenceExpressionExports.default;
|
|
60767
|
+
|
|
60718
60768
|
var taggedTemplateExpression$5 = {};
|
|
60719
60769
|
|
|
60720
60770
|
taggedTemplateExpression$5.TaggedTemplateExpression = (path, {print}) => {
|
|
@@ -60981,7 +61031,7 @@ const {ArrayPattern: ArrayPattern$4} = arrayPattern$5;
|
|
|
60981
61031
|
const {AssignmentPattern: AssignmentPattern$5} = assignmentPattern$5;
|
|
60982
61032
|
const {RestElement: RestElement$5} = restElement$5;
|
|
60983
61033
|
const {SpreadElement: SpreadElement$4} = spreadElement$5;
|
|
60984
|
-
const {SequenceExpression: SequenceExpression$5} =
|
|
61034
|
+
const {SequenceExpression: SequenceExpression$5} = sequenceExpressionExports;
|
|
60985
61035
|
const {TaggedTemplateExpression: TaggedTemplateExpression$5} = taggedTemplateExpression$5;
|
|
60986
61036
|
const {BinaryExpression: BinaryExpression$5} = binaryExpression$5;
|
|
60987
61037
|
const {LogicalExpression: LogicalExpression$5} = logicalExpression$5;
|
|
@@ -64507,7 +64557,7 @@ jsxText$5.JSXText = (path, {write, indent}) => {
|
|
|
64507
64557
|
const isSpacesOnly = /^\s+$/.test(value);
|
|
64508
64558
|
const hasNext = isNext$1E(path);
|
|
64509
64559
|
|
|
64510
|
-
if (extra
|
|
64560
|
+
if (extra?.raw.includes('&'))
|
|
64511
64561
|
return write(extra.raw);
|
|
64512
64562
|
|
|
64513
64563
|
if (isSpacesOnly && hasNext) {
|
|
@@ -64772,7 +64822,7 @@ function snakeCase(str) {
|
|
|
64772
64822
|
const process$5 = require$$0$3;
|
|
64773
64823
|
const toSnakeCase$4 = justSnakeCase;
|
|
64774
64824
|
const {codeFrameColumns: codeFrameColumns$6} = bundle$1;
|
|
64775
|
-
const {TYPES: TYPES$f} = types$
|
|
64825
|
+
const {TYPES: TYPES$f} = types$3u;
|
|
64776
64826
|
|
|
64777
64827
|
const {stringify: stringify$b} = JSON;
|
|
64778
64828
|
const {
|
|
@@ -64959,7 +65009,7 @@ const initSemantics$4 = (format, semantics = {}) => ({
|
|
|
64959
65009
|
const fullstore$6 = fullstore$7;
|
|
64960
65010
|
|
|
64961
65011
|
const babelTraverse$6 = bundle$1.traverse;
|
|
64962
|
-
const {TYPES: TYPES$e} = types$
|
|
65012
|
+
const {TYPES: TYPES$e} = types$3u;
|
|
64963
65013
|
const baseVisitors$4 = visitors$a;
|
|
64964
65014
|
|
|
64965
65015
|
const {
|