@putout/bundle 4.4.0 → 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 CHANGED
@@ -5983,7 +5983,7 @@ __export$1(lib_exports$1, {
5983
5983
  isRegexLiteral: () => isRegexLiteral$1,
5984
5984
  isRestElement: () => isRestElement$1,
5985
5985
  isRestProperty: () => isRestProperty$1,
5986
- isReturnStatement: () => isReturnStatement$b,
5986
+ isReturnStatement: () => isReturnStatement$c,
5987
5987
  isScopable: () => isScopable$1,
5988
5988
  isScope: () => isScope$1,
5989
5989
  isSequenceExpression: () => isSequenceExpression$7,
@@ -8118,7 +8118,7 @@ function isRestElement$1(node, opts) {
8118
8118
  return opts == null || shallowEqual$1(node, opts);
8119
8119
  }
8120
8120
 
8121
- function isReturnStatement$b(node, opts) {
8121
+ function isReturnStatement$c(node, opts) {
8122
8122
  if (!node)
8123
8123
  return false;
8124
8124
 
@@ -23513,7 +23513,7 @@ var TokContext$1 = class TokContext {
23513
23513
  }
23514
23514
  };
23515
23515
 
23516
- var types$3u = {
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$3u.brace) {
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$3u.brace) {
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$3u.j_oTag || currentContext === types$3u.j_expr) {
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$3u.brace);
28992
+ this.setContext(types$3v.brace);
28993
28993
  this.next();
28994
- node = this.jsxParseExpressionContainer(node, types$3u.j_oTag);
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$3u.j_expr);
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$3u.brace);
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$3u.j_oTag);
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$3u.brace);
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$3u.j_expr));
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$3u.j_expr) {
29209
+ if (context === types$3v.j_expr) {
29210
29210
  this.jsxReadToken();
29211
29211
  return;
29212
29212
  }
29213
29213
 
29214
- if (context === types$3u.j_oTag || context === types$3u.j_cTag) {
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$3u.j_oTag) {
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$3u.j_cTag);
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$3u.j_oTag);
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$3u.j_oTag && prevType === 56 || out === types$3u.j_cTag) {
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$3u.j_expr;
29254
+ this.state.canStartJSXElement = context[context.length - 1] === types$3v.j_expr;
29255
29255
  } else {
29256
- this.setContext(types$3u.j_expr);
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$3u.brace]);
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$3u.brace) {
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$3u.brace) {
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$3u.j_oTag || currentContext === types$3u.j_expr) {
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$3t = {};
56271
+ var types$3u = {};
56272
56272
 
56273
- types$3t.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$3s} = bundle$1;
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$3s;
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$3r} = bundle$1;
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$3r;
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$3q} = bundle$1;
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$3q;
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$3p} = bundle$1;
56969
+ const {types: types$3q} = bundle$1;
56970
56970
 
56971
56971
  const {
56972
56972
  isLast: isLast$Y,
@@ -56986,7 +56986,7 @@ const {
56986
56986
  isMemberExpression: isMemberExpression$r,
56987
56987
  isExpressionStatement: isExpressionStatement$v,
56988
56988
  isCallExpression: isCallExpression$A,
56989
- } = types$3p;
56989
+ } = types$3q;
56990
56990
 
