@putout/bundle 5.0.6 → 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$9() {}
181
+ function noop$8() {}
182
182
 
183
- var on = noop$9;
184
- var addListener = noop$9;
185
- var once$9 = noop$9;
186
- var off = noop$9;
187
- var removeListener = noop$9;
188
- var removeAllListeners = noop$9;
189
- var emit = noop$9;
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$8 = () => {};
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$8,
52168
- printBeforeClose = noop$8,
52169
- printAfterClose = noop$8,
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$7 = () => {};
55792
+ const noop$6 = () => {};
55793
55793
 
55794
- sequenceExpressionComments.printLeadingCommentLine = noop$7;
55795
- sequenceExpressionComments.printLeadingCommentBlock = noop$7;
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$6 = () => {};
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$6;
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$5 = () => {};
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$5 : () => {
59369
+ const printAfterOpen = !isNewline ? noop$4 : () => {
59370
59370
  indent.inc();
59371
59371
  print.breakline();
59372
59372
  };
59373
59373
 
59374
- const printAfterClose = !isNewline ? noop$5 : () => {
59374
+ const printAfterClose = !isNewline ? noop$4 : () => {
59375
59375
  print.breakline();
59376
59376
  };
59377
59377
 
59378
- const printBeforeClose = !isNewline ? noop$5 : () => {
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$4 = () => {};
110641
+ const noop$3 = () => {};
110642
110642
 
110643
110643
  var empty = /*#__PURE__*/Object.freeze({
110644
110644
  __proto__: null,
110645
- default: noop$4
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$4();
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,18 +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 noop$3 = () => {};
111588
-
111589
- const {
111590
- createRequire: createRequire$1 = noop$3,
111591
- } = module$1;
111592
- const require$1 = createRequire$1(import.meta.url);
111603
+ const require$1 = createRequire(import.meta.url);
111593
111604
 
111594
111605
  const {assign: assign$3} = Object;
111595
111606
  const stub$2 = () => () => {};
@@ -111685,20 +111696,20 @@ function buildPluginsDirs(name) {
111685
111696
  ];
111686
111697
  }
111687
111698
 
111688
- const isStr$4 = (a) => typeof a === 'string';
111689
- const {isArray: isArray$c} = Array;
111699
+ const isStr$3 = (a) => typeof a === 'string';
111700
+ const {isArray: isArray$a} = Array;
111690
111701
  const {entries: entries$9} = Object;
111691
111702
 
111692
111703
  const parsePluginNames = (plugins) => {
111693
111704
  const result = [];
111694
111705
 
111695
111706
  for (const plugin of plugins) {
111696
- if (isStr$4(plugin)) {
111707
+ if (isStr$3(plugin)) {
111697
111708
  result.push([plugin]);
111698
111709
  continue;
111699
111710
  }
111700
111711
 
111701
- if (isArray$c(plugin)) {
111712
+ if (isArray$a(plugin)) {
111702
111713
  const [pluginName, fn] = plugin;
111703
111714
  result.push([pluginName, fn]);
111704
111715
  continue;
@@ -111710,9 +111721,9 @@ const parsePluginNames = (plugins) => {
111710
111721
  return result;
111711
111722
  };
111712
111723
 
111713
- const {isArray: isArray$b} = Array;
111724
+ const {isArray: isArray$9} = Array;
111714
111725
  const isBool$2 = (a) => typeof a === 'boolean';
111715
- const isStr$3 = (a) => typeof a === 'string';
111726
+ const isStr$2 = (a) => typeof a === 'string';
111716
111727
  const isObj = (a) => typeof a === 'object';
111717
111728
  const {entries: entries$8} = Object;
111718
111729
  const {stringify: stringify$6} = JSON;
@@ -111720,7 +111731,7 @@ const {stringify: stringify$6} = JSON;
111720
111731
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
111721
111732
  const rulesUsedInsteadOfMatchError = (a) => Error(`☝️ Looks like you need to change "rules" to "match" for ${stringify$6(a)}`);
111722
111733
  const stateOptionError = ({rule, value}) => Error(`☝️ ${rule}: state option can be "on" or "off" only, when used as string, received: "${value}"`);
111723
- const defaultOptions$4 = () => Object.create(null);
111734
+ const defaultOptions$5 = () => Object.create(null);
111724
111735
 
111725
111736
  const parseState = (rule, value) => {
111726
111737
  validateState(rule, value);
@@ -111742,13 +111753,13 @@ const parseRules = (rules) => {
111742
111753
  check$9(rules);
111743
111754
 
111744
111755
  for (const [rule, value] of entries$8(rules)) {
111745
- if (isStr$3(value)) {
111756
+ if (isStr$2(value)) {
111746
111757
  result.push({
111747
111758
  rule,
111748
111759
  state: parseState(rule, value),
111749
111760
  plugin,
111750
111761
  msg,
111751
- options: defaultOptions$4(),
111762
+ options: defaultOptions$5(),
111752
111763
  });
111753
111764
  continue;
111754
111765
  }
@@ -111759,12 +111770,12 @@ const parseRules = (rules) => {
111759
111770
  state: value,
111760
111771
  plugin,
111761
111772
  msg,
111762
- options: defaultOptions$4(),
111773
+ options: defaultOptions$5(),
111763
111774
  });
111764
111775
  continue;
111765
111776
  }
111766
111777
 
111767
- const looksLikeArray = isArray$b(value);
111778
+ const looksLikeArray = isArray$9(value);
111768
111779
  const looksLikeNormalArray = looksLikeArray && value.length;
111769
111780
 
111770
111781
  if (looksLikeNormalArray) {
@@ -111842,11 +111853,11 @@ const enableNestedRules = (rules) => {
111842
111853
  };
111843
111854
 
111844
111855
  function check$9(rules) {
111845
- if (isArray$b(rules))
111856
+ if (isArray$9(rules))
111846
111857
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
111847
111858
  }
111848
111859
 
111849
- const defaultOptions$3 = () => Object.create(null);
111860
+ const defaultOptions$4 = () => Object.create(null);
111850
111861
 
111851
111862
  const mergeRules = ([rule, plugin], rules) => {
111852
111863
  for (const currentRule of rules) {
@@ -111867,7 +111878,7 @@ const mergeRules = ([rule, plugin], rules) => {
111867
111878
  rule,
111868
111879
  plugin,
111869
111880
  msg: '',
111870
- options: defaultOptions$3(),
111881
+ options: defaultOptions$4(),
111871
111882
  };
111872
111883
  };
111873
111884
 
@@ -111959,7 +111970,7 @@ const checkRule = (rule) => {
111959
111970
  throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
111960
111971
  };
111961
111972
 
111962
- const validateRulesRelations$1 = (options) => {
111973
+ const validateRulesRelations = (options) => {
111963
111974
  check$8(options);
111964
111975
 
111965
111976
  const {pluginNames = [], rules = {}} = options;
@@ -112007,8 +112018,8 @@ var validatePlugin = ({plugin, rule}) => {
112007
112018
  throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
112008
112019
  };
112009
112020
 
112010
- const {isArray: isArray$a} = Array;
112011
- 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];
112012
112023
 
112013
112024
  // Would be great to have ability to filter
112014
112025
  // disabled plugins and prevent them from loading
@@ -112138,8 +112149,7 @@ function parseRuleName(rule) {
112138
112149
  return rule;
112139
112150
  }
112140
112151
 
112141
- const {createRequire} = module$1;
112142
- const {isArray: isArray$9} = Array;
112152
+ const {isArray: isArray$7} = Array;
112143
112153
 
112144
112154
  const loadPlugins = (options) => {
112145
112155
  check$8(options);
@@ -112171,7 +112181,7 @@ const parseRule = (rule) => rule
112171
112181
  .replace('import:@putout/plugin-', '')
112172
112182
  .replace('@putout/plugin-', '');
112173
112183
 
112174
- const maybeFromTuple = (a) => isArray$9(a) ? a[1] : a;
112184
+ const maybeFromTuple = (a) => isArray$7(a) ? a[1] : a;
112175
112185
 
112176
112186
  function loadAllPlugins({items, loadedRules}) {
112177
112187
  const plugins = [];
@@ -112230,75 +112240,6 @@ function loadOnePlugin({name, namespace}) {
112230
112240
  });
112231
112241
  }
112232
112242
 
112233
- const isStr$2 = (a) => typeof a === 'string';
112234
- const {isArray: isArray$8} = Array;
112235
-
112236
- const isOn = (a) => a === 'on';
112237
- const isOff = (a) => a === 'off';
112238
-
112239
- var parseProcessorNames = (plugins) => {
112240
- const result = [];
112241
-
112242
- for (const plugin of plugins) {
112243
- if (isStr$2(plugin)) {
112244
- result.push([plugin]);
112245
- continue;
112246
- }
112247
-
112248
- if (isArray$8(plugin)) {
112249
- const [pluginName, fn] = plugin;
112250
-
112251
- if (isOff(fn))
112252
- continue;
112253
-
112254
- if (isOn(fn)) {
112255
- result.push([pluginName]);
112256
- continue;
112257
- }
112258
-
112259
- result.push([pluginName, fn]);
112260
- continue;
112261
- }
112262
- }
112263
-
112264
- return result;
112265
- };
112266
-
112267
- const loadProcessorsAsync = async (options, simpleImport) => {
112268
- check$8(options);
112269
-
112270
- const {processors = []} = options;
112271
- const parsedProcessors = parseProcessorNames(processors);
112272
-
112273
- const loadProcessor = createAsyncLoader('processor', {
112274
- simpleImport,
112275
- });
112276
-
112277
- const list = [];
112278
-
112279
- for (const [name, fn] of parsedProcessors) {
112280
- if (fn) {
112281
- list.push(fn);
112282
- continue;
112283
- }
112284
-
112285
- list.push(loadProcessor(name));
112286
- }
112287
-
112288
- return await Promise.all(list);
112289
- };
112290
-
112291
- var lib$1 = /*#__PURE__*/Object.freeze({
112292
- __proto__: null,
112293
- createAsyncLoader: createAsyncLoader,
112294
- loadPlugins: loadPlugins,
112295
- loadPluginsAsync: loadPluginsAsync,
112296
- loadProcessorsAsync: loadProcessorsAsync,
112297
- validateRulesRelations: validateRulesRelations$1
112298
- });
112299
-
112300
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(lib$1);
112301
-
112302
112243
  var lib = {};
112303
112244
 
112304
112245
  var debug$6 = {};
@@ -112518,7 +112459,7 @@ function formatArgs(diff, args) {
112518
112459
  }
112519
112460
  const log$6 = console.debug || console.log || (() => {});
112520
112461
  const storage = localstorage();
112521
- const defaultOptions$2 = {
112462
+ const defaultOptions$3 = {
112522
112463
  useColors: true,
112523
112464
  formatArgs,
112524
112465
  formatters: { j(v) {
@@ -112535,7 +112476,7 @@ const defaultOptions$2 = {
112535
112476
  function createDebug$9(namespace, options) {
112536
112477
  var _ref;
112537
112478
  const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
112538
- return createDebug$a(namespace, Object.assign(defaultOptions$2, { color }, options));
112479
+ return createDebug$a(namespace, Object.assign(defaultOptions$3, { color }, options));
112539
112480
  }
112540
112481
  function localstorage() {
112541
112482
  try {
@@ -112594,7 +112535,7 @@ debug$6.createDebug = (namespace) => {
112594
112535
  });
112595
112536
  };
112596
112537
 
112597
- const tryCatch$4 = tryCatch$7;
112538
+ const tryCatch$3 = tryCatch$6;
112598
112539
  const {createDebug: createDebug$7} = debug$6;
112599
112540
 
112600
112541
  const {stringify: stringify$5} = JSON;
@@ -112620,7 +112561,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
112620
112561
  };
112621
112562
 
112622
112563
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
112623
- const [e] = tryCatch$4(fix, ...chooseFixArgs({
112564
+ const [e] = tryCatch$3(fix, ...chooseFixArgs({
112624
112565
  path,
112625
112566
  pathOptions,
112626
112567
  options,
@@ -112696,8 +112637,8 @@ function validatePath(path) {
112696
112637
  throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
112697
112638
  }
112698
112639
 
112699
- const {isArray: isArray$7} = Array;
112700
- 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];
112701
112642
 
112702
112643
  var maybeArray_1 = (a) => {
112703
112644
  if (!a)
@@ -113238,7 +113179,7 @@ const isBool$1 = (a, b) => {
113238
113179
  };
113239
113180
 
113240
113181
  const isEqualType$1 = (a, b) => a.type === b.type;
113241
- const {isArray: isArray$6} = Array;
113182
+ const {isArray: isArray$5} = Array;
113242
113183
 
113243
113184
  is$2.isId = isId$2;
113244
113185
  is$2.isBool = isBool$1;
@@ -113261,7 +113202,7 @@ is$2.isAnyLiteral = (a, b) => {
113261
113202
  };
113262
113203
 
113263
113204
  is$2.isArgs = (a) => {
113264
- const b = !isArray$6(a) ? a : a[0];
113205
+ const b = !isArray$5(a) ? a : a[0];
113265
113206
 
113266
113207
  return isIdentifier$4(b, {
113267
113208
  name: ARGS,
@@ -113291,12 +113232,12 @@ is$2.isEqualTypeParams = (a, b) => {
113291
113232
  };
113292
113233
 
113293
113234
  is$2.isLinkedArgs = (a) => {
113294
- const b = !isArray$6(a) ? a : a[0];
113235
+ const b = !isArray$5(a) ? a : a[0];
113295
113236
  return isIdentifier$4(b) && LINKED_ARGS.test(b.name);
113296
113237
  };
113297
113238
 
113298
113239
  is$2.isJSXChildren = (a) => {
113299
- const b = !isArray$6(a) ? a : a[0];
113240
+ const b = !isArray$5(a) ? a : a[0];
113300
113241
 
113301
113242
  return isJSXText$2(b, {
113302
113243
  value: JSX_CHILDREN,
@@ -113304,7 +113245,7 @@ is$2.isJSXChildren = (a) => {
113304
113245
  };
113305
113246
 
113306
113247
  is$2.isJSXAttributes = (a) => {
113307
- const b = !isArray$6(a) ? a : a[0];
113248
+ const b = !isArray$5(a) ? a : a[0];
113308
113249
 
113309
113250
  if (!isJSXAttribute$1(b))
113310
113251
  return false;
@@ -113336,27 +113277,27 @@ is$2.isLinkedRegExp = (a, b) => {
113336
113277
  };
113337
113278
 
113338
113279
  is$2.isPath = (path) => Boolean(path.node);
113339
- is$2.isArray = isArray$6;
113280
+ is$2.isArray = isArray$5;
113340
113281
 
113341
113282
  is$2.isObject = (a) => {
113342
113283
  if (!a)
113343
113284
  return false;
113344
113285
 
113345
- if (isArray$6(a))
113286
+ if (isArray$5(a))
113346
113287
  return false;
113347
113288
 
113348
113289
  return typeof a === 'object';
113349
113290
  };
113350
113291
 
113351
113292
  is$2.isArrays = (a, b) => {
113352
- if (!isArray$6(a) || !isArray$6(b))
113293
+ if (!isArray$5(a) || !isArray$5(b))
113353
113294
  return false;
113354
113295
 
113355
113296
  return a.length === b.length;
113356
113297
  };
113357
113298
 
113358
113299
  is$2.isImports = (a) => {
113359
- const b = !isArray$6(a) ? a : a[0];
113300
+ const b = !isArray$5(a) ? a : a[0];
113360
113301
 
113361
113302
  if (!isImportDefaultSpecifier(b))
113362
113303
  return false;
@@ -113367,7 +113308,7 @@ is$2.isImports = (a) => {
113367
113308
  };
113368
113309
 
113369
113310
  is$2.isExports = (a) => {
113370
- const b = !isArray$6(a) ? a : a[0];
113311
+ const b = !isArray$5(a) ? a : a[0];
113371
113312
 
113372
113313
  if (!isExportSpecifier(b))
113373
113314
  return false;
@@ -113680,7 +113621,7 @@ debug$4.createDebug = (namespace) => {
113680
113621
  const {createDebug: createDebug$5} = debug$4;
113681
113622
  const debug$3 = createDebug$5('putout:compare');
113682
113623
 
113683
- const {isArray: isArray$5} = Array;
113624
+ const {isArray: isArray$4} = Array;
113684
113625
  const isObject$4 = (a) => a && typeof a === 'object';
113685
113626
 
113686
113627
  log$5.exports = (a, b) => {
@@ -113695,7 +113636,7 @@ log$5.exports = (a, b) => {
113695
113636
 
113696
113637
  log$5.exports._parseValue = parseValue;
113697
113638
  function parseValue(a) {
113698
- if (isArray$5(a) && a[0]) {
113639
+ if (isArray$4(a) && a[0]) {
113699
113640
  const [{
113700
113641
  type,
113701
113642
  name,
@@ -114051,13 +113992,13 @@ const {extractExpression} = template$5;
114051
113992
  const addWaterMark = (a) => a;
114052
113993
 
114053
113994
  const {keys: keys$2} = Object;
114054
- const {isArray: isArray$4} = Array;
114055
- const noop$2 = () => {};
114056
- 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;
114057
113998
 
114058
113999
  const compareType = (type) => (path) => path.type === type;
114059
114000
  const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
114060
- const maybeArray$4 = (a) => isArray$4(a) ? a : [a];
114001
+ const maybeArray$4 = (a) => isArray$3(a) ? a : [a];
114061
114002
 
114062
114003
  const findParent = (path, type) => {
114063
114004
  const newPathNode = path.findParent(compareType(type));
@@ -114087,7 +114028,7 @@ compare$5.getValues = getValues$1;
114087
114028
  compare$5.setValues = setValues$1;
114088
114029
  compare$5.getTemplateValues = getTemplateValues$1;
114089
114030
 
114090
- function compare$4(path, template, options = {}, equal = noop$2) {
114031
+ function compare$4(path, template, options = {}, equal = noop$1) {
114091
114032
  const {findUp = true} = options;
114092
114033
 
114093
114034
  if (!path && !template)
@@ -114147,7 +114088,7 @@ compare$5.compareAll = (path, templateNodes, options) => {
114147
114088
 
114148
114089
  // @babel/template creates empty array directives
114149
114090
  // extra duplicate value
114150
- const ignore$2 = [
114091
+ const ignore$1 = [
114151
114092
  'loc',
114152
114093
  'start',
114153
114094
  'end',
@@ -114180,7 +114121,7 @@ function superCompareIterate(node, template) {
114180
114121
  return false;
114181
114122
 
114182
114123
  for (const key of keys$2(template)) {
114183
- if (ignore$2.includes(key))
114124
+ if (ignore$1.includes(key))
114184
114125
  continue;
114185
114126
 
114186
114127
  const nodeValue = extractExpression(node[key]);
@@ -114200,7 +114141,7 @@ function superCompareIterate(node, template) {
114200
114141
  return true;
114201
114142
  }
114202
114143
 
114203
- const tryCatch$3 = tryCatch$7;
114144
+ const tryCatch$2 = tryCatch$6;
114204
114145
 
114205
114146
  const {
114206
114147
  compareAny: compareAny$1,
@@ -114295,7 +114236,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
114295
114236
  if (!isFn$2(fn))
114296
114237
  throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
114297
114238
 
114298
- const [e] = tryCatch$3(fn, path);
114239
+ const [e] = tryCatch$2(fn, path);
114299
114240
 
114300
114241
  if (e) {
114301
114242
  e.rule = rule;
@@ -114791,7 +114732,7 @@ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
114791
114732
 
114792
114733
  const {EventEmitter} = require$$0$1;
114793
114734
 
114794
- progress.createProgress = () => {
114735
+ var createProgress$1 = progress.createProgress = () => {
114795
114736
  let pluginsCount = 0;
114796
114737
  let pluginsIndex = 0;
114797
114738
 
@@ -114845,10 +114786,10 @@ progress.createProgress = () => {
114845
114786
 
114846
114787
  var tryThrowWithReason$1 = {};
114847
114788
 
114848
- const tryCatch$2 = tryCatch$7;
114789
+ const tryCatch$1 = tryCatch$6;
114849
114790
 
114850
114791
  tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
114851
- const [error, result] = tryCatch$2(fn, ...args);
114792
+ const [error, result] = tryCatch$1(fn, ...args);
114852
114793
 
114853
114794
  if (error) {
114854
114795
  error.reason ??= 'traverse';
@@ -114945,7 +114886,7 @@ function check$4(fn) {
114945
114886
  }
114946
114887
 
114947
114888
  const {entries: entries$4} = Object;
114948
- const {isArray: isArray$3} = Array;
114889
+ const {isArray: isArray$2} = Array;
114949
114890
 
114950
114891
  var findPath$1 = (parentPath) => {
114951
114892
  let current = {
@@ -114967,7 +114908,7 @@ function findKey(path, parent) {
114967
114908
  let value;
114968
114909
 
114969
114910
  for ([key, value] of entries$4(parent)) {
114970
- if (isArray$3(value)) {
114911
+ if (isArray$2(value)) {
114971
114912
  const index = value.indexOf(node);
114972
114913
 
114973
114914
  if (index >= 0)
@@ -115371,13 +115312,13 @@ const TS_EXCLUDE = [
115371
115312
  ];
115372
115313
 
115373
115314
  declare$1.declare = (declarations) => ({
115374
- report: report$4,
115315
+ report: report$3,
115375
115316
  include: include$1,
115376
115317
  fix: fix$3(declarations),
115377
115318
  filter: filter(declarations),
115378
115319
  });
115379
115320
 
115380
- const report$4 = (path) => {
115321
+ const report$3 = (path) => {
115381
115322
  const {name} = path.node;
115382
115323
  const peaceOfName = cutName(name);
115383
115324
 
@@ -115550,16 +115491,16 @@ const fullstore$1 = fullstore$3;
115550
115491
  const driverStore = fullstore$1();
115551
115492
 
115552
115493
  const {assign} = Object;
115553
- const noop$1 = () => {};
115494
+ const noop = () => {};
115554
115495
  const returns = (a) => () => a;
115555
115496
 
115556
115497
  const defaultFS = {
115557
- renameFile: noop$1,
115558
- removeFile: noop$1,
115559
- createDirectory: noop$1,
115498
+ renameFile: noop,
115499
+ removeFile: noop,
115500
+ createDirectory: noop,
115560
115501
  readFileContent: returns(''),
115561
- writeFileContent: noop$1,
115562
- copyFile: noop$1,
115502
+ writeFileContent: noop,
115503
+ copyFile: noop,
115563
115504
  };
115564
115505
 
115565
115506
  const maybeFS$1 = assign({}, defaultFS);
@@ -115650,7 +115591,7 @@ const {
115650
115591
  } = require$$0;
115651
115592
 
115652
115593
  const {types: types$8} = bundle$1;
115653
- const tryCatch$1 = tryCatch$7;
115594
+ const tryCatch = tryCatch$6;
115654
115595
 
115655
115596
  const {
115656
115597
  setLiteralValue: setLiteralValue$1,
@@ -115673,11 +115614,11 @@ const {
115673
115614
  } = types$8;
115674
115615
 
115675
115616
  const isString$1 = (a) => typeof a === 'string';
115676
- const {isArray: isArray$2} = Array;
115677
- const maybeArray = (a) => isArray$2(a) ? a : [a];
115617
+ const {isArray: isArray$1} = Array;
115618
+ const maybeArray = (a) => isArray$1(a) ? a : [a];
115678
115619
 
115679
115620
  const toBase64 = (content) => {
115680
- const [e, result] = tryCatch$1(btoa, content);
115621
+ const [e, result] = tryCatch(btoa, content);
115681
115622
 
115682
115623
  if (e)
115683
115624
  return btoa(escape(content));
@@ -115689,7 +115630,7 @@ const fromBase64 = (content) => {
115689
115630
  if (content.includes(' '))
115690
115631
  return content;
115691
115632
 
115692
- const [e, decoded] = tryCatch$1(atob, content);
115633
+ const [e, decoded] = tryCatch(atob, content);
115693
115634
 
115694
115635
  if (!e)
115695
115636
  return unescape(decoded);
@@ -115762,7 +115703,7 @@ function findFile$5(node, name, exclude = []) {
115762
115703
  }
115763
115704
 
115764
115705
  function checkName(name) {
115765
- if (!isString$1(name) && !isArray$2(name))
115706
+ if (!isString$1(name) && !isArray$1(name))
115766
115707
  throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
115767
115708
  }
115768
115709
 
@@ -116243,7 +116184,7 @@ const {
116243
116184
  arrayExpression,
116244
116185
  } = types$6;
116245
116186
 
116246
- const {isArray: isArray$1} = Array;
116187
+ const {isArray} = Array;
116247
116188
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
116248
116189
 
116249
116190
  convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
@@ -116273,7 +116214,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
116273
116214
  const list = [];
116274
116215
 
116275
116216
  for (const name of names) {
116276
- if (isArray$1(name)) {
116217
+ if (isArray(name)) {
116277
116218
  list.push(arrayExpression([
116278
116219
  stringLiteral$2(name[0]),
116279
116220
  stringLiteral$2(name[1]),
@@ -116465,7 +116406,7 @@ const runFix = runFix$3;
116465
116406
  const mergeVisitors = mergeVisitors$1;
116466
116407
  const superFind = superFind$1;
116467
116408
  const template$2 = templateExports;
116468
- const {createProgress: createProgress$1} = progress;
116409
+ const {createProgress} = progress;
116469
116410
  const {tryThrowWithReason} = tryThrowWithReason$1;
116470
116411
 
116471
116412
  const {include} = includer;
@@ -116477,7 +116418,7 @@ const {getPath, getPosition} = getPosition$2;
116477
116418
  const debug = createDebug('putout:runner:find');
116478
116419
  const isRemoved = (a) => a?.removed;
116479
116420
 
116480
- 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}) => {
116481
116422
  let places = [];
116482
116423
 
116483
116424
  const merge = once(mergeVisitors);
@@ -116653,20 +116594,16 @@ function splitPlugins(plugins, {progress}) {
116653
116594
  };
116654
116595
  }
116655
116596
 
116656
- const loader = require$$1;
116657
- const runner = lib;
116658
- const {createProgress} = progress;
116659
-
116660
- defaultOptions$5.defaultOptions = (opts = {}) => {
116597
+ const defaultOptions$1 = (opts = {}) => {
116661
116598
  const {
116662
116599
  parser = 'babel',
116663
116600
  printer = opts.printer || 'putout',
116664
116601
  fix = true,
116665
116602
  fixCount = 3,
116666
- loadPlugins = loader.loadPlugins,
116667
- loadPluginsAsync = loader.loadPluginsAsync,
116668
- runPlugins = runner.runPlugins,
116669
- progress = createProgress(),
116603
+ loadPlugins: loadPlugins$1 = loadPlugins,
116604
+ loadPluginsAsync: loadPluginsAsync$1 = loadPluginsAsync,
116605
+ runPlugins = lib.runPlugins,
116606
+ progress = createProgress$1(),
116670
116607
  } = opts;
116671
116608
 
116672
116609
  return {
@@ -116675,16 +116612,21 @@ defaultOptions$5.defaultOptions = (opts = {}) => {
116675
116612
  printer,
116676
116613
  fix,
116677
116614
  fixCount,
116678
- loadPlugins,
116679
- loadPluginsAsync,
116615
+ loadPlugins: loadPlugins$1,
116616
+ loadPluginsAsync: loadPluginsAsync$1,
116680
116617
  runPlugins,
116681
116618
  progress,
116682
116619
  };
116683
116620
  };
116684
116621
 
116685
- var transform$5 = {};
116622
+ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
116623
+ __proto__: null,
116624
+ defaultOptions: defaultOptions$1
116625
+ });
116686
116626
 
116687
- var parseError$2 = (e, type = 'parser') => {
116627
+ var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
116628
+
116629
+ const parseError$1 = (e, type = 'parser') => {
116688
116630
  const {line, column} = e.loc || {
116689
116631
  line: 1,
116690
116632
  column: 1,
@@ -116705,13 +116647,6 @@ var parseError$2 = (e, type = 'parser') => {
116705
116647
 
116706
116648
  const cutBrackets = (a) => a.replace(/\s\(\d:\d+\)/, '');
116707
116649
 
116708
- const tryCatch = tryCatch$7;
116709
-
116710
- const {validateRulesRelations} = require$$1;
116711
- const {defaultOptions: defaultOptions$1} = defaultOptions$5;
116712
- const {cutShebang: cutShebang$1} = shebang;
116713
- const parseError$1 = parseError$2;
116714
-
116715
116650
  const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116716
116651
 
116717
116652
  // why we pass 'source' to 'transform()'?
@@ -116723,7 +116658,7 @@ const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116723
116658
  // 27 column,¬
116724
116659
  // 28 };¬
116725
116660
  //
116726
- transform$5.transform = (ast, source, opts) => {
116661
+ const transform$4 = (ast, source, opts) => {
116727
116662
  opts = defaultOptions$1(opts);
116728
116663
 
116729
116664
  const {
@@ -116739,7 +116674,7 @@ transform$5.transform = (ast, source, opts) => {
116739
116674
 
116740
116675
  const [, shebang] = cutShebang$1(source);
116741
116676
 
116742
- const [validationError] = tryCatch(validateRulesRelations, {
116677
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116743
116678
  rules,
116744
116679
  pluginNames,
116745
116680
  });
@@ -116765,7 +116700,7 @@ transform$5.transform = (ast, source, opts) => {
116765
116700
  ];
116766
116701
  };
116767
116702
 
116768
- transform$5.transformAsync = async (ast, source, opts) => {
116703
+ const transformAsync$1 = async (ast, source, opts) => {
116769
116704
  opts = defaultOptions$1(opts);
116770
116705
 
116771
116706
  const {
@@ -116781,7 +116716,7 @@ transform$5.transformAsync = async (ast, source, opts) => {
116781
116716
 
116782
116717
  const [, shebang] = cutShebang$1(source);
116783
116718
 
116784
- const [validationError] = tryCatch(validateRulesRelations, {
116719
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116785
116720
  rules,
116786
116721
  pluginNames,
116787
116722
  });
@@ -116807,78 +116742,35 @@ transform$5.transformAsync = async (ast, source, opts) => {
116807
116742
  ];
116808
116743
  };
116809
116744
 
116810
- var findPlaces$2 = {};
116745
+ var transform$5 = /*#__PURE__*/Object.freeze({
116746
+ __proto__: null,
116747
+ transform: transform$4,
116748
+ transformAsync: transformAsync$1
116749
+ });
116811
116750
 
116812
- const {transform: transform$4, transformAsync: transformAsync$1} = transform$5;
116751
+ var require$$4$1 = /*@__PURE__*/getAugmentedNamespace(transform$5);
116813
116752
 
116814
- findPlaces$2.findPlaces = (ast, source, opts) => {
116753
+ const findPlaces$2 = (ast, source, opts) => {
116815
116754
  return transform$4(ast, source, {
116816
116755
  ...opts,
116817
116756
  fix: false,
116818
116757
  });
116819
116758
  };
116820
116759
 
116821
- findPlaces$2.findPlacesAsync = async (ast, source, opts) => {
116760
+ const findPlacesAsync$1 = async (ast, source, opts) => {
116822
116761
  return await transformAsync$1(ast, source, {
116823
116762
  ...opts,
116824
116763
  fix: false,
116825
116764
  });
116826
116765
  };
116827
116766
 
116828
- const {isArray} = Array;
116829
- const noop = () => {};
116830
-
116831
- var report$3 = () => {
116832
- let filesCount = 0;
116833
- let errorsCount = 0;
116834
-
116835
- return async (formatter, options) => {
116836
- const {
116837
- name,
116838
- rule,
116839
- source,
116840
- places,
116841
- index = 0,
116842
- count = 1,
116843
- trace = noop,
116844
- formatterOptions = {},
116845
- } = options;
116846
-
116847
- if (!isArray(places))
116848
- throw Error(`☝️ Looks like for 'places: Places[]' you passed the wrong type: '${typeof places}'`);
116849
-
116850
- if (places.length)
116851
- ++filesCount;
116852
-
116853
- errorsCount += places.length;
116854
-
116855
- trace('progress', {
116856
- rule,
116857
- name,
116858
- options: formatterOptions,
116859
- source,
116860
- places,
116861
- index,
116862
- count,
116863
- filesCount,
116864
- errorsCount,
116865
- });
116866
-
116867
- return await formatter({
116868
- rule,
116869
- name,
116870
- options: formatterOptions,
116871
- source,
116872
- places,
116873
- index,
116874
- count,
116875
- filesCount,
116876
- errorsCount,
116877
- });
116878
- };
116879
- };
116767
+ var findPlaces$3 = /*#__PURE__*/Object.freeze({
116768
+ __proto__: null,
116769
+ findPlaces: findPlaces$2,
116770
+ findPlacesAsync: findPlacesAsync$1
116771
+ });
116880
116772
 
116881
- report$3.default;
116773
+ var require$$5 = /*@__PURE__*/getAugmentedNamespace(findPlaces$3);
116882
116774
 
116883
116775
  var traverse$5 = {};
116884
116776
 
@@ -124489,15 +124381,12 @@ keyword.isTSKeyword = (name) => {
124489
124381
 
124490
124382
  var matchFiles = {};
124491
124383
 
124492
- const {relative} = require$$0;
124493
- const ignore$1 = require$$1$2;
124494
-
124495
124384
  const isNegative = (a) => !a.indexOf('!');
124496
124385
  const positive = (a) => a.replace(/^!/, '');
124497
124386
 
124498
- var ignores$2 = (dirOpt, resolvedName, options = {}) => {
124387
+ const ignores$1 = (dirOpt, resolvedName, options = {}) => {
124499
124388
  const relativeName = relative(dirOpt, resolvedName);
124500
- const ignorer = ignore$1();
124389
+ const ignorer = noop$3();
124501
124390
  const ignoreList = mergeIgnores(options.ignore || []);
124502
124391
 
124503
124392
  ignorer.add(ignoreList);
@@ -124518,14 +124407,19 @@ function mergeIgnores(ignores) {
124518
124407
  return Array.from(noDuplicates);
124519
124408
  }
124520
124409
 
124521
- 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);
124522
124416
 
124523
124417
  const path = require$$0;
124524
124418
 
124525
124419
  const {parse: parse$2, print: print$1} = parser$5;
124526
- const {transform: transform$1} = transform$5;
124527
- const {findPlaces: findPlaces$1} = findPlaces$2;
124528
- 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;
124529
124423
 
124530
124424
  const {toJS, fromJS} = json;
124531
124425
 
@@ -124600,7 +124494,7 @@ const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, prog
124600
124494
  filename: inputFilename,
124601
124495
  });
124602
124496
 
124603
- if (ignores$1(cwd, inputFilename, options))
124497
+ if (ignores(cwd, inputFilename, options))
124604
124498
  continue;
124605
124499
 
124606
124500
  allFiles.push({
@@ -124984,9 +124878,7 @@ function hasParens(path, printer = getPrinter(path)) {
124984
124878
  return /^(TS)?Parenthesized(Expression|Type)?$/.test(type);
124985
124879
  }
124986
124880
 
124987
- const {codeFrameColumns} = bundle$1;
124988
-
124989
- var codeframe$1 = ({source, error, highlightCode = true}) => {
124881
+ const codeframe$1 = ({source, error, highlightCode = true}) => {
124990
124882
  const {message, loc} = error;
124991
124883
 
124992
124884
  if (!loc)
@@ -124996,13 +124888,18 @@ var codeframe$1 = ({source, error, highlightCode = true}) => {
124996
124888
  start: loc,
124997
124889
  };
124998
124890
 
124999
- return codeFrameColumns(source, location, {
124891
+ return bundle$1.codeFrameColumns(source, location, {
125000
124892
  highlightCode,
125001
124893
  message,
125002
124894
  });
125003
124895
  };
125004
124896
 
125005
- 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);
125006
124903
 
125007
124904
  const {traverse, types} = bundle$1;
125008
124905
  const {
@@ -125012,16 +124909,14 @@ const {
125012
124909
  template,
125013
124910
  } = parser$5;
125014
124911
 
125015
- const {cutShebang, mergeShebang} = shebang;
125016
- const {defaultOptions} = defaultOptions$5;
125017
- const {transform, transformAsync} = transform$5;
124912
+ const {cutShebang, mergeShebang} = require$$2;
124913
+ const {defaultOptions} = require$$3;
124914
+ const {transform, transformAsync} = require$$4$1;
125018
124915
 
125019
124916
  const {
125020
124917
  findPlaces,
125021
124918
  findPlacesAsync,
125022
- } = findPlaces$2;
125023
-
125024
- const isString = (a) => typeof a === 'string';
124919
+ } = require$$5;
125025
124920
 
125026
124921
  putout$1.exports = putout;
125027
124922
  var putout_2 = putout$1.exports.putout = putout;
@@ -125119,7 +125014,6 @@ var traverse_1 = putout$1.exports.traverse = traverse;
125119
125014
  var types_1 = putout$1.exports.types = types;
125120
125015
  var template_1 = putout$1.exports.template = template;
125121
125016
  var generate_1 = putout$1.exports.generate = generate;
125122
- var initReport = putout$1.exports.initReport = report$3;
125123
125017
 
125124
125018
  var operator = putout$1.exports.operator = {
125125
125019
  ...operate,
@@ -125138,14 +125032,14 @@ var operator = putout$1.exports.operator = {
125138
125032
  ...parens,
125139
125033
  };
125140
125034
 
125141
- var ignores = putout$1.exports.ignores = ignores$2;
125142
- 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;
125143
125039
 
125144
125040
  function check(source) {
125145
125041
  if (!isString(source))
125146
125042
  throw Error(`☝️ Looks like 'source' has type '${typeof source}', expected: 'string'`);
125147
125043
  }
125148
125044
 
125149
- var putoutExports = putout$1.exports;
125150
-
125151
- 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 };