prettier 1.6.1 → 2.0.0.pre.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +316 -293
  3. data/CONTRIBUTING.md +6 -9
  4. data/LICENSE +1 -1
  5. data/README.md +11 -12
  6. data/dist/haml/embed.js +53 -0
  7. data/dist/haml/parser.js +31 -0
  8. data/{src → dist}/haml/parser.rb +0 -0
  9. data/dist/haml/printer.js +336 -0
  10. data/dist/parser/getInfo.js +17 -0
  11. data/{src → dist}/parser/netcat.js +1 -0
  12. data/dist/parser/parseSync.js +128 -0
  13. data/dist/parser/server.rb +140 -0
  14. data/dist/plugin.js +143 -0
  15. data/dist/prettier.js +15 -0
  16. data/dist/rbs/parser.js +34 -0
  17. data/{src → dist}/rbs/parser.rb +0 -0
  18. data/dist/rbs/printer.js +517 -0
  19. data/dist/ruby/embed.js +110 -0
  20. data/dist/ruby/nodes/alias.js +59 -0
  21. data/{src → dist}/ruby/nodes/aref.js +26 -35
  22. data/dist/ruby/nodes/args.js +165 -0
  23. data/dist/ruby/nodes/arrays.js +126 -0
  24. data/dist/ruby/nodes/assign.js +41 -0
  25. data/dist/ruby/nodes/blocks.js +68 -0
  26. data/dist/ruby/nodes/calls.js +220 -0
  27. data/dist/ruby/nodes/case.js +50 -0
  28. data/dist/ruby/nodes/class.js +54 -0
  29. data/dist/ruby/nodes/commands.js +124 -0
  30. data/dist/ruby/nodes/conditionals.js +242 -0
  31. data/dist/ruby/nodes/constants.js +38 -0
  32. data/dist/ruby/nodes/flow.js +66 -0
  33. data/dist/ruby/nodes/hashes.js +130 -0
  34. data/dist/ruby/nodes/heredocs.js +30 -0
  35. data/dist/ruby/nodes/hooks.js +35 -0
  36. data/dist/ruby/nodes/ints.js +27 -0
  37. data/dist/ruby/nodes/lambdas.js +69 -0
  38. data/dist/ruby/nodes/loops.js +73 -0
  39. data/dist/ruby/nodes/massign.js +73 -0
  40. data/dist/ruby/nodes/methods.js +70 -0
  41. data/dist/ruby/nodes/operators.js +70 -0
  42. data/dist/ruby/nodes/params.js +89 -0
  43. data/dist/ruby/nodes/patterns.js +109 -0
  44. data/dist/ruby/nodes/regexp.js +45 -0
  45. data/dist/ruby/nodes/rescue.js +82 -0
  46. data/dist/ruby/nodes/return.js +75 -0
  47. data/dist/ruby/nodes/statements.js +111 -0
  48. data/dist/ruby/nodes/strings.js +218 -0
  49. data/dist/ruby/nodes/super.js +30 -0
  50. data/dist/ruby/nodes/undef.js +26 -0
  51. data/dist/ruby/nodes.js +151 -0
  52. data/dist/ruby/parser.js +34 -0
  53. data/{src → dist}/ruby/parser.rb +1215 -252
  54. data/dist/ruby/printer.js +125 -0
  55. data/dist/ruby/toProc.js +93 -0
  56. data/dist/types/haml.js +4 -0
  57. data/dist/types/plugin.js +3 -0
  58. data/dist/types/rbs.js +4 -0
  59. data/dist/types/ruby.js +4 -0
  60. data/dist/types/utils.js +2 -0
  61. data/dist/types.js +30 -0
  62. data/dist/utils/containsAssignment.js +15 -0
  63. data/dist/utils/getTrailingComma.js +6 -0
  64. data/dist/utils/hasAncestor.js +15 -0
  65. data/{src → dist}/utils/inlineEnsureParens.js +16 -17
  66. data/dist/utils/isEmptyBodyStmt.js +10 -0
  67. data/dist/utils/isEmptyStmts.js +10 -0
  68. data/dist/utils/literal.js +8 -0
  69. data/dist/utils/literallineWithoutBreakParent.js +8 -0
  70. data/dist/utils/makeCall.js +13 -0
  71. data/dist/utils/noIndent.js +11 -0
  72. data/dist/utils/printEmptyCollection.js +44 -0
  73. data/dist/utils/skipAssignIndent.js +15 -0
  74. data/dist/utils.js +30 -0
  75. data/node_modules/prettier/bin-prettier.js +313 -190
  76. data/node_modules/prettier/doc.js +191 -323
  77. data/node_modules/prettier/index.js +2753 -3677
  78. data/node_modules/prettier/package.json +1 -1
  79. data/node_modules/prettier/parser-angular.js +13 -14
  80. data/node_modules/prettier/parser-babel.js +7 -7
  81. data/node_modules/prettier/parser-espree.js +7 -7
  82. data/node_modules/prettier/parser-flow.js +7 -7
  83. data/node_modules/prettier/parser-glimmer.js +1 -1
  84. data/node_modules/prettier/parser-graphql.js +1 -1
  85. data/node_modules/prettier/parser-html.js +17 -17
  86. data/node_modules/prettier/parser-markdown.js +9 -9
  87. data/node_modules/prettier/parser-meriyah.js +7 -7
  88. data/node_modules/prettier/parser-postcss.js +2 -2
  89. data/node_modules/prettier/parser-typescript.js +7 -7
  90. data/node_modules/prettier/parser-yaml.js +2 -2
  91. data/node_modules/prettier/third-party.js +143 -78
  92. data/package.json +26 -18
  93. metadata +74 -67
  94. data/src/haml/embed.js +0 -87
  95. data/src/haml/parser.js +0 -23
  96. data/src/haml/printer.js +0 -438
  97. data/src/parser/parseSync.js +0 -172
  98. data/src/parser/server.rb +0 -66
  99. data/src/plugin.js +0 -148
  100. data/src/prettier.js +0 -16
  101. data/src/rbs/parser.js +0 -37
  102. data/src/rbs/printer.js +0 -643
  103. data/src/ruby/embed.js +0 -142
  104. data/src/ruby/nodes/alias.js +0 -73
  105. data/src/ruby/nodes/args.js +0 -222
  106. data/src/ruby/nodes/arrays.js +0 -162
  107. data/src/ruby/nodes/assign.js +0 -47
  108. data/src/ruby/nodes/blocks.js +0 -90
  109. data/src/ruby/nodes/calls.js +0 -246
  110. data/src/ruby/nodes/case.js +0 -65
  111. data/src/ruby/nodes/class.js +0 -64
  112. data/src/ruby/nodes/commands.js +0 -131
  113. data/src/ruby/nodes/conditionals.js +0 -282
  114. data/src/ruby/nodes/constants.js +0 -43
  115. data/src/ruby/nodes/flow.js +0 -74
  116. data/src/ruby/nodes/hashes.js +0 -155
  117. data/src/ruby/nodes/heredocs.js +0 -36
  118. data/src/ruby/nodes/hooks.js +0 -34
  119. data/src/ruby/nodes/ints.js +0 -31
  120. data/src/ruby/nodes/lambdas.js +0 -76
  121. data/src/ruby/nodes/loops.js +0 -98
  122. data/src/ruby/nodes/massign.js +0 -98
  123. data/src/ruby/nodes/methods.js +0 -74
  124. data/src/ruby/nodes/operators.js +0 -83
  125. data/src/ruby/nodes/params.js +0 -106
  126. data/src/ruby/nodes/patterns.js +0 -157
  127. data/src/ruby/nodes/regexp.js +0 -56
  128. data/src/ruby/nodes/rescue.js +0 -101
  129. data/src/ruby/nodes/return.js +0 -94
  130. data/src/ruby/nodes/statements.js +0 -142
  131. data/src/ruby/nodes/strings.js +0 -272
  132. data/src/ruby/nodes/super.js +0 -35
  133. data/src/ruby/nodes/undef.js +0 -42
  134. data/src/ruby/nodes.js +0 -34
  135. data/src/ruby/parser.js +0 -37
  136. data/src/ruby/printer.js +0 -147
  137. data/src/ruby/toProc.js +0 -105
  138. data/src/utils/containsAssignment.js +0 -11
  139. data/src/utils/getTrailingComma.js +0 -5
  140. data/src/utils/hasAncestor.js +0 -17
  141. data/src/utils/isEmptyBodyStmt.js +0 -7
  142. data/src/utils/isEmptyStmts.js +0 -11
  143. data/src/utils/literal.js +0 -7
  144. data/src/utils/literallineWithoutBreakParent.js +0 -7
  145. data/src/utils/makeCall.js +0 -14
  146. data/src/utils/noIndent.js +0 -10
  147. data/src/utils/printEmptyCollection.js +0 -49
  148. data/src/utils/skipAssignIndent.js +0 -17
  149. data/src/utils.js +0 -13
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- var path$1 = require('path');
4
+ var path = require('path');
5
5
  var fs$4 = require('fs');