56991
56991
  const hasBody$9 = (path) => {
56992
56992
  if (path.isTSModuleDeclaration())
@@ -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$4(print);
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$4 = ({print, condition}) => ({
57297
+ const maybeParensCondition$5 = ({print, condition, checkParens = true}) => ({
57298
57298
  ...maybeParensPrint$4(print),
57299
- condition: (path) => condition?.(path) || isParens$j(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$3o} = bundle$1;
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;
@@ -57354,7 +57361,7 @@ const {
57354
57361
  isExpressionStatement: isExpressionStatement$u,
57355
57362
  isFunctionDeclaration: isFunctionDeclaration$f,
57356
57363
  isExportDefaultDeclaration: isExportDefaultDeclaration$5,
57357
- } = types$3o;
57364
+ } = types$3p;
57358
57365
 
57359
57366
  const isInsideNamedExport$9 = ({parentPath}) => isExportNamedDeclaration$b(parentPath);
57360
57367
 
@@ -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$9} = is$8;
57512
+ const {hasLeadingComment: hasLeadingComment$b} = 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$9(firstDecorator))
57528
+ if (hasLeadingComment$b(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$3n} = bundle$1;
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$3n;
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,14 +58047,14 @@ function tooLong$9(args) {
58040
58047
 
58041
58048
  var newExpression$5 = {};
58042
58049
 
58043
- const {types: types$3m} = bundle$1;
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
58055
  isExpressionStatement: isExpressionStatement$t,
58049
58056
  isMemberExpression: isMemberExpression$q,
58050
- } = types$3m;
58057
+ } = types$3n;
58051
58058
 
58052
58059
  const isInsideExpressionStatement$4 = ({parentPath}) => isExpressionStatement$t(parentPath);
58053
58060
  const notFirst$4 = ({parentPath}) => exists$17(parentPath.getPrevSibling());
@@ -58126,8 +58133,8 @@ var objectExpression$7 = {};
58126
58133
 
58127
58134
  var isInsideTuple$9 = {};
58128
58135
 
58129
- const {types: types$3l} = bundle$1;
58130
- const {isArrayExpression: isArrayExpression$A} = types$3l;
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$3k} = bundle$1;
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$3k;
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$3j} = bundle$1;
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$8,
58185
+ hasLeadingComment: hasLeadingComment$a,
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$3j;
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$8(next);
58312
+ return hasLeadingComment$a(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$3i} = bundle$1;
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$3i;
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$3h} = bundle$1;
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$3h;
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$3g} = bundle$1;
58473
+ const {types: types$3h} = bundle$1;
58467
58474
  const {
58468
58475
  isMemberExpression: isMemberExpression$p,
58469
58476
  isSequenceExpression: isSequenceExpression$6,
58470
- } = types$3g;
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$3f} = bundle$1;
58508
+ const {types: types$3g} = bundle$1;
58502
58509
  const {
58503
58510
  isAssignmentPattern: isAssignmentPattern$a,
58504
58511
  isIdentifier: isIdentifier$J,
58505
- } = types$3f;
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$3e} = bundle$1;
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$3e;
58573
+ } = types$3f;
58567
58574
 
58568
58575
  const isInsideFn$4 = (path) => {
58569
58576
  if (isFunction$q(path.parentPath))
@@ -58898,94 +58905,98 @@ classProperty$5.ClassAccessorProperty = (path, printer, semantics) => {
58898
58905
  });
58899
58906
  };
58900
58907
 
58901
- var assignmentExpression$5 = {};
58908
+ var assignmentExpression$5 = {exports: {}};
58902
58909
 
58903
- var maybeWriteBrace$j = {};
58904
-
58905
- const {isParens: isParens$h} = maybeParens$1a;
58910
+ var maybeParensCondition$4 = {};
58906
58911
 
58907
- maybeWriteBrace$j.maybePrintLeftBrace = (path, printer, semantics) => {
58908
- maybeWriteBrace$i(path, printer, semantics, {
58909
- brace: '(',
58910
- });
58911
- };
58912
+ const {hasLeadingComment: hasLeadingComment$9} = is$8;
58912
58913
 
58913
- maybeWriteBrace$j.maybePrintRightBrace = (path, printer, semantics) => {
58914
- maybeWriteBrace$i(path, printer, semantics, {
58915
- brace: ')',
58916
- });
58917
- };
58914
+ const {isParens: isParens$h} = maybeParens$1a;
58918
58915
 
