houdini 1.0.0-next.6 → 1.0.0-next.8

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.
Files changed (63) hide show
  1. package/build/cmd-cjs/index.js +398 -399
  2. package/build/cmd-esm/index.js +372 -373
  3. package/build/codegen-cjs/index.js +372 -372
  4. package/build/codegen-esm/index.js +360 -360
  5. package/build/lib/config.d.ts +2 -1
  6. package/build/lib/path.d.ts +1 -1
  7. package/build/lib-cjs/index.js +393 -390
  8. package/build/lib-esm/index.js +368 -365
  9. package/build/runtime/cache/cache.d.ts +6 -6
  10. package/build/runtime/cache/storage.d.ts +5 -5
  11. package/build/runtime/cache/stuff.d.ts +0 -2
  12. package/build/runtime/client/documentStore.d.ts +5 -4
  13. package/build/runtime/client/index.d.ts +12 -10
  14. package/build/runtime/client/plugins/injectedPlugins.d.ts +2 -1
  15. package/build/runtime/client/utils/documentPlugins.d.ts +2 -2
  16. package/build/runtime/lib/flatten.d.ts +2 -0
  17. package/build/runtime/lib/types.d.ts +1 -0
  18. package/build/runtime/public/record.d.ts +1 -2
  19. package/build/runtime-cjs/cache/cache.d.ts +6 -6
  20. package/build/runtime-cjs/cache/cache.js +6 -5
  21. package/build/runtime-cjs/cache/lists.js +3 -3
  22. package/build/runtime-cjs/cache/storage.d.ts +5 -5
  23. package/build/runtime-cjs/cache/storage.js +2 -2
  24. package/build/runtime-cjs/cache/stuff.d.ts +0 -2
  25. package/build/runtime-cjs/cache/stuff.js +2 -19
  26. package/build/runtime-cjs/cache/subscription.js +5 -4
  27. package/build/runtime-cjs/client/documentStore.d.ts +5 -4
  28. package/build/runtime-cjs/client/documentStore.js +3 -3
  29. package/build/runtime-cjs/client/index.d.ts +12 -10
  30. package/build/runtime-cjs/client/index.js +37 -11
  31. package/build/runtime-cjs/client/plugins/injectedPlugins.d.ts +2 -1
  32. package/build/runtime-cjs/client/utils/documentPlugins.d.ts +2 -2
  33. package/build/runtime-cjs/lib/flatten.d.ts +2 -0
  34. package/build/runtime-cjs/lib/flatten.js +41 -0
  35. package/build/runtime-cjs/lib/types.d.ts +1 -0
  36. package/build/runtime-cjs/public/cache.js +2 -2
  37. package/build/runtime-cjs/public/record.d.ts +1 -2
  38. package/build/runtime-cjs/public/record.js +1 -2
  39. package/build/runtime-esm/cache/cache.d.ts +6 -6
  40. package/build/runtime-esm/cache/cache.js +7 -6
  41. package/build/runtime-esm/cache/lists.js +3 -3
  42. package/build/runtime-esm/cache/storage.d.ts +5 -5
  43. package/build/runtime-esm/cache/storage.js +2 -2
  44. package/build/runtime-esm/cache/stuff.d.ts +0 -2
  45. package/build/runtime-esm/cache/stuff.js +1 -17
  46. package/build/runtime-esm/cache/subscription.js +6 -5
  47. package/build/runtime-esm/client/documentStore.d.ts +5 -4
  48. package/build/runtime-esm/client/documentStore.js +3 -3
  49. package/build/runtime-esm/client/index.d.ts +12 -10
  50. package/build/runtime-esm/client/index.js +36 -11
  51. package/build/runtime-esm/client/plugins/injectedPlugins.d.ts +2 -1
  52. package/build/runtime-esm/client/utils/documentPlugins.d.ts +2 -2
  53. package/build/runtime-esm/lib/flatten.d.ts +2 -0
  54. package/build/runtime-esm/lib/flatten.js +17 -0
  55. package/build/runtime-esm/lib/types.d.ts +1 -0
  56. package/build/runtime-esm/public/cache.js +2 -2
  57. package/build/runtime-esm/public/record.d.ts +1 -2
  58. package/build/runtime-esm/public/record.js +1 -2
  59. package/build/test-cjs/index.js +372 -372
  60. package/build/test-esm/index.js +360 -360
  61. package/build/vite-cjs/index.js +395 -391
  62. package/build/vite-esm/index.js +370 -366
  63. package/package.json +4 -4