6
6
  var os = require('os');
7
7
  var tty = require('tty');
@@ -12,7 +12,7 @@ var readline = require('readline');
12
12
 
13
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
14
 
15
- var path__default = /*#__PURE__*/_interopDefaultLegacy(path$1);
15
+ var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
16
16
  var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$4);
17
17
  var os__default = /*#__PURE__*/_interopDefaultLegacy(os);
18
18
  var tty__default = /*#__PURE__*/_interopDefaultLegacy(tty);
@@ -115,10 +115,10 @@ var createPropertyDescriptor = function (bitmap, value) {
115
115
  };
116
116
  };
117
117
 
118
- var toString$1 = {}.toString;
118
+ var toString$2 = {}.toString;
119
119
 
120
120
  var classofRaw = function (it) {
121
- return toString$1.call(it).slice(8, -1);
121
+ return toString$2.call(it).slice(8, -1);
122
122
  };
123
123
 
124
124
  var split = ''.split;
@@ -151,19 +151,99 @@ var isObject$3 = function (it) {
151
151
  return typeof it === 'object' ? it !== null : typeof it === 'function';
152
152
  };
153
153
 
154
- // `ToPrimitive` abstract operation
155
- // https://tc39.es/ecma262/#sec-toprimitive
156
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
157
- // and the second argument - flag - preferred type is a string
158
- var toPrimitive = function (input, PREFERRED_STRING) {
159
- if (!isObject$3(input)) return input;
154
+ var aFunction$1 = function (variable) {
155
+ return typeof variable == 'function' ? variable : undefined;
156
+ };
157
+
158
+ var getBuiltIn = function (namespace, method) {
159
+ return arguments.length < 2 ? aFunction$1(global$1[namespace]) : global$1[namespace] && global$1[namespace][method];
160
+ };
161
+
162
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
163
+
164
+ var process$1 = global$1.process;
165
+ var Deno = global$1.Deno;
166
+ var versions = process$1 && process$1.versions || Deno && Deno.version;
167
+ var v8 = versions && versions.v8;
168
+ var match, version;
169
+
170
+ if (v8) {
171
+ match = v8.split('.');
172
+ version = match[0] < 4 ? 1 : match[0] + match[1];
173
+ } else if (engineUserAgent) {
174
+ match = engineUserAgent.match(/Edge\/(\d+)/);
175
+ if (!match || match[1] >= 74) {
176
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
177
+ if (match) version = match[1];
178
+ }
179
+ }
180
+
181
+ var engineV8Version = version && +version;
182
+
183
+ /* eslint-disable es/no-symbol -- required for testing */
184
+
185
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
186
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
187
+ var symbol = Symbol();
188
+ // Chrome 38 Symbol has incorrect toString conversion
189
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
190
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
191
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
192
+ !Symbol.sham && engineV8Version && engineV8Version < 41;
193
+ });
194
+
195
+ /* eslint-disable es/no-symbol -- required for testing */
196
+
197
+ var useSymbolAsUid = nativeSymbol
198
+ && !Symbol.sham
199
+ && typeof Symbol.iterator == 'symbol';
200
+
201
+ var isSymbol$1 = useSymbolAsUid ? function (it) {
202
+ return typeof it == 'symbol';
203
+ } : function (it) {
204
+ var $Symbol = getBuiltIn('Symbol');
205
+ return typeof $Symbol == 'function' && Object(it) instanceof $Symbol;
206
+ };
207
+
208
+ // `OrdinaryToPrimitive` abstract operation
209
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
210
+ var ordinaryToPrimitive = function (input, pref) {
160
211
  var fn, val;
161
- if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$3(val = fn.call(input))) return val;
212
+ if (pref === 'string' && typeof (fn = input.toString) == 'function' && !isObject$3(val = fn.call(input))) return val;
162
213
  if (typeof (fn = input.valueOf) == 'function' && !isObject$3(val = fn.call(input))) return val;