58919
- function maybeWriteBrace$i(path, printer, semantics, {brace}) {
58916
+ maybeParensCondition$4.condition = (path, printer, semantics) => {
58920
58917
  const {parentPath} = path;
58921
58918
  const {type} = parentPath;
58922
58919
  const {roundBraces} = semantics;
58923
- const {write} = printer;
58924
58920
 
58925
- if (path.node.left.type === 'ObjectPattern') {
58926
- write(brace);
58927
- return;
58928
- }
58921
+ if (path.node.left.type === 'ObjectPattern')
58922
+ return true;
58929
58923
 
58930
- if (type === 'LogicalExpression') {
58931
- write(brace);
58932
- return;
58933
- }
58924
+ if (type === 'LogicalExpression')
58925
+ return true;
58934
58926
 
58935
- if (type === 'BinaryExpression') {
58936
- write(brace);
58937
- return;
58938
- }
58927
+ if (type === 'BinaryExpression')
58928
+ return true;
58939
58929
 
58940
- if (type === 'UnaryExpression') {
58941
- write(brace);
58942
- return;
58943
- }
58930
+ if (type === 'UnaryExpression')
58931
+ return true;
58944
58932
 
58945
- if (!roundBraces.assign)
58933
+ if (!roundBraces.assign && !hasLeadingComment$9(path))
58934
+ return false;
58935
+
58936
+ return isParens$h(path);
58937
+ };
58938
+
58939
+ var assignmentExpressionComments = {};
58940
+
58941
+ const {types: types$3e} = bundle$1;
58942
+ const {hasLeadingComment: hasLeadingComment$8} = is$8;
58943
+ const {isReturnStatement: isReturnStatement$b} = types$3e;
58944
+
58945
+ assignmentExpressionComments.printLeadingCommentLine = (path, printer, semantics, {printComment}) => {
58946
+ const {parentPath} = path;
58947
+ const {print} = printer;
58948
+
58949
+ if (isReturnStatement$b(parentPath))
58946
58950
  return;
58947
58951
 
58948
- if (!isParens$h(path))
58952
+ printComment();
58953
+ print.newline();
58954
+ };
58955
+
58956
+ assignmentExpressionComments.maybeInsideReturnWithCommentStart = (path, {print, indent}) => {
58957
+ const {parentPath} = path;
58958
+ const is = isReturnStatement$b(parentPath);
58959
+
58960
+ if (is && hasLeadingComment$8(path)) {
58961
+ indent.inc();
58962
+ const {leadingComments} = path.node;
58963
+
58964
+ print.breakline();
58965
+ for (const {type, value} of leadingComments) {
58966
+ if (type === 'CommentLine')
58967
+ print(`//${value}`);
58968
+ else
58969
+ print(`/*${value}*/`);
58970
+
58971
+ print.breakline();
58972
+ }
58973
+ }
58974
+ };
58975
+
58976
+ assignmentExpressionComments.maybeInsideReturnWithCommentEnd = (path, {print, indent}) => {
58977
+ const {parentPath} = path;
58978
+ const is = isReturnStatement$b(parentPath);
58979
+
58980
+ if (!is || !hasLeadingComment$8(path))
58949
58981
  return;
58950
58982
 
58951
- write(brace);
58952
- }
58983
+ indent.dec();
58984
+ print.breakline();
58985
+ };
58953
58986
 
58954
- const {types: types$3d} = bundle$1;
58955
- const {
58956
- maybePrintLeftBrace: maybePrintLeftBrace$4,
58957
- maybePrintRightBrace: maybePrintRightBrace$4,
58958
- } = maybeWriteBrace$j;
58987
+ var printSeparator = {};
58959
58988
 
58989
+ const {types: types$3d} = bundle$1;
58960
58990
  const {
58961
- isExpressionStatement: isExpressionStatement$s,
58962
58991
  isAssignmentExpression: isAssignmentExpression$e,
58992
+ isExpressionStatement: isExpressionStatement$s,
58963
58993
  } = types$3d;
58964
58994
 
