@putout/bundle 4.7.6 → 4.8.0

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
@@ -3570,7 +3570,7 @@ __export(lib_exports, {
3570
3570
  TSNullKeyword: () => TSNullKeyword,
3571
3571
  TSNumberKeyword: () => TSNumberKeyword,
3572
3572
  TSObjectKeyword: () => TSObjectKeyword,
3573
- TSOptionalType: () => TSOptionalType,
3573
+ TSOptionalType: () => TSOptionalType$1,
3574
3574
  TSParameterProperty: () => TSParameterProperty$1,
3575
3575
  TSParenthesizedType: () => TSParenthesizedType$1,
3576
3576
  TSPropertySignature: () => TSPropertySignature$1,
@@ -3581,7 +3581,7 @@ __export(lib_exports, {
3581
3581
  TSSymbolKeyword: () => TSSymbolKeyword,
3582
3582
  TSTYPEELEMENT_TYPES: () => TSTYPEELEMENT_TYPES,
3583
3583
  TSTYPE_TYPES: () => TSTYPE_TYPES,
3584
- TSTemplateLiteralType: () => TSTemplateLiteralType,
3584
+ TSTemplateLiteralType: () => TSTemplateLiteralType$1,
3585
3585
  TSThisType: () => TSThisType,
3586
3586
  TSTupleType: () => TSTupleType$1,
3587
3587
  TSTypeAliasDeclaration: () => TSTypeAliasDeclaration$1,
@@ -3634,7 +3634,7 @@ __export(lib_exports, {
3634
3634
  VoidTypeAnnotation: () => VoidTypeAnnotation,
3635
3635
  WHILE_TYPES: () => WHILE_TYPES,
3636
3636
  WhileStatement: () => WhileStatement$1,
3637
- WithStatement: () => WithStatement,
3637
+ WithStatement: () => WithStatement$1,
3638
3638
  YieldExpression: () => YieldExpression,
3639
3639
  __internal__deprecationWarning: () => deprecationWarning,
3640
3640
  addComment: () => addComment,
@@ -4153,7 +4153,7 @@ __export(lib_exports, {
4153
4153
  isForOfStatement: () => isForOfStatement$2,
4154
4154
  isForStatement: () => isForStatement,
4155
4155
  isForXStatement: () => isForXStatement,
4156
- isFunction: () => isFunction$7,
4156
+ isFunction: () => isFunction$8,
4157
4157
  isFunctionDeclaration: () => isFunctionDeclaration$3,
4158
4158
  isFunctionExpression: () => isFunctionExpression$1,
4159
4159
  isFunctionParameter: () => isFunctionParameter,
@@ -4161,7 +4161,7 @@ __export(lib_exports, {
4161
4161
  isFunctionTypeAnnotation: () => isFunctionTypeAnnotation,
4162
4162
  isFunctionTypeParam: () => isFunctionTypeParam,
4163
4163
  isGenericTypeAnnotation: () => isGenericTypeAnnotation,
4164
- isIdentifier: () => isIdentifier$g,
4164
+ isIdentifier: () => isIdentifier$h,
4165
4165
  isIfStatement: () => isIfStatement$3,
4166
4166
  isImmutable: () => isImmutable,
4167
4167
  isImport: () => isImport,
@@ -4185,14 +4185,14 @@ __export(lib_exports, {
4185
4185
  isJSXClosingFragment: () => isJSXClosingFragment,
4186
4186
  isJSXElement: () => isJSXElement$5,
4187
4187
  isJSXEmptyExpression: () => isJSXEmptyExpression,
4188
- isJSXExpressionContainer: () => isJSXExpressionContainer,
4188
+ isJSXExpressionContainer: () => isJSXExpressionContainer$1,
4189
4189
  isJSXFragment: () => isJSXFragment,
4190
4190
  isJSXIdentifier: () => isJSXIdentifier$3,
4191
4191
  isJSXMemberExpression: () => isJSXMemberExpression,
4192
4192
  isJSXNamespacedName: () => isJSXNamespacedName,
4193
4193
  isJSXOpeningElement: () => isJSXOpeningElement,
4194
4194
  isJSXOpeningFragment: () => isJSXOpeningFragment,
4195
- isJSXSpreadAttribute: () => isJSXSpreadAttribute,
4195
+ isJSXSpreadAttribute: () => isJSXSpreadAttribute$1,
4196
4196
  isJSXSpreadChild: () => isJSXSpreadChild,
4197
4197
  isJSXText: () => isJSXText$4,
4198
4198
  isLVal: () => isLVal,
@@ -4273,7 +4273,7 @@ __export(lib_exports, {
4273
4273
  isSymbolTypeAnnotation: () => isSymbolTypeAnnotation,
4274
4274
  isTSAnyKeyword: () => isTSAnyKeyword,
4275
4275
  isTSArrayType: () => isTSArrayType,
4276
- isTSAsExpression: () => isTSAsExpression,
4276
+ isTSAsExpression: () => isTSAsExpression$1,
4277
4277
  isTSBaseType: () => isTSBaseType,
4278
4278
  isTSBigIntKeyword: () => isTSBigIntKeyword,
4279
4279
  isTSBooleanKeyword: () => isTSBooleanKeyword,
@@ -4515,7 +4515,7 @@ __export(lib_exports, {
4515
4515
  tsNullKeyword: () => tsNullKeyword,
4516
4516
  tsNumberKeyword: () => tsNumberKeyword,
4517
4517
  tsObjectKeyword: () => tsObjectKeyword,
4518
- tsOptionalType: () => tsOptionalType,
4518
+ tsOptionalType: () => tsOptionalType$1,
4519
4519
  tsParameterProperty: () => tsParameterProperty$1,
4520
4520
  tsParenthesizedType: () => tsParenthesizedType$3,
4521
4521
  tsPropertySignature: () => tsPropertySignature$1,
@@ -4524,7 +4524,7 @@ __export(lib_exports, {
4524
4524
  tsSatisfiesExpression: () => tsSatisfiesExpression,
4525
4525
  tsStringKeyword: () => tsStringKeyword,
4526
4526
  tsSymbolKeyword: () => tsSymbolKeyword,
4527
- tsTemplateLiteralType: () => tsTemplateLiteralType,
4527
+ tsTemplateLiteralType: () => tsTemplateLiteralType$1,
4528
4528
  tsThisType: () => tsThisType,
4529
4529
  tsTupleType: () => tsTupleType$1,
4530
4530
  tsTypeAliasDeclaration: () => tsTypeAliasDeclaration$1,
@@ -4563,7 +4563,7 @@ __export(lib_exports, {
4563
4563
  voidPattern: () => voidPattern$1,
4564
4564
  voidTypeAnnotation: () => voidTypeAnnotation,
4565
4565
  whileStatement: () => whileStatement$1,
4566
- withStatement: () => withStatement,
4566
+ withStatement: () => withStatement$1,
4567
4567
  yieldExpression: () => yieldExpression,
4568
4568
  });
4569
4569
 
@@ -6229,7 +6229,7 @@ function isFunctionExpression$1(node, opts) {
6229
6229
  return opts == null || shallowEqual(node, opts);
6230
6230
  }
6231
6231
 
6232
- function isIdentifier$g(node, opts) {
6232
+ function isIdentifier$h(node, opts) {
6233
6233
  if (!node)
6234
6234
  return false;
6235
6235
 
@@ -7599,7 +7599,7 @@ function isJSXEmptyExpression(node, opts) {
7599
7599
  return opts == null || shallowEqual(node, opts);
7600
7600
  }
7601
7601
 
7602
- function isJSXExpressionContainer(node, opts) {
7602
+ function isJSXExpressionContainer$1(node, opts) {
7603
7603
  if (!node)
7604
7604
  return false;
7605
7605
 
@@ -7659,7 +7659,7 @@ function isJSXOpeningElement(node, opts) {
7659
7659
  return opts == null || shallowEqual(node, opts);
7660
7660
  }
7661
7661
 
7662
- function isJSXSpreadAttribute(node, opts) {
7662
+ function isJSXSpreadAttribute$1(node, opts) {
7663
7663
  if (!node)
7664
7664
  return false;
7665
7665
 
@@ -8359,7 +8359,7 @@ function isTSInstantiationExpression(node, opts) {
8359
8359
  return opts == null || shallowEqual(node, opts);
8360
8360
  }
8361
8361
 
8362
- function isTSAsExpression(node, opts) {
8362
+ function isTSAsExpression$1(node, opts) {
8363
8363
  if (!node)
8364
8364
  return false;
8365
8365
 
@@ -9070,7 +9070,7 @@ function isForXStatement(node, opts) {
9070
9070
  return opts == null || shallowEqual(node, opts);
9071
9071
  }
9072
9072
 
9073
- function isFunction$7(node, opts) {
9073
+ function isFunction$8(node, opts) {
9074
9074
  if (!node)
9075
9075
  return false;
9076
9076
 
@@ -9921,7 +9921,7 @@ function matchesPattern$1(member, match, allowPartial) {
9921
9921
  const node2 = nodes2[j];
9922
9922
  let value;
9923
9923
 
9924
- if (isIdentifier$g(node2)) {
9924
+ if (isIdentifier$h(node2)) {
9925
9925
  value = node2.name;
9926
9926
  } else if (isStringLiteral$a(node2)) {
9927
9927
  value = node2.value;
@@ -14967,7 +14967,7 @@ function whileStatement$1(test, body) {
14967
14967
  return node;
14968
14968
  }
14969
14969
 
14970
- function withStatement(object, body) {
14970
+ function withStatement$1(object, body) {
14971
14971
  const node = {
14972
14972
  type: 'WithStatement',
14973
14973
  object,
@@ -16916,7 +16916,7 @@ function tsTupleType$1(elementTypes) {
16916
16916
  return node;
16917
16917
  }
16918
16918
 
16919
- function tsOptionalType(typeAnnotation2) {
16919
+ function tsOptionalType$1(typeAnnotation2) {
16920
16920
  const node = {
16921
16921
  type: 'TSOptionalType',
16922
16922
  typeAnnotation: typeAnnotation2,
@@ -17057,7 +17057,7 @@ function tsMappedType$1(key, constraint, nameType = null, typeAnnotation2 = null
17057
17057
  return node;
17058
17058
  }
17059
17059
 
17060
- function tsTemplateLiteralType(quasis, types2) {
17060
+ function tsTemplateLiteralType$1(quasis, types2) {
17061
17061
  const node = {
17062
17062
  type: 'TSTemplateLiteralType',
17063
17063
  quasis,
@@ -17614,7 +17614,7 @@ var b = /* @__PURE__ */Object.freeze({
17614
17614
  tsNullKeyword,
17615
17615
  tsNumberKeyword,
17616
17616
  tsObjectKeyword,
17617
- tsOptionalType,
17617
+ tsOptionalType: tsOptionalType$1,
17618
17618
  tsParameterProperty: tsParameterProperty$1,
17619
17619
  tsParenthesizedType: tsParenthesizedType$3,
17620
17620
  tsPropertySignature: tsPropertySignature$1,
@@ -17623,7 +17623,7 @@ var b = /* @__PURE__ */Object.freeze({
17623
17623
  tsSatisfiesExpression,
17624
17624
  tsStringKeyword,
17625
17625
  tsSymbolKeyword,
17626
- tsTemplateLiteralType,
17626
+ tsTemplateLiteralType: tsTemplateLiteralType$1,
17627
17627
  tsThisType,
17628
17628
  tsTupleType: tsTupleType$1,
17629
17629
  tsTypeAliasDeclaration: tsTypeAliasDeclaration$1,
@@ -17660,7 +17660,7 @@ var b = /* @__PURE__ */Object.freeze({
17660
17660
  voidPattern: voidPattern$1,
17661
17661
  voidTypeAnnotation,
17662
17662
  whileStatement: whileStatement$1,
17663
- withStatement,
17663
+ withStatement: withStatement$1,
17664
17664
  yieldExpression,
17665
17665
  });
17666
17666
 
@@ -17723,7 +17723,7 @@ var UpdateExpression = alias('updateExpression');
17723
17723
  var VariableDeclaration$1 = alias('variableDeclaration');
17724
17724
  var VariableDeclarator = alias('variableDeclarator');
17725
17725
  var WhileStatement$1 = alias('whileStatement');
17726
- var WithStatement = alias('withStatement');
17726
+ var WithStatement$1 = alias('withStatement');
17727
17727
  var AssignmentPattern$1 = alias('assignmentPattern');
17728
17728
  var ArrayPattern$1 = alias('arrayPattern');
17729
17729
  var ArrowFunctionExpression$1 = alias('arrowFunctionExpression');
@@ -17888,7 +17888,7 @@ var TSTypeQuery$1 = alias('tsTypeQuery');
17888
17888
  var TSTypeLiteral$1 = alias('tsTypeLiteral');
17889
17889
  var TSArrayType = alias('tsArrayType');
17890
17890
  var TSTupleType$1 = alias('tsTupleType');
17891
- var TSOptionalType = alias('tsOptionalType');
17891
+ var TSOptionalType$1 = alias('tsOptionalType');
17892
17892
  var TSRestType = alias('tsRestType');
17893
17893
  var TSNamedTupleMember$1 = alias('tsNamedTupleMember');
17894
17894
  var TSUnionType$1 = alias('tsUnionType');
@@ -17899,7 +17899,7 @@ var TSParenthesizedType$1 = alias('tsParenthesizedType');
17899
17899
  var TSTypeOperator = alias('tsTypeOperator');
17900
17900
  var TSIndexedAccessType = alias('tsIndexedAccessType');
17901
17901
  var TSMappedType$1 = alias('tsMappedType');
17902
- var TSTemplateLiteralType = alias('tsTemplateLiteralType');
17902
+ var TSTemplateLiteralType$1 = alias('tsTemplateLiteralType');
17903
17903
  var TSLiteralType = alias('tsLiteralType');
17904
17904
  var TSClassImplements = alias('tsClassImplements');
17905
17905
  var TSInterfaceHeritage = alias('tsInterfaceHeritage');
@@ -17977,7 +17977,7 @@ function buildChildren(node) {
17977
17977
  continue;
17978
17978
  }
17979
17979
 
17980
- if (isJSXExpressionContainer(child))
17980
+ if (isJSXExpressionContainer$1(child))
17981
17981
  child = child.expression;
17982
17982
 
17983
17983
  if (isJSXEmptyExpression(child))
@@ -19270,7 +19270,7 @@ function createTypeAnnotationBasedOnTypeof(type) {
19270
19270
  }
19271
19271
 
19272
19272
  function getQualifiedName$1(node) {
19273
- return isIdentifier$g(node) ? node.name : `${node.id.name}.${getQualifiedName$1(node.qualification)}`;
19273
+ return isIdentifier$h(node) ? node.name : `${node.id.name}.${getQualifiedName$1(node.qualification)}`;
19274
19274
  }
19275
19275
 
19276
19276
  function removeTypeDuplicates$1(nodesIn) {
@@ -19354,7 +19354,7 @@ function createFlowUnionType(types2) {
19354
19354
  }
19355
19355
 
19356
19356
  function getQualifiedName(node) {
19357
- return isIdentifier$g(node) ? node.name : isThisExpression(node) ? 'this' : `${node.right.name}.${getQualifiedName(node.left)}`;
19357
+ return isIdentifier$h(node) ? node.name : isThisExpression(node) ? 'this' : `${node.right.name}.${getQualifiedName(node.left)}`;
19358
19358
  }
19359
19359
 
19360
19360
  function removeTypeDuplicates(nodesIn) {
@@ -19479,7 +19479,7 @@ function cloneNodeInternal(node, deep = true, withoutLoc = false, commentsCache)
19479
19479
  type: node.type,
19480
19480
  };
19481
19481
 
19482
- if (isIdentifier$g(node)) {
19482
+ if (isIdentifier$h(node)) {
19483
19483
  newNode.name = node.name;
19484
19484
 
19485
19485
  if (hasOwn(node, 'optional') && typeof node.optional === 'boolean') {
@@ -19705,7 +19705,7 @@ function toBlock(node, parent) {
19705
19705
  blockNodes = [];
19706
19706
  } else {
19707
19707
  if (!isStatement$7(node)) {
19708
- if (isFunction$7(parent)) {
19708
+ if (isFunction$8(parent)) {
19709
19709
  node = returnStatement$1(node);
19710
19710
  } else {
19711
19711
  node = expressionStatement$5(node);
@@ -19755,7 +19755,7 @@ function toBindingIdentifierName(name) {
19755
19755
  }
19756
19756
 
19757
19757
  function toComputedKey(node, key = node.key || node.property) {
19758
- if (!node.computed && isIdentifier$g(key))
19758
+ if (!node.computed && isIdentifier$h(key))
19759
19759
  key = stringLiteral$6(key.name);
19760
19760
 
19761
19761
  return key;
@@ -19773,7 +19773,7 @@ function toExpression$4(node) {
19773
19773
  if (isClass(node)) {
19774
19774
  node.type = 'ClassExpression';
19775
19775
  node.abstract = false;
19776
- } else if (isFunction$7(node)) {
19776
+ } else if (isFunction$8(node)) {
19777
19777
  node.type = 'FunctionExpression';
19778
19778
  }
19779
19779
 
@@ -19875,7 +19875,7 @@ function toKeyAlias(node, key = node.key) {
19875
19875
 
19876
19876
  if (node.kind === 'method') {
19877
19877
  return toKeyAlias.increment() + '';
19878
- } else if (isIdentifier$g(key)) {
19878
+ } else if (isIdentifier$h(key)) {
19879
19879
  alias2 = key.name;
19880
19880
  } else if (isStringLiteral$a(key)) {
19881
19881
  alias2 = JSON.stringify(key.value);
@@ -19913,7 +19913,7 @@ function toStatement$1(node, ignore) {
19913
19913
  if (isClass(node)) {
19914
19914
  mustHaveId = true;
19915
19915
  newType = 'ClassDeclaration';
19916
- } else if (isFunction$7(node)) {
19916
+ } else if (isFunction$8(node)) {
19917
19917
  mustHaveId = true;
19918
19918
  newType = 'FunctionDeclaration';
19919
19919
  } else if (isAssignmentExpression$3(node)) {
@@ -20145,7 +20145,7 @@ function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) {
20145
20145
  continue;
20146
20146
  }
20147
20147
 
20148
- if (isIdentifier$g(id)) {
20148
+ if (isIdentifier$h(id)) {
20149
20149
  if (duplicates) {
20150
20150
  const _ids = ids[id.name] = ids[id.name] || [];
20151
20151
  _ids.push(id);
@@ -20302,7 +20302,7 @@ function getFunctionName(node, parent) {
20302
20302
  if (!id)
20303
20303
  return null;
20304
20304
 
20305
- const name = isLiteral$4(id) ? getNameFromLiteralId(id) : isIdentifier$g(id) ? id.name : isPrivateName(id) ? id.id.name : null;
20305
+ const name = isLiteral$4(id) ? getNameFromLiteralId(id) : isIdentifier$h(id) ? id.name : isPrivateName(id) ? id.id.name : null;
20306
20306
 
20307
20307
  if (name == null)
20308
20308
  return null;
@@ -20405,7 +20405,7 @@ function isImmutable(node) {
20405
20405
  if (isType(node.type, 'Immutable'))
20406
20406
  return true;
20407
20407
 
20408
- if (isIdentifier$g(node)) {
20408
+ if (isIdentifier$h(node)) {
20409
20409
  if (node.name === 'undefined') {
20410
20410
  return true;
20411
20411
  } else {
@@ -20601,11 +20601,11 @@ function isReferenced(node, parent, grandparent) {
20601
20601
  }
20602
20602
 
20603
20603
  function isScope(node, parent) {
20604
- if (isBlockStatement$7(node) && (isFunction$7(parent) || isCatchClause(parent))) {
20604
+ if (isBlockStatement$7(node) && (isFunction$8(parent) || isCatchClause(parent))) {
20605
20605
  return false;
20606
20606
  }
20607
20607
 
20608
- if (isPattern(node) && (isFunction$7(parent) || isCatchClause(parent))) {
20608
+ if (isPattern(node) && (isFunction$8(parent) || isCatchClause(parent))) {
20609
20609
  return true;
20610
20610
  }
20611
20611
 
@@ -20613,7 +20613,7 @@ function isScope(node, parent) {
20613
20613
  }
20614
20614
 
20615
20615
  function isSpecifierDefault(specifier) {
20616
- return isImportDefaultSpecifier$1(specifier) || isIdentifier$g(specifier.imported || specifier.exported, {
20616
+ return isImportDefaultSpecifier$1(specifier) || isIdentifier$h(specifier.imported || specifier.exported, {
20617
20617
  name: 'default',
20618
20618
  });
20619
20619
  }
@@ -51383,7 +51383,7 @@ var is$3 = {};
51383
51383
  const {types: types$16} = bundle;
51384
51384
  const {
51385
51385
  isStringLiteral: isStringLiteral$9,
51386
- isIdentifier: isIdentifier$f,
51386
+ isIdentifier: isIdentifier$g,
51387
51387
  isIfStatement: isIfStatement$2,
51388
51388
  isStatement: isStatement$6,
51389
51389
  isForOfStatement: isForOfStatement$1,
@@ -51397,7 +51397,7 @@ const {
51397
51397
  const isParentProgram$1 = (path) => path.parentPath?.isProgram();
51398
51398
  const isParentBlock$3 = (path) => path.parentPath.isBlockStatement();
51399
51399
 
51400
- const isNext$p = (path) => {
51400
+ const isNext$q = (path) => {
51401
51401
  const next = path.getNextSibling();
51402
51402
 
51403
51403
  if (!next.node)
@@ -51411,8 +51411,8 @@ const isPrev$1 = (path) => {
51411
51411
  return next.node;
51412
51412
  };
51413
51413
 
51414
- const isNextParent$5 = (path) => isNext$p(path.parentPath);
51415
- const isLast$d = (path) => isParentProgram$1(path) && !isNext$p(path);
51414
+ const isNextParent$5 = (path) => isNext$q(path.parentPath);
51415
+ const isLast$d = (path) => isParentProgram$1(path) && !isNext$q(path);
51416
51416
 
51417
51417
  is$3.isNextObject = (a) => a
51418
51418
  .getNextSibling()
@@ -51426,7 +51426,7 @@ is$3.isFirst = (path) => path.node === path.parentPath.node.body?.[0];
51426
51426
  is$3.isPrevBody = (path) => path
51427
51427
  .getPrevSibling()
51428
51428
  .isBlockStatement();
51429
- is$3.isNext = isNext$p;
51429
+ is$3.isNext = isNext$q;
51430
51430
  is$3.isPrev = isPrev$1;
51431
51431
  is$3.isNextParent = isNextParent$5;
51432
51432
  is$3.isParentProgram = isParentProgram$1;
@@ -51455,7 +51455,7 @@ function isCoupleLines$9(path) {
51455
51455
  is$3.exists = (a) => a.node;
51456
51456
  is$3.isStringAndIdentifier = isStringAndIdentifier$2;
51457
51457
  function isStringAndIdentifier$2([a, b]) {
51458
- return isStringLiteral$9(a) && isIdentifier$f(b);
51458
+ return isStringLiteral$9(a) && isIdentifier$g(b);
51459
51459
  }
51460
51460
 
51461
51461
  const checkObject = (elements) => {
@@ -51488,11 +51488,11 @@ is$3.isSimpleAndNotEmptyObject = (elements) => {
51488
51488
  };
51489
51489
 
51490
51490
  is$3.isIdentifierAndIdentifier = ([a, b]) => {
51491
- return isIdentifier$f(a) && isIdentifier$f(b);
51491
+ return isIdentifier$g(a) && isIdentifier$g(b);
51492
51492
  };
51493
51493
 
51494
51494
  is$3.isStringAndMember = ([a, b]) => isStringLiteral$9(a) && isMemberExpression$7(b);
51495
- is$3.isIdentifierAndString = ([a, b]) => isIdentifier$f(a) && isStringLiteral$9(b);
51495
+ is$3.isIdentifierAndString = ([a, b]) => isIdentifier$g(a) && isStringLiteral$9(b);
51496
51496
  is$3.isStringAndArray = ([a, b]) => {
51497
51497
  if (!isStringLiteral$9(a))
51498
51498
  return false;
@@ -51571,14 +51571,14 @@ const WATER_MARK_BEFORE = '__putout_newline_before';
51571
51571
  const WATER_MARK_AFTER = '__putout_newline_after';
51572
51572
 
51573
51573
  mark.markBefore = markBefore$2;
51574
- mark.markAfter = markAfter$b;
51575
- mark.maybeMarkAfter = (a, path) => a && markAfter$b(path);
51574
+ mark.markAfter = markAfter$c;
51575
+ mark.maybeMarkAfter = (a, path) => a && markAfter$c(path);
51576
51576
 
51577
51577
  function markBefore$2(path) {
51578
51578
  path[WATER_MARK_BEFORE] = true;
51579
51579
  }
51580
51580
 
51581
- function markAfter$b(path) {
51581
+ function markAfter$c(path) {
51582
51582
  path[WATER_MARK_AFTER] = true;
51583
51583
  }
51584
51584
 
@@ -51981,7 +51981,7 @@ const {
51981
51981
  isUnaryExpression,
51982
51982
  isIfStatement: isIfStatement$1,
51983
51983
  isCallExpression: isCallExpression$8,
51984
- isIdentifier: isIdentifier$e,
51984
+ isIdentifier: isIdentifier$f,
51985
51985
  } = types$14;
51986
51986
 
51987
51987
  const isArgOfCall = (path) => path.parentPath?.isCallExpression() && path.parentPath.get('arguments.0') === path;
@@ -51991,10 +51991,10 @@ const isExcludedFromChain = satisfy$2([isUnaryExpression, isIfStatement$1]);
51991
51991
  const hasComment = ({type}) => type === 'CommentLine';
51992
51992
 
51993
51993
  const isInsideMemberCall = (path) => {
51994
- if (!isIdentifier$e(path.node.object))
51994
+ if (!isIdentifier$f(path.node.object))
51995
51995
  return false;
51996
51996
 
51997
- if (!isIdentifier$e(path.node.property))
51997
+ if (!isIdentifier$f(path.node.property))
51998
51998
  return false;
51999
51999
 
52000
52000
  return isCallExpression$8(path.parentPath.parentPath);
@@ -52060,7 +52060,7 @@ const {types: types$13} = bundle;
52060
52060
  const {
52061
52061
  isLast: isLast$c,
52062
52062
  isCoupleLines: isCoupleLines$8,
52063
- isNext: isNext$o,
52063
+ isNext: isNext$p,
52064
52064
  } = is$3;
52065
52065
 
52066
52066
  const {isLooksLikeChain: isLooksLikeChain$3} = isLooksLikeChain$4;
@@ -52195,7 +52195,7 @@ parseTrailingComments$2.parseTrailingComments = (path, printer, semantics, {curr
52195
52195
  }
52196
52196
 
52197
52197
  if (hasBody$1(path)) {
52198
- maybe.write.breakline(!isNext$o(path));
52198
+ maybe.write.breakline(!isNext$p(path));
52199
52199
  maybe.write.breakline(!n);
52200
52200
  }
52201
52201
 
@@ -52231,7 +52231,7 @@ function isPrevCall(path) {
52231
52231
 
52232
52232
  var parseComments$8 = {};
52233
52233
 
52234
- const {isNext: isNext$n} = is$3;
52234
+ const {isNext: isNext$o} = is$3;
52235
52235
 
52236
52236
  parseComments$8.parseComments = (path, {write, maybe}, semantics) => {
52237
52237
  if (!semantics.comments)
@@ -52247,7 +52247,7 @@ parseComments$8.parseComments = (path, {write, maybe}, semantics) => {
52247
52247
 
52248
52248
  for (const [i, {type, value}] of comments.entries()) {
52249
52249
  if (type === 'CommentLine') {
52250
- maybe.write.breakline(isNext$n(path) || !program);
52250
+ maybe.write.breakline(isNext$o(path) || !program);
52251
52251
  write('//');
52252
52252
  write(value);
52253
52253
 
@@ -52435,8 +52435,8 @@ arrowFunctionExpression.ArrowFunctionExpression = maybeParens$d((path, printer,
52435
52435
  var functionDeclaration = {};
52436
52436
 
52437
52437
  const {types: types$12} = bundle;
52438
- const {markAfter: markAfter$a} = mark;
52439
- const {isNext: isNext$m, isNextParent: isNextParent$4} = is$3;
52438
+ const {markAfter: markAfter$b} = mark;
52439
+ const {isNext: isNext$n, isNextParent: isNextParent$4} = is$3;
52440
52440
  const {printParams: printParams$b} = params;
52441
52441
 
52442
52442
  const not = (fn) => (...a) => !fn(...a);
@@ -52487,13 +52487,13 @@ functionDeclaration.FunctionDeclaration = {
52487
52487
  print.space();
52488
52488
  print('__body');
52489
52489
  },
52490
- afterSatisfy: () => [isNext$m, isNextParent$4, isInsideBlockStatement],
52490
+ afterSatisfy: () => [isNext$n, isNextParent$4, isInsideBlockStatement],
52491
52491
  after(path, {indent, maybe}) {
52492
- if (isNextAssign$1(path) || isNextFunction(path) || isNext$m(path))
52492
+ if (isNextAssign$1(path) || isNextFunction(path) || isNext$n(path))
52493
52493
  indent();
52494
52494
 
52495
52495
  maybe.write.newline(notInsideExportDefaultWithBody(path));
52496
- markAfter$a(path);
52496
+ markAfter$b(path);
52497
52497
  },
52498
52498
  };
52499
52499
 
@@ -52688,7 +52688,7 @@ const createPrintSpace = ({isNewline, printer}) => () => {
52688
52688
  };
52689
52689
 
52690
52690
  const {
52691
- isNext: isNext$l,
52691
+ isNext: isNext$m,
52692
52692
  hasTrailingComment: hasTrailingComment$3,
52693
52693
  } = is$3;
52694
52694
 
@@ -52701,7 +52701,7 @@ const noTrailingCommentAndNext = (path) => {
52701
52701
  if (hasTrailingComment$3(path))
52702
52702
  return false;
52703
52703
 
52704
- return isNext$l(path);
52704
+ return isNext$m(path);
52705
52705
  };
52706
52706
 
52707
52707
  const ClassMethod$1 = {
@@ -52838,7 +52838,7 @@ functions$1.ObjectMethod = ObjectMethod;
52838
52838
 
52839
52839
  var unaryExpressions$1 = {};
52840
52840
 
52841
- const {isLast: isLast$b, isNext: isNext$k} = is$3;
52841
+ const {isLast: isLast$b, isNext: isNext$l} = is$3;
52842
52842
  const {maybeParens: maybeParens$b} = maybeParens$e;
52843
52843
 
52844
52844
  const isWord = (a) => /^(delete|typeof|void|throw)$/.test(a);
@@ -52881,7 +52881,7 @@ unaryExpressions$1.ThrowStatement = (path, {print, indent, maybe}) => {
52881
52881
 
52882
52882
  print(';');
52883
52883
  maybe.print.newline(!isLast$b(path));
52884
- maybe.print.breakline(isNext$k(path));
52884
+ maybe.print.breakline(isNext$l(path));
52885
52885
  };
52886
52886
 
52887
52887
  function printUnary(name, {print}) {
@@ -52957,8 +52957,8 @@ maybeDeclare$6.maybeDeclare = (visit) => (path, printer, semantics) => {
52957
52957
 
52958
52958
  const {types: types$11} = bundle;
52959
52959
 
52960
- const {isNext: isNext$j} = is$3;
52961
- const {markAfter: markAfter$9} = mark;
52960
+ const {isNext: isNext$k} = is$3;
52961
+ const {markAfter: markAfter$a} = mark;
52962
52962
 
52963
52963
  const {maybeDeclare: maybeDeclare$5} = maybeDeclare$6;
52964
52964
  const {parseComments: parseComments$5} = comment;
@@ -52969,12 +52969,12 @@ const isInsideTSModuleBlock = (path) => {
52969
52969
  };
52970
52970
 
52971
52971
  const {
52972
- isFunction: isFunction$6,
52972
+ isFunction: isFunction$7,
52973
52973
  isTSModuleBlock: isTSModuleBlock$2,
52974
52974
  } = types$11;
52975
52975
 
52976
52976
  const isInsideExport = ({parentPath}) => parentPath.isExportDeclaration();
52977
- const isFunctionLike = (path) => isFunction$6(path.parentPath.parentPath);
52977
+ const isFunctionLike = (path) => isFunction$7(path.parentPath.parentPath);
52978
52978
  const hasBody = ({node}) => node.body.body.length;
52979
52979
 
52980
52980
  const classVisitor = maybeDecorators$2((path, printer, semantics) => {
@@ -53044,7 +53044,7 @@ _class.ClassDeclaration = {
53044
53044
  if (isFunctionLike(path))
53045
53045
  return true;
53046
53046
 
53047
- if (isNext$j(path))
53047
+ if (isNext$k(path))
53048
53048
  return true;
53049
53049
 
53050
53050
  return isInsideTSModuleBlock(path);
@@ -53054,7 +53054,7 @@ _class.ClassDeclaration = {
53054
53054
 
53055
53055
  if (!isFunctionLike(path) && hasBody(path)) {
53056
53056
  write.newline();
53057
- markAfter$9(path);
53057
+ markAfter$a(path);
53058
53058
  }
53059
53059
  },
53060
53060
  };
@@ -53251,7 +53251,7 @@ const {types: types$_} = bundle;
53251
53251
  const {
53252
53252
  isArrayExpression: isArrayExpression$7,
53253
53253
  isCallExpression: isCallExpression$6,
53254
- isIdentifier: isIdentifier$d,
53254
+ isIdentifier: isIdentifier$e,
53255
53255
  } = types$_;
53256
53256
 
53257
53257
  isThirdObjectInsideArray$1.isThirdObjectInsideArray = ({parentPath}) => {
@@ -53260,7 +53260,7 @@ isThirdObjectInsideArray$1.isThirdObjectInsideArray = ({parentPath}) => {
53260
53260
 
53261
53261
  const [, second] = parentPath.node.elements;
53262
53262
 
53263
- return isCallExpression$6(second) && !!isIdentifier$d(second);
53263
+ return isCallExpression$6(second) && !!isIdentifier$e(second);
53264
53264
  };
53265
53265
 
53266
53266
  const {types: types$Z} = bundle;
@@ -53538,9 +53538,9 @@ objectProperty$3.ObjectProperty = (path, printer, semantics) => {
53538
53538
 
53539
53539
  var objectPattern$1 = {};
53540
53540
 
53541
- var wrongShortand = {};
53541
+ var wrongShorthand$1 = {};
53542
53542
 
53543
- wrongShortand.wrongShorthand = ({computed, isAssign, keyPath, valuePath}) => {
53543
+ wrongShorthand$1.wrongShorthand = ({computed, isAssign, keyPath, valuePath}) => {
53544
53544
  return !computed && !isAssign && keyPath.node.name !== valuePath.node.name;
53545
53545
  };
53546
53546
 
@@ -53597,14 +53597,14 @@ var moreThenMaxPropertiesLengthInOneLine$1 = {};
53597
53597
  const {types: types$V} = bundle;
53598
53598
  const {
53599
53599
  isAssignmentPattern: isAssignmentPattern$2,
53600
- isIdentifier: isIdentifier$c,
53600
+ isIdentifier: isIdentifier$d,
53601
53601
  } = types$V;
53602
53602
 
53603
53603
  function getLength(left, right) {
53604
- if (isIdentifier$c(left) && isIdentifier$c(right))
53604
+ if (isIdentifier$d(left) && isIdentifier$d(right))
53605
53605
  return left.name.length + right.name.length;
53606
53606
 
53607
- if (isIdentifier$c(left))
53607
+ if (isIdentifier$d(left))
53608
53608
  return left.name.length;
53609
53609
 
53610
53610
  return 0;
@@ -53623,7 +53623,7 @@ moreThenMaxPropertiesLengthInOneLine$1.moreThenMaxPropertiesLengthInOneLine = (p
53623
53623
  return true;
53624
53624
  }
53625
53625
 
53626
- if (!isIdentifier$c(key))
53626
+ if (!isIdentifier$d(key))
53627
53627
  continue;
53628
53628
 
53629
53629
  const {name} = key;
@@ -53642,6 +53642,7 @@ const {
53642
53642
  isAssignmentPattern: isAssignmentPattern$1,
53643
53643
  isArrayExpression: isArrayExpression$5,
53644
53644
  isObjectExpression: isObjectExpression$7,
53645
+ isIdentifier: isIdentifier$c,
53645
53646
  } = types$U;
53646
53647
 
53647
53648
  calculateLongAssignPattern.calculateAssigns = (property, semantics) => {
@@ -53659,12 +53660,17 @@ calculateLongAssignPattern.calculateAssigns = (property, semantics) => {
53659
53660
  calculateLongAssignPattern.isLongAssignPattern = isLongAssignPattern$1;
53660
53661
 
53661
53662
  function isLongAssignPattern$1(path, semantics) {
53662
- if (!isAssignmentPattern$1(path.node.value))
53663
+ const {key, value} = path.node;
53664
+
53665
+ if (!isAssignmentPattern$1(value))
53663
53666
  return false;
53664
53667
 
53668
+ if (!isIdentifier$c(key))
53669
+ return true;
53670
+
53665
53671
  const {maxPropertiesLengthInOneLine} = semantics;
53666
53672
 
53667
- return path.node.key.name.length > maxPropertiesLengthInOneLine;
53673
+ return key.name.length > maxPropertiesLengthInOneLine;
53668
53674
  }
53669
53675
 
53670
53676
  function isComplexObject(node) {
@@ -53675,7 +53681,7 @@ function isComplexObject(node) {
53675
53681
  }
53676
53682
 
53677
53683
  const {types: types$T} = bundle;
53678
- const {wrongShorthand} = wrongShortand;
53684
+ const {wrongShorthand} = wrongShorthand$1;
53679
53685
 
53680
53686
  const {
53681
53687
  isForOf: isForOf$2,
@@ -53699,17 +53705,17 @@ const {
53699
53705
  isIdentifier: isIdentifier$b,
53700
53706
  isAssignmentPattern,
53701
53707
  isVariableDeclarator: isVariableDeclarator$2,
53702
- isFunction: isFunction$5,
53708
+ isFunction: isFunction$6,
53703
53709
  isObjectPattern: isObjectPattern$2,
53704
53710
  isForOfStatement,
53705
53711
  isVariableDeclaration: isVariableDeclaration$3,
53706
53712
  } = types$T;
53707
53713
 
53708
53714
  const isInsideFn = (path) => {
53709
- if (isFunction$5(path.parentPath))
53715
+ if (isFunction$6(path.parentPath))
53710
53716
  return true;
53711
53717
 
53712
- return isFunction$5(path.parentPath.parentPath);
53718
+ return isFunction$6(path.parentPath.parentPath);
53713
53719
  };
53714
53720
 
53715
53721
  function isIndent(path) {
@@ -53901,6 +53907,17 @@ function hasAssign(properties) {
53901
53907
  return false;
53902
53908
  }
53903
53909
 
53910
+ function hasComputed(properties) {
53911
+ for (const prop of properties) {
53912
+ const {computed} = prop.node;
53913
+
53914
+ if (computed)
53915
+ return true;
53916
+ }
53917
+
53918
+ return false;
53919
+ }
53920
+
53904
53921
  function hasAssignObject(path, maxPropertiesLengthInOneLine) {
53905
53922
  const {parentPath} = path;
53906
53923
 
@@ -53954,6 +53971,9 @@ function shouldAddNewline(path, semantics) {
53954
53971
  maxPropertiesInOneLine,
53955
53972
  });
53956
53973
 
53974
+ if (hasComputed(properties))
53975
+ return COUPLE_LINES;
53976
+
53957
53977
  const fnParam = isFunctionParam(path);
53958
53978
 
53959
53979
  if (hasObjectPattern(properties))
@@ -54279,6 +54299,7 @@ const {
54279
54299
  isJSXIdentifier: isJSXIdentifier$2,
54280
54300
  isTSTypeReference: isTSTypeReference$2,
54281
54301
  isTSTypeParameter,
54302
+ isTSAsExpression,
54282
54303
  } = types$O;
54283
54304
 
54284
54305
  extract$6.extract = extract$5;
@@ -54325,6 +54346,9 @@ function extract$5(node) {
54325
54346
  if (isTSTypeParameter(node))
54326
54347
  return extract$5(node.name);
54327
54348
 
54349
+ if (isTSAsExpression(node))
54350
+ return extract$5(node.expression);
54351
+
54328
54352
  const nodeTypes = [
54329
54353
  'Literals',
54330
54354
  'Identifiers',
@@ -54337,6 +54361,7 @@ function extract$5(node) {
54337
54361
  'JSXAttribute',
54338
54362
  'JSXText',
54339
54363
  'TSTypeParameter',
54364
+ 'TSAsExpression',
54340
54365
  ].join(', ');
54341
54366
 
54342
54367
  throw Error(`'operator.extract(node)' understands only ${nodeTypes} and TSTypeReference🤷, found: ${node.type}`);
@@ -55538,7 +55563,7 @@ const {
55538
55563
  isSpreadElement,
55539
55564
  isStringLiteral: isStringLiteral$4,
55540
55565
  isIdentifier: isIdentifier$6,
55541
- isFunction: isFunction$4,
55566
+ isFunction: isFunction$5,
55542
55567
  isCallExpression: isCallExpression$3,
55543
55568
  isObjectProperty,
55544
55569
  } = types$H;
@@ -55561,7 +55586,7 @@ const isSpreadBeforeObject = (a) => {
55561
55586
  if (argCall.isCallExpression()) {
55562
55587
  const [first] = argCall.get('arguments');
55563
55588
 
55564
- if (isFunction$4(first))
55589
+ if (isFunction$5(first))
55565
55590
  return false;
55566
55591
  }
55567
55592
 
@@ -56217,7 +56242,7 @@ var isInsideAssignNextAssignFunction = {};
56217
56242
  const {types: types$E} = bundle;
56218
56243
  const {
56219
56244
  isExpressionStatement: isExpressionStatement$2,
56220
- isFunction: isFunction$3,
56245
+ isFunction: isFunction$4,
56221
56246
  isAssignmentExpression,
56222
56247
  } = types$E;
56223
56248
 
@@ -56229,7 +56254,7 @@ isInsideAssignNextAssignFunction.isInsideAssignNextAssignFunction = (path) => {
56229
56254
 
56230
56255
  const next = path.getNextSibling();
56231
56256
 
56232
- if (isFunction$3(next) && next.node.leadingComments)
56257
+ if (isFunction$4(next) && next.node.leadingComments)
56233
56258
  return true;
56234
56259
 
56235
56260
  if (!isExpressionStatement$2(next))
@@ -56243,7 +56268,7 @@ isInsideAssignNextAssignFunction.isInsideAssignNextAssignFunction = (path) => {
56243
56268
  if (!isAssignmentExpression(next.node.expression))
56244
56269
  return false;
56245
56270
 
56246
- return isFunction$3(next.node.expression.right);
56271
+ return isFunction$4(next.node.expression.right);
56247
56272
  };
56248
56273
 
56249
56274
  var expressionStatementComments = {};
@@ -56513,7 +56538,7 @@ maybeSpaceAfterKeyword$3.maybeSpaceAfterKeyword = (path, {write}) => {
56513
56538
 
56514
56539
  const {types: types$C} = bundle;
56515
56540
  const {
56516
- isNext: isNext$i,
56541
+ isNext: isNext$j,
56517
56542
  isCoupleLines: isCoupleLines$3,
56518
56543
  isNewlineBetweenSiblings: isNewlineBetweenSiblings$1,
56519
56544
  exists: exists$7,
@@ -56599,7 +56624,7 @@ variableDeclaration.VariableDeclaration = {
56599
56624
  wasNewline = true;
56600
56625
  }
56601
56626
 
56602
- if (isParentBlock$2(path) && isNext$i(path) && (noTrailingComment$1(path) || isNewlineBetweenSiblings$1(path))) {
56627
+ if (isParentBlock$2(path) && isNext$j(path) && (noTrailingComment$1(path) || isNewlineBetweenSiblings$1(path))) {
56603
56628
  write.newline();
56604
56629
  wasNewline = true;
56605
56630
  }
@@ -56631,7 +56656,7 @@ variableDeclaration.VariableDeclaration = {
56631
56656
  };
56632
56657
 
56633
56658
  function noNextParentBlock(path) {
56634
- if (isNext$i(path))
56659
+ if (isNext$j(path))
56635
56660
  return false;
56636
56661
 
56637
56662
  return path.parentPath.isBlockStatement();
@@ -56677,7 +56702,7 @@ function isNextCoupleLines(path) {
56677
56702
  return isCoupleLines$3(next);
56678
56703
  }
56679
56704
 
56680
- const isLast$a = (path) => path.parentPath?.isProgram() && !isNext$i(path);
56705
+ const isLast$a = (path) => path.parentPath?.isProgram() && !isNext$j(path);
56681
56706
 
56682
56707
  function shouldAddNewlineBefore(path) {
56683
56708
  if (isFirst$1(path))
@@ -56729,10 +56754,10 @@ var ifStatement = {};
56729
56754
 
56730
56755
  const {types: types$B} = bundle;
56731
56756
 
56732
- const {markAfter: markAfter$8} = mark;
56757
+ const {markAfter: markAfter$9} = mark;
56733
56758
  const {
56734
56759
  exists: exists$6,
56735
- isNext: isNext$h,
56760
+ isNext: isNext$i,
56736
56761
  isInsideIf: isInsideIf$2,
56737
56762
  } = is$3;
56738
56763
 
@@ -56828,7 +56853,7 @@ ifStatement.IfStatement = {
56828
56853
  indent.dec();
56829
56854
  }
56830
56855
 
56831
- if (!isNext$h(path) && !consequent.isBlockStatement())
56856
+ if (!isNext$i(path) && !consequent.isBlockStatement())
56832
56857
  return;
56833
56858
 
56834
56859
  const nextPath = path.parentPath.getNextSibling();
@@ -56839,10 +56864,10 @@ ifStatement.IfStatement = {
56839
56864
  if (isLastEmptyInsideBody(path))
56840
56865
  print.newline();
56841
56866
  },
56842
- afterSatisfy: () => [isNext$h],
56867
+ afterSatisfy: () => [isNext$i],
56843
56868
  after: (path, {print}) => {
56844
56869
  print.linebreak();
56845
- markAfter$8(path);
56870
+ markAfter$9(path);
56846
56871
  },
56847
56872
  };
56848
56873
 
@@ -56850,14 +56875,14 @@ var forOfStatement = {};
56850
56875
 
56851
56876
  const {
56852
56877
  hasPrevNewline: hasPrevNewline$2,
56853
- markAfter: markAfter$7,
56878
+ markAfter: markAfter$8,
56854
56879
  markBefore,
56855
56880
  isMarkedAfter: isMarkedAfter$1,
56856
56881
  } = mark;
56857
56882
 
56858
56883
  const {
56859
56884
  isFirst,
56860
- isNext: isNext$g,
56885
+ isNext: isNext$h,
56861
56886
  isLast: isLast$9,
56862
56887
  } = is$3;
56863
56888
 
@@ -56894,7 +56919,7 @@ forOfStatement.ForOfStatement = {
56894
56919
  print('__body');
56895
56920
 
56896
56921
  const {length} = bodyPath.node.body;
56897
- maybe.print.newline(!length && !isLast$9(path) && !isNext$g(path));
56922
+ maybe.print.newline(!length && !isLast$9(path) && !isNext$h(path));
56898
56923
 
56899
56924
  return;
56900
56925
  }
@@ -56906,10 +56931,10 @@ forOfStatement.ForOfStatement = {
56906
56931
 
56907
56932
  maybe.markAfter(isMarkedAfter$1(bodyPath), path);
56908
56933
  },
56909
- afterIf: isNext$g,
56934
+ afterIf: isNext$h,
56910
56935
  after(path, {print}) {
56911
56936
  print.linebreak();
56912
- markAfter$7(path);
56937
+ markAfter$8(path);
56913
56938
  },
56914
56939
  };
56915
56940
 
@@ -56986,14 +57011,14 @@ function isTopCall(path) {
56986
57011
 
56987
57012
  const {types: types$z} = bundle;
56988
57013
  const {
56989
- isNext: isNext$f,
57014
+ isNext: isNext$g,
56990
57015
  isParentProgram,
56991
57016
  isLast: isLast$8,
56992
57017
  exists: exists$4,
56993
57018
  satisfy: satisfy$1,
56994
57019
  } = is$3;
56995
57020
 
56996
- const {markAfter: markAfter$6} = mark;
57021
+ const {markAfter: markAfter$7} = mark;
56997
57022
  const {parseComments: parseComments$3} = comment;
56998
57023
  const {insideIfWithNoBody} = insideIfWithNoBody$1;
56999
57024
  const {getDirectives: getDirectives$1} = getDirectives$2;
@@ -57081,20 +57106,20 @@ blockStatement.BlockStatement = {
57081
57106
  const {parentPath} = path;
57082
57107
 
57083
57108
  if (isObjectMethod(parentPath))
57084
- maybe.write(isNext$f(parentPath) || trailingComma, ',');
57109
+ maybe.write(isNext$g(parentPath) || trailingComma, ',');
57085
57110
  },
57086
57111
  afterIf: shouldAddNewlineAfter,
57087
57112
  after(path, {write}) {
57088
57113
  write.newline();
57089
- markAfter$6(path.parentPath);
57114
+ markAfter$7(path.parentPath);
57090
57115
  },
57091
57116
  };
57092
57117
 
57093
57118
  const isTopLevelWithNoNext = (path) => {
57094
- if (isNext$f(path))
57119
+ if (isNext$g(path))
57095
57120
  return false;
57096
57121
 
57097
- return !isNext$f(path.parentPath) && isParentProgram(path.parentPath);
57122
+ return !isNext$g(path.parentPath) && isParentProgram(path.parentPath);
57098
57123
  };
57099
57124
 
57100
57125
  const isInsideIfWithoutElseInsideFn = (path) => {
@@ -57103,7 +57128,7 @@ const isInsideIfWithoutElseInsideFn = (path) => {
57103
57128
 
57104
57129
  const isEmptyBodyNoNext = (path) => {
57105
57130
  const {parentPath} = path;
57106
- return parentPath.isStatement() && !path.node.body.length && !isNext$f(parentPath);
57131
+ return parentPath.isStatement() && !path.node.body.length && !isNext$g(parentPath);
57107
57132
  };
57108
57133
 
57109
57134
  const isLooksLikeInsideFn = ({parentPath}) => {
@@ -57157,7 +57182,7 @@ function isExportFunction(path) {
57157
57182
  if (!isExportDeclaration$2(path.parentPath?.parentPath))
57158
57183
  return false;
57159
57184
 
57160
- return !isNext$f(path.parentPath?.parentPath);
57185
+ return !isNext$g(path.parentPath?.parentPath);
57161
57186
  }
57162
57187
 
57163
57188
  function isNextIfAlternate(path) {
@@ -57214,7 +57239,7 @@ maybeSpaceAfterKeyword$1.maybeSpaceAfterKeyword = (path, {print}, semantics) =>
57214
57239
 
57215
57240
  const {types: types$y} = bundle;
57216
57241
 
57217
- const {isInsideLabel: isInsideLabel$3} = is$3;
57242
+ const {isInsideLabel: isInsideLabel$4} = is$3;
57218
57243
  const {
57219
57244
  isPrevBody,
57220
57245
  noTrailingComment,
@@ -57239,7 +57264,7 @@ returnStatement.ReturnStatement = {
57239
57264
  print(path, printer, semantics) {
57240
57265
  const {maybe, print} = printer;
57241
57266
 
57242
- maybe.indent(!isInsideLabel$3(path));
57267
+ maybe.indent(!isInsideLabel$4(path));
57243
57268
  print('return');
57244
57269
  maybeSpaceAfterKeyword(path, printer, semantics);
57245
57270
 
@@ -57284,7 +57309,7 @@ function isJSXWithComment(path) {
57284
57309
 
57285
57310
  var tryStatements = {};
57286
57311
 
57287
- const {isNext: isNext$e} = is$3;
57312
+ const {isNext: isNext$f} = is$3;
57288
57313
 
57289
57314
  tryStatements.TryStatement = {
57290
57315
  print(path, {print}) {
@@ -57303,7 +57328,7 @@ tryStatements.TryStatement = {
57303
57328
  print.newline();
57304
57329
  }
57305
57330
  },
57306
- afterSatisfy: () => [isNext$e],
57331
+ afterSatisfy: () => [isNext$f],
57307
57332
  after(path, {maybe, print}) {
57308
57333
  maybe.print.newline(!path.node.finalizer);
57309
57334
  print.breakline();
@@ -57336,7 +57361,7 @@ function isInsideBlock$1(path) {
57336
57361
 
57337
57362
  var debuggerStatement = {};
57338
57363
 
57339
- const {isNext: isNext$d, isInsideIf: isInsideIf$1} = is$3;
57364
+ const {isNext: isNext$e, isInsideIf: isInsideIf$1} = is$3;
57340
57365
  const isInsideBlock = (path) => path.parentPath.isBlockStatement();
57341
57366
 
57342
57367
  debuggerStatement.DebuggerStatement = {
@@ -57345,7 +57370,7 @@ debuggerStatement.DebuggerStatement = {
57345
57370
  print('debugger;');
57346
57371
  },
57347
57372
  afterSatisfy: () => [
57348
- isNext$d,
57373
+ isNext$e,
57349
57374
  isInsideBlock,
57350
57375
  isInsideIf$1,
57351
57376
  ],
@@ -57356,19 +57381,20 @@ debuggerStatement.DebuggerStatement = {
57356
57381
 
57357
57382
  var forStatement = {};
57358
57383
 
57384
+ const {isInsideLabel: isInsideLabel$3} = is$3;
57359
57385
  const {exists: exists$3} = is$3;
57360
57386
 
57361
- const {markAfter: markAfter$5} = mark;
57387
+ const {markAfter: markAfter$6} = mark;
57362
57388
 
57363
57389
  forStatement.ForStatement = {
57364
- print(path, {print, maybe, indent}) {
57390
+ print(path, {print, maybe}) {
57365
57391
  const {
57366
57392
  test,
57367
57393
  update,
57368
57394
  body,
57369
57395
  } = path.node;
57370
57396
 
57371
- indent();
57397
+ maybe.indent(!isInsideLabel$3(path));
57372
57398
  print('for');
57373
57399
  print.space();
57374
57400
  print('(');
@@ -57398,7 +57424,7 @@ forStatement.ForStatement = {
57398
57424
  },
57399
57425
  after(path, {print}) {
57400
57426
  print.linebreak();
57401
- markAfter$5(path);
57427
+ markAfter$6(path);
57402
57428
  },
57403
57429
  };
57404
57430
 
@@ -57648,7 +57674,7 @@ const {types: types$w} = bundle;
57648
57674
 
57649
57675
  const {isParentBlock: isParentBlock$1} = is$3;
57650
57676
  const {
57651
- markAfter: markAfter$4,
57677
+ markAfter: markAfter$5,
57652
57678
  isMarkedAfter,
57653
57679
  hasPrevNewline,
57654
57680
  } = mark;
@@ -57656,7 +57682,7 @@ const {
57656
57682
  const {
57657
57683
  isNewlineBetweenSiblings,
57658
57684
  exists: exists$2,
57659
- isNext: isNext$c,
57685
+ isNext: isNext$d,
57660
57686
  isLast: isLast$6,
57661
57687
  } = is$3;
57662
57688
 
@@ -57769,7 +57795,7 @@ exportDeclaration.ExportNamedDeclaration = {
57769
57795
  }
57770
57796
 
57771
57797
  print(';');
57772
- maybe.print.newline(isNext$c(path) || isInsideNamespace$1(path));
57798
+ maybe.print.newline(isNext$d(path) || isInsideNamespace$1(path));
57773
57799
 
57774
57800
  return;
57775
57801
  }
@@ -57797,7 +57823,7 @@ exportDeclaration.ExportNamedDeclaration = {
57797
57823
 
57798
57824
  print.newline();
57799
57825
 
57800
- markAfter$4(path);
57826
+ markAfter$5(path);
57801
57827
  },
57802
57828
  };
57803
57829
 
@@ -57818,8 +57844,8 @@ exportAllDeclaration.ExportAllDeclaration = (path, {print}) => {
57818
57844
 
57819
57845
  var whileStatement = {};
57820
57846
 
57821
- const {isNext: isNext$b} = is$3;
57822
- const {markAfter: markAfter$3} = mark;
57847
+ const {isNext: isNext$c} = is$3;
57848
+ const {markAfter: markAfter$4} = mark;
57823
57849
 
57824
57850
  whileStatement.WhileStatement = {
57825
57851
  print(path, {print, indent}) {
@@ -57841,18 +57867,18 @@ whileStatement.WhileStatement = {
57841
57867
  }
57842
57868
  },
57843
57869
  afterIf(path) {
57844
- return isNext$b(path);
57870
+ return isNext$c(path);
57845
57871
  },
57846
57872
  after(path, {print}) {
57847
57873
  print.linebreak();
57848
- markAfter$3(path);
57874
+ markAfter$4(path);
57849
57875
  },
57850
57876
  };
57851
57877
 
57852
57878
  var switchStatement = {};
57853
57879
 
57854
57880
  const {
57855
- isNext: isNext$a,
57881
+ isNext: isNext$b,
57856
57882
  exists: exists$1,
57857
57883
  isLast: isLast$5,
57858
57884
  } = is$3;
@@ -57918,10 +57944,10 @@ switchStatement.SwitchStatement = {
57918
57944
  print.indent();
57919
57945
  print('}');
57920
57946
 
57921
- if (!isNext$a(path) && !isLast$5(path))
57947
+ if (!isNext$b(path) && !isLast$5(path))
57922
57948
  print.newline();
57923
57949
  },
57924
- afterSatisfy: () => [isNext$a],
57950
+ afterSatisfy: () => [isNext$b],
57925
57951
  after(path, {print}) {
57926
57952
  print.breakline();
57927
57953
  print.newline();
@@ -57949,11 +57975,11 @@ forInStatement.ForInStatement = (path, {print, indent}) => {
57949
57975
  var exportDefaultDeclaration = {};
57950
57976
 
57951
57977
  const {types: types$v} = bundle;
57952
- const {isNext: isNext$9} = is$3;
57978
+ const {isNext: isNext$a} = is$3;
57953
57979
 
57954
57980
  const {
57955
57981
  isVariableDeclaration: isVariableDeclaration$1,
57956
- isFunction: isFunction$2,
57982
+ isFunction: isFunction$3,
57957
57983
  } = types$v;
57958
57984
 
57959
57985
  function shouldAddSemicolon(path) {
@@ -57970,7 +57996,7 @@ exportDefaultDeclaration.ExportDefaultDeclaration = {
57970
57996
  traverse(declaration);
57971
57997
  maybe.print(shouldAddSemicolon(declaration), ';');
57972
57998
  },
57973
- afterSatisfy: () => [isNext$9],
57999
+ afterSatisfy: () => [isNext$a],
57974
58000
  after(path, {print, maybe}) {
57975
58001
  print.newline();
57976
58002
  maybe.print.newline(!isVarAfterFn(path));
@@ -57985,7 +58011,7 @@ function isVarAfterFn(path) {
57985
58011
 
57986
58012
  const {declaration} = path.node;
57987
58013
 
57988
- return isFunction$2(declaration);
58014
+ return isFunction$3(declaration);
57989
58015
  }
57990
58016
 
57991
58017
  var breakStatement = {};
@@ -58118,6 +58144,39 @@ emptyStatement.EmptyStatement = (path, {write, maybe}) => {
58118
58144
  maybe.write.newline(!isLast$3(path) && !isLast$3(parentPath));
58119
58145
  };
58120
58146
 
58147
+ var withStatement = {};
58148
+
58149
+ const {isNext: isNext$9} = is$3;
58150
+ const {markAfter: markAfter$3} = mark;
58151
+
58152
+ withStatement.WithStatement = {
58153
+ print(path, {print, indent}) {
58154
+ indent();
58155
+ print('with');
58156
+ print.space();
58157
+ print('(');
58158
+ print('__object');
58159
+ print(')');
58160
+
58161
+ if (path.node.body.body) {
58162
+ print.space();
58163
+ print('__body');
58164
+ } else {
58165
+ indent.inc();
58166
+ print.newline();
58167
+ print('__body');
58168
+ indent.dec();
58169
+ }
58170
+ },
58171
+ afterIf(path) {
58172
+ return isNext$9(path);
58173
+ },
58174
+ after(path, {print}) {
58175
+ print.linebreak();
58176
+ markAfter$3(path);
58177
+ },
58178
+ };
58179
+
58121
58180
  const {ExpressionStatement} = expressionStatementExports;
58122
58181
  const {VariableDeclaration} = variableDeclaration;
58123
58182
  const {IfStatement} = ifStatement;
@@ -58141,6 +58200,7 @@ const {Program} = program$1;
58141
58200
  const {ContinueStatement} = continueStatement;
58142
58201
  const {LabeledStatement} = labeledStatement;
58143
58202
  const {EmptyStatement} = emptyStatement;
58203
+ const {WithStatement} = withStatement;
58144
58204
 
58145
58205
  const {
58146
58206
  ExportNamespaceSpecifier,
@@ -58177,18 +58237,19 @@ var statements$2 = {
58177
58237
  BreakStatement,
58178
58238
  ContinueStatement,
58179
58239
  WhileStatement,
58240
+ WithStatement,
58180
58241
  };
58181
58242
 
58182
58243
  var templateLiteral = {};
58183
58244
 
58184
- templateLiteral.TemplateLiteral = (path, {write, traverse}) => {
58245
+ var writeTemplateLiteral$2 = {};
58246
+
58247
+ writeTemplateLiteral$2.writeTemplateLiteral = (quasis, expressions, {write, traverse}) => {
58185
58248
  write('`');
58186
-
58187
58249
  let i = 0;
58188
- const expressions = path.get('expressions');
58189
58250
 
58190
- for (const element of path.node.quasis) {
58191
- write(element.value.raw);
58251
+ for (const element of quasis) {
58252
+ write(element.node.value.raw);
58192
58253
 
58193
58254
  const exp = expressions[i++];
58194
58255
 
@@ -58202,6 +58263,15 @@ templateLiteral.TemplateLiteral = (path, {write, traverse}) => {
58202
58263
  write('`');
58203
58264
  };
58204
58265
 
58266
+ const {writeTemplateLiteral: writeTemplateLiteral$1} = writeTemplateLiteral$2;
58267
+
58268
+ templateLiteral.TemplateLiteral = (path, printer) => {
58269
+ const expressions = path.get('expressions');
58270
+ const quasis = path.get('quasis');
58271
+
58272
+ writeTemplateLiteral$1(quasis, expressions, printer);
58273
+ };
58274
+
58205
58275
  var identifier$2 = {};
58206
58276
 
58207
58277
  var maybeGet = {};
@@ -58572,12 +58642,10 @@ tsTypeParameter.TSTypeParameter = (path, {write, traverse}) => {
58572
58642
 
58573
58643
  write(path.node.name.name);
58574
58644
 
58575
- if (!exists(constraint))
58576
- return;
58577
-
58578
- write(' extends ');
58579
-
58580
- traverse(constraint);
58645
+ if (exists(constraint)) {
58646
+ write(' extends ');
58647
+ traverse(constraint);
58648
+ }
58581
58649
 
58582
58650
  const defaultPath = path.get('default');
58583
58651
 
@@ -59281,6 +59349,24 @@ tsParenthesizedType$2.TSParenthesizedType = (path, {print}) => {
59281
59349
  print(')');
59282
59350
  };
59283
59351
 
59352
+ var tsTemplateLiteralType = {};
59353
+
59354
+ const {writeTemplateLiteral} = writeTemplateLiteral$2;
59355
+
59356
+ tsTemplateLiteralType.TSTemplateLiteralType = (path, printer) => {
59357
+ const quasis = path.get('quasis');
59358
+ const types = path.get('types');
59359
+
59360
+ writeTemplateLiteral(quasis, types, printer);
59361
+ };
59362
+
59363
+ var tsOptionalType = {};
59364
+
59365
+ tsOptionalType.TSOptionalType = (path, {print}) => {
59366
+ print('__typeAnnotation');
59367
+ print('?');
59368
+ };
59369
+
59284
59370
  const {isNext: isNext$1} = is$3;
59285
59371
  const {TSTypeLiteral} = tsTypeLiteral;
59286
59372
  const {TSTypeAliasDeclaration} = tsTypeAliasDeclaration;
@@ -59320,6 +59406,8 @@ const {TSInferType} = tsInferType;
59320
59406
  const {TSParameterProperty} = tsParameterPropertyExports;
59321
59407
  const {TSTypeQuery} = tsTypeQuery;
59322
59408
  const {TSParenthesizedType} = tsParenthesizedType$2;
59409
+ const {TSTemplateLiteralType} = tsTemplateLiteralType;
59410
+ const {TSOptionalType} = tsOptionalType;
59323
59411
 
59324
59412
  var typescript$2 = {
59325
59413
  TSAsExpression,
@@ -59336,6 +59424,8 @@ var typescript$2 = {
59336
59424
  TSImportType,
59337
59425
  TSUnionType,
59338
59426
  TSTypeQuery,
59427
+ TSTemplateLiteralType,
59428
+ TSOptionalType,
59339
59429
  TSBigIntKeyword(path, {write}) {
59340
59430
  write('bigint');
59341
59431
  },
@@ -59496,7 +59586,13 @@ var typescript$2 = {
59496
59586
  var jsxElement = {};
59497
59587
 
59498
59588
  const {types: types$r} = bundle;
59499
- const {isJSXElement: isJSXElement$2} = types$r;
59589
+ const {
59590
+ isJSXElement: isJSXElement$2,
59591
+ isJSXExpressionContainer,
59592
+ isFunction: isFunction$2,
59593
+ isJSXSpreadAttribute,
59594
+ } = types$r;
59595
+
59500
59596
  const isInsideArrow = ({parentPath}) => parentPath.isArrowFunctionExpression();
59501
59597
 
59502
59598
  jsxElement.JSXElement = {
@@ -59556,10 +59652,29 @@ function condition$1(path) {
59556
59652
  return path.parentPath.isVariableDeclarator();
59557
59653
  }
59558
59654
 
59559
- function isNeedIndent(path) {
59560
- const attributesCount = path.node.openingElement.attributes.length;
59655
+ function hasComplexAttribute(path) {
59656
+ const {attributes} = path.node.openingElement;
59657
+
59658
+ for (const attribute of attributes) {
59659
+ const {value} = attribute;
59660
+
59661
+ if (isJSXSpreadAttribute(attribute))
59662
+ return true;
59663
+
59664
+ if (!isJSXExpressionContainer(value))
59665
+ continue;
59666
+
59667
+ const {expression} = value;
59668
+
59669
+ if (isFunction$2(expression))
59670
+ return true;
59671
+ }
59561
59672
 
59562
- if (attributesCount > 2)
59673
+ return false;
59674
+ }
59675
+
59676
+ function isNeedIndent(path) {
59677
+ if (hasComplexAttribute(path))
59563
59678
  return false;
59564
59679
 
59565
59680
  const insideFn = path.parentPath.isArrowFunctionExpression();
@@ -61490,7 +61605,6 @@ babel$1.parse = function babelParse(source, overrides) {
61490
61605
  const parserOptions = {
61491
61606
  sourceFileName,
61492
61607
  sourceType: 'module',
61493
- tokens: true,
61494
61608
  ...options,
61495
61609
  errorRecovery: isRecovery,
61496
61610
  plugins: clean([
@@ -61506,6 +61620,7 @@ babel$1.parse = function babelParse(source, overrides) {
61506
61620
  if (printer === 'babel')
61507
61621
  assign$5(parserOptions, {
61508
61622
  createParenthesizedExpressions: true,
61623
+ tokens: true,
61509
61624
  });
61510
61625
 
61511
61626
  const ast = parse(source, parserOptions);
@@ -62772,7 +62887,7 @@ filterEnabledPlugins$2.filterEnabledPlugins = ({plugins, cookedRules}) => {
62772
62887
 
62773
62888
  const [status, currentPlugin] = maybeTuple(plugin);
62774
62889
 
62775
- if (!isExectRuleEnabled(name, status, cookedRules))
62890
+ if (!isExactRuleEnabled(name, status, cookedRules))
62776
62891
  continue;
62777
62892
 
62778
62893
  result.push(mergeRules(
@@ -62784,7 +62899,7 @@ filterEnabledPlugins$2.filterEnabledPlugins = ({plugins, cookedRules}) => {
62784
62899
  return result;
62785
62900
  };
62786
62901
 
62787
- function isExectRuleEnabled(name, status, rules) {
62902
+ function isExactRuleEnabled(name, status, rules) {
62788
62903
  if (status === 'on')
62789
62904
  return true;
62790
62905