163
- if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$3(val = fn.call(input))) return val;
214
+ if (pref !== 'string' && typeof (fn = input.toString) == 'function' && !isObject$3(val = fn.call(input))) return val;
164
215
  throw TypeError("Can't convert object to primitive value");
165
216
  };
166
217
 
218
+ function createCommonjsModule(fn) {
219
+ var module = { exports: {} };
220
+ return fn(module, module.exports), module.exports;
221
+ }
222
+
223
+ var setGlobal = function (key, value) {
224
+ try {
225
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
226
+ Object.defineProperty(global$1, key, { value: value, configurable: true, writable: true });
227
+ } catch (error) {
228
+ global$1[key] = value;
229
+ } return value;
230
+ };
231
+
232
+ var SHARED = '__core-js_shared__';
233
+ var store$1 = global$1[SHARED] || setGlobal(SHARED, {});
234
+
235
+ var sharedStore = store$1;
236
+
237
+ var shared = createCommonjsModule(function (module) {
238
+ (module.exports = function (key, value) {
239
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
240
+ })('versions', []).push({
241
+ version: '3.17.3',
242
+ mode: 'global',
243
+ copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
244
+ });
245
+ });
246
+
167
247
  // `ToObject` abstract operation
168
248
  // https://tc39.es/ecma262/#sec-toobject
169
249
  var toObject = function (argument) {
@@ -176,6 +256,52 @@ var has$1 = Object.hasOwn || function hasOwn(it, key) {
176
256
  return hasOwnProperty$b.call(toObject(it), key);
177
257
  };
178
258
 
259
+ var id = 0;
260
+ var postfix = Math.random();
261
+
262
+ var uid = function (key) {
263
+ return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
264
+ };
265
+
266
+ var WellKnownSymbolsStore = shared('wks');
267
+ var Symbol$2 = global$1.Symbol;
268
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid;
269
+
270
+ var wellKnownSymbol = function (name) {
271
+ if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
272
+ if (nativeSymbol && has$1(Symbol$2, name)) {
273
+ WellKnownSymbolsStore[name] = Symbol$2[name];
274
+ } else {
275
+ WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
276
+ }
277
+ } return WellKnownSymbolsStore[name];
278
+ };
279
+
280
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
281
+
282
+ // `ToPrimitive` abstract operation
283
+ // https://tc39.es/ecma262/#sec-toprimitive
284
+ var toPrimitive = function (input, pref) {
285
+ if (!isObject$3(input) || isSymbol$1(input)) return input;
286
+ var exoticToPrim = input[TO_PRIMITIVE];
287
+ var result;
288
+ if (exoticToPrim !== undefined) {
289
+ if (pref === undefined) pref = 'default';
290
+ result = exoticToPrim.call(input, pref);
291
+ if (!isObject$3(result) || isSymbol$1(result)) return result;
292
+ throw TypeError("Can't convert object to primitive value");
293
+ }
294
+ if (pref === undefined) pref = 'number';
295
+ return ordinaryToPrimitive(input, pref);
296
+ };
297
+
298
+ // `ToPropertyKey` abstract operation
299
+ // https://tc39.es/ecma262/#sec-topropertykey
300
+ var toPropertyKey = function (argument) {
301
+ var key = toPrimitive(argument, 'string');
302
+ return isSymbol$1(key) ? key : String(key);
303
+ };
304
+
179
305
  var document = global$1.document;
180
306
  // typeof document.createElement is 'object' in old IE
181
307
  var EXISTS = isObject$3(document) && isObject$3(document.createElement);
@@ -199,7 +325,7 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
199
325
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
200
326
  var f$3 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
201
327
  O = toIndexedObject(O);
202
- P = toPrimitive(P, true);
328
+ P = toPropertyKey(P);
203
329
  if (ie8DomDefine) try {
204
330
  return $getOwnPropertyDescriptor(O, P);
205
331
  } catch (error) { /* empty */ }