58965
- const isInsideBlock$o = ({parentPath}) => /BlockStatement|Program/.test(parentPath.type);
58966
-
58967
- assignmentExpression$5.AssignmentExpression = (path, printer, semantics) => {
58968
- const {print} = printer;
58969
- const {operator} = path.node;
58970
-
58971
- maybePrintLeftBrace$4(path, printer, semantics);
58972
- print('__left');
58973
- print.space();
58974
- print(operator);
58975
-
58995
+ printSeparator.printSeparator = (path, {print}) => {
58976
58996
  if (isMultiline$4(path))
58977
58997
  print.breakline();
58978
58998
  else
58979
58999
  print.space();
58980
-
58981
- print('__right');
58982
-
58983
- if (isInsideBlock$o(path)) {
58984
- print(';');
58985
- print.breakline();
58986
- }
58987
-
58988
- maybePrintRightBrace$4(path, printer, semantics);
58989
59000
  };
58990
59001
 
58991
59002
  function isMultiline$4(path) {
@@ -58997,6 +59008,51 @@ function isMultiline$4(path) {
58997
59008
  return isAssignmentExpression$e(right);
58998
59009
  }
58999
59010
 
59011
+ (function (module) {
59012
+
59013
+ const {condition} = maybeParensCondition$4;
59014
+
59015
+ const {
59016
+ printLeadingCommentLine,
59017
+ maybeInsideReturnWithCommentEnd,
59018
+ maybeInsideReturnWithCommentStart,
59019
+ } = assignmentExpressionComments;
59020
+
59021
+ const {maybeParens} = maybeParens$1a;
59022
+ const {printSeparator: printSeparator$1} = printSeparator;
59023
+
59024
+ const isInsideBlock = ({parentPath}) => /BlockStatement|Program/.test(parentPath.type);
59025
+
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');
59036
+ print.space();
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
+ });
59049
+
59050
+ module.exports.AssignmentExpression.printLeadingCommentLine = printLeadingCommentLine;
59051
+ } (assignmentExpression$5));
59052
+
59053
+ var assignmentExpressionExports = assignmentExpression$5.exports;
59054
+ assignmentExpressionExports.default;
59055
+
59000
59056
  var arrayExpression$8 = {};
59001
59057
 
59002
59058
  var newline$4 = {};
@@ -60918,7 +60974,7 @@ const {
60918
60974
  PrivateName: PrivateName$6,
60919
60975
  } = classProperty$5;
60920
60976
 
60921
- const {AssignmentExpression: AssignmentExpression$5} = assignmentExpression$5;
60977
+ const {AssignmentExpression: AssignmentExpression$5} = assignmentExpressionExports;
60922
60978
  const {ArrayExpression: ArrayExpression$5} = arrayExpression$8;
60923
60979
  const {ArrayPattern: ArrayPattern$4} = arrayPattern$5;
60924
60980
  const {AssignmentPattern: AssignmentPattern$5} = assignmentPattern$5;
@@ -64715,7 +64771,7 @@ function snakeCase(str) {
64715
64771
  const process$5 = require$$0$3;
64716
64772
  const toSnakeCase$4 = justSnakeCase;
64717
64773
  const {codeFrameColumns: codeFrameColumns$6} = bundle$1;
64718
- const {TYPES: TYPES$f} = types$3t;
64774
+ const {TYPES: TYPES$f} = types$3u;
64719
64775
 
64720
64776
  const {stringify: stringify$b} = JSON;
64721
64777
  const {
@@ -64902,7 +64958,7 @@ const initSemantics$4 = (format, semantics = {}) => ({
64902
64958
  const fullstore$6 = fullstore$7;
64903
64959
 
64904
64960
  const babelTraverse$6 = bundle$1.traverse;
64905
- const {TYPES: TYPES$e} = types$3t;
64961
+ const {TYPES: TYPES$e} = types$3u;
64906
64962
  const baseVisitors$4 = visitors$a;
64907
64963
 
64908
64964
  const {