@putout/bundle 5.0.7 → 5.0.9

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.
@@ -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
  };
@@ -60103,7 +60103,7 @@ function objectPlugin(plugin, path, printer, semantics) {
60103
60103
 
60104
60104
  var debug$9 = {};
60105
60105
 
60106
- var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_process);
60106
+ var require$$0$4 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_process);
60107
60107
 
60108
60108
  var justSnakeCase = snakeCase;
60109
60109
 
@@ -60134,9 +60134,9 @@ function snakeCase(str) {
60134
60134
  .join('_');
60135
60135
  }
60136
60136
 
60137
- const process = require$$0$3;
60137
+ const process = require$$0$4;
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$9.createDebug = (tokens) => (a) => {
60160
60160
 
60161
60161
  debug$9.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$9.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$9.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) => {
@@ -60868,12 +60868,14 @@ babel$2.print = (ast, options) => {
60868
60868
  ...options,
60869
60869
  };
60870
60870
 
60871
- let {code} = generate$6(ast, {
60872
- ...source && {
60871
+ let {code} = generate$6(
60872
+ ast,
60873
+ source && {
60873
60874
  experimental_preserveFormat: true,
60874
60875
  retainLines: true,
60875
60876
  },
60876
- }, source);
60877
+ source,
60878
+ );
60877
60879
 
60878
60880
  if (code[0] === '\n')
60879
60881
  code = code.trimStart();
@@ -60889,9 +60891,9 @@ babel$2.print = (ast, options) => {
60889
60891
  const putoutPrinter = printer;
60890
60892
  const babelPrinter = babel$2;
60891
60893
 
60892
- const {isArray: isArray$d} = Array;
60894
+ const {isArray: isArray$b} = Array;
60893
60895
 
60894
- const maybeArray$7 = (a) => isArray$d(a) ? a : [a, {}];
60896
+ const maybeArray$7 = (a) => isArray$b(a) ? a : [a, {}];
60895
60897
 
60896
60898
  var print$4 = (ast, options = {}) => {
60897
60899
  const [printer = 'putout', printerOptions] = maybeArray$7(options.printer);
@@ -61930,7 +61932,7 @@ var require_src = __commonJS({
61930
61932
  var index_exports = {};
61931
61933
 
61932
61934
  __export(index_exports, {
61933
- codeFrameColumns: () => codeFrameColumns$1,
61935
+ codeFrameColumns: () => codeFrameColumns,
61934
61936
  generate: () => generate$5,
61935
61937
  parse: () => parse$6,
61936
61938
  parseExpression: () => parseExpression$1,
@@ -95418,7 +95420,7 @@ function getMarkerLines(loc, source, opts) {
95418
95420
  };
95419
95421
  }
95420
95422
 
95421
- function codeFrameColumns$1(rawLines, loc, opts = {}) {
95423
+ function codeFrameColumns(rawLines, loc, opts = {}) {
95422
95424
  const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
95423
95425
  const defs = getDefs(shouldHighlight);
95424
95426
  const lines = rawLines.split(NEWLINE);
@@ -95805,7 +95807,7 @@ function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
95805
95807
  const loc = err.loc;
95806
95808
 
95807
95809
  if (loc) {
95808
- err.message += '\n' + codeFrameColumns$1(code2, {
95810
+ err.message += '\n' + codeFrameColumns(code2, {
95809
95811
  start: loc,
95810
95812
  });
95811
95813
  err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
@@ -106642,7 +106644,7 @@ function replaceWithSourceString(replacement) {
106642
106644
  const loc = err.loc;
106643
106645
 
106644
106646
  if (loc) {
106645
- err.message += ' - make sure this is an expression.\n' + codeFrameColumns$1(replacement, {
106647
+ err.message += ' - make sure this is an expression.\n' + codeFrameColumns(replacement, {
106646
106648
  start: {
106647
106649
  line: loc.line,
106648
106650
  column: loc.column + 1,
@@ -110638,20 +110640,20 @@ function onceStrict (fn) {
110638
110640
 
110639
110641
  var onceExports = once$8.exports;
110640
110642
 
110641
- const noop$5 = () => {};
110643
+ const noop$3 = () => {};
110642
110644
 
110643
110645
  var empty = /*#__PURE__*/Object.freeze({
110644
110646
  __proto__: null,
110645
- default: noop$5
110647
+ default: noop$3
110646
110648
  });
110647
110649
 
110648
- var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(empty);
110650
+ var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(empty);
110649
110651
 
110650
110652
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110651
110653
 
110652
110654
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110653
110655
  function privateMethods(Parser) {
110654
- const ExtendedParser = noop$5();
110656
+ const ExtendedParser = noop$3();
110655
110657
 
110656
110658
  return class extends ExtendedParser {
110657
110659
  // Parse private methods
@@ -110677,7 +110679,7 @@ var acornPrivateMethods = /*#__PURE__*/Object.freeze({
110677
110679
  default: privateMethods
110678
110680
  });
110679
110681
 
110680
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110682
+ var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110681
110683
 
110682
110684
  var acornStage3;
110683
110685
  var hasRequiredAcornStage3;
@@ -110688,9 +110690,9 @@ function requireAcornStage3 () {
110688
110690
 
110689
110691
  acornStage3 = function(Parser) {
110690
110692
  return Parser.extend(
110691
- require$$1$2,
110692
- require$$1$2,
110693
- require$$2
110693
+ require$$1$1,
110694
+ require$$1$1,
110695
+ require$$2$1
110694
110696
  )
110695
110697
  };
110696
110698
  return acornStage3;
@@ -110699,10 +110701,10 @@ function requireAcornStage3 () {
110699
110701
  const once$6 = onceExports;
110700
110702
 
110701
110703
  const initAcorn = once$6(() => {
110702
- const {Parser} = require$$1$2;
110704
+ const {Parser} = require$$1$1;
110703
110705
 
110704
110706
  const stage3 = requireAcornStage3();
110705
- const typescript = require$$1$2.default;
110707
+ const typescript = require$$1$1.default;
110706
110708
 
110707
110709
  return Parser.extend(typescript(), stage3);
110708
110710
  });
@@ -110819,7 +110821,7 @@ function getBabelLangExts({isTS, isFlow, isJSX}) {
110819
110821
  var espree$1 = {};
110820
110822
 
110821
110823
  const once$4 = onceExports;
110822
- const initEspree = once$4(() => require$$1$2);
110824
+ const initEspree = once$4(() => require$$1$1);
110823
110825
 
110824
110826
  espree$1.parse = function espreeParse(source) {
110825
110827
  const {parse} = initEspree();
@@ -110840,7 +110842,7 @@ espree$1.parse = function espreeParse(source) {
110840
110842
  var esprima$1 = {};
110841
110843
 
110842
110844
  const once$3 = onceExports;
110843
- const initEsprima = once$3(() => require$$1$2);
110845
+ const initEsprima = once$3(() => require$$1$1);
110844
110846
 
110845
110847
  esprima$1.parse = function esprimaParse(source) {
110846
110848
  const {parse} = initEsprima();
@@ -110857,7 +110859,7 @@ esprima$1.parse = function esprimaParse(source) {
110857
110859
  var tenko$1 = {};
110858
110860
 
110859
110861
  const once$2 = onceExports;
110860
- const initTenko = once$2(() => require$$1$2);
110862
+ const initTenko = once$2(() => require$$1$1);
110861
110863
 
110862
110864
  tenko$1.parse = (source) => {
110863
110865
  const {Tenko} = initTenko();
@@ -110874,7 +110876,7 @@ tenko$1.parse = (source) => {
110874
110876
  var hermes$1 = {};
110875
110877
 
110876
110878
  const once$1 = onceExports;
110877
- const initHermes = once$1(() => require$$1$2);
110879
+ const initHermes = once$1(() => require$$1$1);
110878
110880
 
110879
110881
  hermes$1.parse = function hermesParse(source) {
110880
110882
  const parser = initHermes();
@@ -110890,7 +110892,7 @@ hermes$1.parse = function hermesParse(source) {
110890
110892
  return parser.parse(source, options);
110891
110893
  };
110892
110894
 
110893
- var tryCatch$7 = (fn, ...args) => {
110895
+ const tryCatch$8 = (fn, ...args) => {
110894
110896
  try {
110895
110897
  return [null, fn(...args)];
110896
110898
  } catch(e) {
@@ -110898,11 +110900,19 @@ var tryCatch$7 = (fn, ...args) => {
110898
110900
  }
110899
110901
  };
110900
110902
 
110901
- const tryCatch$6 = tryCatch$7;
110903
+ var tryCatch$9 = /*#__PURE__*/Object.freeze({
110904
+ __proto__: null,
110905
+ default: tryCatch$8,
110906
+ tryCatch: tryCatch$8
110907
+ });
110908
+
110909
+ var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(tryCatch$9);
110910
+
110911
+ const tryCatch$7 = require$$0$3;
110902
110912
 
110903
110913
  var secondChance$1 = (fn, source, messages, args) => {
110904
110914
  const [a, ...others] = args;
110905
- const [errorA, resultA] = tryCatch$6(fn, source, a);
110915
+ const [errorA, resultA] = tryCatch$7(fn, source, a);
110906
110916
 
110907
110917
  if (!errorA)
110908
110918
  return resultA;
@@ -110911,7 +110921,7 @@ var secondChance$1 = (fn, source, messages, args) => {
110911
110921
  throw errorA;
110912
110922
 
110913
110923
  for (const b of others) {
110914
- const [errorB, resultB] = tryCatch$6(fn, source, b);
110924
+ const [errorB, resultB] = tryCatch$7(fn, source, b);
110915
110925
 
110916
110926
  if (!errorB)
110917
110927
  return resultB;
@@ -111002,10 +111012,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
111002
111012
 
111003
111013
  var tryThrowWithReason$3 = {};
111004
111014
 
111005
- const tryCatch$5 = tryCatch$7;
111015
+ const tryCatch$6 = require$$0$3;
111006
111016
 
111007
111017
  tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
111008
- const [error, result] = tryCatch$5(fn, ...args);
111018
+ const [error, result] = tryCatch$6(fn, ...args);
111009
111019
 
111010
111020
  if (error) {
111011
111021
  error.reason = 'parse';
@@ -111185,12 +111195,12 @@ var nanoMemoize = /*#__PURE__*/Object.freeze({
111185
111195
  nanomemoize: $cf838c15c8b009ba$export$22f15dd4e5be7e52
111186
111196
  });
111187
111197
 
111188
- var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111198
+ var require$$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111189
111199
 
111190
111200
  (function (module) {
111191
111201
 
111192
111202
  const {types, template} = bundle$1;
111193
- const {nanomemoize} = require$$1$1;
111203
+ const {nanomemoize} = require$$1;
111194
111204
  const plugins = plugins$1;
111195
111205
  const options = options$1;
111196
111206
 
@@ -111282,16 +111292,14 @@ parser$5.parse = parse$4;
111282
111292
  parser$5.generate = generate$3;
111283
111293
  parser$5.template = template$9;
111284
111294
 
111285
- var shebang = {};
111286
-
111287
- shebang.mergeShebang = (shebang, source) => {
111295
+ const mergeShebang$1 = (shebang, source) => {
111288
111296
  if (!shebang)
111289
111297
  return source;
111290
111298
 
111291
111299
  return `${shebang}\n${source}`;
111292
111300
  };
111293
111301
 
111294
- shebang.cutShebang = (source) => {
111302
+ const cutShebang$1 = (source) => {
111295
111303
  if (source.indexOf('#'))
111296
111304
  return [source, ''];
111297
111305
 
@@ -111309,7 +111317,13 @@ shebang.cutShebang = (source) => {
111309
111317
  ];
111310
111318
  };
111311
111319
 
111312
- var defaultOptions$4 = {};
111320
+ var shebang = /*#__PURE__*/Object.freeze({
111321
+ __proto__: null,
111322
+ cutShebang: cutShebang$1,
111323
+ mergeShebang: mergeShebang$1
111324
+ });
111325
+
111326
+ var require$$2 = /*@__PURE__*/getAugmentedNamespace(shebang);
111313
111327
 
111314
111328
  // Copyright Joyent, Inc. and other Node contributors.
111315
111329
  //
@@ -111439,7 +111453,7 @@ function join$3() {
111439
111453
 
111440
111454
  // path.relative(from, to)
111441
111455
  // posix version
111442
- function relative$1(from, to) {
111456
+ function relative(from, to) {
111443
111457
  from = resolve(from).substr(1);
111444
111458
  to = resolve(to).substr(1);
111445
111459
 
@@ -111520,7 +111534,7 @@ var _polyfillNode_path = {
111520
111534
  dirname: dirname$2,
111521
111535
  sep: sep,
111522
111536
  delimiter: delimiter,
111523
- relative: relative$1,
111537
+ relative: relative,
111524
111538
  join: join$3,
111525
111539
  isAbsolute: isAbsolute,
111526
111540
  normalize: normalize,
@@ -111554,13 +111568,11 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
111554
111568
  isAbsolute: isAbsolute,
111555
111569
  join: join$3,
111556
111570
  normalize: normalize,
111557
- relative: relative$1,
111571
+ relative: relative,
111558
111572
  resolve: resolve,
111559
111573
  sep: sep
111560
111574
  });
111561
111575
 
111562
- var module$1 = {};
111563
-
111564
111576
  var tryToCatch = async (fn, ...args) => {
111565
111577
  check$a(fn);
111566
111578
 
@@ -111578,19 +111590,25 @@ function check$a(fn) {
111578
111590
 
111579
111591
  var tryToCatch$1 = tryToCatch.default;
111580
111592
 
111593
+ var _module = {};
111594
+
111595
+ const returns$1 = (a) => () => a;
111596
+ const noop$2 = () => {};
111597
+
111598
+ const createRequire = (url, overrides = {}) => {
111599
+ const {module = _module} = overrides;
111600
+ const {createRequire = returns$1(noop$2)} = module;
111601
+
111602
+ return createRequire(url);
111603
+ };
111604
+
111581
111605
  // How in other way to mock import using mock require in CommonJS?
111582
111606
  const simpleImport = async (url) => {
111583
111607
  const result = await import(url);
111584
111608
  return result.default || result;
111585
111609
  };
111586
111610
 
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);
111611
+ const require$1 = createRequire(import.meta.url);
111594
111612
 
111595
111613
  const {assign: assign$3} = Object;
111596
111614
  const stub$2 = () => () => {};
@@ -111686,20 +111704,20 @@ function buildPluginsDirs(name) {
111686
111704
  ];
111687
111705
  }
111688
111706
 
111689
- const isStr$4 = (a) => typeof a === 'string';
111690
- const {isArray: isArray$c} = Array;
111707
+ const isStr$3 = (a) => typeof a === 'string';
111708
+ const {isArray: isArray$a} = Array;
111691
111709
  const {entries: entries$9} = Object;
111692
111710
 
111693
111711
  const parsePluginNames = (plugins) => {
111694
111712
  const result = [];
111695
111713
 
111696
111714
  for (const plugin of plugins) {
111697
- if (isStr$4(plugin)) {
111715
+ if (isStr$3(plugin)) {
111698
111716
  result.push([plugin]);
111699
111717
  continue;
111700
111718
  }
111701
111719
 
111702
- if (isArray$c(plugin)) {
111720
+ if (isArray$a(plugin)) {
111703
111721
  const [pluginName, fn] = plugin;
111704
111722
  result.push([pluginName, fn]);
111705
111723
  continue;
@@ -111711,9 +111729,9 @@ const parsePluginNames = (plugins) => {
111711
111729
  return result;
111712
111730
  };
111713
111731
 
111714
- const {isArray: isArray$b} = Array;
111732
+ const {isArray: isArray$9} = Array;
111715
111733
  const isBool$2 = (a) => typeof a === 'boolean';
111716
- const isStr$3 = (a) => typeof a === 'string';
111734
+ const isStr$2 = (a) => typeof a === 'string';
111717
111735
  const isObj = (a) => typeof a === 'object';
111718
111736
  const {entries: entries$8} = Object;
111719
111737
  const {stringify: stringify$6} = JSON;
@@ -111721,7 +111739,7 @@ const {stringify: stringify$6} = JSON;
111721
111739
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
111722
111740
  const rulesUsedInsteadOfMatchError = (a) => Error(`☝️ Looks like you need to change "rules" to "match" for ${stringify$6(a)}`);
111723
111741
  const stateOptionError = ({rule, value}) => Error(`☝️ ${rule}: state option can be "on" or "off" only, when used as string, received: "${value}"`);
111724
- const defaultOptions$3 = () => Object.create(null);
111742
+ const defaultOptions$4 = () => Object.create(null);
111725
111743
 
111726
111744
  const parseState = (rule, value) => {
111727
111745
  validateState(rule, value);
@@ -111743,13 +111761,13 @@ const parseRules = (rules) => {
111743
111761
  check$9(rules);
111744
111762
 
111745
111763
  for (const [rule, value] of entries$8(rules)) {
111746
- if (isStr$3(value)) {
111764
+ if (isStr$2(value)) {
111747
111765
  result.push({
111748
111766
  rule,
111749
111767
  state: parseState(rule, value),
111750
111768
  plugin,
111751
111769
  msg,
111752
- options: defaultOptions$3(),
111770
+ options: defaultOptions$4(),
111753
111771
  });
111754
111772
  continue;
111755
111773
  }
@@ -111760,12 +111778,12 @@ const parseRules = (rules) => {
111760
111778
  state: value,
111761
111779
  plugin,
111762
111780
  msg,
111763
- options: defaultOptions$3(),
111781
+ options: defaultOptions$4(),
111764
111782
  });
111765
111783
  continue;
111766
111784
  }
111767
111785
 
111768
- const looksLikeArray = isArray$b(value);
111786
+ const looksLikeArray = isArray$9(value);
111769
111787
  const looksLikeNormalArray = looksLikeArray && value.length;
111770
111788
 
111771
111789
  if (looksLikeNormalArray) {
@@ -111843,11 +111861,11 @@ const enableNestedRules = (rules) => {
111843
111861
  };
111844
111862
 
111845
111863
  function check$9(rules) {
111846
- if (isArray$b(rules))
111864
+ if (isArray$9(rules))
111847
111865
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
111848
111866
  }
111849
111867
 
111850
- const defaultOptions$2 = () => Object.create(null);
111868
+ const defaultOptions$3 = () => Object.create(null);
111851
111869
 
111852
111870
  const mergeRules = ([rule, plugin], rules) => {
111853
111871
  for (const currentRule of rules) {
@@ -111868,7 +111886,7 @@ const mergeRules = ([rule, plugin], rules) => {
111868
111886
  rule,
111869
111887
  plugin,
111870
111888
  msg: '',
111871
- options: defaultOptions$2(),
111889
+ options: defaultOptions$3(),
111872
111890
  };
111873
111891
  };
111874
111892
 
@@ -111960,7 +111978,7 @@ const checkRule = (rule) => {
111960
111978
  throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
111961
111979
  };
111962
111980
 
111963
- const validateRulesRelations$1 = (options) => {
111981
+ const validateRulesRelations = (options) => {
111964
111982
  check$8(options);
111965
111983
 
111966
111984
  const {pluginNames = [], rules = {}} = options;
@@ -112008,8 +112026,8 @@ var validatePlugin = ({plugin, rule}) => {
112008
112026
  throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
112009
112027
  };
112010
112028
 
112011
- const {isArray: isArray$a} = Array;
112012
- const maybeTuple = (a) => isArray$a(a) ? a : ['on', a];
112029
+ const {isArray: isArray$8} = Array;
112030
+ const maybeTuple = (a) => isArray$8(a) ? a : ['on', a];
112013
112031
 
112014
112032
  // Would be great to have ability to filter
112015
112033
  // disabled plugins and prevent them from loading
@@ -112139,11 +112157,7 @@ function parseRuleName(rule) {
112139
112157
  return rule;
112140
112158
  }
112141
112159
 
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;
112160
+ const {isArray: isArray$7} = Array;
112147
112161
 
112148
112162
  const loadPlugins = (options) => {
112149
112163
  check$8(options);
@@ -112175,7 +112189,7 @@ const parseRule = (rule) => rule
112175
112189
  .replace('import:@putout/plugin-', '')
112176
112190
  .replace('@putout/plugin-', '');
112177
112191
 
112178
- const maybeFromTuple = (a) => isArray$9(a) ? a[1] : a;
112192
+ const maybeFromTuple = (a) => isArray$7(a) ? a[1] : a;
112179
112193
 
112180
112194
  function loadAllPlugins({items, loadedRules}) {
112181
112195
  const plugins = [];
@@ -112234,75 +112248,6 @@ function loadOnePlugin({name, namespace}) {
112234
112248
  });
112235
112249
  }
112236
112250
 
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
112251
  var lib = {};
112307
112252
 
112308
112253
  var debug$7 = {};
@@ -112339,7 +112284,15 @@ debug$7.createDebug = (namespace) => {
112339
112284
  });
112340
112285
  };
112341
112286
 
112342
- const tryCatch$4 = tryCatch$7;
112287
+ var tryCatch$5 = (fn, ...args) => {
112288
+ try {
112289
+ return [null, fn(...args)];
112290
+ } catch(e) {
112291
+ return [e];
112292
+ }
112293
+ };
112294
+
112295
+ const tryCatch$4 = tryCatch$5;
112343
112296
  const {createDebug: createDebug$7} = debug$7;
112344
112297
 
112345
112298
  const {stringify: stringify$5} = JSON;
@@ -112441,8 +112394,8 @@ function validatePath(path) {
112441
112394
  throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
112442
112395
  }
112443
112396
 
112444
- const {isArray: isArray$7} = Array;
112445
- const maybeArray$6 = (a) => isArray$7(a) ? a : [a];
112397
+ const {isArray: isArray$6} = Array;
112398
+ const maybeArray$6 = (a) => isArray$6(a) ? a : [a];
112446
112399
 
112447
112400
  var maybeArray_1 = (a) => {
112448
112401
  if (!a)
@@ -112983,7 +112936,7 @@ const isBool$1 = (a, b) => {
112983
112936
  };
112984
112937
 
112985
112938
  const isEqualType$1 = (a, b) => a.type === b.type;
112986
- const {isArray: isArray$6} = Array;
112939
+ const {isArray: isArray$5} = Array;
112987
112940
 
112988
112941
  is$2.isId = isId$2;
112989
112942
  is$2.isBool = isBool$1;
@@ -113006,7 +112959,7 @@ is$2.isAnyLiteral = (a, b) => {
113006
112959
  };
113007
112960
 
113008
112961
  is$2.isArgs = (a) => {
113009
- const b = !isArray$6(a) ? a : a[0];
112962
+ const b = !isArray$5(a) ? a : a[0];
113010
112963
 
113011
112964
  return isIdentifier$4(b, {
113012
112965
  name: ARGS,
@@ -113036,12 +112989,12 @@ is$2.isEqualTypeParams = (a, b) => {
113036
112989
  };
113037
112990
 
113038
112991
  is$2.isLinkedArgs = (a) => {
113039
- const b = !isArray$6(a) ? a : a[0];
112992
+ const b = !isArray$5(a) ? a : a[0];
113040
112993
  return isIdentifier$4(b) && LINKED_ARGS.test(b.name);
113041
112994
  };
113042
112995
 
113043
112996
  is$2.isJSXChildren = (a) => {
113044
- const b = !isArray$6(a) ? a : a[0];
112997
+ const b = !isArray$5(a) ? a : a[0];
113045
112998
 
113046
112999
  return isJSXText$2(b, {
113047
113000
  value: JSX_CHILDREN,
@@ -113049,7 +113002,7 @@ is$2.isJSXChildren = (a) => {
113049
113002
  };
113050
113003
 
113051
113004
  is$2.isJSXAttributes = (a) => {
113052
- const b = !isArray$6(a) ? a : a[0];
113005
+ const b = !isArray$5(a) ? a : a[0];
113053
113006
 
113054
113007
  if (!isJSXAttribute$1(b))
113055
113008
  return false;
@@ -113081,27 +113034,27 @@ is$2.isLinkedRegExp = (a, b) => {
113081
113034
  };
113082
113035
 
113083
113036
  is$2.isPath = (path) => Boolean(path.node);
113084
- is$2.isArray = isArray$6;
113037
+ is$2.isArray = isArray$5;
113085
113038
 
113086
113039
  is$2.isObject = (a) => {
113087
113040
  if (!a)
113088
113041
  return false;
113089
113042
 
113090
- if (isArray$6(a))
113043
+ if (isArray$5(a))
113091
113044
  return false;
113092
113045
 
113093
113046
  return typeof a === 'object';
113094
113047
  };
113095
113048
 
113096
113049
  is$2.isArrays = (a, b) => {
113097
- if (!isArray$6(a) || !isArray$6(b))
113050
+ if (!isArray$5(a) || !isArray$5(b))
113098
113051
  return false;
113099
113052
 
113100
113053
  return a.length === b.length;
113101
113054
  };
113102
113055
 
113103
113056
  is$2.isImports = (a) => {
113104
- const b = !isArray$6(a) ? a : a[0];
113057
+ const b = !isArray$5(a) ? a : a[0];
113105
113058
 
113106
113059
  if (!isImportDefaultSpecifier(b))
113107
113060
  return false;
@@ -113112,7 +113065,7 @@ is$2.isImports = (a) => {
113112
113065
  };
113113
113066
 
113114
113067
  is$2.isExports = (a) => {
113115
- const b = !isArray$6(a) ? a : a[0];
113068
+ const b = !isArray$5(a) ? a : a[0];
113116
113069
 
113117
113070
  if (!isExportSpecifier(b))
113118
113071
  return false;
@@ -113425,7 +113378,7 @@ debug$4.createDebug = (namespace) => {
113425
113378
  const {createDebug: createDebug$5} = debug$4;
113426
113379
  const debug$3 = createDebug$5('putout:compare');
113427
113380
 
113428
- const {isArray: isArray$5} = Array;
113381
+ const {isArray: isArray$4} = Array;
113429
113382
  const isObject$4 = (a) => a && typeof a === 'object';
113430
113383
 
113431
113384
  log$5.exports = (a, b) => {
@@ -113440,7 +113393,7 @@ log$5.exports = (a, b) => {
113440
113393
 
113441
113394
  log$5.exports._parseValue = parseValue;
113442
113395
  function parseValue(a) {
113443
- if (isArray$5(a) && a[0]) {
113396
+ if (isArray$4(a) && a[0]) {
113444
113397
  const [{
113445
113398
  type,
113446
113399
  name,
@@ -113796,13 +113749,13 @@ const {extractExpression} = template$5;
113796
113749
  const addWaterMark = (a) => a;
113797
113750
 
113798
113751
  const {keys: keys$2} = Object;
113799
- const {isArray: isArray$4} = Array;
113800
- const noop$2 = () => {};
113801
- const isEmptyArray = (a) => isArray$4(a) && !a.length;
113752
+ const {isArray: isArray$3} = Array;
113753
+ const noop$1 = () => {};
113754
+ const isEmptyArray = (a) => isArray$3(a) && !a.length;
113802
113755
 
113803
113756
  const compareType = (type) => (path) => path.type === type;
113804
113757
  const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
113805
- const maybeArray$4 = (a) => isArray$4(a) ? a : [a];
113758
+ const maybeArray$4 = (a) => isArray$3(a) ? a : [a];
113806
113759
 
113807
113760
  const findParent = (path, type) => {
113808
113761
  const newPathNode = path.findParent(compareType(type));
@@ -113832,7 +113785,7 @@ compare$5.getValues = getValues$1;
113832
113785
  compare$5.setValues = setValues$1;
113833
113786
  compare$5.getTemplateValues = getTemplateValues$1;
113834
113787
 
113835
- function compare$4(path, template, options = {}, equal = noop$2) {
113788
+ function compare$4(path, template, options = {}, equal = noop$1) {
113836
113789
  const {findUp = true} = options;
113837
113790
 
113838
113791
  if (!path && !template)
@@ -113892,7 +113845,7 @@ compare$5.compareAll = (path, templateNodes, options) => {
113892
113845
 
113893
113846
  // @babel/template creates empty array directives
113894
113847
  // extra duplicate value
113895
- const ignore$2 = [
113848
+ const ignore$1 = [
113896
113849
  'loc',
113897
113850
  'start',
113898
113851
  'end',
@@ -113925,7 +113878,7 @@ function superCompareIterate(node, template) {
113925
113878
  return false;
113926
113879
 
113927
113880
  for (const key of keys$2(template)) {
113928
- if (ignore$2.includes(key))
113881
+ if (ignore$1.includes(key))
113929
113882
  continue;
113930
113883
 
113931
113884
  const nodeValue = extractExpression(node[key]);
@@ -113945,7 +113898,7 @@ function superCompareIterate(node, template) {
113945
113898
  return true;
113946
113899
  }
113947
113900
 
113948
- const tryCatch$3 = tryCatch$7;
113901
+ const tryCatch$3 = tryCatch$5;
113949
113902
 
113950
113903
  const {
113951
113904
  compareAny: compareAny$1,
@@ -114536,7 +114489,7 @@ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
114536
114489
 
114537
114490
  const {EventEmitter} = require$$0$1;
114538
114491
 
114539
- progress.createProgress = () => {
114492
+ var createProgress$1 = progress.createProgress = () => {
114540
114493
  let pluginsCount = 0;
114541
114494
  let pluginsIndex = 0;
114542
114495
 
@@ -114590,7 +114543,7 @@ progress.createProgress = () => {
114590
114543
 
114591
114544
  var tryThrowWithReason$1 = {};
114592
114545
 
114593
- const tryCatch$2 = tryCatch$7;
114546
+ const tryCatch$2 = tryCatch$5;
114594
114547
 
114595
114548
  tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
114596
114549
  const [error, result] = tryCatch$2(fn, ...args);
@@ -114690,7 +114643,7 @@ function check$4(fn) {
114690
114643
  }
114691
114644
 
114692
114645
  const {entries: entries$4} = Object;
114693
- const {isArray: isArray$3} = Array;
114646
+ const {isArray: isArray$2} = Array;
114694
114647
 
114695
114648
  var findPath$1 = (parentPath) => {
114696
114649
  let current = {
@@ -114712,7 +114665,7 @@ function findKey(path, parent) {
114712
114665
  let value;
114713
114666
 
114714
114667
  for ([key, value] of entries$4(parent)) {
114715
- if (isArray$3(value)) {
114668
+ if (isArray$2(value)) {
114716
114669
  const index = value.indexOf(node);
114717
114670
 
114718
114671
  if (index >= 0)
@@ -115116,13 +115069,13 @@ const TS_EXCLUDE = [
115116
115069
  ];
115117
115070
 
115118
115071
  declare$1.declare = (declarations) => ({
115119
- report: report$4,
115072
+ report: report$3,
115120
115073
  include: include$1,
115121
115074
  fix: fix$3(declarations),
115122
115075
  filter: filter(declarations),
115123
115076
  });
115124
115077
 
115125
- const report$4 = (path) => {
115078
+ const report$3 = (path) => {
115126
115079
  const {name} = path.node;
115127
115080
  const peaceOfName = cutName(name);
115128
115081
 
@@ -115295,16 +115248,16 @@ const fullstore$1 = fullstore$3;
115295
115248
  const driverStore = fullstore$1();
115296
115249
 
115297
115250
  const {assign} = Object;
115298
- const noop$1 = () => {};
115251
+ const noop = () => {};
115299
115252
  const returns = (a) => () => a;
115300
115253
 
115301
115254
  const defaultFS = {
115302
- renameFile: noop$1,
115303
- removeFile: noop$1,
115304
- createDirectory: noop$1,
115255
+ renameFile: noop,
115256
+ removeFile: noop,
115257
+ createDirectory: noop,
115305
115258
  readFileContent: returns(''),
115306
- writeFileContent: noop$1,
115307
- copyFile: noop$1,
115259
+ writeFileContent: noop,
115260
+ copyFile: noop,
115308
115261
  };
115309
115262
 
115310
115263
  const maybeFS$1 = assign({}, defaultFS);
@@ -115395,7 +115348,7 @@ const {
115395
115348
  } = require$$0;
115396
115349
 
115397
115350
  const {types: types$8} = bundle$1;
115398
- const tryCatch$1 = tryCatch$7;
115351
+ const tryCatch$1 = tryCatch$5;
115399
115352
 
115400
115353
  const {
115401
115354
  setLiteralValue: setLiteralValue$1,
@@ -115418,8 +115371,8 @@ const {
115418
115371
  } = types$8;
115419
115372
 
115420
115373
  const isString$1 = (a) => typeof a === 'string';
115421
- const {isArray: isArray$2} = Array;
115422
- const maybeArray = (a) => isArray$2(a) ? a : [a];
115374
+ const {isArray: isArray$1} = Array;
115375
+ const maybeArray = (a) => isArray$1(a) ? a : [a];
115423
115376
 
115424
115377
  const toBase64 = (content) => {
115425
115378
  const [e, result] = tryCatch$1(btoa, content);
@@ -115507,7 +115460,7 @@ function findFile$5(node, name, exclude = []) {
115507
115460
  }
115508
115461
 
115509
115462
  function checkName(name) {
115510
- if (!isString$1(name) && !isArray$2(name))
115463
+ if (!isString$1(name) && !isArray$1(name))
115511
115464
  throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
115512
115465
  }
115513
115466
 
@@ -115988,7 +115941,7 @@ const {
115988
115941
  arrayExpression,
115989
115942
  } = types$6;
115990
115943
 
115991
- const {isArray: isArray$1} = Array;
115944
+ const {isArray} = Array;
115992
115945
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
115993
115946
 
115994
115947
  convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
@@ -116018,7 +115971,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
116018
115971
  const list = [];
116019
115972
 
116020
115973
  for (const name of names) {
116021
- if (isArray$1(name)) {
115974
+ if (isArray(name)) {
116022
115975
  list.push(arrayExpression([
116023
115976
  stringLiteral$2(name[0]),
116024
115977
  stringLiteral$2(name[1]),
@@ -116210,7 +116163,7 @@ const runFix = runFix$3;
116210
116163
  const mergeVisitors = mergeVisitors$1;
116211
116164
  const superFind = superFind$1;
116212
116165
  const template$2 = templateExports;
116213
- const {createProgress: createProgress$1} = progress;
116166
+ const {createProgress} = progress;
116214
116167
  const {tryThrowWithReason} = tryThrowWithReason$1;
116215
116168
 
116216
116169
  const {include} = includer;
@@ -116222,7 +116175,7 @@ const {getPath, getPosition} = getPosition$2;
116222
116175
  const debug = createDebug('putout:runner:find');
116223
116176
  const isRemoved = (a) => a?.removed;
116224
116177
 
116225
- lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress$1(), traverse = defaultTraverse}) => {
116178
+ lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress(), traverse = defaultTraverse}) => {
116226
116179
  let places = [];
116227
116180
 
116228
116181
  const merge = once(mergeVisitors);
@@ -116398,20 +116351,16 @@ function splitPlugins(plugins, {progress}) {
116398
116351
  };
116399
116352
  }
116400
116353
 
116401
- const loader = require$$1;
116402
- const runner = lib;
116403
- const {createProgress} = progress;
116404
-
116405
- defaultOptions$4.defaultOptions = (opts = {}) => {
116354
+ const defaultOptions$1 = (opts = {}) => {
116406
116355
  const {
116407
116356
  parser = 'babel',
116408
116357
  printer = opts.printer || 'putout',
116409
116358
  fix = true,
116410
116359
  fixCount = 3,
116411
- loadPlugins = loader.loadPlugins,
116412
- loadPluginsAsync = loader.loadPluginsAsync,
116413
- runPlugins = runner.runPlugins,
116414
- progress = createProgress(),
116360
+ loadPlugins: loadPlugins$1 = loadPlugins,
116361
+ loadPluginsAsync: loadPluginsAsync$1 = loadPluginsAsync,
116362
+ runPlugins = lib.runPlugins,
116363
+ progress = createProgress$1(),
116415
116364
  } = opts;
116416
116365
 
116417
116366
  return {
@@ -116420,16 +116369,29 @@ defaultOptions$4.defaultOptions = (opts = {}) => {
116420
116369
  printer,
116421
116370
  fix,
116422
116371
  fixCount,
116423
- loadPlugins,
116424
- loadPluginsAsync,
116372
+ loadPlugins: loadPlugins$1,
116373
+ loadPluginsAsync: loadPluginsAsync$1,
116425
116374
  runPlugins,
116426
116375
  progress,
116427
116376
  };
116428
116377
  };
116429
116378
 
116430
- var transform$5 = {};
116379
+ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
116380
+ __proto__: null,
116381
+ defaultOptions: defaultOptions$1
116382
+ });
116383
+
116384
+ var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
116431
116385
 
116432
- var parseError$2 = (e, type = 'parser') => {
116386
+ const tryCatch = (fn, ...args) => {
116387
+ try {
116388
+ return [null, fn(...args)];
116389
+ } catch(e) {
116390
+ return [e];
116391
+ }
116392
+ };
116393
+
116394
+ const parseError$1 = (e, type = 'parser') => {
116433
116395
  const {line, column} = e.loc || {
116434
116396
  line: 1,
116435
116397
  column: 1,
@@ -116450,13 +116412,6 @@ var parseError$2 = (e, type = 'parser') => {
116450
116412
 
116451
116413
  const cutBrackets = (a) => a.replace(/\s\(\d:\d+\)/, '');
116452
116414
 
116453
- const tryCatch = tryCatch$7;
116454
-
116455
- const {validateRulesRelations} = require$$1;
116456
- const {defaultOptions: defaultOptions$1} = defaultOptions$4;
116457
- const {cutShebang: cutShebang$1} = shebang;
116458
- const parseError$1 = parseError$2;
116459
-
116460
116415
  const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116461
116416
 
116462
116417
  // why we pass 'source' to 'transform()'?
@@ -116468,7 +116423,7 @@ const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116468
116423
  // 27 column,¬
116469
116424
  // 28 };¬
116470
116425
  //
116471
- transform$5.transform = (ast, source, opts) => {
116426
+ const transform$4 = (ast, source, opts) => {
116472
116427
  opts = defaultOptions$1(opts);
116473
116428
 
116474
116429
  const {
@@ -116510,7 +116465,7 @@ transform$5.transform = (ast, source, opts) => {
116510
116465
  ];
116511
116466
  };
116512
116467
 
116513
- transform$5.transformAsync = async (ast, source, opts) => {
116468
+ const transformAsync$1 = async (ast, source, opts) => {
116514
116469
  opts = defaultOptions$1(opts);
116515
116470
 
116516
116471
  const {
@@ -116552,78 +116507,35 @@ transform$5.transformAsync = async (ast, source, opts) => {
116552
116507
  ];
116553
116508
  };
116554
116509
 
116555
- var findPlaces$2 = {};
116510
+ var transform$5 = /*#__PURE__*/Object.freeze({
116511
+ __proto__: null,
116512
+ transform: transform$4,
116513
+ transformAsync: transformAsync$1
116514
+ });
116556
116515
 
116557
- const {transform: transform$4, transformAsync: transformAsync$1} = transform$5;
116516
+ var require$$4$1 = /*@__PURE__*/getAugmentedNamespace(transform$5);
116558
116517
 
116559
- findPlaces$2.findPlaces = (ast, source, opts) => {
116518
+ const findPlaces$2 = (ast, source, opts) => {
116560
116519
  return transform$4(ast, source, {
116561
116520
  ...opts,
116562
116521
  fix: false,
116563
116522
  });
116564
116523
  };
116565
116524
 
116566
- findPlaces$2.findPlacesAsync = async (ast, source, opts) => {
116525
+ const findPlacesAsync$1 = async (ast, source, opts) => {
116567
116526
  return await transformAsync$1(ast, source, {
116568
116527
  ...opts,
116569
116528
  fix: false,
116570
116529
  });
116571
116530
  };
116572
116531
 
116573
- const {isArray} = Array;
116574
- const noop = () => {};
116575
-
116576
- var report$3 = () => {
116577
- let filesCount = 0;
116578
- let errorsCount = 0;
116579
-
116580
- return async (formatter, options) => {
116581
- const {
116582
- name,
116583
- rule,
116584
- source,
116585
- places,
116586
- index = 0,
116587
- count = 1,
116588
- trace = noop,
116589
- formatterOptions = {},
116590
- } = options;
116591
-
116592
- if (!isArray(places))
116593
- throw Error(`☝️ Looks like for 'places: Places[]' you passed the wrong type: '${typeof places}'`);
116594
-
116595
- if (places.length)
116596
- ++filesCount;
116597
-
116598
- errorsCount += places.length;
116599
-
116600
- trace('progress', {
116601
- rule,
116602
- name,
116603
- options: formatterOptions,
116604
- source,
116605
- places,
116606
- index,
116607
- count,
116608
- filesCount,
116609
- errorsCount,
116610
- });
116611
-
116612
- return await formatter({
116613
- rule,
116614
- name,
116615
- options: formatterOptions,
116616
- source,
116617
- places,
116618
- index,
116619
- count,
116620
- filesCount,
116621
- errorsCount,
116622
- });
116623
- };
116624
- };
116532
+ var findPlaces$3 = /*#__PURE__*/Object.freeze({
116533
+ __proto__: null,
116534
+ findPlaces: findPlaces$2,
116535
+ findPlacesAsync: findPlacesAsync$1
116536
+ });
116625
116537
 
116626
- report$3.default;
116538
+ var require$$5 = /*@__PURE__*/getAugmentedNamespace(findPlaces$3);
116627
116539
 
116628
116540
  var traverse$5 = {};
116629
116541
 
@@ -124234,15 +124146,12 @@ keyword.isTSKeyword = (name) => {
124234
124146
 
124235
124147
  var matchFiles = {};
124236
124148
 
124237
- const {relative} = require$$0;
124238
- const ignore$1 = require$$1$2;
124239
-
124240
124149
  const isNegative = (a) => !a.indexOf('!');
124241
124150
  const positive = (a) => a.replace(/^!/, '');
124242
124151
 
124243
- var ignores$2 = (dirOpt, resolvedName, options = {}) => {
124152
+ const ignores$1 = (dirOpt, resolvedName, options = {}) => {
124244
124153
  const relativeName = relative(dirOpt, resolvedName);
124245
- const ignorer = ignore$1();
124154
+ const ignorer = noop$3();
124246
124155
  const ignoreList = mergeIgnores(options.ignore || []);
124247
124156
 
124248
124157
  ignorer.add(ignoreList);
@@ -124263,14 +124172,19 @@ function mergeIgnores(ignores) {
124263
124172
  return Array.from(noDuplicates);
124264
124173
  }
124265
124174
 
124266
- ignores$2.default;
124175
+ var ignores$2 = /*#__PURE__*/Object.freeze({
124176
+ __proto__: null,
124177
+ ignores: ignores$1
124178
+ });
124179
+
124180
+ var require$$4 = /*@__PURE__*/getAugmentedNamespace(ignores$2);
124267
124181
 
124268
124182
  const path = require$$0;
124269
124183
 
124270
124184
  const {parse: parse$2, print: print$1} = parser$5;
124271
- const {transform: transform$1} = transform$5;
124272
- const {findPlaces: findPlaces$1} = findPlaces$2;
124273
- const ignores$1 = ignores$2;
124185
+ const {transform: transform$1} = require$$4$1;
124186
+ const {findPlaces: findPlaces$1} = require$$5;
124187
+ const {ignores} = require$$4;
124274
124188
 
124275
124189
  const {toJS, fromJS} = json;
124276
124190
 
@@ -124345,7 +124259,7 @@ const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, prog
124345
124259
  filename: inputFilename,
124346
124260
  });
124347
124261
 
124348
- if (ignores$1(cwd, inputFilename, options))
124262
+ if (ignores(cwd, inputFilename, options))
124349
124263
  continue;
124350
124264
 
124351
124265
  allFiles.push({
@@ -124729,9 +124643,7 @@ function hasParens(path, printer = getPrinter(path)) {
124729
124643
  return /^(TS)?Parenthesized(Expression|Type)?$/.test(type);
124730
124644
  }
124731
124645
 
124732
- const {codeFrameColumns} = bundle$1;
124733
-
124734
- var codeframe$1 = ({source, error, highlightCode = true}) => {
124646
+ const codeframe$1 = ({source, error, highlightCode = true}) => {
124735
124647
  const {message, loc} = error;
124736
124648
 
124737
124649
  if (!loc)
@@ -124741,13 +124653,18 @@ var codeframe$1 = ({source, error, highlightCode = true}) => {
124741
124653
  start: loc,
124742
124654
  };
124743
124655
 
124744
- return codeFrameColumns(source, location, {
124656
+ return bundle$1.codeFrameColumns(source, location, {
124745
124657
  highlightCode,
124746
124658
  message,
124747
124659
  });
124748
124660
  };
124749
124661
 
124750
- codeframe$1.default;
124662
+ var codeframe$2 = /*#__PURE__*/Object.freeze({
124663
+ __proto__: null,
124664
+ codeframe: codeframe$1
124665
+ });
124666
+
124667
+ var require$$20 = /*@__PURE__*/getAugmentedNamespace(codeframe$2);
124751
124668
 
124752
124669
  const {traverse, types} = bundle$1;
124753
124670
  const {
@@ -124757,16 +124674,14 @@ const {
124757
124674
  template,
124758
124675
  } = parser$5;
124759
124676
 
124760
- const {cutShebang, mergeShebang} = shebang;
124761
- const {defaultOptions} = defaultOptions$4;
124762
- const {transform, transformAsync} = transform$5;
124677
+ const {cutShebang, mergeShebang} = require$$2;
124678
+ const {defaultOptions} = require$$3;
124679
+ const {transform, transformAsync} = require$$4$1;
124763
124680
 
124764
124681
  const {
124765
124682
  findPlaces,
124766
124683
  findPlacesAsync,
124767
- } = findPlaces$2;
124768
-
124769
- const isString = (a) => typeof a === 'string';
124684
+ } = require$$5;
124770
124685
 
124771
124686
  putout$1.exports = putout;
124772
124687
  var putout_2 = putout$1.exports.putout = putout;
@@ -124864,7 +124779,6 @@ var traverse_1 = putout$1.exports.traverse = traverse;
124864
124779
  var types_1 = putout$1.exports.types = types;
124865
124780
  var template_1 = putout$1.exports.template = template;
124866
124781
  var generate_1 = putout$1.exports.generate = generate;
124867
- var initReport = putout$1.exports.initReport = report$3;
124868
124782
 
124869
124783
  var operator = putout$1.exports.operator = {
124870
124784
  ...operate,
@@ -124883,14 +124797,14 @@ var operator = putout$1.exports.operator = {
124883
124797
  ...parens,
124884
124798
  };
124885
124799
 
124886
- var ignores = putout$1.exports.ignores = ignores$2;
124887
- var codeframe = putout$1.exports.codeframe = codeframe$1;
124800
+ const {codeframe} = require$$20;
124801
+ const isString = (a) => typeof a === 'string';
124802
+
124803
+ var codeframe_1 = putout$1.exports.codeframe = codeframe;
124888
124804
 
124889
124805
  function check(source) {
124890
124806
  if (!isString(source))
124891
124807
  throw Error(`☝️ Looks like 'source' has type '${typeof source}', expected: 'string'`);
124892
124808
  }
124893
124809
 
124894
- var putoutExports = putout$1.exports;
124895
-
124896
- 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 };
124810
+ 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 };