@putout/bundle 5.0.7 → 5.0.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.
package/bundle/putout.js CHANGED
@@ -178,15 +178,15 @@ var versions = {};
178
178
  var release = {};
179
179
  var config = {};
180
180
 
181
- function noop$a() {}
181
+ function noop$8() {}
182
182
 
183
- var on = noop$a;
184
- var addListener = noop$a;
185
- var once$9 = noop$a;
186
- var off = noop$a;
187
- var removeListener = noop$a;
188
- var removeAllListeners = noop$a;
189
- var emit = noop$a;
183
+ var on = noop$8;
184
+ var addListener = noop$8;
185
+ var once$9 = noop$8;
186
+ var off = noop$8;
187
+ var removeListener = noop$8;
188
+ var removeAllListeners = noop$8;
189
+ var emit = noop$8;
190
190
 
191
191
  function binding(name) {
192
192
  throw new Error('process.binding is not supported');
@@ -482,7 +482,7 @@ function write (buffer, value, offset, isLE, mLen, nBytes) {
482
482
 
483
483
  var toString = {}.toString;
484
484
 
485
- var isArray$f = Array.isArray || function (arr) {
485
+ var isArray$d = Array.isArray || function (arr) {
486
486
  return toString.call(arr) == '[object Array]';
487
487
  };
488
488
 
@@ -766,7 +766,7 @@ function fromObject (that, obj) {
766
766
  return fromArrayLike(that, obj)
767
767
  }
768
768
 
769
- if (obj.type === 'Buffer' && isArray$f(obj.data)) {
769
+ if (obj.type === 'Buffer' && isArray$d(obj.data)) {
770
770
  return fromArrayLike(that, obj.data)
771
771
  }
772
772
  }
@@ -831,7 +831,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
831
831
  };
832
832
 
833
833
  Buffer.concat = function concat (list, length) {
834
- if (!isArray$f(list)) {
834
+ if (!isArray$d(list)) {
835
835
  throw new TypeError('"list" argument must be an Array of Buffers')
836
836
  }
837
837
 
@@ -2752,7 +2752,7 @@ var require_jsesc$1 = __commonJS$1({
2752
2752
  var index_exports$1 = {};
2753
2753
 
2754
2754
  __export$1(index_exports$1, {
2755
- codeFrameColumns: () => codeFrameColumns$3,
2755
+ codeFrameColumns: () => codeFrameColumns$2,
2756
2756
  generate: () => generate$7,
2757
2757
  parse: () => parse$7,
2758
2758
  parseExpression: () => parseExpression$2,
@@ -36520,7 +36520,7 @@ function getMarkerLines$1(loc, source, opts) {
36520
36520
  };
36521
36521
  }
36522
36522
 
36523
- function codeFrameColumns$3(rawLines, loc, opts = {}) {
36523
+ function codeFrameColumns$2(rawLines, loc, opts = {}) {
36524
36524
  const shouldHighlight = opts.forceColor || isColorSupported$1() && opts.highlightCode;
36525
36525
  const defs = getDefs$1(shouldHighlight);
36526
36526
  const lines = rawLines.split(NEWLINE$3);
@@ -36889,7 +36889,7 @@ function parseWithCodeFrame$1(code2, parserOpts, syntacticPlaceholders) {
36889
36889
  const loc = err.loc;
36890
36890
 
36891
36891
  if (loc) {
36892
- err.message += '\n' + codeFrameColumns$3(code2, {
36892
+ err.message += '\n' + codeFrameColumns$2(code2, {
36893
36893
  start: loc,
36894
36894
  });
36895
36895
  err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
@@ -47816,7 +47816,7 @@ function replaceWithSourceString$1(replacement) {
47816
47816
  const loc = err.loc;
47817
47817
 
47818
47818
  if (loc) {
47819
- err.message += ' - make sure this is an expression.\n' + codeFrameColumns$3(replacement, {
47819
+ err.message += ' - make sure this is an expression.\n' + codeFrameColumns$2(replacement, {
47820
47820
  start: {
47821
47821
  line: loc.line,
47822
47822
  column: loc.column + 1,
@@ -52148,7 +52148,7 @@ comment.parseComments = parseComments$7;
52148
52148
 
52149
52149
  const {parseComments: parseComments$6} = comment;
52150
52150
 
52151
- const noop$9 = () => {};
52151
+ const noop$7 = () => {};
52152
52152
  const parseParams = (path) => path.get('params');
52153
52153
 
52154
52154
  params.printParams = (path, printer, semantics, customization = {}) => {
@@ -52164,9 +52164,9 @@ params.printParams = (path, printer, semantics, customization = {}) => {
52164
52164
  braceOpen = '(',
52165
52165
  braceClose = ')',
52166
52166
  printSpace = print.space,
52167
- printAfterOpen = noop$9,
52168
- printBeforeClose = noop$9,
52169
- printAfterClose = noop$9,
52167
+ printAfterOpen = noop$7,
52168
+ printBeforeClose = noop$7,
52169
+ printAfterClose = noop$7,
52170
52170
  } = customization;
52171
52171
 
52172
52172
  if (typeParameters)
@@ -52964,12 +52964,12 @@ var callExpression$3 = {};
52964
52964
 
52965
52965
  const {exists: exists$c} = is$4;
52966
52966
  const {maybeParens: maybeParens$9} = maybeParens$e;
52967
- const {isArray: isArray$e} = Array;
52967
+ const {isArray: isArray$c} = Array;
52968
52968
 
52969
52969
  const parseArgs = (path) => {
52970
52970
  const argsPath = path.get('arguments');
52971
52971
 
52972
- if (!isArray$e(argsPath))
52972
+ if (!isArray$c(argsPath))
52973
52973
  return [];
52974
52974
 
52975
52975
  return argsPath;
@@ -55789,10 +55789,10 @@ maybeWriteBrace.condition = (path, printer, semantics) => {
55789
55789
  var sequenceExpressionComments = {};
55790
55790
 
55791
55791
  const {hasLeadingComment} = is$4;
55792
- const noop$8 = () => {};
55792
+ const noop$6 = () => {};
55793
55793
 
55794
- sequenceExpressionComments.printLeadingCommentLine = noop$8;
55795
- sequenceExpressionComments.printLeadingCommentBlock = noop$8;
55794
+ sequenceExpressionComments.printLeadingCommentLine = noop$6;
55795
+ sequenceExpressionComments.printLeadingCommentBlock = noop$6;
55796
55796
 
55797
55797
  sequenceExpressionComments.maybePrintComments = (path, {print}) => {
55798
55798
  if (hasLeadingComment(path)) {
@@ -58900,7 +58900,7 @@ var tsPropertySignature$1 = {exports: {}};
58900
58900
  var comments$1 = {};
58901
58901
 
58902
58902
  const {isPrev} = is$4;
58903
- const noop$7 = () => {};
58903
+ const noop$5 = () => {};
58904
58904
 
58905
58905
  comments$1.printLeadingCommentLine = (path, printer, semantics, {printComment}) => {
58906
58906
  const {print} = printer;
@@ -58917,7 +58917,7 @@ comments$1.printLeadingCommentBlock = (path, printer, semantics, {printComment})
58917
58917
  print.indent();
58918
58918
  };
58919
58919
 
58920
- comments$1.printTrailingCommentBlock = noop$7;
58920
+ comments$1.printTrailingCommentBlock = noop$5;
58921
58921
 
58922
58922
  (function (module) {
58923
58923
 
@@ -59356,7 +59356,7 @@ const {types: types$t} = bundle$1;
59356
59356
  const {createPrintSpace} = printFunctionParams$1;
59357
59357
  const {printParams: printParams$1} = params;
59358
59358
  const {isTSUnionType: isTSUnionType$1} = types$t;
59359
- const noop$6 = () => {};
59359
+ const noop$4 = () => {};
59360
59360
 
59361
59361
  tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semantics) => {
59362
59362
  const {print, indent} = printer;
@@ -59366,16 +59366,16 @@ tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semant
59366
59366
  printer,
59367
59367
  });
59368
59368
 
59369
- const printAfterOpen = !isNewline ? noop$6 : () => {
59369
+ const printAfterOpen = !isNewline ? noop$4 : () => {
59370
59370
  indent.inc();
59371
59371
  print.breakline();
59372
59372
  };
59373
59373
 
59374
- const printAfterClose = !isNewline ? noop$6 : () => {
59374
+ const printAfterClose = !isNewline ? noop$4 : () => {
59375
59375
  print.breakline();
59376
59376
  };
59377
59377
 
59378
- const printBeforeClose = !isNewline ? noop$6 : () => {
59378
+ const printBeforeClose = !isNewline ? noop$4 : () => {
59379
59379
  indent.dec();
59380
59380
  print.breakline();
59381
59381
  };
@@ -60136,7 +60136,7 @@ function snakeCase(str) {
60136
60136
 
60137
60137
  const process = require$$0$3;
60138
60138
  const toSnakeCase = justSnakeCase;
60139
- const {codeFrameColumns: codeFrameColumns$2} = bundle$1;
60139
+ const {codeFrameColumns: codeFrameColumns$1} = bundle$1;
60140
60140
  const {TYPES: TYPES$3} = types$19;
60141
60141
 
60142
60142
  const {stringify: stringify$7} = JSON;
@@ -60160,7 +60160,7 @@ debug$8.createDebug = (tokens) => (a) => {
60160
60160
 
60161
60161
  debug$8.createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type, value}) => {
60162
60162
  if (LOG_TOKENS) {
60163
- console.log(codeFrameColumns$2(stringify$7({
60163
+ console.log(codeFrameColumns$1(stringify$7({
60164
60164
  type,
60165
60165
  value,
60166
60166
  }), {}, {
@@ -60171,7 +60171,7 @@ debug$8.createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type,
60171
60171
  }
60172
60172
 
60173
60173
  if (LOG_ALL) {
60174
- console.log(codeFrameColumns$2(value, {}, {
60174
+ console.log(codeFrameColumns$1(value, {}, {
60175
60175
  highlightCode: true,
60176
60176
  }));
60177
60177
 
@@ -60180,7 +60180,7 @@ debug$8.createLog = ({newline = '\n', store = createStore$1()} = {}) => ({type,
60180
60180
 
60181
60181
  if (LOG) {
60182
60182
  if (value === newline) {
60183
- console.log(codeFrameColumns$2(store(), {}, {
60183
+ console.log(codeFrameColumns$1(store(), {}, {
60184
60184
  highlightCode: true,
60185
60185
  }));
60186
60186
 
@@ -60654,9 +60654,9 @@ var removeBlankLines$1 = function removeBlankLines(input) {
60654
60654
  return input.replace(blankLines, "");
60655
60655
  };
60656
60656
 
60657
- var lib$2 = removeBlankLines$1;
60657
+ var lib$1 = removeBlankLines$1;
60658
60658
 
60659
- const removeBlankLines = lib$2;
60659
+ const removeBlankLines = lib$1;
60660
60660
 
60661
60661
  const cut$1 = (a) => a.slice(0, a.indexOf('('));
60662
60662
  const createPrefix = (name) => {
@@ -60889,9 +60889,9 @@ babel$2.print = (ast, options) => {
60889
60889
  const putoutPrinter = printer;
60890
60890
  const babelPrinter = babel$2;
60891
60891
 
60892
- const {isArray: isArray$d} = Array;
60892
+ const {isArray: isArray$b} = Array;
60893
60893
 
60894
- const maybeArray$7 = (a) => isArray$d(a) ? a : [a, {}];
60894
+ const maybeArray$7 = (a) => isArray$b(a) ? a : [a, {}];
60895
60895
 
60896
60896
  var print$4 = (ast, options = {}) => {
60897
60897
  const [printer = 'putout', printerOptions] = maybeArray$7(options.printer);
@@ -61930,7 +61930,7 @@ var require_src = __commonJS({
61930
61930
  var index_exports = {};
61931
61931
 
61932
61932
  __export(index_exports, {
61933
- codeFrameColumns: () => codeFrameColumns$1,
61933
+ codeFrameColumns: () => codeFrameColumns,
61934
61934
  generate: () => generate$5,
61935
61935
  parse: () => parse$6,
61936
61936
  parseExpression: () => parseExpression$1,
@@ -95418,7 +95418,7 @@ function getMarkerLines(loc, source, opts) {
95418
95418
  };
95419
95419
  }
95420
95420
 
95421
- function codeFrameColumns$1(rawLines, loc, opts = {}) {
95421
+ function codeFrameColumns(rawLines, loc, opts = {}) {
95422
95422
  const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
95423
95423
  const defs = getDefs(shouldHighlight);
95424
95424
  const lines = rawLines.split(NEWLINE);
@@ -95805,7 +95805,7 @@ function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
95805
95805
  const loc = err.loc;
95806
95806
 
95807
95807
  if (loc) {
95808
- err.message += '\n' + codeFrameColumns$1(code2, {
95808
+ err.message += '\n' + codeFrameColumns(code2, {
95809
95809
  start: loc,
95810
95810
  });
95811
95811
  err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
@@ -106642,7 +106642,7 @@ function replaceWithSourceString(replacement) {
106642
106642
  const loc = err.loc;
106643
106643
 
106644
106644
  if (loc) {
106645
- err.message += ' - make sure this is an expression.\n' + codeFrameColumns$1(replacement, {
106645
+ err.message += ' - make sure this is an expression.\n' + codeFrameColumns(replacement, {
106646
106646
  start: {
106647
106647
  line: loc.line,
106648
106648
  column: loc.column + 1,
@@ -110638,20 +110638,20 @@ function onceStrict (fn) {
110638
110638
 
110639
110639
  var onceExports = once$8.exports;
110640
110640
 
110641
- const noop$5 = () => {};
110641
+ const noop$3 = () => {};
110642
110642
 
110643
110643
  var empty = /*#__PURE__*/Object.freeze({
110644
110644
  __proto__: null,
110645
- default: noop$5
110645
+ default: noop$3
110646
110646
  });
110647
110647
 
110648
- var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(empty);
110648
+ var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(empty);
110649
110649
 
110650
110650
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110651
110651
 
110652
110652
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110653
110653
  function privateMethods(Parser) {
110654
- const ExtendedParser = noop$5();
110654
+ const ExtendedParser = noop$3();
110655
110655
 
110656
110656
  return class extends ExtendedParser {
110657
110657
  // Parse private methods
@@ -110677,7 +110677,7 @@ var acornPrivateMethods = /*#__PURE__*/Object.freeze({
110677
110677
  default: privateMethods
110678
110678
  });
110679
110679
 
110680
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110680
+ var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110681
110681
 
110682
110682
  var acornStage3;
110683
110683
  var hasRequiredAcornStage3;
@@ -110688,9 +110688,9 @@ function requireAcornStage3 () {
110688
110688
 
110689
110689
  acornStage3 = function(Parser) {
110690
110690
  return Parser.extend(
110691
- require$$1$2,
110692
- require$$1$2,
110693
- require$$2
110691
+ require$$1$1,
110692
+ require$$1$1,
110693
+ require$$2$1
110694
110694
  )
110695
110695
  };
110696
110696
  return acornStage3;
@@ -110699,10 +110699,10 @@ function requireAcornStage3 () {
110699
110699
  const once$6 = onceExports;
110700
110700
 
110701
110701
  const initAcorn = once$6(() => {
110702
- const {Parser} = require$$1$2;
110702
+ const {Parser} = require$$1$1;
110703
110703
 
110704
110704
  const stage3 = requireAcornStage3();
110705
- const typescript = require$$1$2.default;
110705
+ const typescript = require$$1$1.default;
110706
110706
 
110707
110707
  return Parser.extend(typescript(), stage3);
110708
110708
  });
@@ -110819,7 +110819,7 @@ function getBabelLangExts({isTS, isFlow, isJSX}) {
110819
110819
  var espree$1 = {};
110820
110820
 
110821
110821
  const once$4 = onceExports;
110822
- const initEspree = once$4(() => require$$1$2);
110822
+ const initEspree = once$4(() => require$$1$1);
110823
110823
 
110824
110824
  espree$1.parse = function espreeParse(source) {
110825
110825
  const {parse} = initEspree();
@@ -110840,7 +110840,7 @@ espree$1.parse = function espreeParse(source) {
110840
110840
  var esprima$1 = {};
110841
110841
 
110842
110842
  const once$3 = onceExports;
110843
- const initEsprima = once$3(() => require$$1$2);
110843
+ const initEsprima = once$3(() => require$$1$1);
110844
110844
 
110845
110845
  esprima$1.parse = function esprimaParse(source) {
110846
110846
  const {parse} = initEsprima();
@@ -110857,7 +110857,7 @@ esprima$1.parse = function esprimaParse(source) {
110857
110857
  var tenko$1 = {};
110858
110858
 
110859
110859
  const once$2 = onceExports;
110860
- const initTenko = once$2(() => require$$1$2);
110860
+ const initTenko = once$2(() => require$$1$1);
110861
110861
 
110862
110862
  tenko$1.parse = (source) => {
110863
110863
  const {Tenko} = initTenko();
@@ -110874,7 +110874,7 @@ tenko$1.parse = (source) => {
110874
110874
  var hermes$1 = {};
110875
110875
 
110876
110876
  const once$1 = onceExports;
110877
- const initHermes = once$1(() => require$$1$2);
110877
+ const initHermes = once$1(() => require$$1$1);
110878
110878
 
110879
110879
  hermes$1.parse = function hermesParse(source) {
110880
110880
  const parser = initHermes();
@@ -110890,7 +110890,7 @@ hermes$1.parse = function hermesParse(source) {
110890
110890
  return parser.parse(source, options);
110891
110891
  };
110892
110892
 
110893
- var tryCatch$7 = (fn, ...args) => {
110893
+ var tryCatch$6 = (fn, ...args) => {
110894
110894
  try {
110895
110895
  return [null, fn(...args)];
110896
110896
  } catch(e) {
@@ -110898,11 +110898,13 @@ var tryCatch$7 = (fn, ...args) => {
110898
110898
  }
110899
110899
  };
110900
110900
 
110901
- const tryCatch$6 = tryCatch$7;
110901
+ var tryCatch$7 = tryCatch$6.default;
110902
+
110903
+ const tryCatch$5 = tryCatch$6;
110902
110904
 
110903
110905
  var secondChance$1 = (fn, source, messages, args) => {
110904
110906
  const [a, ...others] = args;
110905
- const [errorA, resultA] = tryCatch$6(fn, source, a);
110907
+ const [errorA, resultA] = tryCatch$5(fn, source, a);
110906
110908
 
110907
110909
  if (!errorA)
110908
110910
  return resultA;
@@ -110911,7 +110913,7 @@ var secondChance$1 = (fn, source, messages, args) => {
110911
110913
  throw errorA;
110912
110914
 
110913
110915
  for (const b of others) {
110914
- const [errorB, resultB] = tryCatch$6(fn, source, b);
110916
+ const [errorB, resultB] = tryCatch$5(fn, source, b);
110915
110917
 
110916
110918
  if (!errorB)
110917
110919
  return resultB;
@@ -111002,10 +111004,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
111002
111004
 
111003
111005
  var tryThrowWithReason$3 = {};
111004
111006
 
111005
- const tryCatch$5 = tryCatch$7;
111007
+ const tryCatch$4 = tryCatch$6;
111006
111008
 
111007
111009
  tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
111008
- const [error, result] = tryCatch$5(fn, ...args);
111010
+ const [error, result] = tryCatch$4(fn, ...args);
111009
111011
 
111010
111012
  if (error) {
111011
111013
  error.reason = 'parse';
@@ -111185,12 +111187,12 @@ var nanoMemoize = /*#__PURE__*/Object.freeze({
111185
111187
  nanomemoize: $cf838c15c8b009ba$export$22f15dd4e5be7e52
111186
111188
  });
111187
111189
 
111188
- var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111190
+ var require$$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111189
111191
 
111190
111192
  (function (module) {
111191
111193
 
111192
111194
  const {types, template} = bundle$1;
111193
- const {nanomemoize} = require$$1$1;
111195
+ const {nanomemoize} = require$$1;
111194
111196
  const plugins = plugins$1;
111195
111197
  const options = options$1;
111196
111198
 
@@ -111282,16 +111284,14 @@ parser$5.parse = parse$4;
111282
111284
  parser$5.generate = generate$3;
111283
111285
  parser$5.template = template$9;
111284
111286
 
111285
- var shebang = {};
111286
-
111287
- shebang.mergeShebang = (shebang, source) => {
111287
+ const mergeShebang$1 = (shebang, source) => {
111288
111288
  if (!shebang)
111289
111289
  return source;
111290
111290
 
111291
111291
  return `${shebang}\n${source}`;
111292
111292
  };
111293
111293
 
111294
- shebang.cutShebang = (source) => {
111294
+ const cutShebang$1 = (source) => {
111295
111295
  if (source.indexOf('#'))
111296
111296
  return [source, ''];
111297
111297
 
@@ -111309,7 +111309,13 @@ shebang.cutShebang = (source) => {
111309
111309
  ];
111310
111310
  };
111311
111311
 
111312
- var defaultOptions$5 = {};
111312
+ var shebang = /*#__PURE__*/Object.freeze({
111313
+ __proto__: null,
111314
+ cutShebang: cutShebang$1,
111315
+ mergeShebang: mergeShebang$1
111316
+ });
111317
+
111318
+ var require$$2 = /*@__PURE__*/getAugmentedNamespace(shebang);
111313
111319
 
111314
111320
  // Copyright Joyent, Inc. and other Node contributors.
111315
111321
  //
@@ -111439,7 +111445,7 @@ function join$3() {
111439
111445
 
111440
111446
  // path.relative(from, to)
111441
111447
  // posix version
111442
- function relative$1(from, to) {
111448
+ function relative(from, to) {
111443
111449
  from = resolve(from).substr(1);
111444
111450
  to = resolve(to).substr(1);
111445
111451
 
@@ -111520,7 +111526,7 @@ var _polyfillNode_path = {
111520
111526
  dirname: dirname$2,
111521
111527
  sep: sep,
111522
111528
  delimiter: delimiter,
111523
- relative: relative$1,
111529
+ relative: relative,
111524
111530
  join: join$3,
111525
111531
  isAbsolute: isAbsolute,
111526
111532
  normalize: normalize,
@@ -111554,13 +111560,11 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
111554
111560
  isAbsolute: isAbsolute,
111555
111561
  join: join$3,
111556
111562
  normalize: normalize,
111557
- relative: relative$1,
111563
+ relative: relative,
111558
111564
  resolve: resolve,
111559
111565
  sep: sep
111560
111566
  });
111561
111567
 
111562
- var module$1 = {};
111563
-
111564
111568
  var tryToCatch = async (fn, ...args) => {
111565
111569
  check$a(fn);
111566
111570
 
@@ -111578,19 +111582,25 @@ function check$a(fn) {
111578
111582
 
111579
111583
  var tryToCatch$1 = tryToCatch.default;
111580
111584
 
111585
+ var _module = {};
111586
+
111587
+ const returns$1 = (a) => () => a;
111588
+ const noop$2 = () => {};
111589
+
111590
+ const createRequire = (url, overrides = {}) => {
111591
+ const {module = _module} = overrides;
111592
+ const {createRequire = returns$1(noop$2)} = module;
111593
+
111594
+ return createRequire(url);
111595
+ };
111596
+
111581
111597
  // How in other way to mock import using mock require in CommonJS?
111582
111598
  const simpleImport = async (url) => {
111583
111599
  const result = await import(url);
111584
111600
  return result.default || result;
111585
111601
  };
111586
111602
 
111587
- const returns$2 = (a) => () => a;
111588
-
111589
- const noop$4 = () => {};
111590
-
111591
- const {createRequire: createRequire$1 = returns$2(noop$4)} = module$1;
111592
-
111593
- const require$1 = createRequire$1(import.meta.url);
111603
+ const require$1 = createRequire(import.meta.url);
111594
111604
 
111595
111605
  const {assign: assign$3} = Object;
111596
111606
  const stub$2 = () => () => {};
@@ -111686,20 +111696,20 @@ function buildPluginsDirs(name) {
111686
111696
  ];
111687
111697
  }
111688
111698
 
111689
- const isStr$4 = (a) => typeof a === 'string';
111690
- const {isArray: isArray$c} = Array;
111699
+ const isStr$3 = (a) => typeof a === 'string';
111700
+ const {isArray: isArray$a} = Array;
111691
111701
  const {entries: entries$9} = Object;
111692
111702
 
111693
111703
  const parsePluginNames = (plugins) => {
111694
111704
  const result = [];
111695
111705
 
111696
111706
  for (const plugin of plugins) {
111697
- if (isStr$4(plugin)) {
111707
+ if (isStr$3(plugin)) {
111698
111708
  result.push([plugin]);
111699
111709
  continue;
111700
111710
  }
111701
111711
 
111702
- if (isArray$c(plugin)) {
111712
+ if (isArray$a(plugin)) {
111703
111713
  const [pluginName, fn] = plugin;
111704
111714
  result.push([pluginName, fn]);
111705
111715
  continue;
@@ -111711,9 +111721,9 @@ const parsePluginNames = (plugins) => {
111711
111721
  return result;
111712
111722
  };
111713
111723
 
111714
- const {isArray: isArray$b} = Array;
111724
+ const {isArray: isArray$9} = Array;
111715
111725
  const isBool$2 = (a) => typeof a === 'boolean';
111716
- const isStr$3 = (a) => typeof a === 'string';
111726
+ const isStr$2 = (a) => typeof a === 'string';
111717
111727
  const isObj = (a) => typeof a === 'object';
111718
111728
  const {entries: entries$8} = Object;
111719
111729
  const {stringify: stringify$6} = JSON;
@@ -111721,7 +111731,7 @@ const {stringify: stringify$6} = JSON;
111721
111731
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
111722
111732
  const rulesUsedInsteadOfMatchError = (a) => Error(`☝️ Looks like you need to change "rules" to "match" for ${stringify$6(a)}`);
111723
111733
  const stateOptionError = ({rule, value}) => Error(`☝️ ${rule}: state option can be "on" or "off" only, when used as string, received: "${value}"`);
111724
- const defaultOptions$4 = () => Object.create(null);
111734
+ const defaultOptions$5 = () => Object.create(null);
111725
111735
 
111726
111736
  const parseState = (rule, value) => {
111727
111737
  validateState(rule, value);
@@ -111743,13 +111753,13 @@ const parseRules = (rules) => {
111743
111753
  check$9(rules);
111744
111754
 
111745
111755
  for (const [rule, value] of entries$8(rules)) {
111746
- if (isStr$3(value)) {
111756
+ if (isStr$2(value)) {
111747
111757
  result.push({
111748
111758
  rule,
111749
111759
  state: parseState(rule, value),
111750
111760
  plugin,
111751
111761
  msg,
111752
- options: defaultOptions$4(),
111762
+ options: defaultOptions$5(),
111753
111763
  });
111754
111764
  continue;
111755
111765
  }
@@ -111760,12 +111770,12 @@ const parseRules = (rules) => {
111760
111770
  state: value,
111761
111771
  plugin,
111762
111772
  msg,
111763
- options: defaultOptions$4(),
111773
+ options: defaultOptions$5(),
111764
111774
  });
111765
111775
  continue;
111766
111776
  }
111767
111777
 
111768
- const looksLikeArray = isArray$b(value);
111778
+ const looksLikeArray = isArray$9(value);
111769
111779
  const looksLikeNormalArray = looksLikeArray && value.length;
111770
111780
 
111771
111781
  if (looksLikeNormalArray) {
@@ -111843,11 +111853,11 @@ const enableNestedRules = (rules) => {
111843
111853
  };
111844
111854
 
111845
111855
  function check$9(rules) {
111846
- if (isArray$b(rules))
111856
+ if (isArray$9(rules))
111847
111857
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
111848
111858
  }
111849
111859
 
111850
- const defaultOptions$3 = () => Object.create(null);
111860
+ const defaultOptions$4 = () => Object.create(null);
111851
111861
 
111852
111862
  const mergeRules = ([rule, plugin], rules) => {
111853
111863
  for (const currentRule of rules) {
@@ -111868,7 +111878,7 @@ const mergeRules = ([rule, plugin], rules) => {
111868
111878
  rule,
111869
111879
  plugin,
111870
111880
  msg: '',
111871
- options: defaultOptions$3(),
111881
+ options: defaultOptions$4(),
111872
111882
  };
111873
111883
  };
111874
111884
 
@@ -111960,7 +111970,7 @@ const checkRule = (rule) => {
111960
111970
  throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
111961
111971
  };
111962
111972
 
111963
- const validateRulesRelations$1 = (options) => {
111973
+ const validateRulesRelations = (options) => {
111964
111974
  check$8(options);
111965
111975
 
111966
111976
  const {pluginNames = [], rules = {}} = options;
@@ -112008,8 +112018,8 @@ var validatePlugin = ({plugin, rule}) => {
112008
112018
  throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
112009
112019
  };
112010
112020
 
112011
- const {isArray: isArray$a} = Array;
112012
- const maybeTuple = (a) => isArray$a(a) ? a : ['on', a];
112021
+ const {isArray: isArray$8} = Array;
112022
+ const maybeTuple = (a) => isArray$8(a) ? a : ['on', a];
112013
112023
 
112014
112024
  // Would be great to have ability to filter
112015
112025
  // disabled plugins and prevent them from loading
@@ -112139,11 +112149,7 @@ function parseRuleName(rule) {
112139
112149
  return rule;
112140
112150
  }
112141
112151
 
112142
- const noop$3 = () => {};
112143
- const returns$1 = (a) => () => a;
112144
-
112145
- const {createRequire = returns$1(noop$3)} = module$1;
112146
- const {isArray: isArray$9} = Array;
112152
+ const {isArray: isArray$7} = Array;
112147
112153
 
112148
112154
  const loadPlugins = (options) => {
112149
112155
  check$8(options);
@@ -112175,7 +112181,7 @@ const parseRule = (rule) => rule
112175
112181
  .replace('import:@putout/plugin-', '')
112176
112182
  .replace('@putout/plugin-', '');
112177
112183
 
112178
- const maybeFromTuple = (a) => isArray$9(a) ? a[1] : a;
112184
+ const maybeFromTuple = (a) => isArray$7(a) ? a[1] : a;
112179
112185
 
112180
112186
  function loadAllPlugins({items, loadedRules}) {
112181
112187
  const plugins = [];
@@ -112234,75 +112240,6 @@ function loadOnePlugin({name, namespace}) {
112234
112240
  });
112235
112241
  }
112236
112242
 
112237
- const isStr$2 = (a) => typeof a === 'string';
112238
- const {isArray: isArray$8} = Array;
112239
-
112240
- const isOn = (a) => a === 'on';
112241
- const isOff = (a) => a === 'off';
112242
-
112243
- var parseProcessorNames = (plugins) => {
112244
- const result = [];
112245
-
112246
- for (const plugin of plugins) {
112247
- if (isStr$2(plugin)) {
112248
- result.push([plugin]);
112249
- continue;
112250
- }
112251
-
112252
- if (isArray$8(plugin)) {
112253
- const [pluginName, fn] = plugin;
112254
-
112255
- if (isOff(fn))
112256
- continue;
112257
-
112258
- if (isOn(fn)) {
112259
- result.push([pluginName]);
112260
- continue;
112261
- }
112262
-
112263
- result.push([pluginName, fn]);
112264
- continue;
112265
- }
112266
- }
112267
-
112268
- return result;
112269
- };
112270
-
112271
- const loadProcessorsAsync = async (options, simpleImport) => {
112272
- check$8(options);
112273
-
112274
- const {processors = []} = options;
112275
- const parsedProcessors = parseProcessorNames(processors);
112276
-
112277
- const loadProcessor = createAsyncLoader('processor', {
112278
- simpleImport,
112279
- });
112280
-
112281
- const list = [];
112282
-
112283
- for (const [name, fn] of parsedProcessors) {
112284
- if (fn) {
112285
- list.push(fn);
112286
- continue;
112287
- }
112288
-
112289
- list.push(loadProcessor(name));
112290
- }
112291
-
112292
- return await Promise.all(list);
112293
- };
112294
-
112295
- var lib$1 = /*#__PURE__*/Object.freeze({
112296
- __proto__: null,
112297
- createAsyncLoader: createAsyncLoader,
112298
- loadPlugins: loadPlugins,
112299
- loadPluginsAsync: loadPluginsAsync,
112300
- loadProcessorsAsync: loadProcessorsAsync,
112301
- validateRulesRelations: validateRulesRelations$1
112302
- });
112303
-
112304
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(lib$1);
112305
-
112306
112243
  var lib = {};
112307
112244
 
112308
112245
  var debug$6 = {};
@@ -112522,7 +112459,7 @@ function formatArgs(diff, args) {
112522
112459
  }
112523
112460
  const log$6 = console.debug || console.log || (() => {});
112524
112461
  const storage = localstorage();
112525
- const defaultOptions$2 = {
112462
+ const defaultOptions$3 = {
112526
112463
  useColors: true,
112527
112464
  formatArgs,
112528
112465
  formatters: { j(v) {
@@ -112539,7 +112476,7 @@ const defaultOptions$2 = {
112539
112476
  function createDebug$9(namespace, options) {
112540
112477
  var _ref;
112541
112478
  const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
112542
- return createDebug$a(namespace, Object.assign(defaultOptions$2, { color }, options));
112479
+ return createDebug$a(namespace, Object.assign(defaultOptions$3, { color }, options));
112543
112480
  }
112544
112481
  function localstorage() {
112545
112482
  try {
@@ -112598,7 +112535,7 @@ debug$6.createDebug = (namespace) => {
112598
112535
  });
112599
112536
  };
112600
112537
 
112601
- const tryCatch$4 = tryCatch$7;
112538
+ const tryCatch$3 = tryCatch$6;
112602
112539
  const {createDebug: createDebug$7} = debug$6;
112603
112540
 
112604
112541
  const {stringify: stringify$5} = JSON;
@@ -112624,7 +112561,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
112624
112561
  };
112625
112562
 
112626
112563
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
112627
- const [e] = tryCatch$4(fix, ...chooseFixArgs({
112564
+ const [e] = tryCatch$3(fix, ...chooseFixArgs({
112628
112565
  path,
112629
112566
  pathOptions,
112630
112567
  options,
@@ -112700,8 +112637,8 @@ function validatePath(path) {
112700
112637
  throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
112701
112638
  }
112702
112639
 
112703
- const {isArray: isArray$7} = Array;
112704
- const maybeArray$6 = (a) => isArray$7(a) ? a : [a];
112640
+ const {isArray: isArray$6} = Array;
112641
+ const maybeArray$6 = (a) => isArray$6(a) ? a : [a];
112705
112642
 
112706
112643
  var maybeArray_1 = (a) => {
112707
112644
  if (!a)
@@ -113242,7 +113179,7 @@ const isBool$1 = (a, b) => {
113242
113179
  };
113243
113180
 
113244
113181
  const isEqualType$1 = (a, b) => a.type === b.type;
113245
- const {isArray: isArray$6} = Array;
113182
+ const {isArray: isArray$5} = Array;
113246
113183
 
113247
113184
  is$2.isId = isId$2;
113248
113185
  is$2.isBool = isBool$1;
@@ -113265,7 +113202,7 @@ is$2.isAnyLiteral = (a, b) => {
113265
113202
  };
113266
113203
 
113267
113204
  is$2.isArgs = (a) => {
113268
- const b = !isArray$6(a) ? a : a[0];
113205
+ const b = !isArray$5(a) ? a : a[0];
113269
113206
 
113270
113207
  return isIdentifier$4(b, {
113271
113208
  name: ARGS,
@@ -113295,12 +113232,12 @@ is$2.isEqualTypeParams = (a, b) => {
113295
113232
  };
113296
113233
 
113297
113234
  is$2.isLinkedArgs = (a) => {
113298
- const b = !isArray$6(a) ? a : a[0];
113235
+ const b = !isArray$5(a) ? a : a[0];
113299
113236
  return isIdentifier$4(b) && LINKED_ARGS.test(b.name);
113300
113237
  };
113301
113238
 
113302
113239
  is$2.isJSXChildren = (a) => {
113303
- const b = !isArray$6(a) ? a : a[0];
113240
+ const b = !isArray$5(a) ? a : a[0];
113304
113241
 
113305
113242
  return isJSXText$2(b, {
113306
113243
  value: JSX_CHILDREN,
@@ -113308,7 +113245,7 @@ is$2.isJSXChildren = (a) => {
113308
113245
  };
113309
113246
 
113310
113247
  is$2.isJSXAttributes = (a) => {
113311
- const b = !isArray$6(a) ? a : a[0];
113248
+ const b = !isArray$5(a) ? a : a[0];
113312
113249
 
113313
113250
  if (!isJSXAttribute$1(b))
113314
113251
  return false;
@@ -113340,27 +113277,27 @@ is$2.isLinkedRegExp = (a, b) => {
113340
113277
  };
113341
113278
 
113342
113279
  is$2.isPath = (path) => Boolean(path.node);
113343
- is$2.isArray = isArray$6;
113280
+ is$2.isArray = isArray$5;
113344
113281
 
113345
113282
  is$2.isObject = (a) => {
113346
113283
  if (!a)
113347
113284
  return false;
113348
113285
 
113349
- if (isArray$6(a))
113286
+ if (isArray$5(a))
113350
113287
  return false;
113351
113288
 
113352
113289
  return typeof a === 'object';
113353
113290
  };
113354
113291
 
113355
113292
  is$2.isArrays = (a, b) => {
113356
- if (!isArray$6(a) || !isArray$6(b))
113293
+ if (!isArray$5(a) || !isArray$5(b))
113357
113294
  return false;
113358
113295
 
113359
113296
  return a.length === b.length;
113360
113297
  };
113361
113298
 
113362
113299
  is$2.isImports = (a) => {
113363
- const b = !isArray$6(a) ? a : a[0];
113300
+ const b = !isArray$5(a) ? a : a[0];
113364
113301
 
113365
113302
  if (!isImportDefaultSpecifier(b))
113366
113303
  return false;
@@ -113371,7 +113308,7 @@ is$2.isImports = (a) => {
113371
113308
  };
113372
113309
 
113373
113310
  is$2.isExports = (a) => {
113374
- const b = !isArray$6(a) ? a : a[0];
113311
+ const b = !isArray$5(a) ? a : a[0];
113375
113312
 
113376
113313
  if (!isExportSpecifier(b))
113377
113314
  return false;
@@ -113684,7 +113621,7 @@ debug$4.createDebug = (namespace) => {
113684
113621
  const {createDebug: createDebug$5} = debug$4;
113685
113622
  const debug$3 = createDebug$5('putout:compare');
113686
113623
 
113687
- const {isArray: isArray$5} = Array;
113624
+ const {isArray: isArray$4} = Array;
113688
113625
  const isObject$4 = (a) => a && typeof a === 'object';
113689
113626
 
113690
113627
  log$5.exports = (a, b) => {
@@ -113699,7 +113636,7 @@ log$5.exports = (a, b) => {
113699
113636
 
113700
113637
  log$5.exports._parseValue = parseValue;
113701
113638
  function parseValue(a) {
113702
- if (isArray$5(a) && a[0]) {
113639
+ if (isArray$4(a) && a[0]) {
113703
113640
  const [{
113704
113641
  type,
113705
113642
  name,
@@ -114055,13 +113992,13 @@ const {extractExpression} = template$5;
114055
113992
  const addWaterMark = (a) => a;
114056
113993
 
114057
113994
  const {keys: keys$2} = Object;
114058
- const {isArray: isArray$4} = Array;
114059
- const noop$2 = () => {};
114060
- const isEmptyArray = (a) => isArray$4(a) && !a.length;
113995
+ const {isArray: isArray$3} = Array;
113996
+ const noop$1 = () => {};
113997
+ const isEmptyArray = (a) => isArray$3(a) && !a.length;
114061
113998
 
114062
113999
  const compareType = (type) => (path) => path.type === type;
114063
114000
  const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
114064
- const maybeArray$4 = (a) => isArray$4(a) ? a : [a];
114001
+ const maybeArray$4 = (a) => isArray$3(a) ? a : [a];
114065
114002
 
114066
114003
  const findParent = (path, type) => {
114067
114004
  const newPathNode = path.findParent(compareType(type));
@@ -114091,7 +114028,7 @@ compare$5.getValues = getValues$1;
114091
114028
  compare$5.setValues = setValues$1;
114092
114029
  compare$5.getTemplateValues = getTemplateValues$1;
114093
114030
 
114094
- function compare$4(path, template, options = {}, equal = noop$2) {
114031
+ function compare$4(path, template, options = {}, equal = noop$1) {
114095
114032
  const {findUp = true} = options;
114096
114033
 
114097
114034
  if (!path && !template)
@@ -114151,7 +114088,7 @@ compare$5.compareAll = (path, templateNodes, options) => {
114151
114088
 
114152
114089
  // @babel/template creates empty array directives
114153
114090
  // extra duplicate value
114154
- const ignore$2 = [
114091
+ const ignore$1 = [
114155
114092
  'loc',
114156
114093
  'start',
114157
114094
  'end',
@@ -114184,7 +114121,7 @@ function superCompareIterate(node, template) {
114184
114121
  return false;
114185
114122
 
114186
114123
  for (const key of keys$2(template)) {
114187
- if (ignore$2.includes(key))
114124
+ if (ignore$1.includes(key))
114188
114125
  continue;
114189
114126
 
114190
114127
  const nodeValue = extractExpression(node[key]);
@@ -114204,7 +114141,7 @@ function superCompareIterate(node, template) {
114204
114141
  return true;
114205
114142
  }
114206
114143
 
114207
- const tryCatch$3 = tryCatch$7;
114144
+ const tryCatch$2 = tryCatch$6;
114208
114145
 
114209
114146
  const {
114210
114147
  compareAny: compareAny$1,
@@ -114299,7 +114236,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
114299
114236
  if (!isFn$2(fn))
114300
114237
  throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
114301
114238
 
114302
- const [e] = tryCatch$3(fn, path);
114239
+ const [e] = tryCatch$2(fn, path);
114303
114240
 
114304
114241
  if (e) {
114305
114242
  e.rule = rule;
@@ -114795,7 +114732,7 @@ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
114795
114732
 
114796
114733
  const {EventEmitter} = require$$0$1;
114797
114734
 
114798
- progress.createProgress = () => {
114735
+ var createProgress$1 = progress.createProgress = () => {
114799
114736
  let pluginsCount = 0;
114800
114737
  let pluginsIndex = 0;
114801
114738
 
@@ -114849,10 +114786,10 @@ progress.createProgress = () => {
114849
114786
 
114850
114787
  var tryThrowWithReason$1 = {};
114851
114788
 
114852
- const tryCatch$2 = tryCatch$7;
114789
+ const tryCatch$1 = tryCatch$6;
114853
114790
 
114854
114791
  tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
114855
- const [error, result] = tryCatch$2(fn, ...args);
114792
+ const [error, result] = tryCatch$1(fn, ...args);
114856
114793
 
114857
114794
  if (error) {
114858
114795
  error.reason ??= 'traverse';
@@ -114949,7 +114886,7 @@ function check$4(fn) {
114949
114886
  }
114950
114887
 
114951
114888
  const {entries: entries$4} = Object;
114952
- const {isArray: isArray$3} = Array;
114889
+ const {isArray: isArray$2} = Array;
114953
114890
 
114954
114891
  var findPath$1 = (parentPath) => {
114955
114892
  let current = {
@@ -114971,7 +114908,7 @@ function findKey(path, parent) {
114971
114908
  let value;
114972
114909
 
114973
114910
  for ([key, value] of entries$4(parent)) {
114974
- if (isArray$3(value)) {
114911
+ if (isArray$2(value)) {
114975
114912
  const index = value.indexOf(node);
114976
114913
 
114977
114914
  if (index >= 0)
@@ -115375,13 +115312,13 @@ const TS_EXCLUDE = [
115375
115312
  ];
115376
115313
 
115377
115314
  declare$1.declare = (declarations) => ({
115378
- report: report$4,
115315
+ report: report$3,
115379
115316
  include: include$1,
115380
115317
  fix: fix$3(declarations),
115381
115318
  filter: filter(declarations),
115382
115319
  });
115383
115320
 
115384
- const report$4 = (path) => {
115321
+ const report$3 = (path) => {
115385
115322
  const {name} = path.node;
115386
115323
  const peaceOfName = cutName(name);
115387
115324
 
@@ -115554,16 +115491,16 @@ const fullstore$1 = fullstore$3;
115554
115491
  const driverStore = fullstore$1();
115555
115492
 
115556
115493
  const {assign} = Object;
115557
- const noop$1 = () => {};
115494
+ const noop = () => {};
115558
115495
  const returns = (a) => () => a;
115559
115496
 
115560
115497
  const defaultFS = {
115561
- renameFile: noop$1,
115562
- removeFile: noop$1,
115563
- createDirectory: noop$1,
115498
+ renameFile: noop,
115499
+ removeFile: noop,
115500
+ createDirectory: noop,
115564
115501
  readFileContent: returns(''),
115565
- writeFileContent: noop$1,
115566
- copyFile: noop$1,
115502
+ writeFileContent: noop,
115503
+ copyFile: noop,
115567
115504
  };
115568
115505
 
115569
115506
  const maybeFS$1 = assign({}, defaultFS);
@@ -115654,7 +115591,7 @@ const {
115654
115591
  } = require$$0;
115655
115592
 
115656
115593
  const {types: types$8} = bundle$1;
115657
- const tryCatch$1 = tryCatch$7;
115594
+ const tryCatch = tryCatch$6;
115658
115595
 
115659
115596
  const {
115660
115597
  setLiteralValue: setLiteralValue$1,
@@ -115677,11 +115614,11 @@ const {
115677
115614
  } = types$8;
115678
115615
 
115679
115616
  const isString$1 = (a) => typeof a === 'string';
115680
- const {isArray: isArray$2} = Array;
115681
- const maybeArray = (a) => isArray$2(a) ? a : [a];
115617
+ const {isArray: isArray$1} = Array;
115618
+ const maybeArray = (a) => isArray$1(a) ? a : [a];
115682
115619
 
115683
115620
  const toBase64 = (content) => {
115684
- const [e, result] = tryCatch$1(btoa, content);
115621
+ const [e, result] = tryCatch(btoa, content);
115685
115622
 
115686
115623
  if (e)
115687
115624
  return btoa(escape(content));
@@ -115693,7 +115630,7 @@ const fromBase64 = (content) => {
115693
115630
  if (content.includes(' '))
115694
115631
  return content;
115695
115632
 
115696
- const [e, decoded] = tryCatch$1(atob, content);
115633
+ const [e, decoded] = tryCatch(atob, content);
115697
115634
 
115698
115635
  if (!e)
115699
115636
  return unescape(decoded);
@@ -115766,7 +115703,7 @@ function findFile$5(node, name, exclude = []) {
115766
115703
  }
115767
115704
 
115768
115705
  function checkName(name) {
115769
- if (!isString$1(name) && !isArray$2(name))
115706
+ if (!isString$1(name) && !isArray$1(name))
115770
115707
  throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
115771
115708
  }
115772
115709
 
@@ -116247,7 +116184,7 @@ const {
116247
116184
  arrayExpression,
116248
116185
  } = types$6;
116249
116186
 
116250
- const {isArray: isArray$1} = Array;
116187
+ const {isArray} = Array;
116251
116188
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
116252
116189
 
116253
116190
  convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
@@ -116277,7 +116214,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
116277
116214
  const list = [];
116278
116215
 
116279
116216
  for (const name of names) {
116280
- if (isArray$1(name)) {
116217
+ if (isArray(name)) {
116281
116218
  list.push(arrayExpression([
116282
116219
  stringLiteral$2(name[0]),
116283
116220
  stringLiteral$2(name[1]),
@@ -116469,7 +116406,7 @@ const runFix = runFix$3;
116469
116406
  const mergeVisitors = mergeVisitors$1;
116470
116407
  const superFind = superFind$1;
116471
116408
  const template$2 = templateExports;
116472
- const {createProgress: createProgress$1} = progress;
116409
+ const {createProgress} = progress;
116473
116410
  const {tryThrowWithReason} = tryThrowWithReason$1;
116474
116411
 
116475
116412
  const {include} = includer;
@@ -116481,7 +116418,7 @@ const {getPath, getPosition} = getPosition$2;
116481
116418
  const debug = createDebug('putout:runner:find');
116482
116419
  const isRemoved = (a) => a?.removed;
116483
116420
 
116484
- lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress$1(), traverse = defaultTraverse}) => {
116421
+ lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress(), traverse = defaultTraverse}) => {
116485
116422
  let places = [];
116486
116423
 
116487
116424
  const merge = once(mergeVisitors);
@@ -116657,20 +116594,16 @@ function splitPlugins(plugins, {progress}) {
116657
116594
  };
116658
116595
  }
116659
116596
 
116660
- const loader = require$$1;
116661
- const runner = lib;
116662
- const {createProgress} = progress;
116663
-
116664
- defaultOptions$5.defaultOptions = (opts = {}) => {
116597
+ const defaultOptions$1 = (opts = {}) => {
116665
116598
  const {
116666
116599
  parser = 'babel',
116667
116600
  printer = opts.printer || 'putout',
116668
116601
  fix = true,
116669
116602
  fixCount = 3,
116670
- loadPlugins = loader.loadPlugins,
116671
- loadPluginsAsync = loader.loadPluginsAsync,
116672
- runPlugins = runner.runPlugins,
116673
- progress = createProgress(),
116603
+ loadPlugins: loadPlugins$1 = loadPlugins,
116604
+ loadPluginsAsync: loadPluginsAsync$1 = loadPluginsAsync,
116605
+ runPlugins = lib.runPlugins,
116606
+ progress = createProgress$1(),
116674
116607
  } = opts;
116675
116608
 
116676
116609
  return {
@@ -116679,16 +116612,21 @@ defaultOptions$5.defaultOptions = (opts = {}) => {
116679
116612
  printer,
116680
116613
  fix,
116681
116614
  fixCount,
116682
- loadPlugins,
116683
- loadPluginsAsync,
116615
+ loadPlugins: loadPlugins$1,
116616
+ loadPluginsAsync: loadPluginsAsync$1,
116684
116617
  runPlugins,
116685
116618
  progress,
116686
116619
  };
116687
116620
  };
116688
116621
 
116689
- var transform$5 = {};
116622
+ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
116623
+ __proto__: null,
116624
+ defaultOptions: defaultOptions$1
116625
+ });
116626
+
116627
+ var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
116690
116628
 
116691
- var parseError$2 = (e, type = 'parser') => {
116629
+ const parseError$1 = (e, type = 'parser') => {
116692
116630
  const {line, column} = e.loc || {
116693
116631
  line: 1,
116694
116632
  column: 1,
@@ -116709,13 +116647,6 @@ var parseError$2 = (e, type = 'parser') => {
116709
116647
 
116710
116648
  const cutBrackets = (a) => a.replace(/\s\(\d:\d+\)/, '');
116711
116649
 
116712
- const tryCatch = tryCatch$7;
116713
-
116714
- const {validateRulesRelations} = require$$1;
116715
- const {defaultOptions: defaultOptions$1} = defaultOptions$5;
116716
- const {cutShebang: cutShebang$1} = shebang;
116717
- const parseError$1 = parseError$2;
116718
-
116719
116650
  const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116720
116651
 
116721
116652
  // why we pass 'source' to 'transform()'?
@@ -116727,7 +116658,7 @@ const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116727
116658
  // 27 column,¬
116728
116659
  // 28 };¬
116729
116660
  //
116730
- transform$5.transform = (ast, source, opts) => {
116661
+ const transform$4 = (ast, source, opts) => {
116731
116662
  opts = defaultOptions$1(opts);
116732
116663
 
116733
116664
  const {
@@ -116743,7 +116674,7 @@ transform$5.transform = (ast, source, opts) => {
116743
116674
 
116744
116675
  const [, shebang] = cutShebang$1(source);
116745
116676
 
116746
- const [validationError] = tryCatch(validateRulesRelations, {
116677
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116747
116678
  rules,
116748
116679
  pluginNames,
116749
116680
  });
@@ -116769,7 +116700,7 @@ transform$5.transform = (ast, source, opts) => {
116769
116700
  ];
116770
116701
  };
116771
116702
 
116772
- transform$5.transformAsync = async (ast, source, opts) => {
116703
+ const transformAsync$1 = async (ast, source, opts) => {
116773
116704
  opts = defaultOptions$1(opts);
116774
116705
 
116775
116706
  const {
@@ -116785,7 +116716,7 @@ transform$5.transformAsync = async (ast, source, opts) => {
116785
116716
 
116786
116717
  const [, shebang] = cutShebang$1(source);
116787
116718
 
116788
- const [validationError] = tryCatch(validateRulesRelations, {
116719
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116789
116720
  rules,
116790
116721
  pluginNames,
116791
116722
  });
@@ -116811,78 +116742,35 @@ transform$5.transformAsync = async (ast, source, opts) => {
116811
116742
  ];
116812
116743
  };
116813
116744
 
116814
- var findPlaces$2 = {};
116745
+ var transform$5 = /*#__PURE__*/Object.freeze({
116746
+ __proto__: null,
116747
+ transform: transform$4,
116748
+ transformAsync: transformAsync$1
116749
+ });
116815
116750
 
116816
- const {transform: transform$4, transformAsync: transformAsync$1} = transform$5;
116751
+ var require$$4$1 = /*@__PURE__*/getAugmentedNamespace(transform$5);
116817
116752
 
116818
- findPlaces$2.findPlaces = (ast, source, opts) => {
116753
+ const findPlaces$2 = (ast, source, opts) => {
116819
116754
  return transform$4(ast, source, {
116820
116755
  ...opts,
116821
116756
  fix: false,
116822
116757
  });
116823
116758
  };
116824
116759
 
116825
- findPlaces$2.findPlacesAsync = async (ast, source, opts) => {
116760
+ const findPlacesAsync$1 = async (ast, source, opts) => {
116826
116761
  return await transformAsync$1(ast, source, {
116827
116762
  ...opts,
116828
116763
  fix: false,
116829
116764
  });
116830
116765
  };
116831
116766
 
116832
- const {isArray} = Array;
116833
- const noop = () => {};
116834
-
116835
- var report$3 = () => {
116836
- let filesCount = 0;
116837
- let errorsCount = 0;
116838
-
116839
- return async (formatter, options) => {
116840
- const {
116841
- name,
116842
- rule,
116843
- source,
116844
- places,
116845
- index = 0,
116846
- count = 1,
116847
- trace = noop,
116848
- formatterOptions = {},
116849
- } = options;
116850
-
116851
- if (!isArray(places))
116852
- throw Error(`☝️ Looks like for 'places: Places[]' you passed the wrong type: '${typeof places}'`);
116853
-
116854
- if (places.length)
116855
- ++filesCount;
116856
-
116857
- errorsCount += places.length;
116858
-
116859
- trace('progress', {
116860
- rule,
116861
- name,
116862
- options: formatterOptions,
116863
- source,
116864
- places,
116865
- index,
116866
- count,
116867
- filesCount,
116868
- errorsCount,
116869
- });
116870
-
116871
- return await formatter({
116872
- rule,
116873
- name,
116874
- options: formatterOptions,
116875
- source,
116876
- places,
116877
- index,
116878
- count,
116879
- filesCount,
116880
- errorsCount,
116881
- });
116882
- };
116883
- };
116767
+ var findPlaces$3 = /*#__PURE__*/Object.freeze({
116768
+ __proto__: null,
116769
+ findPlaces: findPlaces$2,
116770
+ findPlacesAsync: findPlacesAsync$1
116771
+ });
116884
116772
 
116885
- report$3.default;
116773
+ var require$$5 = /*@__PURE__*/getAugmentedNamespace(findPlaces$3);
116886
116774
 
116887
116775
  var traverse$5 = {};
116888
116776
 
@@ -124493,15 +124381,12 @@ keyword.isTSKeyword = (name) => {
124493
124381
 
124494
124382
  var matchFiles = {};
124495
124383
 
124496
- const {relative} = require$$0;
124497
- const ignore$1 = require$$1$2;
124498
-
124499
124384
  const isNegative = (a) => !a.indexOf('!');
124500
124385
  const positive = (a) => a.replace(/^!/, '');
124501
124386
 
124502
- var ignores$2 = (dirOpt, resolvedName, options = {}) => {
124387
+ const ignores$1 = (dirOpt, resolvedName, options = {}) => {
124503
124388
  const relativeName = relative(dirOpt, resolvedName);
124504
- const ignorer = ignore$1();
124389
+ const ignorer = noop$3();
124505
124390
  const ignoreList = mergeIgnores(options.ignore || []);
124506
124391
 
124507
124392
  ignorer.add(ignoreList);
@@ -124522,14 +124407,19 @@ function mergeIgnores(ignores) {
124522
124407
  return Array.from(noDuplicates);
124523
124408
  }
124524
124409
 
124525
- ignores$2.default;
124410
+ var ignores$2 = /*#__PURE__*/Object.freeze({
124411
+ __proto__: null,
124412
+ ignores: ignores$1
124413
+ });
124414
+
124415
+ var require$$4 = /*@__PURE__*/getAugmentedNamespace(ignores$2);
124526
124416
 
124527
124417
  const path = require$$0;
124528
124418
 
124529
124419
  const {parse: parse$2, print: print$1} = parser$5;
124530
- const {transform: transform$1} = transform$5;
124531
- const {findPlaces: findPlaces$1} = findPlaces$2;
124532
- const ignores$1 = ignores$2;
124420
+ const {transform: transform$1} = require$$4$1;
124421
+ const {findPlaces: findPlaces$1} = require$$5;
124422
+ const {ignores} = require$$4;
124533
124423
 
124534
124424
  const {toJS, fromJS} = json;
124535
124425
 
@@ -124604,7 +124494,7 @@ const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, prog
124604
124494
  filename: inputFilename,
124605
124495
  });
124606
124496
 
124607
- if (ignores$1(cwd, inputFilename, options))
124497
+ if (ignores(cwd, inputFilename, options))
124608
124498
  continue;
124609
124499
 
124610
124500
  allFiles.push({
@@ -124988,9 +124878,7 @@ function hasParens(path, printer = getPrinter(path)) {
124988
124878
  return /^(TS)?Parenthesized(Expression|Type)?$/.test(type);
124989
124879
  }
124990
124880
 
124991
- const {codeFrameColumns} = bundle$1;
124992
-
124993
- var codeframe$1 = ({source, error, highlightCode = true}) => {
124881
+ const codeframe$1 = ({source, error, highlightCode = true}) => {
124994
124882
  const {message, loc} = error;
124995
124883
 
124996
124884
  if (!loc)
@@ -125000,13 +124888,18 @@ var codeframe$1 = ({source, error, highlightCode = true}) => {
125000
124888
  start: loc,
125001
124889
  };
125002
124890
 
125003
- return codeFrameColumns(source, location, {
124891
+ return bundle$1.codeFrameColumns(source, location, {
125004
124892
  highlightCode,
125005
124893
  message,
125006
124894
  });
125007
124895
  };
125008
124896
 
125009
- codeframe$1.default;
124897
+ var codeframe$2 = /*#__PURE__*/Object.freeze({
124898
+ __proto__: null,
124899
+ codeframe: codeframe$1
124900
+ });
124901
+
124902
+ var require$$20 = /*@__PURE__*/getAugmentedNamespace(codeframe$2);
125010
124903
 
125011
124904
  const {traverse, types} = bundle$1;
125012
124905
  const {
@@ -125016,16 +124909,14 @@ const {
125016
124909
  template,
125017
124910
  } = parser$5;
125018
124911
 
125019
- const {cutShebang, mergeShebang} = shebang;
125020
- const {defaultOptions} = defaultOptions$5;
125021
- const {transform, transformAsync} = transform$5;
124912
+ const {cutShebang, mergeShebang} = require$$2;
124913
+ const {defaultOptions} = require$$3;
124914
+ const {transform, transformAsync} = require$$4$1;
125022
124915
 
125023
124916
  const {
125024
124917
  findPlaces,
125025
124918
  findPlacesAsync,
125026
- } = findPlaces$2;
125027
-
125028
- const isString = (a) => typeof a === 'string';
124919
+ } = require$$5;
125029
124920
 
125030
124921
  putout$1.exports = putout;
125031
124922
  var putout_2 = putout$1.exports.putout = putout;
@@ -125123,7 +125014,6 @@ var traverse_1 = putout$1.exports.traverse = traverse;
125123
125014
  var types_1 = putout$1.exports.types = types;
125124
125015
  var template_1 = putout$1.exports.template = template;
125125
125016
  var generate_1 = putout$1.exports.generate = generate;
125126
- var initReport = putout$1.exports.initReport = report$3;
125127
125017
 
125128
125018
  var operator = putout$1.exports.operator = {
125129
125019
  ...operate,
@@ -125142,14 +125032,14 @@ var operator = putout$1.exports.operator = {
125142
125032
  ...parens,
125143
125033
  };
125144
125034
 
125145
- var ignores = putout$1.exports.ignores = ignores$2;
125146
- var codeframe = putout$1.exports.codeframe = codeframe$1;
125035
+ const {codeframe} = require$$20;
125036
+ const isString = (a) => typeof a === 'string';
125037
+
125038
+ var codeframe_1 = putout$1.exports.codeframe = codeframe;
125147
125039
 
125148
125040
  function check(source) {
125149
125041
  if (!isString(source))
125150
125042
  throw Error(`☝️ Looks like 'source' has type '${typeof source}', expected: 'string'`);
125151
125043
  }
125152
125044
 
125153
- var putoutExports = putout$1.exports;
125154
-
125155
- export { codeframe, putoutExports as default, findPlaces_1 as findPlaces, findPlacesAsync_1 as findPlacesAsync, generate_1 as generate, ignores, initReport, operator, parse_1 as parse, print_1 as print, putout_2 as putout, putoutAsync, template_1 as template, transform_1 as transform, transformAsync_1 as transformAsync, traverse_1 as traverse, types_1 as types };
125045
+ export { codeframe_1 as codeframe, putout_2 as default, findPlaces_1 as findPlaces, findPlacesAsync_1 as findPlacesAsync, generate_1 as generate, operator, parse_1 as parse, print_1 as print, putout_2 as putout, putoutAsync, template_1 as template, transform_1 as transform, transformAsync_1 as transformAsync, traverse_1 as traverse, types_1 as types };