@@ -223,7 +349,7 @@ var $defineProperty = Object.defineProperty;
223
349
  // https://tc39.es/ecma262/#sec-object.defineproperty
224
350
  var f$2 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {
225
351
  anObject(O);
226
- P = toPrimitive(P, true);
352
+ P = toPropertyKey(P);
227
353
  anObject(Attributes);
228
354
  if (ie8DomDefine) try {
229
355
  return $defineProperty(O, P, Attributes);
@@ -244,24 +370,6 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
244
370
  return object;
245
371
  };
246
372
 
247
- function createCommonjsModule(fn) {
248
- var module = { exports: {} };
249
- return fn(module, module.exports), module.exports;
250
- }
251
-
252
- var setGlobal = function (key, value) {
253
- try {
254
- createNonEnumerableProperty(global$1, key, value);
255
- } catch (error) {
256
- global$1[key] = value;
257
- } return value;
258
- };
259
-
260
- var SHARED = '__core-js_shared__';
261
- var store$1 = global$1[SHARED] || setGlobal(SHARED, {});
262
-
263
- var sharedStore = store$1;
264
-
265
373
  var functionToString = Function.toString;
266
374
 
267
375
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
@@ -277,23 +385,6 @@ var WeakMap$3 = global$1.WeakMap;
277
385
 
278
386
  var nativeWeakMap = typeof WeakMap$3 === 'function' && /native code/.test(inspectSource(WeakMap$3));
279
387
 
280
- var shared = createCommonjsModule(function (module) {
281
- (module.exports = function (key, value) {
282
- return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
283
- })('versions', []).push({
284
- version: '3.14.0',
285
- mode: 'global',
286
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
287
- });
288
- });
289
-
290
- var id = 0;
291
- var postfix = Math.random();
292
-
293
- var uid = function (key) {
294
- return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
295
- };
296
-
297
388
  var keys$1 = shared('keys');
298
389
 
299
390
  var sharedKey = function (key) {
@@ -397,17 +488,6 @@ var TEMPLATE = String(String).split('String');
397
488
  });
398
489
  });
399
490
 
400
- var path = global$1;
401
-
402
- var aFunction$1 = function (variable) {
403
- return typeof variable == 'function' ? variable : undefined;
404
- };
405
-
406
- var getBuiltIn = function (namespace, method) {
407
- return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global$1[namespace])
408
- : path[namespace] && path[namespace][method] || global$1[namespace] && global$1[namespace][method];
409
- };
410
-
411
491
  var ceil = Math.ceil;
412
492
  var floor$1 = Math.floor;
413
493
 
@@ -609,6 +689,11 @@ var aFunction = function (it) {
609
689
  } return it;
610
690
  };
611
691
 
692
+ var toString$1 = function (argument) {
693
+ if (isSymbol$1(argument)) throw TypeError('Cannot convert a Symbol value to a string');
694
+ return String(argument);
695
+ };
696
+
612
697
  // TODO: use something more complex like timsort?
613
698
  var floor = Math.floor;
614
699
 
@@ -663,32 +748,12 @@ var arrayMethodIsStrict = function (METHOD_NAME, argument) {
663
748
  });
664
749
  };
665
750
 
666
- var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
667
-
668
751
  var firefox = engineUserAgent.match(/firefox\/(\d+)/i);
669
752
 
670
753
  var engineFfVersion = !!firefox && +firefox[1];
671
754
 
672
755
  var engineIsIeOrEdge = /MSIE|Trident/.test(engineUserAgent);
673
756
 
674
- var process$1 = global$1.process;
675
- var versions = process$1 && process$1.versions;
676
- var v8 = versions && versions.v8;
677
- var match, version;
678
-
679
- if (v8) {
680
- match = v8.split('.');
681
- version = match[0] < 4 ? 1 : match[0] + match[1];
682
- } else if (engineUserAgent) {
683
- match = engineUserAgent.match(/Edge\/(\d+)/);
684
- if (!match || match[1] >= 74) {
685
- match = engineUserAgent.match(/Chrome\/(\d+)/);
686
- if (match) version = match[1];
687
- }
688
- }
689
-
690
- var engineV8Version = version && +version;
691
-
692
757
  var webkit = engineUserAgent.match(/AppleWebKit\/(\d+)\./);
693
758
 
694
759
  var engineWebkitVersion = !!webkit && +webkit[1];
@@ -749,7 +814,7 @@ var getSortCompare = function (comparefn) {
749
814
  if (y === undefined) return -1;
750
815
  if (x === undefined) return 1;
751
816
  if (comparefn !== undefined) return +comparefn(x, y) || 0;
752
- return String(x) > String(y) ? 1 : -1;
817
+ return toString$1(x) > toString$1(y) ? 1 : -1;
753
818
  };
754
819
  };
755
820
 
@@ -2801,43 +2866,11 @@ var flattenIntoArray = function (target, original, source, sourceLen, start, dep
2801
2866
 
2802
2867
  var flattenIntoArray_1 = flattenIntoArray;
2803
2868
 
2804
- /* eslint-disable es/no-symbol -- required for testing */
2805
-
2806
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
2807
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
2808
- var symbol = Symbol();
2809
- // Chrome 38 Symbol has incorrect toString conversion
2810
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
2811
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
2812
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
2813
- !Symbol.sham && engineV8Version && engineV8Version < 41;
2814
- });
2815
-
2816
- /* eslint-disable es/no-symbol -- required for testing */
2817
-
2818
- var useSymbolAsUid = nativeSymbol
2819
- && !Symbol.sham
2820
- && typeof Symbol.iterator == 'symbol';
2821
-
2822
- var WellKnownSymbolsStore = shared('wks');
2823
- var Symbol$2 = global$1.Symbol;
2824
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid;
2825
-
2826
- var wellKnownSymbol = function (name) {
2827
- if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
2828
- if (nativeSymbol && has$1(Symbol$2, name)) {
2829
- WellKnownSymbolsStore[name] = Symbol$2[name];
2830
- } else {
2831
- WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
2832
- }
2833
- } return WellKnownSymbolsStore[name];
2834
- };
2835
-
2836
2869
  var SPECIES = wellKnownSymbol('species');
