@putout/bundle 4.4.1 → 4.4.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 +163 -164
- package/bundle/putout.min.js +7 -7
- package/package.json +2 -2
package/bundle/putout.js
CHANGED
|
@@ -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;
|
|
@@ -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) {
|
|
@@ -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,
|
|
@@ -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();
|
|
@@ -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,57 @@ classProperty$5.ClassAccessorProperty = (path, printer, semantics) => {
|
|
|
58900
58907
|
|
|
58901
58908
|
var assignmentExpression$5 = {exports: {}};
|
|
58902
58909
|
|
|
58903
|
-
var
|
|
58910
|
+
var maybeParensCondition$4 = {};
|
|
58904
58911
|
|
|
58905
58912
|
const {hasLeadingComment: hasLeadingComment$9} = is$8;
|
|
58906
|
-
const {isParens: isParens$h} = maybeParens$1a;
|
|
58907
58913
|
|
|
58908
|
-
|
|
58909
|
-
maybeWriteBrace$i(path, printer, semantics, {
|
|
58910
|
-
brace: '(',
|
|
58911
|
-
});
|
|
58912
|
-
};
|
|
58913
|
-
|
|
58914
|
-
maybeWriteBrace$j.maybePrintRightBrace = (path, printer, semantics) => {
|
|
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
58920
|
|
|
58926
|
-
if (path.node.left.type === 'ObjectPattern')
|
|
58927
|
-
|
|
58928
|
-
return;
|
|
58929
|
-
}
|
|
58921
|
+
if (path.node.left.type === 'ObjectPattern')
|
|
58922
|
+
return true;
|
|
58930
58923
|
|
|
58931
|
-
if (type === 'LogicalExpression')
|
|
58932
|
-
|
|
58933
|
-
return;
|
|
58934
|
-
}
|
|
58924
|
+
if (type === 'LogicalExpression')
|
|
58925
|
+
return true;
|
|
58935
58926
|
|
|
58936
|
-
if (type === 'BinaryExpression')
|
|
58937
|
-
|
|
58938
|
-
return;
|
|
58939
|
-
}
|
|
58927
|
+
if (type === 'BinaryExpression')
|
|
58928
|
+
return true;
|
|
58940
58929
|
|
|
58941
|
-
if (type === 'UnaryExpression')
|
|
58942
|
-
|
|
58943
|
-
return;
|
|
58944
|
-
}
|
|
58930
|
+
if (type === 'UnaryExpression')
|
|
58931
|
+
return true;
|
|
58945
58932
|
|
|
58946
58933
|
if (!roundBraces.assign && !hasLeadingComment$9(path))
|
|
58947
|
-
return;
|
|
58948
|
-
|
|
58949
|
-
if (!isParens$h(path))
|
|
58950
|
-
return;
|
|
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$
|
|
58941
|
+
const {types: types$3e} = bundle$1;
|
|
58958
58942
|
const {hasLeadingComment: hasLeadingComment$8} = is$8;
|
|
58959
|
-
const {isReturnStatement: isReturnStatement$b} = types$
|
|
58943
|
+
const {isReturnStatement: isReturnStatement$b} = types$3e;
|
|
58960
58944
|
|
|
58961
|
-
assignmentExpressionComments.printLeadingCommentLine = ({
|
|
58945
|
+
assignmentExpressionComments.printLeadingCommentLine = (path, printer, semantics, {printComment}) => {
|
|
58946
|
+
const {parentPath} = path;
|
|
58947
|
+
const {print} = printer;
|
|
58948
|
+
|
|
58949
|
+
if (isReturnStatement$b(parentPath))
|
|
58950
|
+
return;
|
|
58951
|
+
|
|
58952
|
+
printComment();
|
|
58953
|
+
print.newline();
|
|
58954
|
+
};
|
|
58962
58955
|
|
|
58963
58956
|
assignmentExpressionComments.maybeInsideReturnWithCommentStart = (path, {print, indent}) => {
|
|
58964
58957
|
const {parentPath} = path;
|
|
58958
|
+
const is = isReturnStatement$b(parentPath);
|
|
58965
58959
|
|
|
58966
|
-
if (
|
|
58960
|
+
if (is && hasLeadingComment$8(path)) {
|
|
58967
58961
|
indent.inc();
|
|
58968
58962
|
const {leadingComments} = path.node;
|
|
58969
58963
|
|
|
@@ -58981,22 +58975,42 @@ assignmentExpressionComments.maybeInsideReturnWithCommentStart = (path, {print,
|
|
|
58981
58975
|
|
|
58982
58976
|
assignmentExpressionComments.maybeInsideReturnWithCommentEnd = (path, {print, indent}) => {
|
|
58983
58977
|
const {parentPath} = path;
|
|
58978
|
+
const is = isReturnStatement$b(parentPath);
|
|
58984
58979
|
|
|
58985
|
-
if (!
|
|
58980
|
+
if (!is || !hasLeadingComment$8(path))
|
|
58986
58981
|
return;
|
|
58987
58982
|
|
|
58988
58983
|
indent.dec();
|
|
58989
58984
|
print.breakline();
|
|
58990
58985
|
};
|
|
58991
58986
|
|
|
58992
|
-
|
|
58987
|
+
var printSeparator = {};
|
|
58993
58988
|
|
|
58994
|
-
|
|
58989
|
+
const {types: types$3d} = bundle$1;
|
|
58990
|
+
const {
|
|
58991
|
+
isAssignmentExpression: isAssignmentExpression$e,
|
|
58992
|
+
isExpressionStatement: isExpressionStatement$s,
|
|
58993
|
+
} = types$3d;
|
|
58995
58994
|
|
|
58996
|
-
|
|
58997
|
-
|
|
58998
|
-
|
|
58999
|
-
|
|
58995
|
+
printSeparator.printSeparator = (path, {print}) => {
|
|
58996
|
+
if (isMultiline$4(path))
|
|
58997
|
+
print.breakline();
|
|
58998
|
+
else
|
|
58999
|
+
print.space();
|
|
59000
|
+
};
|
|
59001
|
+
|
|
59002
|
+
function isMultiline$4(path) {
|
|
59003
|
+
const {right} = path.node;
|
|
59004
|
+
|
|
59005
|
+
if (!path.parentPath.find(isExpressionStatement$s))
|
|
59006
|
+
return false;
|
|
59007
|
+
|
|
59008
|
+
return isAssignmentExpression$e(right);
|
|
59009
|
+
}
|
|
59010
|
+
|
|
59011
|
+
(function (module) {
|
|
59012
|
+
|
|
59013
|
+
const {condition} = maybeParensCondition$4;
|
|
59000
59014
|
|
|
59001
59015
|
const {
|
|
59002
59016
|
printLeadingCommentLine,
|
|
@@ -59004,51 +59018,36 @@ assignmentExpressionComments.maybeInsideReturnWithCommentEnd = (path, {print, in
|
|
|
59004
59018
|
maybeInsideReturnWithCommentStart,
|
|
59005
59019
|
} = assignmentExpressionComments;
|
|
59006
59020
|
|
|
59007
|
-
const {
|
|
59008
|
-
|
|
59009
|
-
isAssignmentExpression,
|
|
59010
|
-
} = types;
|
|
59021
|
+
const {maybeParens} = maybeParens$1a;
|
|
59022
|
+
const {printSeparator: printSeparator$1} = printSeparator;
|
|
59011
59023
|
|
|
59012
59024
|
const isInsideBlock = ({parentPath}) => /BlockStatement|Program/.test(parentPath.type);
|
|
59013
59025
|
|
|
59014
|
-
module.exports.AssignmentExpression = (
|
|
59015
|
-
|
|
59016
|
-
|
|
59017
|
-
|
|
59018
|
-
|
|
59019
|
-
|
|
59020
|
-
|
|
59021
|
-
|
|
59022
|
-
|
|
59023
|
-
|
|
59024
|
-
|
|
59025
|
-
if (isMultiline(path))
|
|
59026
|
-
print.breakline();
|
|
59027
|
-
else
|
|
59026
|
+
module.exports.AssignmentExpression = maybeParens({
|
|
59027
|
+
checkParens: false,
|
|
59028
|
+
condition,
|
|
59029
|
+
print(path, printer) {
|
|
59030
|
+
const {print} = printer;
|
|
59031
|
+
const {operator} = path.node;
|
|
59032
|
+
|
|
59033
|
+
maybeInsideReturnWithCommentStart(path, printer);
|
|
59034
|
+
|
|
59035
|
+
print('__left');
|
|
59028
59036
|
print.space();
|
|
59029
|
-
|
|
59030
|
-
|
|
59031
|
-
|
|
59032
|
-
|
|
59033
|
-
|
|
59034
|
-
|
|
59035
|
-
|
|
59036
|
-
|
|
59037
|
-
|
|
59038
|
-
|
|
59039
|
-
|
|
59040
|
-
};
|
|
59041
|
-
|
|
59042
|
-
module.exports.AssignmentExpression.printLeadingCommentLine = printLeadingCommentLine;
|
|
59037
|
+
print(operator);
|
|
59038
|
+
printSeparator$1(path, printer);
|
|
59039
|
+
print('__right');
|
|
59040
|
+
|
|
59041
|
+
if (isInsideBlock(path)) {
|
|
59042
|
+
print(';');
|
|
59043
|
+
print.breakline();
|
|
59044
|
+
}
|
|
59045
|
+
|
|
59046
|
+
maybeInsideReturnWithCommentEnd(path, printer);
|
|
59047
|
+
},
|
|
59048
|
+
});
|
|
59043
59049
|
|
|
59044
|
-
|
|
59045
|
-
const {right} = path.node;
|
|
59046
|
-
|
|
59047
|
-
if (!path.parentPath.find(isExpressionStatement))
|
|
59048
|
-
return false;
|
|
59049
|
-
|
|
59050
|
-
return isAssignmentExpression(right);
|
|
59051
|
-
}
|
|
59050
|
+
module.exports.AssignmentExpression.printLeadingCommentLine = printLeadingCommentLine;
|
|
59052
59051
|
} (assignmentExpression$5));
|
|
59053
59052
|
|
|
59054
59053
|
var assignmentExpressionExports = assignmentExpression$5.exports;
|
|
@@ -64772,7 +64771,7 @@ function snakeCase(str) {
|
|
|
64772
64771
|
const process$5 = require$$0$3;
|
|
64773
64772
|
const toSnakeCase$4 = justSnakeCase;
|
|
64774
64773
|
const {codeFrameColumns: codeFrameColumns$6} = bundle$1;
|
|
64775
|
-
const {TYPES: TYPES$f} = types$
|
|
64774
|
+
const {TYPES: TYPES$f} = types$3u;
|
|
64776
64775
|
|
|
64777
64776
|
const {stringify: stringify$b} = JSON;
|
|
64778
64777
|
const {
|
|
@@ -64959,7 +64958,7 @@ const initSemantics$4 = (format, semantics = {}) => ({
|
|
|
64959
64958
|
const fullstore$6 = fullstore$7;
|
|
64960
64959
|
|
|
64961
64960
|
const babelTraverse$6 = bundle$1.traverse;
|
|
64962
|
-
const {TYPES: TYPES$e} = types$
|
|
64961
|
+
const {TYPES: TYPES$e} = types$3u;
|
|
64963
64962
|
const baseVisitors$4 = visitors$a;
|
|
64964
64963
|
|
|
64965
64964
|
const {
|