@@ -4825,10 +4825,10 @@ var require_printer = __commonJS({
4825
4825
  Object.defineProperty(exports, "__esModule", {
4826
4826
  value: true
4827
4827
  });
4828
- exports.print = print12;
4828
+ exports.print = print11;
4829
4829
  var _visitor = require_visitor();
4830
4830
  var _blockString = require_blockString();
4831
- function print12(ast) {
4831
+ function print11(ast) {
4832
4832
  return (0, _visitor.visit)(ast, {
4833
4833
  leave: printDocASTReducer2
4834
4834
  });
@@ -56930,12 +56930,12 @@ var require_comments = __commonJS({
56930
56930
  comment.trailing = true;
56931
56931
  addCommentHelper(node, comment);
56932
56932
  }
56933
- function printLeadingComment(commentPath, print12) {
56933
+ function printLeadingComment(commentPath, print11) {
56934
56934
  var comment = commentPath.getValue();
56935
56935
  n.Comment.assert(comment);
56936
56936
  var loc = comment.loc;
56937
56937
  var lines = loc && loc.lines;
56938
- var parts = [print12(commentPath)];
56938
+ var parts = [print11(commentPath)];
56939
56939
  if (comment.trailing) {
56940
56940
  parts.push("\n");
56941
56941
  } else if (lines instanceof lines_1.Lines) {
@@ -56950,7 +56950,7 @@ var require_comments = __commonJS({
56950
56950
  }
56951
56951
  return (0, lines_1.concat)(parts);
56952
56952
  }
56953
- function printTrailingComment(commentPath, print12) {
56953
+ function printTrailingComment(commentPath, print11) {
56954
56954
  var comment = commentPath.getValue(commentPath);
56955
56955
  n.Comment.assert(comment);
56956
56956
  var loc = comment.loc;
@@ -56965,12 +56965,12 @@ var require_comments = __commonJS({
56965
56965
  parts.push(new Array(leadingSpace.length).join("\n"));
56966
56966
  }
56967
56967
  }
56968
- parts.push(print12(commentPath));
56968
+ parts.push(print11(commentPath));
56969
56969
  return (0, lines_1.concat)(parts);
56970
56970
  }
56971
- function printComments(path2, print12) {
56971
+ function printComments(path2, print11) {
56972
56972
  var value = path2.getValue();
56973
- var innerLines = print12(path2);
56973
+ var innerLines = print11(path2);
56974
56974
  var comments = n.Node.check(value) && types16.getFieldValue(value, "comments");
56975
56975
  if (!comments || comments.length === 0) {
56976
56976
  return innerLines;
@@ -56982,9 +56982,9 @@ var require_comments = __commonJS({
56982
56982
  var leading = types16.getFieldValue(comment, "leading");
56983
56983
  var trailing = types16.getFieldValue(comment, "trailing");
56984
56984
  if (leading || trailing && !(n.Statement.check(value) || comment.type === "Block" || comment.type === "CommentBlock")) {
56985
- leadingParts.push(printLeadingComment(commentPath, print12));
56985
+ leadingParts.push(printLeadingComment(commentPath, print11));
56986
56986
  } else if (trailing) {
56987
- trailingParts.push(printTrailingComment(commentPath, print12));
56987
+ trailingParts.push(printTrailingComment(commentPath, print11));
56988
56988
  }
56989
56989
  }, "comments");
56990
56990
  leadingParts.push.apply(leadingParts, trailingParts);
@@ -57675,7 +57675,7 @@ var require_patcher = __commonJS({
57675
57675
  };
57676
57676
  exports.Patcher = Patcher;
57677
57677
  var Pp = Patcher.prototype;
57678
- Pp.tryToReprintComments = function(newNode, oldNode, print12) {
57678
+ Pp.tryToReprintComments = function(newNode, oldNode, print11) {
57679
57679
  var patcher = this;
57680
57680
  if (!newNode.comments && !oldNode.comments) {
57681
57681
  return true;
@@ -57692,7 +57692,7 @@ var require_patcher = __commonJS({
57692
57692
  assert_1.default.ok(oldComment.leading || oldComment.trailing);
57693
57693
  patcher.replace(
57694
57694
  oldComment.loc,
57695
- print12(reprint.newPath).indentTail(oldComment.loc.indent)
57695
+ print11(reprint.newPath).indentTail(oldComment.loc.indent)
57696
57696
  );
57697
57697
  });
57698
57698
  }
@@ -57739,17 +57739,17 @@ var require_patcher = __commonJS({
57739
57739
  var reprints = [];
57740
57740
  if (!lines || !findReprints(path2, reprints))
57741
57741
  return;
57742
- return function(print12) {
57742
+ return function(print11) {
57743
57743
  var patcher = new Patcher(lines);
57744
57744
  reprints.forEach(function(reprint) {
57745
57745
  var newNode = reprint.newPath.getValue();
57746
57746
  var oldNode = reprint.oldPath.getValue();
57747
57747
  SourceLocation.assert(oldNode.loc, true);
57748
- var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print12);
57748
+ var needToPrintNewPathWithComments = !patcher.tryToReprintComments(newNode, oldNode, print11);
57749
57749
  if (needToPrintNewPathWithComments) {
57750
57750
  patcher.deleteComments(oldNode);
57751
57751
  }
57752
- var newLines = print12(reprint.newPath, {
57752
+ var newLines = print11(reprint.newPath, {
57753
57753
  includeComments: needToPrintNewPathWithComments,
57754
57754
  avoidRootParens: oldNode.type === newNode.type && reprint.oldPath.hasParens()
57755
57755
  }).indentTail(oldNode.loc.indent);
@@ -57966,10 +57966,10 @@ var require_printer2 = __commonJS({
57966
57966
  function makePrintFunctionWith(options, overrides) {
57967
57967
  options = Object.assign({}, options, overrides);
57968
57968
  return function(path2) {
57969
- return print12(path2, options);
57969
+ return print11(path2, options);
57970
57970
  };
57971
57971
  }
57972
- function print12(path2, options) {
57972
+ function print11(path2, options) {
57973
57973
  assert_1.default.ok(path2 instanceof fast_path_1.default);
57974
57974
  options = options || {};
57975
57975
  if (options.includeComments) {
@@ -57985,7 +57985,7 @@ var require_printer2 = __commonJS({
57985
57985
  }
57986
57986
  }
57987
57987
  var reprinter = (0, patcher_1.getReprinter)(path2);
57988
- var lines = reprinter ? reprinter(print12) : genericPrint(path2, config2, options, makePrintFunctionWith(options, {
57988
+ var lines = reprinter ? reprinter(print11) : genericPrint(path2, config2, options, makePrintFunctionWith(options, {
57989
57989
  includeComments: true,
57990
57990
  avoidRootParens: false
57991
57991
  }));
@@ -57996,7 +57996,7 @@ var require_printer2 = __commonJS({
57996
57996
  if (!ast) {
57997
57997
  return emptyPrintResult;
57998
57998
  }
57999
- var lines = print12(fast_path_1.default.from(ast), {
57999
+ var lines = print11(fast_path_1.default.from(ast), {
58000
58000
  includeComments: true,
58001
58001
  avoidRootParens: false
58002
58002
  });
@@ -58049,7 +58049,7 @@ var require_printer2 = __commonJS({
58049
58049
  }
58050
58050
  return (0, lines_1.concat)(parts);
58051
58051
  }
58052
- function genericPrintNoParens(path2, options, print12) {
58052
+ function genericPrintNoParens(path2, options, print11) {
58053
58053
  var n = path2.getValue();
58054
58054
  if (!n) {
58055
58055
  return (0, lines_1.fromString)("");
@@ -58061,45 +58061,45 @@ var require_printer2 = __commonJS({
58061
58061
  var parts = [];
58062
58062
  switch (n.type) {
58063
58063
  case "File":
58064
- return path2.call(print12, "program");
58064
+ return path2.call(print11, "program");
58065
58065
  case "Program":
58066
58066
  if (n.directives) {
58067
58067
  path2.each(function(childPath) {
58068
- parts.push(print12(childPath), ";\n");
58068
+ parts.push(print11(childPath), ";\n");
58069
58069
  }, "directives");
58070
58070
  }
58071
58071
  if (n.interpreter) {
58072
- parts.push(path2.call(print12, "interpreter"));
58072
+ parts.push(path2.call(print11, "interpreter"));
58073
58073
  }
58074
58074
  parts.push(path2.call(function(bodyPath) {
58075
- return printStatementSequence(bodyPath, options, print12);
58075
+ return printStatementSequence(bodyPath, options, print11);
58076
58076
  }, "body"));
58077
58077
  return (0, lines_1.concat)(parts);
58078
58078
  case "Noop":
58079
58079
  case "EmptyStatement":
58080
58080
  return (0, lines_1.fromString)("");
58081
58081
  case "ExpressionStatement":
58082
- return (0, lines_1.concat)([path2.call(print12, "expression"), ";"]);
58082
+ return (0, lines_1.concat)([path2.call(print11, "expression"), ";"]);
58083
58083
  case "ParenthesizedExpression":
58084
- return (0, lines_1.concat)(["(", path2.call(print12, "expression"), ")"]);
58084
+ return (0, lines_1.concat)(["(", path2.call(print11, "expression"), ")"]);
58085
58085
  case "BinaryExpression":
58086
58086
  case "LogicalExpression":
58087
58087
  case "AssignmentExpression":
58088
58088
  return (0, lines_1.fromString)(" ").join([
58089
- path2.call(print12, "left"),
58089
+ path2.call(print11, "left"),
58090
58090
  n.operator,
58091
- path2.call(print12, "right")
58091
+ path2.call(print11, "right")
58092
58092
  ]);
58093
58093
  case "AssignmentPattern":
58094
58094
  return (0, lines_1.concat)([
58095
- path2.call(print12, "left"),
58095
+ path2.call(print11, "left"),
58096
58096
  " = ",
58097
- path2.call(print12, "right")
58097
+ path2.call(print11, "right")
58098
58098
  ]);
58099
58099
  case "MemberExpression":
58100
58100
  case "OptionalMemberExpression": {
58101
- parts.push(path2.call(print12, "object"));
58102
- var property = path2.call(print12, "property");
58101
+ parts.push(path2.call(print11, "object"));
58102
+ var property = path2.call(print11, "property");
58103
58103
  var optional = types16.getFieldValue(n, "optional");
58104
58104
  if (n.computed) {
58105
58105
  parts.push(optional ? "?.[" : "[", property, "]");
@@ -58109,18 +58109,18 @@ var require_printer2 = __commonJS({
58109
58109
  return (0, lines_1.concat)(parts);
58110
58110
  }
58111
58111
  case "ChainExpression":
58112
- return path2.call(print12, "expression");
58112
+ return path2.call(print11, "expression");
58113
58113
  case "MetaProperty":
58114
58114
  return (0, lines_1.concat)([
58115
- path2.call(print12, "meta"),
58115
+ path2.call(print11, "meta"),
58116
58116
  ".",
58117
- path2.call(print12, "property")
58117
+ path2.call(print11, "property")
58118
58118
  ]);
58119
58119
  case "BindExpression":
58120
58120
  if (n.object) {
58121
- parts.push(path2.call(print12, "object"));
58121
+ parts.push(path2.call(print11, "object"));
58122
58122
  }
58123
- parts.push("::", path2.call(print12, "callee"));
58123
+ parts.push("::", path2.call(print11, "callee"));
58124
58124
  return (0, lines_1.concat)(parts);
58125
58125
  case "Path":
58126
58126
  return (0, lines_1.fromString)(".").join(n.body);
@@ -58128,7 +58128,7 @@ var require_printer2 = __commonJS({
58128
58128
  return (0, lines_1.concat)([
58129
58129
  (0, lines_1.fromString)(n.name, options),
58130
58130
  n.optional ? "?" : "",
58131
- path2.call(print12, "typeAnnotation")
58131
+ path2.call(print11, "typeAnnotation")
58132
58132
  ]);
58133
58133
  case "SpreadElement":
58134
58134
  case "SpreadElementPattern":
@@ -58139,8 +58139,8 @@ var require_printer2 = __commonJS({
58139
58139
  case "RestElement":
58140
58140
  return (0, lines_1.concat)([
58141
58141
  "...",
58142
- path2.call(print12, "argument"),
58143
- path2.call(print12, "typeAnnotation")
58142
+ path2.call(print11, "argument"),
58143
+ path2.call(print11, "typeAnnotation")
58144
58144
  ]);
58145
58145
  case "FunctionDeclaration":
58146
58146
  case "FunctionExpression":
@@ -58155,15 +58155,15 @@ var require_printer2 = __commonJS({
58155
58155
  if (n.generator)
58156
58156
  parts.push("*");
58157
58157
  if (n.id) {
58158
- parts.push(" ", path2.call(print12, "id"), path2.call(print12, "typeParameters"));
58158
+ parts.push(" ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
58159
58159
  } else {
58160
58160
  if (n.typeParameters) {
58161
- parts.push(path2.call(print12, "typeParameters"));
58161
+ parts.push(path2.call(print11, "typeParameters"));
58162
58162
  }
58163
58163
  }
58164
- parts.push("(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "returnType"));
58164
+ parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
58165
58165
  if (n.body) {
58166
- parts.push(" ", path2.call(print12, "body"));
58166
+ parts.push(" ", path2.call(print11, "body"));
58167
58167
  }
58168
58168
  return (0, lines_1.concat)(parts);
58169
58169
  case "ArrowFunctionExpression":
@@ -58171,44 +58171,44 @@ var require_printer2 = __commonJS({
58171
58171
  parts.push("async ");
58172
58172
  }
58173
58173
  if (n.typeParameters) {
58174
- parts.push(path2.call(print12, "typeParameters"));
58174
+ parts.push(path2.call(print11, "typeParameters"));
58175
58175
  }
58176
58176
  if (!options.arrowParensAlways && n.params.length === 1 && !n.rest && n.params[0].type === "Identifier" && !n.params[0].typeAnnotation && !n.returnType) {
58177
- parts.push(path2.call(print12, "params", 0));
58177
+ parts.push(path2.call(print11, "params", 0));
58178
58178
  } else {
58179
- parts.push("(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "returnType"));
58179
+ parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
58180
58180
  }
58181
- parts.push(" => ", path2.call(print12, "body"));
58181
+ parts.push(" => ", path2.call(print11, "body"));
58182
58182
  return (0, lines_1.concat)(parts);
58183
58183
  case "MethodDefinition":
58184
- return printMethod(path2, options, print12);
58184
+ return printMethod(path2, options, print11);
58185
58185
  case "YieldExpression":
58186
58186
  parts.push("yield");
58187
58187
  if (n.delegate)
58188
58188
  parts.push("*");
58189
58189
  if (n.argument)
58190
- parts.push(" ", path2.call(print12, "argument"));
58190
+ parts.push(" ", path2.call(print11, "argument"));
58191
58191
  return (0, lines_1.concat)(parts);
58192
58192
  case "AwaitExpression":
58193
58193
  parts.push("await");
58194
58194
  if (n.all)
58195
58195
  parts.push("*");
58196
58196
  if (n.argument)
58197
- parts.push(" ", path2.call(print12, "argument"));
58197
+ parts.push(" ", path2.call(print11, "argument"));
58198
58198
  return (0, lines_1.concat)(parts);
58199
58199
  case "ModuleExpression":
58200
58200
  return (0, lines_1.concat)([
58201
58201
  "module {\n",
58202
- path2.call(print12, "body").indent(options.tabWidth),
58202
+ path2.call(print11, "body").indent(options.tabWidth),
58203
58203
  "\n}"
58204
58204
  ]);
58205
58205
  case "ModuleDeclaration":
58206
- parts.push("module", path2.call(print12, "id"));
58206
+ parts.push("module", path2.call(print11, "id"));
58207
58207
  if (n.source) {
58208
58208
  assert_1.default.ok(!n.body);
58209
- parts.push("from", path2.call(print12, "source"));
58209
+ parts.push("from", path2.call(print11, "source"));
58210
58210
  } else {
58211
- parts.push(path2.call(print12, "body"));
58211
+ parts.push(path2.call(print11, "body"));
58212
58212
  }
58213
58213
  return (0, lines_1.fromString)(" ").join(parts);
58214
58214
  case "ImportSpecifier":
@@ -58216,27 +58216,27 @@ var require_printer2 = __commonJS({
58216
58216
  parts.push(n.importKind + " ");
58217
58217
  }
58218
58218
  if (n.imported) {
58219
- parts.push(path2.call(print12, "imported"));
58219
+ parts.push(path2.call(print11, "imported"));
58220
58220
  if (n.local && n.local.name !== n.imported.name) {
58221
- parts.push(" as ", path2.call(print12, "local"));
58221
+ parts.push(" as ", path2.call(print11, "local"));
58222
58222
  }
58223
58223
  } else if (n.id) {
58224
- parts.push(path2.call(print12, "id"));
58224
+ parts.push(path2.call(print11, "id"));
58225
58225
  if (n.name) {
58226
- parts.push(" as ", path2.call(print12, "name"));
58226
+ parts.push(" as ", path2.call(print11, "name"));
58227
58227
  }
58228
58228
  }
58229
58229
  return (0, lines_1.concat)(parts);
58230
58230
  case "ExportSpecifier":
58231
58231
  if (n.local) {
58232
- parts.push(path2.call(print12, "local"));
58232
+ parts.push(path2.call(print11, "local"));
58233
58233
  if (n.exported && n.exported.name !== n.local.name) {
58234
- parts.push(" as ", path2.call(print12, "exported"));
58234
+ parts.push(" as ", path2.call(print11, "exported"));
58235
58235
  }
58236
58236
  } else if (n.id) {
58237
- parts.push(path2.call(print12, "id"));
58237
+ parts.push(path2.call(print11, "id"));
58238
58238
  if (n.name) {
58239
- parts.push(" as ", path2.call(print12, "name"));
58239
+ parts.push(" as ", path2.call(print11, "name"));
58240
58240
  }
58241
58241
  }
58242
58242
  return (0, lines_1.concat)(parts);
@@ -58245,40 +58245,40 @@ var require_printer2 = __commonJS({
58245
58245
  case "ImportNamespaceSpecifier":
58246
58246
  parts.push("* as ");
58247
58247
  if (n.local) {
58248
- parts.push(path2.call(print12, "local"));
58248
+ parts.push(path2.call(print11, "local"));
58249
58249
  } else if (n.id) {
58250
- parts.push(path2.call(print12, "id"));
58250
+ parts.push(path2.call(print11, "id"));
58251
58251
  }
58252
58252
  return (0, lines_1.concat)(parts);
58253
58253
  case "ImportDefaultSpecifier":
58254
58254
  if (n.local) {
58255
- return path2.call(print12, "local");
58255
+ return path2.call(print11, "local");
58256
58256
  }
58257
- return path2.call(print12, "id");
58257
+ return path2.call(print11, "id");
58258
58258
  case "TSExportAssignment":
58259
- return (0, lines_1.concat)(["export = ", path2.call(print12, "expression")]);
58259
+ return (0, lines_1.concat)(["export = ", path2.call(print11, "expression")]);
58260
58260
  case "ExportDeclaration":
58261
58261
  case "ExportDefaultDeclaration":
58262
58262
  case "ExportNamedDeclaration":
58263
- return printExportDeclaration(path2, options, print12);
58263
+ return printExportDeclaration(path2, options, print11);
58264
58264
  case "ExportAllDeclaration":
58265
58265
  parts.push("export *");
58266
58266
  if (n.exported) {
58267
- parts.push(" as ", path2.call(print12, "exported"));
58267
+ parts.push(" as ", path2.call(print11, "exported"));
58268
58268
  }
58269
- parts.push(" from ", path2.call(print12, "source"), ";");
58269
+ parts.push(" from ", path2.call(print11, "source"), ";");
58270
58270
  return (0, lines_1.concat)(parts);
58271
58271
  case "TSNamespaceExportDeclaration":
58272
- parts.push("export as namespace ", path2.call(print12, "id"));
58272
+ parts.push("export as namespace ", path2.call(print11, "id"));
58273
58273
  return maybeAddSemicolon((0, lines_1.concat)(parts));
58274
58274
  case "ExportNamespaceSpecifier":
58275
- return (0, lines_1.concat)(["* as ", path2.call(print12, "exported")]);
58275
+ return (0, lines_1.concat)(["* as ", path2.call(print11, "exported")]);
58276
58276
  case "ExportDefaultSpecifier":
58277
- return path2.call(print12, "exported");
58277
+ return path2.call(print11, "exported");
58278
58278
  case "Import":
58279
58279
  return (0, lines_1.fromString)("import", options);
58280
58280
  case "ImportExpression":
58281
- return (0, lines_1.concat)(["import(", path2.call(print12, "source"), ")"]);
58281
+ return (0, lines_1.concat)(["import(", path2.call(print11, "source"), ")"]);
58282
58282
  case "ImportDeclaration": {
58283
58283
  parts.push("import ");
58284
58284
  if (n.importKind && n.importKind !== "value") {
@@ -58290,9 +58290,9 @@ var require_printer2 = __commonJS({
58290
58290
  path2.each(function(specifierPath) {
58291
58291
  var spec = specifierPath.getValue();
58292
58292
  if (spec.type === "ImportSpecifier") {
58293
- bracedSpecifiers_1.push(print12(specifierPath));
58293
+ bracedSpecifiers_1.push(print11(specifierPath));
58294
58294
  } else if (spec.type === "ImportDefaultSpecifier" || spec.type === "ImportNamespaceSpecifier") {
58295
- unbracedSpecifiers_1.push(print12(specifierPath));
58295
+ unbracedSpecifiers_1.push(print11(specifierPath));
58296
58296
  }
58297
58297
  }, "specifiers");
58298
58298
  unbracedSpecifiers_1.forEach(function(lines2, i2) {
@@ -58322,16 +58322,16 @@ var require_printer2 = __commonJS({
58322
58322
  }
58323
58323
  parts.push(" from ");
58324
58324
  }
58325
- parts.push(path2.call(print12, "source"), maybePrintImportAssertions(path2, options, print12), ";");
58325
+ parts.push(path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11), ";");
58326
58326
  return (0, lines_1.concat)(parts);
58327
58327
  }
58328
58328
  case "ImportAttribute":
58329
- return (0, lines_1.concat)([path2.call(print12, "key"), ": ", path2.call(print12, "value")]);
58329
+ return (0, lines_1.concat)([path2.call(print11, "key"), ": ", path2.call(print11, "value")]);
58330
58330
  case "StaticBlock":
58331
58331
  parts.push("static ");
58332
58332
  case "BlockStatement": {
58333
58333
  var naked_1 = path2.call(function(bodyPath) {
58334
- return printStatementSequence(bodyPath, options, print12);
58334
+ return printStatementSequence(bodyPath, options, print11);
58335
58335
  }, "body");
58336
58336
  if (naked_1.isEmpty()) {
58337
58337
  if (!n.directives || n.directives.length === 0) {
@@ -58342,7 +58342,7 @@ var require_printer2 = __commonJS({
58342
58342
  parts.push("{\n");
58343
58343
  if (n.directives) {
58344
58344
  path2.each(function(childPath) {
58345
- parts.push(maybeAddSemicolon(print12(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
58345
+ parts.push(maybeAddSemicolon(print11(childPath).indent(options.tabWidth)), n.directives.length > 1 || !naked_1.isEmpty() ? "\n" : "");
58346
58346
  }, "directives");
58347
58347
  }
58348
58348
  parts.push(naked_1.indent(options.tabWidth));
@@ -58352,7 +58352,7 @@ var require_printer2 = __commonJS({
58352
58352
  case "ReturnStatement": {
58353
58353
  parts.push("return");
58354
58354
  if (n.argument) {
58355
- var argLines = path2.call(print12, "argument");
58355
+ var argLines = path2.call(print11, "argument");
58356
58356
  if (argLines.startsWithComment() || argLines.length > 1 && namedTypes.JSXElement && namedTypes.JSXElement.check(n.argument)) {
58357
58357
  parts.push(" (\n", argLines.indent(options.tabWidth), "\n)");
58358
58358
  } else {
@@ -58364,17 +58364,17 @@ var require_printer2 = __commonJS({
58364
58364
  }
58365
58365
  case "CallExpression":
58366
58366
  case "OptionalCallExpression":
58367
- parts.push(path2.call(print12, "callee"));
58367
+ parts.push(path2.call(print11, "callee"));
58368
58368
  if (n.typeParameters) {
58369
- parts.push(path2.call(print12, "typeParameters"));
58369
+ parts.push(path2.call(print11, "typeParameters"));
58370
58370
  }
58371
58371
  if (n.typeArguments) {
58372
- parts.push(path2.call(print12, "typeArguments"));
58372
+ parts.push(path2.call(print11, "typeArguments"));
58373
58373
  }
58374
58374
  if (types16.getFieldValue(n, "optional")) {
58375
58375
  parts.push("?.");
58376
58376
  }
58377
- parts.push(printArgumentsList(path2, options, print12));
58377
+ parts.push(printArgumentsList(path2, options, print11));
58378
58378
  return (0, lines_1.concat)(parts);
58379
58379
  case "RecordExpression":
58380
58380
  parts.push("#");
@@ -58404,7 +58404,7 @@ var require_printer2 = __commonJS({
58404
58404
  var i_1 = 0;
58405
58405
  fields.forEach(function(field) {
58406
58406
  path2.each(function(childPath) {
58407
- var lines2 = print12(childPath);
58407
+ var lines2 = print11(childPath);
58408
58408
  if (!oneLine_1) {
58409
58409
  lines2 = lines2.indent(options.tabWidth);
58410
58410
  }
@@ -58441,32 +58441,32 @@ var require_printer2 = __commonJS({
58441
58441
  parts[parts.length - 1] = " " + rightBrace;
58442
58442
  }
58443
58443
  if (n.typeAnnotation) {
58444
- parts.push(path2.call(print12, "typeAnnotation"));
58444
+ parts.push(path2.call(print11, "typeAnnotation"));
58445
58445
  }
58446
58446
  return (0, lines_1.concat)(parts);
58447
58447
  }
58448
58448
  case "PropertyPattern":
58449
58449
  return (0, lines_1.concat)([
58450
- path2.call(print12, "key"),
58450
+ path2.call(print11, "key"),
58451
58451
  ": ",
58452
- path2.call(print12, "pattern")
58452
+ path2.call(print11, "pattern")
58453
58453
  ]);
58454
58454
  case "ObjectProperty":
58455
58455
  case "Property": {
58456
58456
  if (n.method || n.kind === "get" || n.kind === "set") {
58457
- return printMethod(path2, options, print12);
58457
+ return printMethod(path2, options, print11);
58458
58458
  }
58459
58459
  if (n.shorthand && n.value.type === "AssignmentPattern") {
58460
- return path2.call(print12, "value");
58460
+ return path2.call(print11, "value");
58461
58461
  }
58462
- var key = path2.call(print12, "key");
58462
+ var key = path2.call(print11, "key");
58463
58463
  if (n.computed) {
58464
58464
  parts.push("[", key, "]");
58465
58465
  } else {
58466
58466
  parts.push(key);
58467
58467
  }
58468
58468
  if (!n.shorthand || n.key.name !== n.value.name) {
58469
- parts.push(": ", path2.call(print12, "value"));
58469
+ parts.push(": ", path2.call(print11, "value"));
58470
58470
  }
58471
58471
  return (0, lines_1.concat)(parts);
58472
58472
  }
@@ -58474,18 +58474,18 @@ var require_printer2 = __commonJS({
58474
58474
  case "ObjectMethod":
58475
58475
  case "ClassPrivateMethod":
58476
58476
  case "TSDeclareMethod":
58477
- return printMethod(path2, options, print12);
58477
+ return printMethod(path2, options, print11);
58478
58478
  case "PrivateName":
58479
- return (0, lines_1.concat)(["#", path2.call(print12, "id")]);
58479
+ return (0, lines_1.concat)(["#", path2.call(print11, "id")]);
58480
58480
  case "Decorator":
58481
- return (0, lines_1.concat)(["@", path2.call(print12, "expression")]);
58481
+ return (0, lines_1.concat)(["@", path2.call(print11, "expression")]);
58482
58482
  case "TupleExpression":
58483
58483
  parts.push("#");
58484
58484
  case "ArrayExpression":
58485
58485
  case "ArrayPattern": {
58486
58486
  var elems = n.elements;
58487
58487
  var len_2 = elems.length;
58488
- var printed_1 = path2.map(print12, "elements");
58488
+ var printed_1 = path2.map(print11, "elements");
58489
58489
  var joined = (0, lines_1.fromString)(", ").join(printed_1);
58490
58490
  var oneLine_2 = joined.getLineLength(1) <= options.wrapColumn;
58491
58491
  if (oneLine_2) {
@@ -58523,12 +58523,12 @@ var require_printer2 = __commonJS({
58523
58523
  parts.push("]");
58524
58524
  }
58525
58525
  if (n.typeAnnotation) {
58526
- parts.push(path2.call(print12, "typeAnnotation"));
58526
+ parts.push(path2.call(print11, "typeAnnotation"));
58527
58527
  }
58528
58528
  return (0, lines_1.concat)(parts);
58529
58529
  }
58530
58530
  case "SequenceExpression":
58531
- return (0, lines_1.fromString)(", ").join(path2.map(print12, "expressions"));
58531
+ return (0, lines_1.fromString)(", ").join(path2.map(print11, "expressions"));
58532
58532
  case "ThisExpression":
58533
58533
  return (0, lines_1.fromString)("this");
58534
58534
  case "Super":
@@ -58549,7 +58549,7 @@ var require_printer2 = __commonJS({
58549
58549
  case "Literal":
58550
58550
  return (0, lines_1.fromString)(getPossibleRaw(n) || (typeof n.value === "string" ? nodeStr(n.value, options) : n.value), options);
58551
58551
  case "Directive":
58552
- return path2.call(print12, "value");
58552
+ return path2.call(print11, "value");
58553
58553
  case "DirectiveLiteral":
58554
58554
  return (0, lines_1.fromString)(getPossibleRaw(n) || nodeStr(n.value, options), options);
58555
58555
  case "InterpreterDirective":
@@ -58563,32 +58563,32 @@ var require_printer2 = __commonJS({
58563
58563
  parts.push(n.operator);
58564
58564
  if (/[a-z]$/.test(n.operator))
58565
58565
  parts.push(" ");
58566
- parts.push(path2.call(print12, "argument"));
58566
+ parts.push(path2.call(print11, "argument"));
58567
58567
  return (0, lines_1.concat)(parts);
58568
58568
  case "UpdateExpression":
58569
- parts.push(path2.call(print12, "argument"), n.operator);
58569
+ parts.push(path2.call(print11, "argument"), n.operator);
58570
58570
  if (n.prefix)
58571
58571
  parts.reverse();
58572
58572
  return (0, lines_1.concat)(parts);
58573
58573
  case "ConditionalExpression":
58574
58574
  return (0, lines_1.concat)([
58575
- path2.call(print12, "test"),
58575
+ path2.call(print11, "test"),
58576
58576
  " ? ",
58577
- path2.call(print12, "consequent"),
58577
+ path2.call(print11, "consequent"),
58578
58578
  " : ",
58579
- path2.call(print12, "alternate")
58579
+ path2.call(print11, "alternate")
58580
58580
  ]);
58581
58581
  case "NewExpression": {
58582
- parts.push("new ", path2.call(print12, "callee"));
58582
+ parts.push("new ", path2.call(print11, "callee"));
58583
58583
  if (n.typeParameters) {
58584
- parts.push(path2.call(print12, "typeParameters"));
58584
+ parts.push(path2.call(print11, "typeParameters"));
58585
58585
  }
58586
58586
  if (n.typeArguments) {
58587
- parts.push(path2.call(print12, "typeArguments"));
58587
+ parts.push(path2.call(print11, "typeArguments"));
58588
58588
  }
58589
58589
  var args = n.arguments;
58590
58590
  if (args) {
58591
- parts.push(printArgumentsList(path2, options, print12));
58591
+ parts.push(printArgumentsList(path2, options, print11));
58592
58592
  }
58593
58593
  return (0, lines_1.concat)(parts);
58594
58594
  }
@@ -58599,7 +58599,7 @@ var require_printer2 = __commonJS({
58599
58599
  parts.push(n.kind, " ");
58600
58600
  var maxLen_1 = 0;
58601
58601
  var printed = path2.map(function(childPath) {
58602
- var lines2 = print12(childPath);
58602
+ var lines2 = print11(childPath);
58603
58603
  maxLen_1 = Math.max(lines2.length, maxLen_1);
58604
58604
  return lines2;
58605
58605
  }, "declarations");
@@ -58618,30 +58618,30 @@ var require_printer2 = __commonJS({
58618
58618
  }
58619
58619
  case "VariableDeclarator":
58620
58620
  return n.init ? (0, lines_1.fromString)(" = ").join([
58621
- path2.call(print12, "id"),
58622
- path2.call(print12, "init")
58623
- ]) : path2.call(print12, "id");
58621
+ path2.call(print11, "id"),
58622
+ path2.call(print11, "init")
58623
+ ]) : path2.call(print11, "id");
58624
58624
  case "WithStatement":
58625
58625
  return (0, lines_1.concat)([
58626
58626
  "with (",
58627
- path2.call(print12, "object"),
58627
+ path2.call(print11, "object"),
58628
58628
  ") ",
58629
- path2.call(print12, "body")
58629
+ path2.call(print11, "body")
58630
58630
  ]);
58631
58631
  case "IfStatement": {
58632
- var con = adjustClause(path2.call(print12, "consequent"), options);
58633
- parts.push("if (", path2.call(print12, "test"), ")", con);
58632
+ var con = adjustClause(path2.call(print11, "consequent"), options);
58633
+ parts.push("if (", path2.call(print11, "test"), ")", con);
58634
58634
  if (n.alternate)
58635
- parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(print12, "alternate"), options));
58635
+ parts.push(endsWithBrace(con) ? " else" : "\nelse", adjustClause(path2.call(print11, "alternate"), options));
58636
58636
  return (0, lines_1.concat)(parts);
58637
58637
  }
58638
58638
  case "ForStatement": {
58639
- var init2 = path2.call(print12, "init");
58639
+ var init2 = path2.call(print11, "init");
58640
58640
  var sep2 = init2.length > 1 ? ";\n" : "; ";
58641
58641
  var forParen = "for (";
58642
- var indented = (0, lines_1.fromString)(sep2).join([init2, path2.call(print12, "test"), path2.call(print12, "update")]).indentTail(forParen.length);
58642
+ var indented = (0, lines_1.fromString)(sep2).join([init2, path2.call(print11, "test"), path2.call(print11, "update")]).indentTail(forParen.length);
58643
58643
  var head = (0, lines_1.concat)([forParen, indented, ")"]);
58644
- var clause = adjustClause(path2.call(print12, "body"), options);
58644
+ var clause = adjustClause(path2.call(print11, "body"), options);
58645
58645
  parts.push(head);
58646
58646
  if (head.length > 1) {
58647
58647
  parts.push("\n");
@@ -58653,18 +58653,18 @@ var require_printer2 = __commonJS({
58653
58653
  case "WhileStatement":
58654
58654
  return (0, lines_1.concat)([
58655
58655
  "while (",
58656
- path2.call(print12, "test"),
58656
+ path2.call(print11, "test"),
58657
58657
  ")",
58658
- adjustClause(path2.call(print12, "body"), options)
58658
+ adjustClause(path2.call(print11, "body"), options)
58659
58659
  ]);
58660
58660
  case "ForInStatement":
58661
58661
  return (0, lines_1.concat)([
58662
58662
  n.each ? "for each (" : "for (",
58663
- path2.call(print12, "left"),
58663
+ path2.call(print11, "left"),
58664
58664
  " in ",
58665
- path2.call(print12, "right"),
58665
+ path2.call(print11, "right"),
58666
58666
  ")",
58667
- adjustClause(path2.call(print12, "body"), options)
58667
+ adjustClause(path2.call(print11, "body"), options)
58668
58668
  ]);
58669
58669
  case "ForOfStatement":
58670
58670
  case "ForAwaitStatement":
@@ -58672,122 +58672,122 @@ var require_printer2 = __commonJS({
58672
58672
  if (n.await || n.type === "ForAwaitStatement") {
58673
58673
  parts.push("await ");
58674
58674
  }
58675
- parts.push("(", path2.call(print12, "left"), " of ", path2.call(print12, "right"), ")", adjustClause(path2.call(print12, "body"), options));
58675
+ parts.push("(", path2.call(print11, "left"), " of ", path2.call(print11, "right"), ")", adjustClause(path2.call(print11, "body"), options));
58676
58676
  return (0, lines_1.concat)(parts);
58677
58677
  case "DoWhileStatement": {
58678
58678
  var doBody = (0, lines_1.concat)([
58679
58679
  "do",
58680
- adjustClause(path2.call(print12, "body"), options)
58680
+ adjustClause(path2.call(print11, "body"), options)
58681
58681
  ]);
58682
58682
  parts.push(doBody);
58683
58683
  if (endsWithBrace(doBody))
58684
58684
  parts.push(" while");
58685
58685
  else
58686
58686
  parts.push("\nwhile");
58687
- parts.push(" (", path2.call(print12, "test"), ");");
58687
+ parts.push(" (", path2.call(print11, "test"), ");");
58688
58688
  return (0, lines_1.concat)(parts);
58689
58689
  }
58690
58690
  case "DoExpression": {
58691
58691
  var statements = path2.call(function(bodyPath) {
58692
- return printStatementSequence(bodyPath, options, print12);
58692
+ return printStatementSequence(bodyPath, options, print11);
58693
58693
  }, "body");
58694
58694
  return (0, lines_1.concat)(["do {\n", statements.indent(options.tabWidth), "\n}"]);
58695
58695
  }
58696
58696
  case "BreakStatement":
58697
58697
  parts.push("break");
58698
58698
  if (n.label)
58699
- parts.push(" ", path2.call(print12, "label"));
58699
+ parts.push(" ", path2.call(print11, "label"));
58700
58700
  parts.push(";");
58701
58701
  return (0, lines_1.concat)(parts);
58702
58702
  case "ContinueStatement":
58703
58703
  parts.push("continue");
58704
58704
  if (n.label)
58705
- parts.push(" ", path2.call(print12, "label"));
58705
+ parts.push(" ", path2.call(print11, "label"));
58706
58706
  parts.push(";");
58707
58707
  return (0, lines_1.concat)(parts);
58708
58708
  case "LabeledStatement":
58709
58709
  return (0, lines_1.concat)([
58710
- path2.call(print12, "label"),
58710
+ path2.call(print11, "label"),
58711
58711
  ":\n",
58712
- path2.call(print12, "body")
58712
+ path2.call(print11, "body")
58713
58713
  ]);
58714
58714
  case "TryStatement":
58715
- parts.push("try ", path2.call(print12, "block"));
58715
+ parts.push("try ", path2.call(print11, "block"));
58716
58716
  if (n.handler) {
58717
- parts.push(" ", path2.call(print12, "handler"));
58717
+ parts.push(" ", path2.call(print11, "handler"));
58718
58718
  } else if (n.handlers) {
58719
58719
  path2.each(function(handlerPath) {
58720
- parts.push(" ", print12(handlerPath));
58720
+ parts.push(" ", print11(handlerPath));
58721
58721
  }, "handlers");
58722
58722
  }
58723
58723
  if (n.finalizer) {
58724
- parts.push(" finally ", path2.call(print12, "finalizer"));
58724
+ parts.push(" finally ", path2.call(print11, "finalizer"));
58725
58725
  }
58726
58726
  return (0, lines_1.concat)(parts);
58727
58727
  case "CatchClause":
58728
58728
  parts.push("catch ");
58729
58729
  if (n.param) {
58730
- parts.push("(", path2.call(print12, "param"));
58730
+ parts.push("(", path2.call(print11, "param"));
58731
58731
  }
58732
58732
  if (n.guard) {
58733
- parts.push(" if ", path2.call(print12, "guard"));
58733
+ parts.push(" if ", path2.call(print11, "guard"));
58734
58734
  }
58735
58735
  if (n.param) {
58736
58736
  parts.push(") ");
58737
58737
  }
58738
- parts.push(path2.call(print12, "body"));
58738
+ parts.push(path2.call(print11, "body"));
58739
58739
  return (0, lines_1.concat)(parts);
58740
58740
  case "ThrowStatement":
58741
- return (0, lines_1.concat)(["throw ", path2.call(print12, "argument"), ";"]);
58741
+ return (0, lines_1.concat)(["throw ", path2.call(print11, "argument"), ";"]);
58742
58742
  case "SwitchStatement":
58743
58743
  return (0, lines_1.concat)([
58744
58744
  "switch (",
58745
- path2.call(print12, "discriminant"),
58745
+ path2.call(print11, "discriminant"),
58746
58746
  ") {\n",
58747
- (0, lines_1.fromString)("\n").join(path2.map(print12, "cases")),
58747
+ (0, lines_1.fromString)("\n").join(path2.map(print11, "cases")),
58748
58748
  "\n}"
58749
58749
  ]);
58750
58750
  case "SwitchCase":
58751
58751
  if (n.test)
58752
- parts.push("case ", path2.call(print12, "test"), ":");
58752
+ parts.push("case ", path2.call(print11, "test"), ":");
58753
58753
  else
58754
58754
  parts.push("default:");
58755
58755
  if (n.consequent.length > 0) {
58756
58756
  parts.push("\n", path2.call(function(consequentPath) {
58757
- return printStatementSequence(consequentPath, options, print12);
58757
+ return printStatementSequence(consequentPath, options, print11);
58758
58758
  }, "consequent").indent(options.tabWidth));
58759
58759
  }
58760
58760
  return (0, lines_1.concat)(parts);
58761
58761
  case "DebuggerStatement":
58762
58762
  return (0, lines_1.fromString)("debugger;");
58763
58763
  case "JSXAttribute":
58764
- parts.push(path2.call(print12, "name"));
58764
+ parts.push(path2.call(print11, "name"));
58765
58765
  if (n.value)
58766
- parts.push("=", path2.call(print12, "value"));
58766
+ parts.push("=", path2.call(print11, "value"));
58767
58767
  return (0, lines_1.concat)(parts);
58768
58768
  case "JSXIdentifier":
58769
58769
  return (0, lines_1.fromString)(n.name, options);
58770
58770
  case "JSXNamespacedName":
58771
58771
  return (0, lines_1.fromString)(":").join([
58772
- path2.call(print12, "namespace"),
58773
- path2.call(print12, "name")
58772
+ path2.call(print11, "namespace"),
58773
+ path2.call(print11, "name")
58774
58774
  ]);
58775
58775
  case "JSXMemberExpression":
58776
58776
  return (0, lines_1.fromString)(".").join([
58777
- path2.call(print12, "object"),
58778
- path2.call(print12, "property")
58777
+ path2.call(print11, "object"),
58778
+ path2.call(print11, "property")
58779
58779
  ]);
58780
58780
  case "JSXSpreadAttribute":
58781
- return (0, lines_1.concat)(["{...", path2.call(print12, "argument"), "}"]);
58781
+ return (0, lines_1.concat)(["{...", path2.call(print11, "argument"), "}"]);
58782
58782
  case "JSXSpreadChild":
58783
- return (0, lines_1.concat)(["{...", path2.call(print12, "expression"), "}"]);
58783
+ return (0, lines_1.concat)(["{...", path2.call(print11, "expression"), "}"]);
58784
58784
  case "JSXExpressionContainer":
58785
- return (0, lines_1.concat)(["{", path2.call(print12, "expression"), "}"]);
58785
+ return (0, lines_1.concat)(["{", path2.call(print11, "expression"), "}"]);
58786
58786
  case "JSXElement":
58787
58787
  case "JSXFragment": {
58788
58788
  var openingPropName = "opening" + (n.type === "JSXElement" ? "Element" : "Fragment");
58789
58789
  var closingPropName = "closing" + (n.type === "JSXElement" ? "Element" : "Fragment");
58790
- var openingLines = path2.call(print12, openingPropName);
58790
+ var openingLines = path2.call(print11, openingPropName);
58791
58791
  if (n[openingPropName].selfClosing) {
58792
58792
  assert_1.default.ok(!n[closingPropName], "unexpected " + closingPropName + " element in self-closing " + n.type);
58793
58793
  return openingLines;
@@ -58801,16 +58801,16 @@ var require_printer2 = __commonJS({
58801
58801
  return "\n";
58802
58802
  }
58803
58803
  }
58804
- return print12(childPath);
58804
+ return print11(childPath);
58805
58805
  }, "children")).indentTail(options.tabWidth);
58806
- var closingLines = path2.call(print12, closingPropName);
58806
+ var closingLines = path2.call(print11, closingPropName);
58807
58807
  return (0, lines_1.concat)([openingLines, childLines, closingLines]);
58808
58808
  }
58809
58809
  case "JSXOpeningElement": {
58810
- parts.push("<", path2.call(print12, "name"));
58810
+ parts.push("<", path2.call(print11, "name"));
58811
58811
  var attrParts_1 = [];
58812
58812
  path2.each(function(attrPath) {
58813
- attrParts_1.push(" ", print12(attrPath));
58813
+ attrParts_1.push(" ", print11(attrPath));
58814
58814
  }, "attributes");
58815
58815
  var attrLines = (0, lines_1.concat)(attrParts_1);
58816
58816
  var needLineWrap = attrLines.length > 1 || attrLines.getLineLength(1) > options.wrapColumn;
@@ -58827,7 +58827,7 @@ var require_printer2 = __commonJS({
58827
58827
  return (0, lines_1.concat)(parts);
58828
58828
  }
58829
58829
  case "JSXClosingElement":
58830
- return (0, lines_1.concat)(["</", path2.call(print12, "name"), ">"]);
58830
+ return (0, lines_1.concat)(["</", path2.call(print11, "name"), ">"]);
58831
58831
  case "JSXOpeningFragment":
58832
58832
  return (0, lines_1.fromString)("<>");
58833
58833
  case "JSXClosingFragment":
@@ -58838,9 +58838,9 @@ var require_printer2 = __commonJS({
58838
58838
  return (0, lines_1.fromString)("");
58839
58839
  case "TypeAnnotatedIdentifier":
58840
58840
  return (0, lines_1.concat)([
58841
- path2.call(print12, "annotation"),
58841
+ path2.call(print11, "annotation"),
58842
58842
  " ",
58843
- path2.call(print12, "identifier")
58843
+ path2.call(print11, "identifier")
58844
58844
  ]);
58845
58845
  case "ClassBody":
58846
58846
  if (n.body.length === 0) {
@@ -58849,12 +58849,12 @@ var require_printer2 = __commonJS({
58849
58849
  return (0, lines_1.concat)([
58850
58850
  "{\n",
58851
58851
  path2.call(function(bodyPath) {
58852
- return printStatementSequence(bodyPath, options, print12);
58852
+ return printStatementSequence(bodyPath, options, print11);
58853
58853
  }, "body").indent(options.tabWidth),
58854
58854
  "\n}"
58855
58855
  ]);
58856
58856
  case "ClassPropertyDefinition":
58857
- parts.push("static ", path2.call(print12, "definition"));
58857
+ parts.push("static ", path2.call(print11, "definition"));
58858
58858
  if (!namedTypes.MethodDefinition.check(n.definition))
58859
58859
  parts.push(";");
58860
58860
  return (0, lines_1.concat)(parts);
@@ -58875,12 +58875,12 @@ var require_printer2 = __commonJS({
58875
58875
  if (n.readonly) {
58876
58876
  parts.push("readonly ");
58877
58877
  }
58878
- var key = path2.call(print12, "key");
58878
+ var key = path2.call(print11, "key");
58879
58879
  if (n.computed) {
58880
58880
  key = (0, lines_1.concat)(["[", key, "]"]);
58881
58881
  }
58882
58882
  if (n.variance) {
58883
- key = (0, lines_1.concat)([printVariance(path2, print12), key]);
58883
+ key = (0, lines_1.concat)([printVariance(path2, print11), key]);
58884
58884
  }
58885
58885
  parts.push(key);
58886
58886
  if (n.optional) {
@@ -58890,10 +58890,10 @@ var require_printer2 = __commonJS({
58890
58890
  parts.push("!");
58891
58891
  }
58892
58892
  if (n.typeAnnotation) {
58893
- parts.push(path2.call(print12, "typeAnnotation"));
58893
+ parts.push(path2.call(print11, "typeAnnotation"));
58894
58894
  }
58895
58895
  if (n.value) {
58896
- parts.push(" = ", path2.call(print12, "value"));
58896
+ parts.push(" = ", path2.call(print11, "value"));
58897
58897
  }
58898
58898
  parts.push(";");
58899
58899
  return (0, lines_1.concat)(parts);
@@ -58902,21 +58902,21 @@ var require_printer2 = __commonJS({
58902
58902
  if (n.static) {
58903
58903
  parts.push("static ");
58904
58904
  }
58905
- parts.push(path2.call(print12, "key"));
58905
+ parts.push(path2.call(print11, "key"));
58906
58906
  if (n.typeAnnotation) {
58907
- parts.push(path2.call(print12, "typeAnnotation"));
58907
+ parts.push(path2.call(print11, "typeAnnotation"));
58908
58908
  }
58909
58909
  if (n.value) {
58910
- parts.push(" = ", path2.call(print12, "value"));
58910
+ parts.push(" = ", path2.call(print11, "value"));
58911
58911
  }
58912
58912
  parts.push(";");
58913
58913
  return (0, lines_1.concat)(parts);
58914
58914
  case "ClassAccessorProperty": {
58915
58915
  parts.push.apply(parts, tslib_1.__spreadArray(tslib_1.__spreadArray([], printClassMemberModifiers(n), false), ["accessor "], false));
58916
58916
  if (n.computed) {
58917
- parts.push("[", path2.call(print12, "key"), "]");
58917
+ parts.push("[", path2.call(print11, "key"), "]");
58918
58918
  } else {
58919
- parts.push(path2.call(print12, "key"));
58919
+ parts.push(path2.call(print11, "key"));
58920
58920
  }
58921
58921
  if (n.optional) {
58922
58922
  parts.push("?");
@@ -58925,10 +58925,10 @@ var require_printer2 = __commonJS({
58925
58925
  parts.push("!");
58926
58926
  }
58927
58927
  if (n.typeAnnotation) {
58928
- parts.push(path2.call(print12, "typeAnnotation"));
58928
+ parts.push(path2.call(print11, "typeAnnotation"));
58929
58929
  }
58930
58930
  if (n.value) {
58931
- parts.push(" = ", path2.call(print12, "value"));
58931
+ parts.push(" = ", path2.call(print11, "value"));
58932
58932
  }
58933
58933
  parts.push(";");
58934
58934
  return (0, lines_1.concat)(parts);
@@ -58944,21 +58944,21 @@ var require_printer2 = __commonJS({
58944
58944
  }
58945
58945
  parts.push("class");
58946
58946
  if (n.id) {
58947
- parts.push(" ", path2.call(print12, "id"));
58947
+ parts.push(" ", path2.call(print11, "id"));
58948
58948
  }
58949
58949
  if (n.typeParameters) {
58950
- parts.push(path2.call(print12, "typeParameters"));
58950
+ parts.push(path2.call(print11, "typeParameters"));
58951
58951
  }
58952
58952
  if (n.superClass) {
58953
- parts.push(" extends ", path2.call(print12, "superClass"), path2.call(print12, "superTypeParameters"));
58953
+ parts.push(" extends ", path2.call(print11, "superClass"), path2.call(print11, "superTypeParameters"));
58954
58954
  }
58955
58955
  if (n.extends && n.extends.length > 0) {
58956
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print12, "extends")));
58956
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
58957
58957
  }
58958
58958
  if (n["implements"] && n["implements"].length > 0) {
58959
- parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(print12, "implements")));
58959
+ parts.push(" implements ", (0, lines_1.fromString)(", ").join(path2.map(print11, "implements")));
58960
58960
  }
58961
- parts.push(" ", path2.call(print12, "body"));
58961
+ parts.push(" ", path2.call(print11, "body"));
58962
58962
  if (n.type === "DeclareClass") {
58963
58963
  return printFlowDeclaration(path2, parts);
58964
58964
  } else {
@@ -58967,11 +58967,11 @@ var require_printer2 = __commonJS({
58967
58967
  case "TemplateElement":
58968
58968
  return (0, lines_1.fromString)(n.value.raw, options).lockIndentTail();
58969
58969
  case "TemplateLiteral": {
58970
- var expressions_1 = path2.map(print12, "expressions");
58970
+ var expressions_1 = path2.map(print11, "expressions");
58971
58971
  parts.push("`");
58972
58972
  path2.each(function(childPath) {
58973
58973
  var i2 = childPath.getName();
58974
- parts.push(print12(childPath));
58974
+ parts.push(print11(childPath));
58975
58975
  if (i2 < expressions_1.length) {
58976
58976
  parts.push("${", expressions_1[i2], "}");
58977
58977
  }
@@ -58980,7 +58980,7 @@ var require_printer2 = __commonJS({
58980
58980
  return (0, lines_1.concat)(parts).lockIndentTail();
58981
58981
  }
58982
58982
  case "TaggedTemplateExpression":
58983
- return (0, lines_1.concat)([path2.call(print12, "tag"), path2.call(print12, "quasi")]);
58983
+ return (0, lines_1.concat)([path2.call(print11, "tag"), path2.call(print11, "quasi")]);
58984
58984
  case "Node":
58985
58985
  case "Printable":
58986
58986
  case "SourceLocation":
@@ -59014,7 +59014,7 @@ var require_printer2 = __commonJS({
59014
59014
  if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
59015
59015
  parts.push(": ");
59016
59016
  }
59017
- parts.push(path2.call(print12, "typeAnnotation"));
59017
+ parts.push(path2.call(print11, "typeAnnotation"));
59018
59018
  return (0, lines_1.concat)(parts);
59019
59019
  }
59020
59020
  return (0, lines_1.fromString)("");
@@ -59028,9 +59028,9 @@ var require_printer2 = __commonJS({
59028
59028
  case "MixedTypeAnnotation":
59029
59029
  return (0, lines_1.fromString)("mixed", options);
59030
59030
  case "ArrayTypeAnnotation":
59031
- return (0, lines_1.concat)([path2.call(print12, "elementType"), "[]"]);
59031
+ return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
59032
59032
  case "TupleTypeAnnotation": {
59033
- var printed_2 = path2.map(print12, "types");
59033
+ var printed_2 = path2.map(print11, "types");
59034
59034
  var joined = (0, lines_1.fromString)(", ").join(printed_2);
59035
59035
  var oneLine_3 = joined.getLineLength(1) <= options.wrapColumn;
59036
59036
  if (oneLine_3) {
@@ -59077,38 +59077,38 @@ var require_printer2 = __commonJS({
59077
59077
  case "InterfaceTypeAnnotation":
59078
59078
  parts.push("interface");
59079
59079
  if (n.extends && n.extends.length > 0) {
59080
- parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print12, "extends")));
59080
+ parts.push(" extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")));
59081
59081
  }
59082
- parts.push(" ", path2.call(print12, "body"));
59082
+ parts.push(" ", path2.call(print11, "body"));
59083
59083
  return (0, lines_1.concat)(parts);
59084
59084
  case "DeclareFunction":
59085
59085
  return printFlowDeclaration(path2, [
59086
59086
  "function ",
59087
- path2.call(print12, "id"),
59087
+ path2.call(print11, "id"),
59088
59088
  ";"
59089
59089
  ]);
59090
59090
  case "DeclareModule":
59091
59091
  return printFlowDeclaration(path2, [
59092
59092
  "module ",
59093
- path2.call(print12, "id"),
59093
+ path2.call(print11, "id"),
59094
59094
  " ",
59095
- path2.call(print12, "body")
59095
+ path2.call(print11, "body")
59096
59096
  ]);
59097
59097
  case "DeclareModuleExports":
59098
59098
  return printFlowDeclaration(path2, [
59099
59099
  "module.exports",
59100
- path2.call(print12, "typeAnnotation")
59100
+ path2.call(print11, "typeAnnotation")
59101
59101
  ]);
59102
59102
  case "DeclareVariable":
59103
- return printFlowDeclaration(path2, ["var ", path2.call(print12, "id"), ";"]);
59103
+ return printFlowDeclaration(path2, ["var ", path2.call(print11, "id"), ";"]);
59104
59104
  case "DeclareExportDeclaration":
59105
59105
  case "DeclareExportAllDeclaration":
59106
- return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options, print12)]);
59106
+ return (0, lines_1.concat)(["declare ", printExportDeclaration(path2, options, print11)]);
59107
59107
  case "EnumDeclaration":
59108
59108
  return (0, lines_1.concat)([
59109
59109
  "enum ",
59110
- path2.call(print12, "id"),
59111
- path2.call(print12, "body")
59110
+ path2.call(print11, "id"),
59111
+ path2.call(print11, "body")
59112
59112
  ]);
59113
59113
  case "EnumBooleanBody":
59114
59114
  case "EnumNumberBody":
@@ -59120,24 +59120,24 @@ var require_printer2 = __commonJS({
59120
59120
  n.type.slice(4, -4).toLowerCase()
59121
59121
  );
59122
59122
  }
59123
- parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(print12, "members")).indent(options.tabWidth), "\n}");
59123
+ parts.push(" {\n", (0, lines_1.fromString)("\n").join(path2.map(print11, "members")).indent(options.tabWidth), "\n}");
59124
59124
  return (0, lines_1.concat)(parts);
59125
59125
  }
59126
59126
  case "EnumDefaultedMember":
59127
- return (0, lines_1.concat)([path2.call(print12, "id"), ","]);
59127
+ return (0, lines_1.concat)([path2.call(print11, "id"), ","]);
59128
59128
  case "EnumBooleanMember":
59129
59129
  case "EnumNumberMember":
59130
59130
  case "EnumStringMember":
59131
59131
  return (0, lines_1.concat)([
59132
- path2.call(print12, "id"),
59132
+ path2.call(print11, "id"),
59133
59133
  " = ",
59134
- path2.call(print12, "init"),
59134
+ path2.call(print11, "init"),
59135
59135
  ","
59136
59136
  ]);
59137
59137
  case "InferredPredicate":
59138
59138
  return (0, lines_1.fromString)("%checks", options);
59139
59139
  case "DeclaredPredicate":
59140
- return (0, lines_1.concat)(["%checks(", path2.call(print12, "value"), ")"]);
59140
+ return (0, lines_1.concat)(["%checks(", path2.call(print11, "value"), ")"]);
59141
59141
  case "FunctionTypeAnnotation": {
59142
59142
  var parent = path2.getParentNode(0);
59143
59143
  var isArrowFunctionTypeAnnotation = !(namedTypes.ObjectTypeCallProperty.check(parent) || namedTypes.ObjectTypeInternalSlot.check(parent) && parent.method || namedTypes.DeclareFunction.check(path2.getParentNode(2)));
@@ -59147,14 +59147,14 @@ var require_printer2 = __commonJS({
59147
59147
  }
59148
59148
  var hasTypeParameters = !!n.typeParameters;
59149
59149
  var needsParens = hasTypeParameters || n.params.length !== 1 || n.params[0].name;
59150
- parts.push(hasTypeParameters ? path2.call(print12, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path2, options, print12), needsParens ? ")" : "");
59150
+ parts.push(hasTypeParameters ? path2.call(print11, "typeParameters") : "", needsParens ? "(" : "", printFunctionParams(path2, options, print11), needsParens ? ")" : "");
59151
59151
  if (n.returnType) {
59152
- parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(print12, "returnType"));
59152
+ parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path2.call(print11, "returnType"));
59153
59153
  }
59154
59154
  return (0, lines_1.concat)(parts);
59155
59155
  }
59156
59156
  case "FunctionTypeParam": {
59157
- var name = path2.call(print12, "name");
59157
+ var name = path2.call(print11, "name");
59158
59158
  parts.push(name);
59159
59159
  if (n.optional) {
59160
59160
  parts.push("?");
@@ -59162,13 +59162,13 @@ var require_printer2 = __commonJS({
59162
59162
  if (name.infos[0].line) {
59163
59163
  parts.push(": ");
59164
59164
  }
59165
- parts.push(path2.call(print12, "typeAnnotation"));
59165
+ parts.push(path2.call(print11, "typeAnnotation"));
59166
59166
  return (0, lines_1.concat)(parts);
59167
59167
  }
59168
59168
  case "GenericTypeAnnotation":
59169
59169
  return (0, lines_1.concat)([
59170
- path2.call(print12, "id"),
59171
- path2.call(print12, "typeParameters")
59170
+ path2.call(print11, "id"),
59171
+ path2.call(print11, "typeParameters")
59172
59172
  ]);
59173
59173
  case "DeclareInterface":
59174
59174
  parts.push("declare ");
@@ -59177,24 +59177,24 @@ var require_printer2 = __commonJS({
59177
59177
  if (n.declare) {
59178
59178
  parts.push("declare ");
59179
59179
  }
59180
- parts.push("interface ", path2.call(print12, "id"), path2.call(print12, "typeParameters"), " ");
59180
+ parts.push("interface ", path2.call(print11, "id"), path2.call(print11, "typeParameters"), " ");
59181
59181
  if (n["extends"] && n["extends"].length > 0) {
59182
- parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(print12, "extends")), " ");
59182
+ parts.push("extends ", (0, lines_1.fromString)(", ").join(path2.map(print11, "extends")), " ");
59183
59183
  }
59184
59184
  if (n.body) {
59185
- parts.push(path2.call(print12, "body"));
59185
+ parts.push(path2.call(print11, "body"));
59186
59186
  }
59187
59187
  return (0, lines_1.concat)(parts);
59188
59188
  case "ClassImplements":
59189
59189
  case "InterfaceExtends":
59190
59190
  return (0, lines_1.concat)([
59191
- path2.call(print12, "id"),
59192
- path2.call(print12, "typeParameters")
59191
+ path2.call(print11, "id"),
59192
+ path2.call(print11, "typeParameters")
59193
59193
  ]);
59194
59194
  case "IntersectionTypeAnnotation":
59195
- return (0, lines_1.fromString)(" & ").join(path2.map(print12, "types"));
59195
+ return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
59196
59196
  case "NullableTypeAnnotation":
59197
- return (0, lines_1.concat)(["?", path2.call(print12, "typeAnnotation")]);
59197
+ return (0, lines_1.concat)(["?", path2.call(print11, "typeAnnotation")]);
59198
59198
  case "NullLiteralTypeAnnotation":
59199
59199
  return (0, lines_1.fromString)("null", options);
59200
59200
  case "ThisTypeAnnotation":
@@ -59202,40 +59202,40 @@ var require_printer2 = __commonJS({
59202
59202
  case "NumberTypeAnnotation":
59203
59203
  return (0, lines_1.fromString)("number", options);
59204
59204
  case "ObjectTypeCallProperty":
59205
- return path2.call(print12, "value");
59205
+ return path2.call(print11, "value");
59206
59206
  case "ObjectTypeIndexer":
59207
59207
  if (n.static) {
59208
59208
  parts.push("static ");
59209
59209
  }
59210
- parts.push(printVariance(path2, print12), "[");
59210
+ parts.push(printVariance(path2, print11), "[");
59211
59211
  if (n.id) {
59212
- parts.push(path2.call(print12, "id"), ": ");
59212
+ parts.push(path2.call(print11, "id"), ": ");
59213
59213
  }
59214
- parts.push(path2.call(print12, "key"), "]: ", path2.call(print12, "value"));
59214
+ parts.push(path2.call(print11, "key"), "]: ", path2.call(print11, "value"));
59215
59215
  return (0, lines_1.concat)(parts);
59216
59216
  case "ObjectTypeProperty":
59217
59217
  return (0, lines_1.concat)([
59218
- printVariance(path2, print12),
59219
- path2.call(print12, "key"),
59218
+ printVariance(path2, print11),
59219
+ path2.call(print11, "key"),
59220
59220
  n.optional ? "?" : "",
59221
59221
  ": ",
59222
- path2.call(print12, "value")
59222
+ path2.call(print11, "value")
59223
59223
  ]);
59224
59224
  case "ObjectTypeInternalSlot":
59225
59225
  return (0, lines_1.concat)([
59226
59226
  n.static ? "static " : "",
59227
59227
  "[[",
59228
- path2.call(print12, "id"),
59228
+ path2.call(print11, "id"),
59229
59229
  "]]",
59230
59230
  n.optional ? "?" : "",
59231
59231
  n.value.type !== "FunctionTypeAnnotation" ? ": " : "",
59232
- path2.call(print12, "value")
59232
+ path2.call(print11, "value")
59233
59233
  ]);
59234
59234
  case "QualifiedTypeIdentifier":
59235
59235
  return (0, lines_1.concat)([
59236
- path2.call(print12, "qualification"),
59236
+ path2.call(print11, "qualification"),
59237
59237
  ".",
59238
- path2.call(print12, "id")
59238
+ path2.call(print11, "id")
59239
59239
  ]);
59240
59240
  case "StringLiteralTypeAnnotation":
59241
59241
  return (0, lines_1.fromString)(nodeStr(n.value, options), options);
@@ -59252,36 +59252,36 @@ var require_printer2 = __commonJS({
59252
59252
  case "TypeAlias":
59253
59253
  return (0, lines_1.concat)([
59254
59254
  "type ",
59255
- path2.call(print12, "id"),
59256
- path2.call(print12, "typeParameters"),
59255
+ path2.call(print11, "id"),
59256
+ path2.call(print11, "typeParameters"),
59257
59257
  " = ",
59258
- path2.call(print12, "right"),
59258
+ path2.call(print11, "right"),
59259
59259
  ";"
59260
59260
  ]);
59261
59261
  case "DeclareOpaqueType":
59262
59262
  parts.push("declare ");
59263
59263
  case "OpaqueType":
59264
- parts.push("opaque type ", path2.call(print12, "id"), path2.call(print12, "typeParameters"));
59264
+ parts.push("opaque type ", path2.call(print11, "id"), path2.call(print11, "typeParameters"));
59265
59265
  if (n["supertype"]) {
59266
- parts.push(": ", path2.call(print12, "supertype"));
59266
+ parts.push(": ", path2.call(print11, "supertype"));
59267
59267
  }
59268
59268
  if (n["impltype"]) {
59269
- parts.push(" = ", path2.call(print12, "impltype"));
59269
+ parts.push(" = ", path2.call(print11, "impltype"));
59270
59270
  }
59271
59271
  parts.push(";");
59272
59272
  return (0, lines_1.concat)(parts);
59273
59273
  case "TypeCastExpression":
59274
59274
  return (0, lines_1.concat)([
59275
59275
  "(",
59276
- path2.call(print12, "expression"),
59277
- path2.call(print12, "typeAnnotation"),
59276
+ path2.call(print11, "expression"),
59277
+ path2.call(print11, "typeAnnotation"),
59278
59278
  ")"
59279
59279
  ]);
59280
59280
  case "TypeParameterDeclaration":
59281
59281
  case "TypeParameterInstantiation":
59282
59282
  return (0, lines_1.concat)([
59283
59283
  "<",
59284
- (0, lines_1.fromString)(", ").join(path2.map(print12, "params")),
59284
+ (0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
59285
59285
  ">"
59286
59286
  ]);
59287
59287
  case "Variance":
@@ -59294,32 +59294,32 @@ var require_printer2 = __commonJS({
59294
59294
  return (0, lines_1.fromString)("");
59295
59295
  case "TypeParameter":
59296
59296
  if (n.variance) {
59297
- parts.push(printVariance(path2, print12));
59297
+ parts.push(printVariance(path2, print11));
59298
59298
  }
59299
- parts.push(path2.call(print12, "name"));
59299
+ parts.push(path2.call(print11, "name"));
59300
59300
  if (n.bound) {
59301
- parts.push(path2.call(print12, "bound"));
59301
+ parts.push(path2.call(print11, "bound"));
59302
59302
  }
59303
59303
  if (n["default"]) {
59304
- parts.push("=", path2.call(print12, "default"));
59304
+ parts.push("=", path2.call(print11, "default"));
59305
59305
  }
59306
59306
  return (0, lines_1.concat)(parts);
59307
59307
  case "TypeofTypeAnnotation":
59308
59308
  return (0, lines_1.concat)([
59309
59309
  (0, lines_1.fromString)("typeof ", options),
59310
- path2.call(print12, "argument")
59310
+ path2.call(print11, "argument")
59311
59311
  ]);
59312
59312
  case "IndexedAccessType":
59313
59313
  case "OptionalIndexedAccessType":
59314
59314
  return (0, lines_1.concat)([
59315
- path2.call(print12, "objectType"),
59315
+ path2.call(print11, "objectType"),
59316
59316
  n.optional ? "?." : "",
59317
59317
  "[",
59318
- path2.call(print12, "indexType"),
59318
+ path2.call(print11, "indexType"),
59319
59319
  "]"
59320
59320
  ]);
59321
59321
  case "UnionTypeAnnotation":
59322
- return (0, lines_1.fromString)(" | ").join(path2.map(print12, "types"));
59322
+ return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
59323
59323
  case "VoidTypeAnnotation":
59324
59324
  return (0, lines_1.fromString)("void", options);
59325
59325
  case "NullTypeAnnotation":
@@ -59359,77 +59359,77 @@ var require_printer2 = __commonJS({
59359
59359
  case "TSNeverKeyword":
59360
59360
  return (0, lines_1.fromString)("never", options);
59361
59361
  case "TSArrayType":
59362
- return (0, lines_1.concat)([path2.call(print12, "elementType"), "[]"]);
59362
+ return (0, lines_1.concat)([path2.call(print11, "elementType"), "[]"]);
59363
59363
  case "TSLiteralType":
59364
- return path2.call(print12, "literal");
59364
+ return path2.call(print11, "literal");
59365
59365
  case "TSUnionType":
59366
- return (0, lines_1.fromString)(" | ").join(path2.map(print12, "types"));
59366
+ return (0, lines_1.fromString)(" | ").join(path2.map(print11, "types"));
59367
59367
  case "TSIntersectionType":
59368
- return (0, lines_1.fromString)(" & ").join(path2.map(print12, "types"));
59368
+ return (0, lines_1.fromString)(" & ").join(path2.map(print11, "types"));
59369
59369
  case "TSConditionalType":
59370
- parts.push(path2.call(print12, "checkType"), " extends ", path2.call(print12, "extendsType"), " ? ", path2.call(print12, "trueType"), " : ", path2.call(print12, "falseType"));
59370
+ parts.push(path2.call(print11, "checkType"), " extends ", path2.call(print11, "extendsType"), " ? ", path2.call(print11, "trueType"), " : ", path2.call(print11, "falseType"));
59371
59371
  return (0, lines_1.concat)(parts);
59372
59372
  case "TSInferType":
59373
- parts.push("infer ", path2.call(print12, "typeParameter"));
59373
+ parts.push("infer ", path2.call(print11, "typeParameter"));
59374
59374
  return (0, lines_1.concat)(parts);
59375
59375
  case "TSParenthesizedType":
59376
- return (0, lines_1.concat)(["(", path2.call(print12, "typeAnnotation"), ")"]);
59376
+ return (0, lines_1.concat)(["(", path2.call(print11, "typeAnnotation"), ")"]);
59377
59377
  case "TSFunctionType":
59378
59378
  return (0, lines_1.concat)([
59379
- path2.call(print12, "typeParameters"),
59379
+ path2.call(print11, "typeParameters"),
59380
59380
  "(",
59381
- printFunctionParams(path2, options, print12),
59381
+ printFunctionParams(path2, options, print11),
59382
59382
  ") => ",
59383
- path2.call(print12, "typeAnnotation", "typeAnnotation")
59383
+ path2.call(print11, "typeAnnotation", "typeAnnotation")
59384
59384
  ]);
59385
59385
  case "TSConstructorType":
59386
59386
  return (0, lines_1.concat)([
59387
59387
  "new ",
59388
- path2.call(print12, "typeParameters"),
59388
+ path2.call(print11, "typeParameters"),
59389
59389
  "(",
59390
- printFunctionParams(path2, options, print12),
59390
+ printFunctionParams(path2, options, print11),
59391
59391
  ") => ",
59392
- path2.call(print12, "typeAnnotation", "typeAnnotation")
59392
+ path2.call(print11, "typeAnnotation", "typeAnnotation")
59393
59393
  ]);
59394
59394
  case "TSMappedType": {
59395
- parts.push(n.readonly ? "readonly " : "", "[", path2.call(print12, "typeParameter"), "]", n.optional ? "?" : "");
59395
+ parts.push(n.readonly ? "readonly " : "", "[", path2.call(print11, "typeParameter"), "]", n.optional ? "?" : "");
59396
59396
  if (n.typeAnnotation) {
59397
- parts.push(": ", path2.call(print12, "typeAnnotation"), ";");
59397
+ parts.push(": ", path2.call(print11, "typeAnnotation"), ";");
59398
59398
  }
59399
59399
  return (0, lines_1.concat)(["{\n", (0, lines_1.concat)(parts).indent(options.tabWidth), "\n}"]);
59400
59400
  }
59401
59401
  case "TSTupleType":
59402
59402
  return (0, lines_1.concat)([
59403
59403
  "[",
59404
- (0, lines_1.fromString)(", ").join(path2.map(print12, "elementTypes")),
59404
+ (0, lines_1.fromString)(", ").join(path2.map(print11, "elementTypes")),
59405
59405
  "]"
59406
59406
  ]);
59407
59407
  case "TSNamedTupleMember":
59408
- parts.push(path2.call(print12, "label"));
59408
+ parts.push(path2.call(print11, "label"));
59409
59409
  if (n.optional) {
59410
59410
  parts.push("?");
59411
59411
  }
59412
- parts.push(": ", path2.call(print12, "elementType"));
59412
+ parts.push(": ", path2.call(print11, "elementType"));
59413
59413
  return (0, lines_1.concat)(parts);
59414
59414
  case "TSRestType":
59415
- return (0, lines_1.concat)(["...", path2.call(print12, "typeAnnotation")]);
59415
+ return (0, lines_1.concat)(["...", path2.call(print11, "typeAnnotation")]);
59416
59416
  case "TSOptionalType":
59417
- return (0, lines_1.concat)([path2.call(print12, "typeAnnotation"), "?"]);
59417
+ return (0, lines_1.concat)([path2.call(print11, "typeAnnotation"), "?"]);
59418
59418
  case "TSIndexedAccessType":
59419
59419
  return (0, lines_1.concat)([
59420
- path2.call(print12, "objectType"),
59420
+ path2.call(print11, "objectType"),
59421
59421
  "[",
59422
- path2.call(print12, "indexType"),
59422
+ path2.call(print11, "indexType"),
59423
59423
  "]"
59424
59424
  ]);
59425
59425
  case "TSTypeOperator":
59426
59426
  return (0, lines_1.concat)([
59427
- path2.call(print12, "operator"),
59427
+ path2.call(print11, "operator"),
59428
59428
  " ",
59429
- path2.call(print12, "typeAnnotation")
59429
+ path2.call(print11, "typeAnnotation")
59430
59430
  ]);
59431
59431
  case "TSTypeLiteral": {
59432
- var members = (0, lines_1.fromString)("\n").join(path2.map(print12, "members").map(function(member) {
59432
+ var members = (0, lines_1.fromString)("\n").join(path2.map(print11, "members").map(function(member) {
59433
59433
  if (lastNonSpaceCharacter(member) !== ";") {
59434
59434
  return member.concat(";");
59435
59435
  }
@@ -59442,13 +59442,13 @@ var require_printer2 = __commonJS({
59442
59442
  return (0, lines_1.concat)(parts);
59443
59443
  }
59444
59444
  case "TSEnumMember":
59445
- parts.push(path2.call(print12, "id"));
59445
+ parts.push(path2.call(print11, "id"));
59446
59446
  if (n.initializer) {
59447
- parts.push(" = ", path2.call(print12, "initializer"));
59447
+ parts.push(" = ", path2.call(print11, "initializer"));
59448
59448
  }
59449
59449
  return (0, lines_1.concat)(parts);
59450
59450
  case "TSTypeQuery":
59451
- return (0, lines_1.concat)(["typeof ", path2.call(print12, "exprName")]);
59451
+ return (0, lines_1.concat)(["typeof ", path2.call(print11, "exprName")]);
59452
59452
  case "TSParameterProperty":
59453
59453
  if (n.accessibility) {
59454
59454
  parts.push(n.accessibility, " ");
@@ -59462,119 +59462,119 @@ var require_printer2 = __commonJS({
59462
59462
  if (n.readonly) {
59463
59463
  parts.push("readonly ");
59464
59464
  }
59465
- parts.push(path2.call(print12, "parameter"));
59465
+ parts.push(path2.call(print11, "parameter"));
59466
59466
  return (0, lines_1.concat)(parts);
59467
59467
  case "TSTypeReference":
59468
59468
  return (0, lines_1.concat)([
59469
- path2.call(print12, "typeName"),
59470
- path2.call(print12, "typeParameters")
59469
+ path2.call(print11, "typeName"),
59470
+ path2.call(print11, "typeParameters")
59471
59471
  ]);
59472
59472
  case "TSQualifiedName":
59473
- return (0, lines_1.concat)([path2.call(print12, "left"), ".", path2.call(print12, "right")]);
59473
+ return (0, lines_1.concat)([path2.call(print11, "left"), ".", path2.call(print11, "right")]);
59474
59474
  case "TSAsExpression":
59475
59475
  case "TSSatisfiesExpression": {
59476
- var expression = path2.call(print12, "expression");
59477
- parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(print12, "typeAnnotation"));
59476
+ var expression = path2.call(print11, "expression");
59477
+ parts.push(expression, n.type === "TSSatisfiesExpression" ? " satisfies " : " as ", path2.call(print11, "typeAnnotation"));
59478
59478
  return (0, lines_1.concat)(parts);
59479
59479
  }
59480
59480
  case "TSTypeCastExpression":
59481
59481
  return (0, lines_1.concat)([
59482
- path2.call(print12, "expression"),
59483
- path2.call(print12, "typeAnnotation")
59482
+ path2.call(print11, "expression"),
59483
+ path2.call(print11, "typeAnnotation")
59484
59484
  ]);
59485
59485
  case "TSNonNullExpression":
59486
- return (0, lines_1.concat)([path2.call(print12, "expression"), "!"]);
59486
+ return (0, lines_1.concat)([path2.call(print11, "expression"), "!"]);
59487
59487
  case "TSTypeAnnotation":
59488
- return (0, lines_1.concat)([": ", path2.call(print12, "typeAnnotation")]);
59488
+ return (0, lines_1.concat)([": ", path2.call(print11, "typeAnnotation")]);
59489
59489
  case "TSIndexSignature":
59490
59490
  return (0, lines_1.concat)([
59491
59491
  n.readonly ? "readonly " : "",
59492
59492
  "[",
59493
- path2.map(print12, "parameters"),
59493
+ path2.map(print11, "parameters"),
59494
59494
  "]",
59495
- path2.call(print12, "typeAnnotation")
59495
+ path2.call(print11, "typeAnnotation")
59496
59496
  ]);
59497
59497
  case "TSPropertySignature":
59498
- parts.push(printVariance(path2, print12), n.readonly ? "readonly " : "");
59498
+ parts.push(printVariance(path2, print11), n.readonly ? "readonly " : "");
59499
59499
  if (n.computed) {
59500
- parts.push("[", path2.call(print12, "key"), "]");
59500
+ parts.push("[", path2.call(print11, "key"), "]");
59501
59501
  } else {
59502
- parts.push(path2.call(print12, "key"));
59502
+ parts.push(path2.call(print11, "key"));
59503
59503
  }
59504
- parts.push(n.optional ? "?" : "", path2.call(print12, "typeAnnotation"));
59504
+ parts.push(n.optional ? "?" : "", path2.call(print11, "typeAnnotation"));
59505
59505
  return (0, lines_1.concat)(parts);
59506
59506
  case "TSMethodSignature":
59507
59507
  if (n.computed) {
59508
- parts.push("[", path2.call(print12, "key"), "]");
59508
+ parts.push("[", path2.call(print11, "key"), "]");
59509
59509
  } else {
59510
- parts.push(path2.call(print12, "key"));
59510
+ parts.push(path2.call(print11, "key"));
59511
59511
  }
59512
59512
  if (n.optional) {
59513
59513
  parts.push("?");
59514
59514
  }
59515
- parts.push(path2.call(print12, "typeParameters"), "(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "typeAnnotation"));
59515
+ parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
59516
59516
  return (0, lines_1.concat)(parts);
59517
59517
  case "TSTypePredicate":
59518
59518
  if (n.asserts) {
59519
59519
  parts.push("asserts ");
59520
59520
  }
59521
- parts.push(path2.call(print12, "parameterName"));
59521
+ parts.push(path2.call(print11, "parameterName"));
59522
59522
  if (n.typeAnnotation) {
59523
- parts.push(" is ", path2.call(print12, "typeAnnotation", "typeAnnotation"));
59523
+ parts.push(" is ", path2.call(print11, "typeAnnotation", "typeAnnotation"));
59524
59524
  }
59525
59525
  return (0, lines_1.concat)(parts);
59526
59526
  case "TSCallSignatureDeclaration":
59527
59527
  return (0, lines_1.concat)([
59528
- path2.call(print12, "typeParameters"),
59528
+ path2.call(print11, "typeParameters"),
59529
59529
  "(",
59530
- printFunctionParams(path2, options, print12),
59530
+ printFunctionParams(path2, options, print11),
59531
59531
  ")",
59532
- path2.call(print12, "typeAnnotation")
59532
+ path2.call(print11, "typeAnnotation")
59533
59533
  ]);
59534
59534
  case "TSConstructSignatureDeclaration":
59535
59535
  if (n.typeParameters) {
59536
- parts.push("new", path2.call(print12, "typeParameters"));
59536
+ parts.push("new", path2.call(print11, "typeParameters"));
59537
59537
  } else {
59538
59538
  parts.push("new ");
59539
59539
  }
59540
- parts.push("(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "typeAnnotation"));
59540
+ parts.push("(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "typeAnnotation"));
59541
59541
  return (0, lines_1.concat)(parts);
59542
59542
  case "TSTypeAliasDeclaration":
59543
59543
  return (0, lines_1.concat)([
59544
59544
  n.declare ? "declare " : "",
59545
59545
  "type ",
59546
- path2.call(print12, "id"),
59547
- path2.call(print12, "typeParameters"),
59546
+ path2.call(print11, "id"),
59547
+ path2.call(print11, "typeParameters"),
59548
59548
  " = ",
59549
- path2.call(print12, "typeAnnotation"),
59549
+ path2.call(print11, "typeAnnotation"),
59550
59550
  ";"
59551
59551
  ]);
59552
59552
  case "TSTypeParameter": {
59553
- parts.push(path2.call(print12, "name"));
59553
+ parts.push(path2.call(print11, "name"));
59554
59554
  var parent = path2.getParentNode(0);
59555
59555
  var isInMappedType = namedTypes.TSMappedType.check(parent);
59556
59556
  if (n.constraint) {
59557
- parts.push(isInMappedType ? " in " : " extends ", path2.call(print12, "constraint"));
59557
+ parts.push(isInMappedType ? " in " : " extends ", path2.call(print11, "constraint"));
59558
59558
  }
59559
59559
  if (n["default"]) {
59560
- parts.push(" = ", path2.call(print12, "default"));
59560
+ parts.push(" = ", path2.call(print11, "default"));
59561
59561
  }
59562
59562
  return (0, lines_1.concat)(parts);
59563
59563
  }
59564
59564
  case "TSTypeAssertion": {
59565
- parts.push("<", path2.call(print12, "typeAnnotation"), "> ", path2.call(print12, "expression"));
59565
+ parts.push("<", path2.call(print11, "typeAnnotation"), "> ", path2.call(print11, "expression"));
59566
59566
  return (0, lines_1.concat)(parts);
59567
59567
  }
59568
59568
  case "TSTypeParameterDeclaration":
59569
59569
  case "TSTypeParameterInstantiation":
59570
59570
  return (0, lines_1.concat)([
59571
59571
  "<",
59572
- (0, lines_1.fromString)(", ").join(path2.map(print12, "params")),
59572
+ (0, lines_1.fromString)(", ").join(path2.map(print11, "params")),
59573
59573
  ">"
59574
59574
  ]);
59575
59575
  case "TSEnumDeclaration": {
59576
- parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(print12, "id"));
59577
- var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(print12, "members"));
59576
+ parts.push(n.declare ? "declare " : "", n.const ? "const " : "", "enum ", path2.call(print11, "id"));
59577
+ var memberLines = (0, lines_1.fromString)(",\n").join(path2.map(print11, "members"));
59578
59578
  if (memberLines.isEmpty()) {
59579
59579
  parts.push(" {}");
59580
59580
  } else {
@@ -59584,11 +59584,11 @@ var require_printer2 = __commonJS({
59584
59584
  }
59585
59585
  case "TSExpressionWithTypeArguments":
59586
59586
  return (0, lines_1.concat)([
59587
- path2.call(print12, "expression"),
59588
- path2.call(print12, "typeParameters")
59587
+ path2.call(print11, "expression"),
59588
+ path2.call(print11, "typeParameters")
59589
59589
  ]);
59590
59590
  case "TSInterfaceBody": {
59591
- var lines = (0, lines_1.fromString)("\n").join(path2.map(print12, "body").map(function(element) {
59591
+ var lines = (0, lines_1.fromString)("\n").join(path2.map(print11, "body").map(function(element) {
59592
59592
  if (lastNonSpaceCharacter(element) !== ";") {
59593
59593
  return element.concat(";");
59594
59594
  }
@@ -59600,22 +59600,22 @@ var require_printer2 = __commonJS({
59600
59600
  return (0, lines_1.concat)(["{\n", lines.indent(options.tabWidth), "\n}"]);
59601
59601
  }
59602
59602
  case "TSImportType":
59603
- parts.push("import(", path2.call(print12, "argument"), ")");
59603
+ parts.push("import(", path2.call(print11, "argument"), ")");
59604
59604
  if (n.qualifier) {
59605
- parts.push(".", path2.call(print12, "qualifier"));
59605
+ parts.push(".", path2.call(print11, "qualifier"));
59606
59606
  }
59607
59607
  if (n.typeParameters) {
59608
- parts.push(path2.call(print12, "typeParameters"));
59608
+ parts.push(path2.call(print11, "typeParameters"));
59609
59609
  }
59610
59610
  return (0, lines_1.concat)(parts);
59611
59611
  case "TSImportEqualsDeclaration":
59612
59612
  if (n.isExport) {
59613
59613
  parts.push("export ");
59614
59614
  }
59615
- parts.push("import ", path2.call(print12, "id"), " = ", path2.call(print12, "moduleReference"));
59615
+ parts.push("import ", path2.call(print11, "id"), " = ", path2.call(print11, "moduleReference"));
59616
59616
  return maybeAddSemicolon((0, lines_1.concat)(parts));
59617
59617
  case "TSExternalModuleReference":
59618
- return (0, lines_1.concat)(["require(", path2.call(print12, "expression"), ")"]);
59618
+ return (0, lines_1.concat)(["require(", path2.call(print11, "expression"), ")"]);
59619
59619
  case "TSModuleDeclaration": {
59620
59620
  var parent = path2.getParentNode();
59621
59621
  if (parent.type === "TSModuleDeclaration") {
@@ -59640,16 +59640,16 @@ var require_printer2 = __commonJS({
59640
59640
  }
59641
59641
  }
59642
59642
  }
59643
- parts.push(path2.call(print12, "id"));
59643
+ parts.push(path2.call(print11, "id"));
59644
59644
  if (n.body) {
59645
59645
  parts.push(" ");
59646
- parts.push(path2.call(print12, "body"));
59646
+ parts.push(path2.call(print11, "body"));
59647
59647
  }
59648
59648
  return (0, lines_1.concat)(parts);
59649
59649
  }
59650
59650
  case "TSModuleBlock": {
59651
59651
  var naked = path2.call(function(bodyPath) {
59652
- return printStatementSequence(bodyPath, options, print12);
59652
+ return printStatementSequence(bodyPath, options, print11);
59653
59653
  }, "body");
59654
59654
  if (naked.isEmpty()) {
59655
59655
  parts.push("{}");
@@ -59659,11 +59659,11 @@ var require_printer2 = __commonJS({
59659
59659
  return (0, lines_1.concat)(parts);
59660
59660
  }
59661
59661
  case "TSInstantiationExpression": {
59662
- parts.push(path2.call(print12, "expression"), path2.call(print12, "typeParameters"));
59662
+ parts.push(path2.call(print11, "expression"), path2.call(print11, "typeParameters"));
59663
59663
  return (0, lines_1.concat)(parts);
59664
59664
  }
59665
59665
  case "V8IntrinsicIdentifier":
59666
- return (0, lines_1.concat)(["%", path2.call(print12, "name")]);
59666
+ return (0, lines_1.concat)(["%", path2.call(print11, "name")]);
59667
59667
  case "TopicReference":
59668
59668
  return (0, lines_1.fromString)("#");
59669
59669
  case "ClassHeritage":
@@ -59713,7 +59713,7 @@ var require_printer2 = __commonJS({
59713
59713
  }
59714
59714
  return (0, lines_1.concat)(parts);
59715
59715
  }
59716
- function printStatementSequence(path2, options, print12) {
59716
+ function printStatementSequence(path2, options, print11) {
59717
59717
  var filtered = [];
59718
59718
  var sawComment = false;
59719
59719
  var sawStatement = false;
@@ -59734,7 +59734,7 @@ var require_printer2 = __commonJS({
59734
59734
  }
59735
59735
  filtered.push({
59736
59736
  node: stmt,
59737
- printed: print12(stmtPath)
59737
+ printed: print11(stmtPath)
59738
59738
  });
59739
59739
  });
59740
59740
  if (sawComment) {
@@ -59826,7 +59826,7 @@ var require_printer2 = __commonJS({
59826
59826
  }
59827
59827
  return parts;
59828
59828
  }
59829
- function printMethod(path2, options, print12) {
59829
+ function printMethod(path2, options, print11) {
59830
59830
  var node = path2.getNode();
59831
59831
  var kind = node.kind;
59832
59832
  var parts = [];
@@ -59844,7 +59844,7 @@ var require_printer2 = __commonJS({
59844
59844
  if (kind === "get" || kind === "set") {
59845
59845
  parts.push(kind, " ");
59846
59846
  }
59847
- var key = path2.call(print12, "key");
59847
+ var key = path2.call(print11, "key");
59848
59848
  if (node.computed) {
59849
59849
  key = (0, lines_1.concat)(["[", key, "]"]);
59850
59850
  }
@@ -59853,26 +59853,26 @@ var require_printer2 = __commonJS({
59853
59853
  parts.push("?");
59854
59854
  }
59855
59855
  if (node === nodeValue) {
59856
- parts.push(path2.call(print12, "typeParameters"), "(", printFunctionParams(path2, options, print12), ")", path2.call(print12, "returnType"));
59856
+ parts.push(path2.call(print11, "typeParameters"), "(", printFunctionParams(path2, options, print11), ")", path2.call(print11, "returnType"));
59857
59857
  if (node.body) {
59858
- parts.push(" ", path2.call(print12, "body"));
59858
+ parts.push(" ", path2.call(print11, "body"));
59859
59859
  } else {
59860
59860
  parts.push(";");
59861
59861
  }
59862
59862
  } else {
59863
- parts.push(path2.call(print12, "value", "typeParameters"), "(", path2.call(function(valuePath) {
59864
- return printFunctionParams(valuePath, options, print12);
59865
- }, "value"), ")", path2.call(print12, "value", "returnType"));
59863
+ parts.push(path2.call(print11, "value", "typeParameters"), "(", path2.call(function(valuePath) {
59864
+ return printFunctionParams(valuePath, options, print11);
59865
+ }, "value"), ")", path2.call(print11, "value", "returnType"));
59866
59866
  if (nodeValue.body) {
59867
- parts.push(" ", path2.call(print12, "value", "body"));
59867
+ parts.push(" ", path2.call(print11, "value", "body"));
59868
59868
  } else {
59869
59869
  parts.push(";");
59870
59870
  }
59871
59871
  }
59872
59872
  return (0, lines_1.concat)(parts);
59873
59873
  }
59874
- function printArgumentsList(path2, options, print12) {
59875
- var printed = path2.map(print12, "arguments");
59874
+ function printArgumentsList(path2, options, print11) {
59875
+ var printed = path2.map(print11, "arguments");
59876
59876
  var trailingComma = util.isTrailingCommaEnabled(options, "parameters");
59877
59877
  var joined = (0, lines_1.fromString)(", ").join(printed);
59878
59878
  if (joined.getLineLength(1) > options.wrapColumn) {
@@ -59885,28 +59885,28 @@ var require_printer2 = __commonJS({
59885
59885
  }
59886
59886
  return (0, lines_1.concat)(["(", joined, ")"]);
59887
59887
  }
59888
- function printFunctionParams(path2, options, print12) {
59888
+ function printFunctionParams(path2, options, print11) {
59889
59889
  var fun = path2.getValue();
59890
59890
  var params;
59891
59891
  var printed = [];
59892
59892
  if (fun.params) {
59893
59893
  params = fun.params;
59894
- printed = path2.map(print12, "params");
59894
+ printed = path2.map(print11, "params");
59895
59895
  } else if (fun.parameters) {
59896
59896
  params = fun.parameters;
59897
- printed = path2.map(print12, "parameters");
59897
+ printed = path2.map(print11, "parameters");
59898
59898
  }
59899
59899
  if (fun.defaults) {
59900
59900
  path2.each(function(defExprPath) {
59901
59901
  var i2 = defExprPath.getName();
59902
59902
  var p = printed[i2];
59903
59903
  if (p && defExprPath.getValue()) {
59904
- printed[i2] = (0, lines_1.concat)([p, " = ", print12(defExprPath)]);
59904
+ printed[i2] = (0, lines_1.concat)([p, " = ", print11(defExprPath)]);
59905
59905
  }
59906
59906
  }, "defaults");
59907
59907
  }
59908
59908
  if (fun.rest) {
59909
- printed.push((0, lines_1.concat)(["...", path2.call(print12, "rest")]));
59909
+ printed.push((0, lines_1.concat)(["...", path2.call(print11, "rest")]));
59910
59910
  }
59911
59911
  var joined = (0, lines_1.fromString)(", ").join(printed);
59912
59912
  if (joined.length > 1 || joined.getLineLength(1) > options.wrapColumn) {
@@ -59920,11 +59920,11 @@ var require_printer2 = __commonJS({
59920
59920
  }
59921
59921
  return joined;
59922
59922
  }
59923
- function maybePrintImportAssertions(path2, options, print12) {
59923
+ function maybePrintImportAssertions(path2, options, print11) {
59924
59924
  var n = path2.getValue();
59925
59925
  if (n.assertions && n.assertions.length > 0) {
59926
59926
  var parts = [" assert {"];
59927
- var printed = path2.map(print12, "assertions");
59927
+ var printed = path2.map(print11, "assertions");
59928
59928
  var flat = (0, lines_1.fromString)(", ").join(printed);
59929
59929
  if (flat.length > 1 || flat.getLineLength(1) > options.wrapColumn) {
59930
59930
  parts.push("\n", (0, lines_1.fromString)(",\n").join(printed).indent(options.tabWidth), "\n}");
@@ -59935,7 +59935,7 @@ var require_printer2 = __commonJS({
59935
59935
  }
59936
59936
  return (0, lines_1.fromString)("");
59937
59937
  }
59938
- function printExportDeclaration(path2, options, print12) {
59938
+ function printExportDeclaration(path2, options, print11) {
59939
59939
  var decl = path2.getValue();
59940
59940
  var parts = ["export "];
59941
59941
  if (decl.exportKind && decl.exportKind === "type") {
@@ -59949,7 +59949,7 @@ var require_printer2 = __commonJS({
59949
59949
  parts.push("default ");
59950
59950
  }
59951
59951
  if (decl.declaration) {
59952
- parts.push(path2.call(print12, "declaration"));
59952
+ parts.push(path2.call(print11, "declaration"));
59953
59953
  } else if (decl.specifiers) {
59954
59954
  if (decl.specifiers.length === 1 && decl.specifiers[0].type === "ExportBatchSpecifier") {
59955
59955
  parts.push("*");
@@ -59961,9 +59961,9 @@ var require_printer2 = __commonJS({
59961
59961
  path2.each(function(specifierPath) {
59962
59962
  var spec = specifierPath.getValue();
59963
59963
  if (spec.type === "ExportDefaultSpecifier") {
59964
- unbracedSpecifiers_2.push(print12(specifierPath));
59964
+ unbracedSpecifiers_2.push(print11(specifierPath));
59965
59965
  } else {
59966
- bracedSpecifiers_2.push(print12(specifierPath));
59966
+ bracedSpecifiers_2.push(print11(specifierPath));
59967
59967
  }
59968
59968
  }, "specifiers");
59969
59969
  unbracedSpecifiers_2.forEach(function(lines2, i2) {
@@ -59992,10 +59992,10 @@ var require_printer2 = __commonJS({
59992
59992
  }
59993
59993
  }
59994
59994
  } else {
59995
- parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(print12, "specifiers")), shouldPrintSpaces ? " }" : "}");
59995
+ parts.push(shouldPrintSpaces ? "{ " : "{", (0, lines_1.fromString)(", ").join(path2.map(print11, "specifiers")), shouldPrintSpaces ? " }" : "}");
59996
59996
  }
59997
59997
  if (decl.source) {
59998
- parts.push(" from ", path2.call(print12, "source"), maybePrintImportAssertions(path2, options, print12));
59998
+ parts.push(" from ", path2.call(print11, "source"), maybePrintImportAssertions(path2, options, print11));
59999
59999
  }
60000
60000
  }
60001
60001
  var lines = (0, lines_1.concat)(parts);
@@ -60013,7 +60013,7 @@ var require_printer2 = __commonJS({
60013
60013
  }
60014
60014
  return (0, lines_1.concat)(parts);
60015
60015
  }
60016
- function printVariance(path2, print12) {
60016
+ function printVariance(path2, print11) {
60017
60017
  return path2.call(function(variancePath) {
60018
60018
  var value = variancePath.getValue();
60019
60019
  if (value) {
@@ -60023,7 +60023,7 @@ var require_printer2 = __commonJS({
60023
60023
  if (value === "minus") {
60024
60024
  return (0, lines_1.fromString)("-");
60025
60025
  }
60026
- return print12(variancePath);
60026
+ return print11(variancePath);
60027
60027
  }
60028
60028
  return (0, lines_1.fromString)("");
60029
60029
  }, "variance");
@@ -60110,10 +60110,10 @@ var require_main2 = __commonJS({
60110
60110
  Object.defineProperty(exports, "visit", { enumerable: true, get: function() {
60111
60111
  return ast_types_1.visit;
60112
60112
  } });
60113
- function print12(node, options) {
60113
+ function print11(node, options) {
60114
60114
  return new printer_1.Printer(options).print(node);
60115
60115
  }
60116
- exports.print = print12;
60116
+ exports.print = print11;
60117
60117
  function prettyPrint3(node, options) {
60118
60118
  return new printer_1.Printer(options).printGenerically(node);
60119
60119
  }
@@ -60137,7 +60137,7 @@ var require_main2 = __commonJS({
60137
60137
  function runString(code, transformer, options) {
60138
60138
  var writeback = options && options.writeback || defaultWriteback;
60139
60139
  transformer((0, parser_1.parse)(code, options), function(node) {
60140
- writeback(print12(node, options).code);
60140
+ writeback(print11(node, options).code);
60141
60141
  });
60142
60142
  }
60143
60143
  }
@@ -68326,7 +68326,7 @@ function mergeSchemas(config2) {
68326
68326
  // src/lib/config.ts
68327
68327
  var graphql2 = __toESM(require_graphql2(), 1);
68328
68328
  var import_minimatch = __toESM(require_minimatch(), 1);
68329
- import { fileURLToPath, pathToFileURL } from "url";
68329
+ import { fileURLToPath, pathToFileURL } from "node:url";
68330
68330
 
68331
68331
  // src/runtime/lib/config.ts
68332
68332
  function defaultConfigValues(file) {
@@ -68431,8 +68431,8 @@ __export(fs_exports, {
68431
68431
  var import_fs_extra = __toESM(require_lib(), 1);
68432
68432
  var import_glob = __toESM(require_glob(), 1);
68433
68433
  var import_memfs = __toESM(require_lib2(), 1);
68434
- import fs from "fs/promises";
68435
- import { promisify } from "util";
68434
+ import fs from "node:fs/promises";
68435
+ import { promisify } from "node:util";
68436
68436
 
68437
68437
  // src/lib/path.ts
68438
68438
  var path_exports = {};
@@ -68449,8 +68449,8 @@ __export(path_exports, {
68449
68449
  resolve: () => resolve,
68450
68450
  sep: () => sep
68451
68451
  });
68452
- import os from "os";
68453
- import path from "path";
68452
+ import os from "node:os";
68453
+ import path from "node:path";
68454
68454
  var sep = "/";
68455
68455
  function resolve(...parts) {
68456
68456
  return posixify(path.resolve(...parts));
@@ -70441,13 +70441,16 @@ var pendingConfigPromise = null;
70441
70441
  async function getConfig({
70442
70442
  configPath = DEFAULT_CONFIG_PATH,
70443
70443
  noSchema,
70444
+ forceReload,
70444
70445
  ...extraConfig
70445
70446
  } = {}) {
70446
- if (_config) {
70447
- return _config;
70448
- }
70449
- if (pendingConfigPromise) {
70450
- return await pendingConfigPromise;
70447
+ if (!forceReload) {
70448
+ if (_config) {
70449
+ return _config;
70450
+ }
70451
+ if (pendingConfigPromise) {
70452
+ return await pendingConfigPromise;
70453
+ }
70451
70454
  }
70452
70455
  let resolve2 = () => {
70453
70456
  };
@@ -70643,7 +70646,7 @@ async function loadSchemaFile(schemaPath) {
70643
70646
 
70644
70647
  // src/lib/graphql.ts
70645
70648
  var graphql3 = __toESM(require_graphql2(), 1);
70646
- import crypto from "crypto";
70649
+ import crypto from "node:crypto";
70647
70650
  function getRootType(type) {
70648
70651
  if (graphql3.isNonNullType(type)) {
70649
70652
  return getRootType(type.ofType);
@@ -70656,8 +70659,8 @@ function getRootType(type) {
70656
70659
  function hashDocument({
70657
70660
  document
70658
70661
  }) {
70659
- const docString = typeof document === "string" ? document : graphql3.print(document.document);
70660
- return crypto.createHash("sha256").update(docString).digest("hex");
70662
+ const docString = typeof document === "string" ? document : document.artifact?.raw;
70663
+ return crypto.createHash("sha256").update(docString ?? "").digest("hex");
70661
70664
  }
70662
70665
  function parentTypeFromAncestors(schema, filepath, ancestors) {
70663
70666
  const parents = [...ancestors];
@@ -76075,11 +76078,7 @@ async function pullSchema_default(args) {
76075
76078
  };
76076
76079
  }, headers);
76077
76080
  }
76078
- await pullSchema(
76079
- apiURL,
76080
- config2.schemaPath ? config2.schemaPath : path_exports.resolve(targetPath, "schema.json"),
76081
- headers
76082
- );
76081
+ await pullSchema(apiURL, config2.schemaPath ?? path_exports.resolve(targetPath, "schema.json"), headers);
76083
76082
  }
76084
76083
 
76085
76084
  // src/cmd/generate.ts
@@ -76113,8 +76112,8 @@ async function generate(args = {
76113
76112
 
76114
76113
  // src/cmd/init.ts
76115
76114
  var import_graphql31 = __toESM(require_graphql2(), 1);
76116
- import { execSync } from "child_process";
76117
76115
  var import_prompts = __toESM(require_prompts3(), 1);
76116
+ import { execSync } from "node:child_process";
76118
76117
  async function init(_path, args) {
76119
76118
  const force_remote_endpoint = args.force_remote_endpoint || false;
76120
76119
  try {
@@ -76485,8 +76484,8 @@ async function updatePackageJSON(targetPath) {
76485
76484
  }
76486
76485
  packageJSON.devDependencies = {
76487
76486
  ...packageJSON.devDependencies,
76488
- houdini: "^1.0.0-next.6",
76489
- "houdini-svelte": "^1.0.0-next.6"
76487
+ houdini: "^1.0.0-next.8",
76488
+ "houdini-svelte": "^1.0.0-next.8"
76490
76489
  };
76491
76490
  await fs_exports.writeFile(packagePath, JSON.stringify(packageJSON, null, 4));
76492
76491
  }