2837
2870
 
2838
- // `ArraySpeciesCreate` abstract operation
2871
+ // a part of `ArraySpeciesCreate` abstract operation
2839
2872
  // https://tc39.es/ecma262/#sec-arrayspeciescreate
2840
- var arraySpeciesCreate = function (originalArray, length) {
2873
+ var arraySpeciesConstructor = function (originalArray) {
2841
2874
  var C;
2842
2875
  if (isArray$1(originalArray)) {
2843
2876
  C = originalArray.constructor;
@@ -2847,7 +2880,13 @@ var arraySpeciesCreate = function (originalArray, length) {
2847
2880
  C = C[SPECIES];
2848
2881
  if (C === null) C = undefined;
2849
2882
  }
2850
- } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
2883
+ } return C === undefined ? Array : C;
2884
+ };
2885
+
2886
+ // `ArraySpeciesCreate` abstract operation
2887
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
2888
+ var arraySpeciesCreate = function (originalArray, length) {
2889
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2851
2890
  };
2852
2891
 
2853
2892
  // `Array.prototype.flatMap` method
@@ -2947,8 +2986,8 @@ var path_1 = createCommonjsModule(function (module, exports) {
2947
2986
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
2948
2987
 
2949
2988
  const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
2950
- /**
2951
- * Designed to work only with simple paths: `dir\\file`.
2989
+ /**
2990
+ * Designed to work only with simple paths: `dir\\file`.
2952
2991
  */
2953
2992
 
2954
2993
  function unixify(filepath) {
@@ -7571,7 +7610,7 @@ var pattern = createCommonjsModule(function (module, exports) {
7571
7610
  Object.defineProperty(exports, "__esModule", {
7572
7611
  value: true
7573
7612
  });
7574
- exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
7613
+ exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
7575
7614
  const GLOBSTAR = '**';
7576
7615
  const ESCAPE_SYMBOL = '\\';
7577
7616
  const COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;
@@ -7587,17 +7626,17 @@ var pattern = createCommonjsModule(function (module, exports) {
7587
7626
  exports.isStaticPattern = isStaticPattern;
7588
7627
 
7589
7628
  function isDynamicPattern(pattern, options = {}) {
7590
- /**
7591
- * A special case with an empty string is necessary for matching patterns that start with a forward slash.
7592
- * An empty string cannot be a dynamic pattern.
7593
- * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
7629
+ /**
7630
+ * A special case with an empty string is necessary for matching patterns that start with a forward slash.
7631
+ * An empty string cannot be a dynamic pattern.
7632
+ * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.
7594
7633
  */
7595
7634
  if (pattern === '') {
7596
7635
  return false;
7597
7636
  }
7598
- /**
7599
- * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
7600
- * filepath directly (without read directory).
7637
+ /**
7638
+ * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check
7639
+ * filepath directly (without read directory).
7601
7640
  */
7602
7641
 
7603
7642
 
@@ -7657,6 +7696,38 @@ var pattern = createCommonjsModule(function (module, exports) {
7657
7696
  }
7658
7697
 
7659
7698
  exports.getPositivePatterns = getPositivePatterns;
7699
+ /**
7700
+ * Returns patterns that can be applied inside the current directory.
7701
+ *
7702
+ * @example
7703
+ * // ['./*', '*', 'a/*']
7704
+ * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
7705
+ */
7706
+
7707
+ function getPatternsInsideCurrentDirectory(patterns) {
7708
+ return patterns.filter(pattern => !isPatternRelatedToParentDirectory(pattern));
7709
+ }
7710
+
7711
+ exports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;
7712
+ /**
7713
+ * Returns patterns to be expanded relative to (outside) the current directory.
7714
+ *
7715
+ * @example
7716
+ * // ['../*', './../*']
7717
+ * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])
7718
+ */
7719
+
7720
+ function getPatternsOutsideCurrentDirectory(patterns) {
7721
+ return patterns.filter(isPatternRelatedToParentDirectory);
7722
+ }
7723
+
7724
+ exports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;
7725
+
7726
+ function isPatternRelatedToParentDirectory(pattern) {
7727
+ return pattern.startsWith('..') || pattern.startsWith('./..');
7728
+ }
7729
+
7730
+ exports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;
7660
7731
 
7661
7732
  function getBaseDirectory(pattern) {
7662
7733
  return globParent(pattern, {
@@ -7705,20 +7776,20 @@ var pattern = createCommonjsModule(function (module, exports) {
7705
7776
  function getPatternParts(pattern, options) {
7706
7777
  let {
7707
7778
  parts
7708
- } = picomatch.scan(pattern, Object.assign(Object.assign({}, options), {
7779
+ } = micromatch_1.scan(pattern, Object.assign(Object.assign({}, options), {
7709
7780
  parts: true
7710
7781
  }));
7711
- /**
7712
- * The scan method returns an empty array in some cases.
7713
- * See micromatch/picomatch#58 for more details.
7782
+ /**
7783
+ * The scan method returns an empty array in some cases.
7784
+ * See micromatch/picomatch#58 for more details.
7714
7785
  */
7715
7786
 
7716
7787
  if (parts.length === 0) {
7717
7788
  parts = [pattern];
7718
7789
  }
7719
- /**
7720
- * The scan method does not return an empty part for the pattern with a forward slash.
7721
- * This is another part of micromatch/picomatch#58.
7790
+ /**
7791
+ * The scan method does not return an empty part for the pattern with a forward slash.
7792
+ * This is another part of micromatch/picomatch#58.
7722
7793
  */
7723
7794
 
7724
7795
 
@@ -7994,17 +8065,32 @@ var tasks = createCommonjsModule(function (module, exports) {
7994
8065
  }
7995
8066
 
7996
8067
  exports.generate = generate;
8068
+ /**
8069
+ * Returns tasks grouped by basic pattern directories.
8070
+ *
8071
+ * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
8072
+ * This is necessary because directory traversal starts at the base directory and goes deeper.
8073
+ */
7997
8074
 
7998
8075
  function convertPatternsToTasks(positive, negative, dynamic) {
7999
- const positivePatternsGroup = groupPatternsByBaseDirectory(positive); // When we have a global group – there is no reason to divide the patterns into independent tasks.
8000
- // In this case, the global task covers the rest.
8076
+ const tasks = [];
8077
+ const patternsOutsideCurrentDirectory = utils$1.pattern.getPatternsOutsideCurrentDirectory(positive);
8078
+ const patternsInsideCurrentDirectory = utils$1.pattern.getPatternsInsideCurrentDirectory(positive);
8079
+ const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
8080
+ const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
8081
+ tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
8082
+ /*
8083
+ * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory
8084
+ * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.
8085
+ */
8001
8086
 
8002
- if ('.' in positivePatternsGroup) {
8003
- const task = convertPatternGroupToTask('.', positive, negative, dynamic);
8004
- return [task];
8087
+ if ('.' in insideCurrentDirectoryGroup) {
8088
+ tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));
8089
+ } else {
8090
+ tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
8005
8091
  }
8006
8092
 
8007
- return convertPatternGroupsToTasks(positivePatternsGroup, negative, dynamic);
8093
+ return tasks;
8008
8094
  }
8009
8095
 
8010
8096
  exports.convertPatternsToTasks = convertPatternsToTasks;
@@ -8686,6 +8772,9 @@ function reusify(Constructor) {
8686
8772
 
8687
8773
  var reusify_1 = reusify;
8688
8774
 
8775
+ /* eslint-disable no-var */
8776
+
8777
+
8689
8778
  function fastqueue(context, worker, concurrency) {
8690
8779
  if (typeof context === 'function') {
8691
8780
  concurrency = worker;
@@ -8907,7 +8996,7 @@ function queueAsPromised(context, worker, concurrency) {
8907
8996
  return queue;
8908
8997
 
8909
8998
  function push(value) {
8910
- return new Promise(function (resolve, reject) {
8999
+ var p = new Promise(function (resolve, reject) {
8911
9000
  pushCb(value, function (err, result) {
8912
9001
  if (err) {
8913
9002
  reject(err);
@@ -8916,11 +9005,16 @@ function queueAsPromised(context, worker, concurrency) {
8916
9005
 
8917
9006
  resolve(result);
8918
9007
  });
8919
- });
9008
+ }); // Let's fork the promise chain to
9009
+ // make the error bubble up to the user but
9010
+ // not lead to a unhandledRejection
9011
+
9012
+ p.catch(noop);
9013
+ return p;
8920
9014
  }
8921
9015
 
8922
9016
  function unshift(value) {
8923
- return new Promise(function (resolve, reject) {
9017
+ var p = new Promise(function (resolve, reject) {
8924
9018
  unshiftCb(value, function (err, result) {
8925
9019
  if (err) {
8926
9020
  reject(err);
@@ -8929,7 +9023,12 @@ function queueAsPromised(context, worker, concurrency) {
8929
9023
 
8930
9024
  resolve(result);
8931
9025
  });
8932
- });
9026
+ }); // Let's fork the promise chain to
9027
+ // make the error bubble up to the user but
9028
+ // not lead to a unhandledRejection
9029
+
9030
+ p.catch(noop);
9031
+ return p;
8933
9032
  }
8934
9033
  }
8935
9034
 
@@ -9108,7 +9207,7 @@ class AsyncReader extends reader$1.default {
9108
9207
  }
9109
9208
 
9110
9209
  if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
9111
- this._pushToQueue(fullpath, entry.path);
9210
+ this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
9112
9211
  }
9113
9212
  }
9114
9213
 
@@ -9130,7 +9229,7 @@ class AsyncProvider {
9130
9229
  this._root = _root;
9131
9230
  this._settings = _settings;
9132
9231
  this._reader = new async$2.default(this._root, this._settings);
9133
- this._storage = new Set();
9232
+ this._storage = [];
9134
9233
  }
9135
9234
 
9136
9235
  read(callback) {
@@ -9139,11 +9238,11 @@ class AsyncProvider {
9139
9238
  });
9140
9239
 
9141
9240
  this._reader.onEntry(entry => {
9142
- this._storage.add(entry);
9241
+ this._storage.push(entry);
9143
9242
  });
9144
9243
 
9145
9244
  this._reader.onEnd(() => {
9146
- callSuccessCallback(callback, [...this._storage]);
9245
+ callSuccessCallback(callback, this._storage);
9147
9246
  });
9148
9247
 
9149
9248
  this._reader.read();
@@ -9214,7 +9313,7 @@ class SyncReader extends reader$1.default {
9214
9313
  constructor() {
9215
9314
  super(...arguments);
9216
9315
  this._scandir = out$2.scandirSync;
9217
- this._storage = new Set();
9316
+ this._storage = [];
9218
9317
  this._queue = new Set();
9219
9318
  }
9220
9319
 
@@ -9223,7 +9322,7 @@ class SyncReader extends reader$1.default {
9223
9322
 
9224
9323
  this._handleQueue();
9225
9324
 
9226
- return [...this._storage];
9325
+ return this._storage;
9227
9326
  }
9228
9327
 
9229
9328
  _pushToQueue(directory, base) {
@@ -9271,12 +9370,12 @@ class SyncReader extends reader$1.default {
9271
9370
  }
9272
9371
 
9273
9372
  if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {
9274
- this._pushToQueue(fullpath, entry.path);
9373
+ this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);
9275
9374
  }
9276
9375
  }
9277
9376
 
9278
9377
  _pushToStorage(entry) {
9279
- this._storage.add(entry);
9378
+ this._storage.push(entry);
9280
9379
  }
9281
9380
 
9282
9381
  }
@@ -9500,9 +9599,9 @@ class Matcher {
9500
9599
  }
9501
9600
 
9502
9601
  _fillStorage() {
9503
- /**
9504
- * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
9505
- * So, before expand patterns with brace expansion into separated patterns.
9602
+ /**
9603
+ * The original pattern may include `{,*,**,a/*}`, which will lead to problems with matching (unresolved level).
9604
+ * So, before expand patterns with brace expansion into separated patterns.
9506
9605
  */
9507
9606
  const patterns = utils$1.pattern.expandPatternsWithBraceExpansion(this._patterns);
9508
9607
 
@@ -9562,12 +9661,12 @@ class PartialMatcher extends matcher.default {
9562
9661
 
9563
9662
  for (const pattern of patterns) {
9564
9663
  const section = pattern.sections[0];
9565
- /**
9566
- * In this case, the pattern has a globstar and we must read all directories unconditionally,
9567
- * but only if the level has reached the end of the first group.
9568
- *
9569
- * fixtures/{a,b}/**
9570
- * ^ true/false ^ always true
9664
+ /**
9665
+ * In this case, the pattern has a globstar and we must read all directories unconditionally,
9666
+ * but only if the level has reached the end of the first group.
9667
+ *
9668
+ * fixtures/{a,b}/**
9669
+ * ^ true/false ^ always true
9571
9670
  */
9572
9671
 
9573
9672
  if (!pattern.complete && levels > section.length) {
@@ -9647,8 +9746,8 @@ class DeepFilter {
9647
9746
  }
9648
9747
 
9649
9748
  _isSkippedByDeep(basePath, entryPath) {
9650
- /**
9651
- * Avoid unnecessary depth calculations when it doesn't matter.
9749
+ /**
9750
+ * Avoid unnecessary depth calculations when it doesn't matter.
9652
9751
  */
9653
9752
  if (this._settings.deep === Infinity) {
9654
9753
  return false;
@@ -10046,9 +10145,9 @@ var settings = createCommonjsModule(function (module, exports) {
10046
10145
  value: true
10047
10146
  });
10048
10147
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
10049
- /**
10050
- * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
10051
- * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
10148
+ /**
10149
+ * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
10150
+ * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107
10052
10151
  */
10053
10152
 
10054
10153
  const CPU_COUNT = Math.max(os__default['default'].cpus().length, 1);
@@ -10129,10 +10228,10 @@ async function FastGlob(source, options) {
10129
10228
  function stream$1(source, options) {
10130
10229
  assertPatternsInput(source);
10131
10230
  const works = getWorks(source, stream.default, options);
10132
- /**
10133
- * The stream returned by the provider cannot work with an asynchronous iterator.
10134
- * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
10135
- * This affects performance (+25%). I don't see best solution right now.
10231
+ /**
10232
+ * The stream returned by the provider cannot work with an asynchronous iterator.
10233
+ * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
10234
+ * This affects performance (+25%). I don't see best solution right now.
10136
10235
  */
10137
10236
 
10138
10237
  return utils$1.stream.merge(works);
@@ -10456,11 +10555,31 @@ var getIteratorMethod = function (it) {
10456
10555
  || iterators[classof(it)];
10457
10556
  };
10458
10557
 
10459
- var iteratorClose = function (iterator) {
10460
- var returnMethod = iterator['return'];
10461
- if (returnMethod !== undefined) {
10462
- return anObject(returnMethod.call(iterator)).value;
10558
+ var getIterator = function (it, usingIterator) {
10559
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod(it) : usingIterator;
10560
+ if (typeof iteratorMethod != 'function') {
10561
+ throw TypeError(String(it) + ' is not iterable');
10562
+ } return anObject(iteratorMethod.call(it));
10563
+ };
10564
+
10565
+ var iteratorClose = function (iterator, kind, value) {
10566
+ var innerResult, innerError;
10567
+ anObject(iterator);
10568
+ try {
10569
+ innerResult = iterator['return'];
10570
+ if (innerResult === undefined) {
10571
+ if (kind === 'throw') throw value;
10572
+ return value;
10573
+ }
10574
+ innerResult = innerResult.call(iterator);
10575
+ } catch (error) {
10576
+ innerError = true;
10577
+ innerResult = error;
10463
10578
  }
10579
+ if (kind === 'throw') throw value;
10580
+ if (innerError) throw innerResult;
10581
+ anObject(innerResult);
10582
+ return value;
10464
10583
  };
10465
10584
 
10466
10585
  var Result = function (stopped, result) {
@@ -10477,7 +10596,7 @@ var iterate = function (iterable, unboundFunction, options) {
10477
10596
  var iterator, iterFn, index, length, result, next, step;
10478
10597
 
10479
10598
  var stop = function (condition) {
10480
- if (iterator) iteratorClose(iterator);
10599
+ if (iterator) iteratorClose(iterator, 'normal', condition);
10481
10600
  return new Result(true, condition);
10482
10601
  };
10483
10602
 
@@ -10500,7 +10619,7 @@ var iterate = function (iterable, unboundFunction, options) {
10500
10619
  if (result && result instanceof Result) return result;
10501
10620
  } return new Result(false);
10502
10621
  }
10503
- iterator = iterFn.call(iterable);
10622
+ iterator = getIterator(iterable, iterFn);
10504
10623
  }
10505
10624
 
10506
10625
  next = iterator.next;
@@ -10508,15 +10627,14 @@ var iterate = function (iterable, unboundFunction, options) {
10508
10627
  try {
10509
10628
  result = callFn(step.value);
10510
10629
  } catch (error) {
10511
- iteratorClose(iterator);
10512
- throw error;
10630
+ iteratorClose(iterator, 'throw', error);
10513
10631
  }
10514
10632
  if (typeof result == 'object' && result && result instanceof Result) return result;
10515
10633
  } return new Result(false);
10516
10634
  };
10517
10635
 
10518
10636
  var createProperty = function (object, key, value) {
10519
- var propertyKey = toPrimitive(key);
10637
+ var propertyKey = toPropertyKey(key);
10520
10638
  if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
10521
10639
  else object[propertyKey] = value;
10522
10640
  };
@@ -11352,9 +11470,7 @@ function arrayLikeKeys(value, inherited) {
11352
11470
 
11353
11471
  for (var key in value) {
11354
11472
  if ((inherited || hasOwnProperty$8.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.
11355
- key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.
11356
- isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.
11357
- isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.
11473
+ key == 'length' || isBuff && (key == 'offset' || key == 'parent') || isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.
11358
11474
  _isIndex(key, length)))) {
11359
11475
  result.push(key);
11360
11476
  }
@@ -13457,8 +13573,8 @@ var stringToPath = _memoizeCapped(function (string) {
13457
13573
  if (string.charCodeAt(0) === 46
13458
13574
  /* . */
13459
13575
  ) {
13460
- result.push('');
13461
- }
13576
+ result.push('');
13577
+ }
13462
13578
 
13463
13579
  string.replace(rePropName, function (match, number, quote, subString) {
13464
13580
  result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match);
@@ -16745,6 +16861,16 @@ function format$1(context, input, opt) {
16745
16861
  };
16746
16862
  }
16747
16863
 
16864
+ if (context.argv["debug-print-ast"]) {
16865
+ const {
16866
+ ast
16867
+ } = prettier$1.__debug.parse(input, opt);
16868
+
16869
+ return {
16870
+ formatted: JSON.stringify(ast)
16871
+ };
16872
+ }
16873
+
16748
16874
  if (context.argv["debug-check"]) {
16749
16875
  const pp = prettier$1.format(input, opt);
16750
16876
  const pppp = prettier$1.format(pp, opt);
@@ -17792,6 +17918,9 @@ const options = {
17792
17918
  "debug-print-comments": {
17793
17919
  type: "boolean"
17794
17920
  },
17921
+ "debug-print-ast": {
17922
+ type: "boolean"
17923
+ },
17795
17924
  "debug-repeat": {
17796
17925
  // Repeat the formatting a few times and measure the average duration.
17797
17926
  type: "int",
@@ -18547,13 +18676,7 @@ function wcwidth(ucs, opts) {
18547
18676
  if (bisearch(ucs)) return 0; // if we arrive here, ucs is not a combining or C0/C1 control character
18548
18677
 
18549
18678
  return 1 + (ucs >= 0x1100 && (ucs <= 0x115f || // Hangul Jamo init. consonants
18550
- ucs == 0x2329 || ucs == 0x232a || ucs >= 0x2e80 && ucs <= 0xa4cf && ucs != 0x303f || // CJK ... Yi
18551
- ucs >= 0xac00 && ucs <= 0xd7a3 || // Hangul Syllables
18552
- ucs >= 0xf900 && ucs <= 0xfaff || // CJK Compatibility Ideographs
18553
- ucs >= 0xfe10 && ucs <= 0xfe19 || // Vertical forms
18554
- ucs >= 0xfe30 && ucs <= 0xfe6f || // CJK Compatibility Forms
18555
- ucs >= 0xff00 && ucs <= 0xff60 || // Fullwidth Forms
18556
- ucs >= 0xffe0 && ucs <= 0xffe6 || ucs >= 0x20000 && ucs <= 0x2fffd || ucs >= 0x30000 && ucs <= 0x3fffd));
18679
+ ucs == 0x2329 || ucs == 0x232a || ucs >= 0x2e80 && ucs <= 0xa4cf && ucs != 0x303f || ucs >= 0xac00 && ucs <= 0xd7a3 || ucs >= 0xf900 && ucs <= 0xfaff || ucs >= 0xfe10 && ucs <= 0xfe19 || ucs >= 0xfe30 && ucs <= 0xfe6f || ucs >= 0xff00 && ucs <= 0xff60 || ucs >= 0xffe0 && ucs <= 0xffe6 || ucs >= 0x20000 && ucs <= 0x2fffd || ucs >= 0x30000 && ucs <= 0x3fffd));
18557
18680
  }
18558
18681
 
18559
18682
  function bisearch(ucs) {