@putout/bundle 3.18.2 → 3.18.4

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
@@ -47186,7 +47186,7 @@ function Identifier$1$1(node, parent, tokenContext, _inForInit, getRawIdentifier
47186
47186
  await: false
47187
47187
  });
47188
47188
  }
47189
- var parens$2 = /* @__PURE__ */ Object.freeze({
47189
+ var parens$1 = /* @__PURE__ */ Object.freeze({
47190
47190
  __proto__: null,
47191
47191
  ArrowFunctionExpression: ConditionalExpression$1,
47192
47192
  AssignmentExpression: AssignmentExpression$1,
@@ -47284,7 +47284,7 @@ function expandAliases(obj) {
47284
47284
  }
47285
47285
  return map;
47286
47286
  }
47287
- var expandedParens = expandAliases(parens$2);
47287
+ var expandedParens = expandAliases(parens$1);
47288
47288
  var expandedWhitespaceNodes = expandAliases(nodes);
47289
47289
  function isOrHasCallExpression(node) {
47290
47290
  if (isCallExpression$1$1(node)) {
@@ -58227,10 +58227,19 @@ var __setModuleDefault = Object.create ? (function(o, v) {
58227
58227
  o["default"] = v;
58228
58228
  };
58229
58229
 
58230
+ var ownKeys = function(o) {
58231
+ ownKeys = Object.getOwnPropertyNames || function (o) {
58232
+ var ar = [];
58233
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
58234
+ return ar;
58235
+ };
58236
+ return ownKeys(o);
58237
+ };
58238
+
58230
58239
  function __importStar(mod) {
58231
58240
  if (mod && mod.__esModule) return mod;
58232
58241
  var result = {};
58233
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
58242
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
58234
58243
  __setModuleDefault(result, mod);
58235
58244
  return result;
58236
58245
  }
@@ -79240,9 +79249,9 @@ function isOneArgArrow(path) {
79240
79249
  return param.type === 'Identifier';
79241
79250
  }
79242
79251
 
79243
- var parens$1 = {};
79252
+ var maybeParens$8 = {};
79244
79253
 
79245
- parens$1.maybeParens = (print) => ({
79254
+ maybeParens$8.maybeParens = (print) => ({
79246
79255
  condition(path) {
79247
79256
  return path.node.extra?.parenthesized;
79248
79257
  },
@@ -79257,7 +79266,7 @@ parens$1.maybeParens = (print) => ({
79257
79266
 
79258
79267
  const {exists: exists$e} = is$3;
79259
79268
  const {printParams: printParams$c} = params;
79260
- const {maybeParens: maybeParens$7} = parens$1;
79269
+ const {maybeParens: maybeParens$7} = maybeParens$8;
79261
79270
 
79262
79271
  arrowFunctionExpression.ArrowFunctionExpression = maybeParens$7((path, printer, semantics) => {
79263
79272
  const {
@@ -79515,7 +79524,7 @@ var functionExpression = {};
79515
79524
 
79516
79525
  const {exists: exists$d} = is$3;
79517
79526
  const {printParams: printParams$8} = params;
79518
- const {maybeParens: maybeParens$6} = parens$1;
79527
+ const {maybeParens: maybeParens$6} = maybeParens$8;
79519
79528
 
79520
79529
  functionExpression.FunctionExpression = maybeParens$6((path, printer, semantics) => {
79521
79530
  const {
@@ -79567,7 +79576,7 @@ var unaryExpressions$1 = {};
79567
79576
 
79568
79577
  const {isLast: isLast$b, isNext: isNext$m} = is$3;
79569
79578
 
79570
- const {maybeParens: maybeParens$5} = parens$1;
79579
+ const {maybeParens: maybeParens$5} = maybeParens$8;
79571
79580
 
79572
79581
  const isWord = (a) => /^(delete|typeof|void|throw)$/.test(a);
79573
79582
 
@@ -79919,7 +79928,7 @@ _class.ClassDeclaration = {
79919
79928
  var callExpression = {};
79920
79929
 
79921
79930
  const {exists: exists$c} = is$3;
79922
- const {maybeParens: maybeParens$4} = parens$1;
79931
+ const {maybeParens: maybeParens$4} = maybeParens$8;
79923
79932
  const {isArray: isArray$h} = Array;
79924
79933
 
79925
79934
  const parseArgs = (path) => {
@@ -84327,7 +84336,7 @@ maybeGet.maybeDecorators = (path) => {
84327
84336
  };
84328
84337
 
84329
84338
  const {maybeDecorators} = maybeGet;
84330
- const {maybeParens: maybeParens$3} = parens$1;
84339
+ const {maybeParens: maybeParens$3} = maybeParens$8;
84331
84340
  const {maybeTypeAnnotation} = maybeTypeAnnotation$4;
84332
84341
 
84333
84342
  identifier.Identifier = maybeParens$3(maybeTypeAnnotation((path, printer) => {
@@ -84479,6 +84488,9 @@ tsTypeLiteral.TSTypeLiteral = (path, {indent, traverse, write}) => {
84479
84488
  function isNewline(path) {
84480
84489
  const members = path.get('members');
84481
84490
 
84491
+ if (members.length === 1 && path.parentPath.isTSTypeParameterInstantiation())
84492
+ return false;
84493
+
84482
84494
  return members.length && members[0].node.typeAnnotation;
84483
84495
  }
84484
84496
 
@@ -84804,7 +84816,7 @@ tsInterfaceDeclaration.TSInterfaceDeclaration = {
84804
84816
 
84805
84817
  var tsAsExpression = {};
84806
84818
 
84807
- const {maybeParens: maybeParens$2} = parens$1;
84819
+ const {maybeParens: maybeParens$2} = maybeParens$8;
84808
84820
  const {
84809
84821
  isVariableDeclarator,
84810
84822
  isObjectExpression: isObjectExpression$1,
@@ -84938,7 +84950,7 @@ printReturnType$5.printReturnType = (path, {traverse}) => {
84938
84950
  const {printParams: printParams$5} = params;
84939
84951
  const {printReturnType: printReturnType$4} = printReturnType$5;
84940
84952
 
84941
- const {maybeParens: maybeParens$1} = parens$1;
84953
+ const {maybeParens: maybeParens$1} = maybeParens$8;
84942
84954
 
84943
84955
  tsFunctionType.TSFunctionType = maybeParens$1((path, printer, semantics) => {
84944
84956
  const {print} = printer;
@@ -85151,7 +85163,7 @@ tsTypeReference.TSTypeReference = (path, {print}) => {
85151
85163
 
85152
85164
  var tsInfertType = {};
85153
85165
 
85154
- const {maybeParens} = parens$1;
85166
+ const {maybeParens} = maybeParens$8;
85155
85167
 
85156
85168
  tsInfertType.TSInferType = maybeParens((path, {print}) => {
85157
85169
  print('infer ');
@@ -94513,7 +94525,8 @@ function requireEslintVisitorKeys () {
94513
94525
  ],
94514
94526
  ExportAllDeclaration: [
94515
94527
  "exported",
94516
- "source"
94528
+ "source",
94529
+ "attributes"
94517
94530
  ],
94518
94531
  ExportDefaultDeclaration: [
94519
94532
  "declaration"
@@ -94521,7 +94534,8 @@ function requireEslintVisitorKeys () {
94521
94534
  ExportNamedDeclaration: [
94522
94535
  "declaration",
94523
94536
  "specifiers",
94524
- "source"
94537
+ "source",
94538
+ "attributes"
94525
94539
  ],
94526
94540
  ExportSpecifier: [
94527
94541
  "exported",
@@ -94562,15 +94576,21 @@ function requireEslintVisitorKeys () {
94562
94576
  "consequent",
94563
94577
  "alternate"
94564
94578
  ],
94579
+ ImportAttribute: [
94580
+ "key",
94581
+ "value"
94582
+ ],
94565
94583
  ImportDeclaration: [
94566
94584
  "specifiers",
94567
- "source"
94585
+ "source",
94586
+ "attributes"
94568
94587
  ],
94569
94588
  ImportDefaultSpecifier: [
94570
94589
  "local"
94571
94590
  ],
94572
94591
  ImportExpression: [
94573
- "source"
94592
+ "source",
94593
+ "options"
94574
94594
  ],
94575
94595
  ImportNamespaceSpecifier: [
94576
94596
  "local"
@@ -95579,7 +95599,7 @@ function requireEspree () {
95579
95599
  };
95580
95600
  };
95581
95601
 
95582
- const version$1 = "10.2.0";
95602
+ const version$1 = "10.3.0";
95583
95603
 
95584
95604
  /**
95585
95605
  * @fileoverview Main Espree file that converts Acorn into Esprima output.