@putout/bundle 5.0.7 → 5.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -178,15 +178,15 @@ var versions = {};
178
178
  var release = {};
179
179
  var config = {};
180
180
 
181
- function noop$a() {}
181
+ function noop$8() {}
182
182
 
183
- var on = noop$a;
184
- var addListener = noop$a;
185
- var once$9 = noop$a;
186
- var off = noop$a;
187
- var removeListener = noop$a;
188
- var removeAllListeners = noop$a;
189
- var emit = noop$a;
183
+ var on = noop$8;
184
+ var addListener = noop$8;
185
+ var once$9 = noop$8;
186
+ var off = noop$8;
187
+ var removeListener = noop$8;
188
+ var removeAllListeners = noop$8;
189
+ var emit = noop$8;
190
190
 
191
191
  function binding(name) {
192
192
  throw new Error('process.binding is not supported');
@@ -482,7 +482,7 @@ function write (buffer, value, offset, isLE, mLen, nBytes) {
482
482
 
483
483
  var toString = {}.toString;
484
484
 
485
- var isArray$f = Array.isArray || function (arr) {
485
+ var isArray$d = Array.isArray || function (arr) {
486
486
  return toString.call(arr) == '[object Array]';
487
487
  };
488
488
 
@@ -766,7 +766,7 @@ function fromObject (that, obj) {
766
766
  return fromArrayLike(that, obj)
767
767
  }
768
768
 
769
- if (obj.type === 'Buffer' && isArray$f(obj.data)) {
769
+ if (obj.type === 'Buffer' && isArray$d(obj.data)) {
770
770
  return fromArrayLike(that, obj.data)
771
771
  }
772
772
  }
@@ -831,7 +831,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
831
831
  };
832
832
 
833
833
  Buffer.concat = function concat (list, length) {
834
- if (!isArray$f(list)) {
834
+ if (!isArray$d(list)) {
835
835
  throw new TypeError('"list" argument must be an Array of Buffers')
836
836
  }
837
837
 
@@ -2752,7 +2752,7 @@ var require_jsesc$1 = __commonJS$1({
2752
2752
  var index_exports$1 = {};
2753
2753
 
2754
2754
  __export$1(index_exports$1, {
2755
- codeFrameColumns: () => codeFrameColumns$3,
2755
+ codeFrameColumns: () => codeFrameColumns$2,
2756
2756
  generate: () => generate$7,
2757
2757
  parse: () => parse$7,
2758
2758
  parseExpression: () => parseExpression$2,
@@ -36520,7 +36520,7 @@ function getMarkerLines$1(loc, source, opts) {
36520
36520
  };
36521
36521
  }
36522
36522
 
36523
- function codeFrameColumns$3(rawLines, loc, opts = {}) {
36523
+ function codeFrameColumns$2(rawLines, loc, opts = {}) {
36524
36524
  const shouldHighlight = opts.forceColor || isColorSupported$1() && opts.highlightCode;
36525
36525
  const defs = getDefs$1(shouldHighlight);
36526
36526
  const lines = rawLines.split(NEWLINE$3);
@@ -36889,7 +36889,7 @@ function parseWithCodeFrame$1(code2, parserOpts, syntacticPlaceholders) {
36889
36889
  const loc = err.loc;
36890
36890
 
36891
36891
  if (loc) {
36892
- err.message += '\n' + codeFrameColumns$3(code2, {
36892
+ err.message += '\n' + codeFrameColumns$2(code2, {
36893
36893
  start: loc,
36894
36894
  });
36895
36895
  err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
@@ -47816,7 +47816,7 @@ function replaceWithSourceString$1(replacement) {
47816
47816
  const loc = err.loc;
47817
47817
 
47818
47818
  if (loc) {
47819
- err.message += ' - make sure this is an expression.\n' + codeFrameColumns$3(replacement, {
47819
+ err.message += ' - make sure this is an expression.\n' + codeFrameColumns$2(replacement, {
47820
47820
  start: {
47821
47821
  line: loc.line,
47822
47822
  column: loc.column + 1,
@@ -52148,7 +52148,7 @@ comment.parseComments = parseComments$7;
52148
52148
 
52149
52149
  const {parseComments: parseComments$6} = comment;
52150
52150
 
52151
- const noop$9 = () => {};
52151
+ const noop$7 = () => {};
52152
52152
  const parseParams = (path) => path.get('params');
52153
52153
 
52154
52154
  params.printParams = (path, printer, semantics, customization = {}) => {
@@ -52164,9 +52164,9 @@ params.printParams = (path, printer, semantics, customization = {}) => {
52164
52164
  braceOpen = '(',
52165
52165
  braceClose = ')',
52166
52166
  printSpace = print.space,
52167
- printAfterOpen = noop$9,
52168
- printBeforeClose = noop$9,
52169
- printAfterClose = noop$9,
52167
+ printAfterOpen = noop$7,
52168
+ printBeforeClose = noop$7,
52169
+ printAfterClose = noop$7,
52170
52170
  } = customization;
52171
52171
 
52172
52172
  if (typeParameters)
@@ -52964,12 +52964,12 @@ var callExpression$3 = {};
52964
52964
 
52965
52965
  const {exists: exists$c} = is$4;
52966
52966
  const {maybeParens: maybeParens$9} = maybeParens$e;
52967
- const {isArray: isArray$e} = Array;
52967
+ const {isArray: isArray$c} = Array;
52968
52968
 
52969
52969
  const parseArgs = (path) => {
52970
52970
  const argsPath = path.get('arguments');
52971
52971
 
52972
- if (!isArray$e(argsPath))
52972
+ if (!isArray$c(argsPath))
52973
52973
  return [];
52974
52974
 
52975
52975
  return argsPath;
@@ -55789,10 +55789,10 @@ maybeWriteBrace.condition = (path, printer, semantics) => {
55789
55789
  var sequenceExpressionComments = {};
55790
55790
 
55791
55791
  const {hasLeadingComment} = is$4;
55792
- const noop$8 = () => {};
55792
+ const noop$6 = () => {};
55793
55793
 
55794
- sequenceExpressionComments.printLeadingCommentLine = noop$8;
55795
- sequenceExpressionComments.printLeadingCommentBlock = noop$8;
55794
+ sequenceExpressionComments.printLeadingCommentLine = noop$6;
55795
+ sequenceExpressionComments.printLeadingCommentBlock = noop$6;
55796
55796
 
55797
55797
  sequenceExpressionComments.maybePrintComments = (path, {print}) => {
55798
55798
  if (hasLeadingComment(path)) {
@@ -58900,7 +58900,7 @@ var tsPropertySignature$1 = {exports: {}};
58900
58900
  var comments$1 = {};
58901
58901
 
58902
58902
  const {isPrev} = is$4;
58903
- const noop$7 = () => {};
58903
+ const noop$5 = () => {};
58904
58904
 
58905
58905
  comments$1.printLeadingCommentLine = (path, printer, semantics, {printComment}) => {
58906
58906
  const {print} = printer;
@@ -58917,7 +58917,7 @@ comments$1.printLeadingCommentBlock = (path, printer, semantics, {printComment})
58917
58917
  print.indent();
58918
58918
  };
58919
58919
 
58920
- comments$1.printTrailingCommentBlock = noop$7;
58920
+ comments$1.printTrailingCommentBlock = noop$5;
58921
58921
 
58922
58922
  (function (module) {
58923
58923
 
@@ -59356,7 +59356,7 @@ const {types: types$t} = bundle$1;
59356
59356
  const {createPrintSpace} = printFunctionParams$1;
59357
59357
  const {printParams: printParams$1} = params;
59358
59358
  const {isTSUnionType: isTSUnionType$1} = types$t;
59359
- const noop$6 = () => {};
59359
+ const noop$4 = () => {};
59360
59360
 
59361
59361
  tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semantics) => {
59362
59362
  const {print, indent} = printer;
@@ -59366,16 +59366,16 @@ tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semant
59366
59366
  printer,
59367
59367
  });
59368
59368
 
59369
- const printAfterOpen = !isNewline ? noop$6 : () => {
59369
+ const printAfterOpen = !isNewline ? noop$4 : () => {
59370
59370
  indent.inc();
59371
59371
  print.breakline();
59372
59372
  };
59373
59373
 
59374
- const printAfterClose = !isNewline ? noop$6 : () => {
59374
+ const printAfterClose = !isNewline ? noop$4 : () => {
59375
59375
  print.breakline();
59376
59376
  };
59377
59377
 
59378
- const printBeforeClose = !isNewline ? noop$6 : () => {
59378
+ const printBeforeClose = !isNewline ? noop$4 : () => {
59379
59379
  indent.dec();
59380
59380
  print.breakline();
59381
59381
  };
@@ -60136,7 +60136,7 @@ function snakeCase(str) {
60136
60136
 
60137
60137
  const process = require$$0$3;
60138
60138
  const toSnakeCase = justSnakeCase;
60139
- const {codeFrameColumns: codeFrameColumns$2} = bundle$1;
60139
+ const {codeFrameColumns: codeFrameColumns$1} = bundle$1;
60140
60140
  const {TYPES: TYPES$3} = types$19;
60141
60141
 
60142
60142
  const {stringify: stringify$7} = JSON;
@@ -60160,7 +60160,7 @@ debug$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) => {
@@ -60889,9 +60889,9 @@ babel$2.print = (ast, options) => {
60889
60889
  const putoutPrinter = printer;
60890
60890
  const babelPrinter = babel$2;
60891
60891
 
60892
- const {isArray: isArray$d} = Array;
60892
+ const {isArray: isArray$b} = Array;
60893
60893
 
60894
- const maybeArray$7 = (a) => isArray$d(a) ? a : [a, {}];
60894
+ const maybeArray$7 = (a) => isArray$b(a) ? a : [a, {}];
60895
60895
 
60896
60896
  var print$4 = (ast, options = {}) => {
60897
60897
  const [printer = 'putout', printerOptions] = maybeArray$7(options.printer);
@@ -61930,7 +61930,7 @@ var require_src = __commonJS({
61930
61930
  var index_exports = {};
61931
61931
 
61932
61932
  __export(index_exports, {
61933
- codeFrameColumns: () => codeFrameColumns$1,
61933
+ codeFrameColumns: () => codeFrameColumns,
61934
61934
  generate: () => generate$5,
61935
61935
  parse: () => parse$6,
61936
61936
  parseExpression: () => parseExpression$1,
@@ -95418,7 +95418,7 @@ function getMarkerLines(loc, source, opts) {
95418
95418
  };
95419
95419
  }
95420
95420
 
95421
- function codeFrameColumns$1(rawLines, loc, opts = {}) {
95421
+ function codeFrameColumns(rawLines, loc, opts = {}) {
95422
95422
  const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
95423
95423
  const defs = getDefs(shouldHighlight);
95424
95424
  const lines = rawLines.split(NEWLINE);
@@ -95805,7 +95805,7 @@ function parseWithCodeFrame(code2, parserOpts, syntacticPlaceholders) {
95805
95805
  const loc = err.loc;
95806
95806
 
95807
95807
  if (loc) {
95808
- err.message += '\n' + codeFrameColumns$1(code2, {
95808
+ err.message += '\n' + codeFrameColumns(code2, {
95809
95809
  start: loc,
95810
95810
  });
95811
95811
  err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
@@ -106642,7 +106642,7 @@ function replaceWithSourceString(replacement) {
106642
106642
  const loc = err.loc;
106643
106643
 
106644
106644
  if (loc) {
106645
- err.message += ' - make sure this is an expression.\n' + codeFrameColumns$1(replacement, {
106645
+ err.message += ' - make sure this is an expression.\n' + codeFrameColumns(replacement, {
106646
106646
  start: {
106647
106647
  line: loc.line,
106648
106648
  column: loc.column + 1,
@@ -110638,20 +110638,20 @@ function onceStrict (fn) {
110638
110638
 
110639
110639
  var onceExports = once$8.exports;
110640
110640
 
110641
- const noop$5 = () => {};
110641
+ const noop$3 = () => {};
110642
110642
 
110643
110643
  var empty = /*#__PURE__*/Object.freeze({
110644
110644
  __proto__: null,
110645
- default: noop$5
110645
+ default: noop$3
110646
110646
  });
110647
110647
 
110648
- var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(empty);
110648
+ var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(empty);
110649
110649
 
110650
110650
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110651
110651
 
110652
110652
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110653
110653
  function privateMethods(Parser) {
110654
- const ExtendedParser = noop$5();
110654
+ const ExtendedParser = noop$3();
110655
110655
 
110656
110656
  return class extends ExtendedParser {
110657
110657
  // Parse private methods
@@ -110677,7 +110677,7 @@ var acornPrivateMethods = /*#__PURE__*/Object.freeze({
110677
110677
  default: privateMethods
110678
110678
  });
110679
110679
 
110680
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110680
+ var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110681
110681
 
110682
110682
  var acornStage3;
110683
110683
  var hasRequiredAcornStage3;
@@ -110688,9 +110688,9 @@ function requireAcornStage3 () {
110688
110688
 
110689
110689
  acornStage3 = function(Parser) {
110690
110690
  return Parser.extend(
110691
- require$$1$2,
110692
- require$$1$2,
110693
- require$$2
110691
+ require$$1$1,
110692
+ require$$1$1,
110693
+ require$$2$1
110694
110694
  )
110695
110695
  };
110696
110696
  return acornStage3;
@@ -110699,10 +110699,10 @@ function requireAcornStage3 () {
110699
110699
  const once$6 = onceExports;
110700
110700
 
110701
110701
  const initAcorn = once$6(() => {
110702
- const {Parser} = require$$1$2;
110702
+ const {Parser} = require$$1$1;
110703
110703
 
110704
110704
  const stage3 = requireAcornStage3();
110705
- const typescript = require$$1$2.default;
110705
+ const typescript = require$$1$1.default;
110706
110706
 
110707
110707
  return Parser.extend(typescript(), stage3);
110708
110708
  });
@@ -110819,7 +110819,7 @@ function getBabelLangExts({isTS, isFlow, isJSX}) {
110819
110819
  var espree$1 = {};
110820
110820
 
110821
110821
  const once$4 = onceExports;
110822
- const initEspree = once$4(() => require$$1$2);
110822
+ const initEspree = once$4(() => require$$1$1);
110823
110823
 
110824
110824
  espree$1.parse = function espreeParse(source) {
110825
110825
  const {parse} = initEspree();
@@ -110840,7 +110840,7 @@ espree$1.parse = function espreeParse(source) {
110840
110840
  var esprima$1 = {};
110841
110841
 
110842
110842
  const once$3 = onceExports;
110843
- const initEsprima = once$3(() => require$$1$2);
110843
+ const initEsprima = once$3(() => require$$1$1);
110844
110844
 
110845
110845
  esprima$1.parse = function esprimaParse(source) {
110846
110846
  const {parse} = initEsprima();
@@ -110857,7 +110857,7 @@ esprima$1.parse = function esprimaParse(source) {
110857
110857
  var tenko$1 = {};
110858
110858
 
110859
110859
  const once$2 = onceExports;
110860
- const initTenko = once$2(() => require$$1$2);
110860
+ const initTenko = once$2(() => require$$1$1);
110861
110861
 
110862
110862
  tenko$1.parse = (source) => {
110863
110863
  const {Tenko} = initTenko();
@@ -110874,7 +110874,7 @@ tenko$1.parse = (source) => {
110874
110874
  var hermes$1 = {};
110875
110875
 
110876
110876
  const once$1 = onceExports;
110877
- const initHermes = once$1(() => require$$1$2);
110877
+ const initHermes = once$1(() => require$$1$1);
110878
110878
 
110879
110879
  hermes$1.parse = function hermesParse(source) {
110880
110880
  const parser = initHermes();
@@ -110890,7 +110890,7 @@ hermes$1.parse = function hermesParse(source) {
110890
110890
  return parser.parse(source, options);
110891
110891
  };
110892
110892
 
110893
- var tryCatch$7 = (fn, ...args) => {
110893
+ var tryCatch$6 = (fn, ...args) => {
110894
110894
  try {
110895
110895
  return [null, fn(...args)];
110896
110896
  } catch(e) {
@@ -110898,11 +110898,13 @@ var tryCatch$7 = (fn, ...args) => {
110898
110898
  }
110899
110899
  };
110900
110900
 
110901
- const tryCatch$6 = tryCatch$7;
110901
+ var tryCatch$7 = tryCatch$6.default;
110902
+
110903
+ const tryCatch$5 = tryCatch$6;
110902
110904
 
110903
110905
  var secondChance$1 = (fn, source, messages, args) => {
110904
110906
  const [a, ...others] = args;
110905
- const [errorA, resultA] = tryCatch$6(fn, source, a);
110907
+ const [errorA, resultA] = tryCatch$5(fn, source, a);
110906
110908
 
110907
110909
  if (!errorA)
110908
110910
  return resultA;
@@ -110911,7 +110913,7 @@ var secondChance$1 = (fn, source, messages, args) => {
110911
110913
  throw errorA;
110912
110914
 
110913
110915
  for (const b of others) {
110914
- const [errorB, resultB] = tryCatch$6(fn, source, b);
110916
+ const [errorB, resultB] = tryCatch$5(fn, source, b);
110915
110917
 
110916
110918
  if (!errorB)
110917
110919
  return resultB;
@@ -111002,10 +111004,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
111002
111004
 
111003
111005
  var tryThrowWithReason$3 = {};
111004
111006
 
111005
- const tryCatch$5 = tryCatch$7;
111007
+ const tryCatch$4 = tryCatch$6;
111006
111008
 
111007
111009
  tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
111008
- const [error, result] = tryCatch$5(fn, ...args);
111010
+ const [error, result] = tryCatch$4(fn, ...args);
111009
111011
 
111010
111012
  if (error) {
111011
111013
  error.reason = 'parse';
@@ -111185,12 +111187,12 @@ var nanoMemoize = /*#__PURE__*/Object.freeze({
111185
111187
  nanomemoize: $cf838c15c8b009ba$export$22f15dd4e5be7e52
111186
111188
  });
111187
111189
 
111188
- var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111190
+ var require$$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111189
111191
 
111190
111192
  (function (module) {
111191
111193
 
111192
111194
  const {types, template} = bundle$1;
111193
- const {nanomemoize} = require$$1$1;
111195
+ const {nanomemoize} = require$$1;
111194
111196
  const plugins = plugins$1;
111195
111197
  const options = options$1;
111196
111198
 
@@ -111282,16 +111284,14 @@ parser$5.parse = parse$4;
111282
111284
  parser$5.generate = generate$3;
111283
111285
  parser$5.template = template$9;
111284
111286
 
111285
- var shebang = {};
111286
-
111287
- shebang.mergeShebang = (shebang, source) => {
111287
+ const mergeShebang$1 = (shebang, source) => {
111288
111288
  if (!shebang)
111289
111289
  return source;
111290
111290
 
111291
111291
  return `${shebang}\n${source}`;
111292
111292
  };
111293
111293
 
111294
- shebang.cutShebang = (source) => {
111294
+ const cutShebang$1 = (source) => {
111295
111295
  if (source.indexOf('#'))
111296
111296
  return [source, ''];
111297
111297
 
@@ -111309,7 +111309,13 @@ shebang.cutShebang = (source) => {
111309
111309
  ];
111310
111310
  };
111311
111311
 
111312
- var defaultOptions$4 = {};
111312
+ var shebang = /*#__PURE__*/Object.freeze({
111313
+ __proto__: null,
111314
+ cutShebang: cutShebang$1,
111315
+ mergeShebang: mergeShebang$1
111316
+ });
111317
+
111318
+ var require$$2 = /*@__PURE__*/getAugmentedNamespace(shebang);
111313
111319
 
111314
111320
  // Copyright Joyent, Inc. and other Node contributors.
111315
111321
  //
@@ -111439,7 +111445,7 @@ function join$3() {
111439
111445
 
111440
111446
  // path.relative(from, to)
111441
111447
  // posix version
111442
- function relative$1(from, to) {
111448
+ function relative(from, to) {
111443
111449
  from = resolve(from).substr(1);
111444
111450
  to = resolve(to).substr(1);
111445
111451
 
@@ -111520,7 +111526,7 @@ var _polyfillNode_path = {
111520
111526
  dirname: dirname$2,
111521
111527
  sep: sep,
111522
111528
  delimiter: delimiter,
111523
- relative: relative$1,
111529
+ relative: relative,
111524
111530
  join: join$3,
111525
111531
  isAbsolute: isAbsolute,
111526
111532
  normalize: normalize,
@@ -111554,13 +111560,11 @@ var _polyfillNode_path$1 = /*#__PURE__*/Object.freeze({
111554
111560
  isAbsolute: isAbsolute,
111555
111561
  join: join$3,
111556
111562
  normalize: normalize,
111557
- relative: relative$1,
111563
+ relative: relative,
111558
111564
  resolve: resolve,
111559
111565
  sep: sep
111560
111566
  });
111561
111567
 
111562
- var module$1 = {};
111563
-
111564
111568
  var tryToCatch = async (fn, ...args) => {
111565
111569
  check$a(fn);
111566
111570
 
@@ -111578,19 +111582,25 @@ function check$a(fn) {
111578
111582
 
111579
111583
  var tryToCatch$1 = tryToCatch.default;
111580
111584
 
111585
+ var _module = {};
111586
+
111587
+ const returns$1 = (a) => () => a;
111588
+ const noop$2 = () => {};
111589
+
111590
+ const createRequire = (url, overrides = {}) => {
111591
+ const {module = _module} = overrides;
111592
+ const {createRequire = returns$1(noop$2)} = module;
111593
+
111594
+ return createRequire(url);
111595
+ };
111596
+
111581
111597
  // How in other way to mock import using mock require in CommonJS?
111582
111598
  const simpleImport = async (url) => {
111583
111599
  const result = await import(url);
111584
111600
  return result.default || result;
111585
111601
  };
111586
111602
 
111587
- const returns$2 = (a) => () => a;
111588
-
111589
- const noop$4 = () => {};
111590
-
111591
- const {createRequire: createRequire$1 = returns$2(noop$4)} = module$1;
111592
-
111593
- const require$1 = createRequire$1(import.meta.url);
111603
+ const require$1 = createRequire(import.meta.url);
111594
111604
 
111595
111605
  const {assign: assign$3} = Object;
111596
111606
  const stub$2 = () => () => {};
@@ -111686,20 +111696,20 @@ function buildPluginsDirs(name) {
111686
111696
  ];
111687
111697
  }
111688
111698
 
111689
- const isStr$4 = (a) => typeof a === 'string';
111690
- const {isArray: isArray$c} = Array;
111699
+ const isStr$3 = (a) => typeof a === 'string';
111700
+ const {isArray: isArray$a} = Array;
111691
111701
  const {entries: entries$9} = Object;
111692
111702
 
111693
111703
  const parsePluginNames = (plugins) => {
111694
111704
  const result = [];
111695
111705
 
111696
111706
  for (const plugin of plugins) {
111697
- if (isStr$4(plugin)) {
111707
+ if (isStr$3(plugin)) {
111698
111708
  result.push([plugin]);
111699
111709
  continue;
111700
111710
  }
111701
111711
 
111702
- if (isArray$c(plugin)) {
111712
+ if (isArray$a(plugin)) {
111703
111713
  const [pluginName, fn] = plugin;
111704
111714
  result.push([pluginName, fn]);
111705
111715
  continue;
@@ -111711,9 +111721,9 @@ const parsePluginNames = (plugins) => {
111711
111721
  return result;
111712
111722
  };
111713
111723
 
111714
- const {isArray: isArray$b} = Array;
111724
+ const {isArray: isArray$9} = Array;
111715
111725
  const isBool$2 = (a) => typeof a === 'boolean';
111716
- const isStr$3 = (a) => typeof a === 'string';
111726
+ const isStr$2 = (a) => typeof a === 'string';
111717
111727
  const isObj = (a) => typeof a === 'object';
111718
111728
  const {entries: entries$8} = Object;
111719
111729
  const {stringify: stringify$6} = JSON;
@@ -111721,7 +111731,7 @@ const {stringify: stringify$6} = JSON;
111721
111731
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
111722
111732
  const rulesUsedInsteadOfMatchError = (a) => Error(`☝️ Looks like you need to change "rules" to "match" for ${stringify$6(a)}`);
111723
111733
  const stateOptionError = ({rule, value}) => Error(`☝️ ${rule}: state option can be "on" or "off" only, when used as string, received: "${value}"`);
111724
- const defaultOptions$3 = () => Object.create(null);
111734
+ const defaultOptions$4 = () => Object.create(null);
111725
111735
 
111726
111736
  const parseState = (rule, value) => {
111727
111737
  validateState(rule, value);
@@ -111743,13 +111753,13 @@ const parseRules = (rules) => {
111743
111753
  check$9(rules);
111744
111754
 
111745
111755
  for (const [rule, value] of entries$8(rules)) {
111746
- if (isStr$3(value)) {
111756
+ if (isStr$2(value)) {
111747
111757
  result.push({
111748
111758
  rule,
111749
111759
  state: parseState(rule, value),
111750
111760
  plugin,
111751
111761
  msg,
111752
- options: defaultOptions$3(),
111762
+ options: defaultOptions$4(),
111753
111763
  });
111754
111764
  continue;
111755
111765
  }
@@ -111760,12 +111770,12 @@ const parseRules = (rules) => {
111760
111770
  state: value,
111761
111771
  plugin,
111762
111772
  msg,
111763
- options: defaultOptions$3(),
111773
+ options: defaultOptions$4(),
111764
111774
  });
111765
111775
  continue;
111766
111776
  }
111767
111777
 
111768
- const looksLikeArray = isArray$b(value);
111778
+ const looksLikeArray = isArray$9(value);
111769
111779
  const looksLikeNormalArray = looksLikeArray && value.length;
111770
111780
 
111771
111781
  if (looksLikeNormalArray) {
@@ -111843,11 +111853,11 @@ const enableNestedRules = (rules) => {
111843
111853
  };
111844
111854
 
111845
111855
  function check$9(rules) {
111846
- if (isArray$b(rules))
111856
+ if (isArray$9(rules))
111847
111857
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
111848
111858
  }
111849
111859
 
111850
- const defaultOptions$2 = () => Object.create(null);
111860
+ const defaultOptions$3 = () => Object.create(null);
111851
111861
 
111852
111862
  const mergeRules = ([rule, plugin], rules) => {
111853
111863
  for (const currentRule of rules) {
@@ -111868,7 +111878,7 @@ const mergeRules = ([rule, plugin], rules) => {
111868
111878
  rule,
111869
111879
  plugin,
111870
111880
  msg: '',
111871
- options: defaultOptions$2(),
111881
+ options: defaultOptions$3(),
111872
111882
  };
111873
111883
  };
111874
111884
 
@@ -111960,7 +111970,7 @@ const checkRule = (rule) => {
111960
111970
  throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
111961
111971
  };
111962
111972
 
111963
- const validateRulesRelations$1 = (options) => {
111973
+ const validateRulesRelations = (options) => {
111964
111974
  check$8(options);
111965
111975
 
111966
111976
  const {pluginNames = [], rules = {}} = options;
@@ -112008,8 +112018,8 @@ var validatePlugin = ({plugin, rule}) => {
112008
112018
  throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
112009
112019
  };
112010
112020
 
112011
- const {isArray: isArray$a} = Array;
112012
- const maybeTuple = (a) => isArray$a(a) ? a : ['on', a];
112021
+ const {isArray: isArray$8} = Array;
112022
+ const maybeTuple = (a) => isArray$8(a) ? a : ['on', a];
112013
112023
 
112014
112024
  // Would be great to have ability to filter
112015
112025
  // disabled plugins and prevent them from loading
@@ -112139,11 +112149,7 @@ function parseRuleName(rule) {
112139
112149
  return rule;
112140
112150
  }
112141
112151
 
112142
- const noop$3 = () => {};
112143
- const returns$1 = (a) => () => a;
112144
-
112145
- const {createRequire = returns$1(noop$3)} = module$1;
112146
- const {isArray: isArray$9} = Array;
112152
+ const {isArray: isArray$7} = Array;
112147
112153
 
112148
112154
  const loadPlugins = (options) => {
112149
112155
  check$8(options);
@@ -112175,7 +112181,7 @@ const parseRule = (rule) => rule
112175
112181
  .replace('import:@putout/plugin-', '')
112176
112182
  .replace('@putout/plugin-', '');
112177
112183
 
112178
- const maybeFromTuple = (a) => isArray$9(a) ? a[1] : a;
112184
+ const maybeFromTuple = (a) => isArray$7(a) ? a[1] : a;
112179
112185
 
112180
112186
  function loadAllPlugins({items, loadedRules}) {
112181
112187
  const plugins = [];
@@ -112234,75 +112240,6 @@ function loadOnePlugin({name, namespace}) {
112234
112240
  });
112235
112241
  }
112236
112242
 
112237
- const isStr$2 = (a) => typeof a === 'string';
112238
- const {isArray: isArray$8} = Array;
112239
-
112240
- const isOn = (a) => a === 'on';
112241
- const isOff = (a) => a === 'off';
112242
-
112243
- var parseProcessorNames = (plugins) => {
112244
- const result = [];
112245
-
112246
- for (const plugin of plugins) {
112247
- if (isStr$2(plugin)) {
112248
- result.push([plugin]);
112249
- continue;
112250
- }
112251
-
112252
- if (isArray$8(plugin)) {
112253
- const [pluginName, fn] = plugin;
112254
-
112255
- if (isOff(fn))
112256
- continue;
112257
-
112258
- if (isOn(fn)) {
112259
- result.push([pluginName]);
112260
- continue;
112261
- }
112262
-
112263
- result.push([pluginName, fn]);
112264
- continue;
112265
- }
112266
- }
112267
-
112268
- return result;
112269
- };
112270
-
112271
- const loadProcessorsAsync = async (options, simpleImport) => {
112272
- check$8(options);
112273
-
112274
- const {processors = []} = options;
112275
- const parsedProcessors = parseProcessorNames(processors);
112276
-
112277
- const loadProcessor = createAsyncLoader('processor', {
112278
- simpleImport,
112279
- });
112280
-
112281
- const list = [];
112282
-
112283
- for (const [name, fn] of parsedProcessors) {
112284
- if (fn) {
112285
- list.push(fn);
112286
- continue;
112287
- }
112288
-
112289
- list.push(loadProcessor(name));
112290
- }
112291
-
112292
- return await Promise.all(list);
112293
- };
112294
-
112295
- var lib$1 = /*#__PURE__*/Object.freeze({
112296
- __proto__: null,
112297
- createAsyncLoader: createAsyncLoader,
112298
- loadPlugins: loadPlugins,
112299
- loadPluginsAsync: loadPluginsAsync,
112300
- loadProcessorsAsync: loadProcessorsAsync,
112301
- validateRulesRelations: validateRulesRelations$1
112302
- });
112303
-
112304
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(lib$1);
112305
-
112306
112243
  var lib = {};
112307
112244
 
112308
112245
  var debug$7 = {};
@@ -112339,7 +112276,7 @@ debug$7.createDebug = (namespace) => {
112339
112276
  });
112340
112277
  };
112341
112278
 
112342
- const tryCatch$4 = tryCatch$7;
112279
+ const tryCatch$3 = tryCatch$6;
112343
112280
  const {createDebug: createDebug$7} = debug$7;
112344
112281
 
112345
112282
  const {stringify: stringify$5} = JSON;
@@ -112365,7 +112302,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
112365
112302
  };
112366
112303
 
112367
112304
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
112368
- const [e] = tryCatch$4(fix, ...chooseFixArgs({
112305
+ const [e] = tryCatch$3(fix, ...chooseFixArgs({
112369
112306
  path,
112370
112307
  pathOptions,
112371
112308
  options,
@@ -112441,8 +112378,8 @@ function validatePath(path) {
112441
112378
  throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
112442
112379
  }
112443
112380
 
112444
- const {isArray: isArray$7} = Array;
112445
- const maybeArray$6 = (a) => isArray$7(a) ? a : [a];
112381
+ const {isArray: isArray$6} = Array;
112382
+ const maybeArray$6 = (a) => isArray$6(a) ? a : [a];
112446
112383
 
112447
112384
  var maybeArray_1 = (a) => {
112448
112385
  if (!a)
@@ -112983,7 +112920,7 @@ const isBool$1 = (a, b) => {
112983
112920
  };
112984
112921
 
112985
112922
  const isEqualType$1 = (a, b) => a.type === b.type;
112986
- const {isArray: isArray$6} = Array;
112923
+ const {isArray: isArray$5} = Array;
112987
112924
 
112988
112925
  is$2.isId = isId$2;
112989
112926
  is$2.isBool = isBool$1;
@@ -113006,7 +112943,7 @@ is$2.isAnyLiteral = (a, b) => {
113006
112943
  };
113007
112944
 
113008
112945
  is$2.isArgs = (a) => {
113009
- const b = !isArray$6(a) ? a : a[0];
112946
+ const b = !isArray$5(a) ? a : a[0];
113010
112947
 
113011
112948
  return isIdentifier$4(b, {
113012
112949
  name: ARGS,
@@ -113036,12 +112973,12 @@ is$2.isEqualTypeParams = (a, b) => {
113036
112973
  };
113037
112974
 
113038
112975
  is$2.isLinkedArgs = (a) => {
113039
- const b = !isArray$6(a) ? a : a[0];
112976
+ const b = !isArray$5(a) ? a : a[0];
113040
112977
  return isIdentifier$4(b) && LINKED_ARGS.test(b.name);
113041
112978
  };
113042
112979
 
113043
112980
  is$2.isJSXChildren = (a) => {
113044
- const b = !isArray$6(a) ? a : a[0];
112981
+ const b = !isArray$5(a) ? a : a[0];
113045
112982
 
113046
112983
  return isJSXText$2(b, {
113047
112984
  value: JSX_CHILDREN,
@@ -113049,7 +112986,7 @@ is$2.isJSXChildren = (a) => {
113049
112986
  };
113050
112987
 
113051
112988
  is$2.isJSXAttributes = (a) => {
113052
- const b = !isArray$6(a) ? a : a[0];
112989
+ const b = !isArray$5(a) ? a : a[0];
113053
112990
 
113054
112991
  if (!isJSXAttribute$1(b))
113055
112992
  return false;
@@ -113081,27 +113018,27 @@ is$2.isLinkedRegExp = (a, b) => {
113081
113018
  };
113082
113019
 
113083
113020
  is$2.isPath = (path) => Boolean(path.node);
113084
- is$2.isArray = isArray$6;
113021
+ is$2.isArray = isArray$5;
113085
113022
 
113086
113023
  is$2.isObject = (a) => {
113087
113024
  if (!a)
113088
113025
  return false;
113089
113026
 
113090
- if (isArray$6(a))
113027
+ if (isArray$5(a))
113091
113028
  return false;
113092
113029
 
113093
113030
  return typeof a === 'object';
113094
113031
  };
113095
113032
 
113096
113033
  is$2.isArrays = (a, b) => {
113097
- if (!isArray$6(a) || !isArray$6(b))
113034
+ if (!isArray$5(a) || !isArray$5(b))
113098
113035
  return false;
113099
113036
 
113100
113037
  return a.length === b.length;
113101
113038
  };
113102
113039
 
113103
113040
  is$2.isImports = (a) => {
113104
- const b = !isArray$6(a) ? a : a[0];
113041
+ const b = !isArray$5(a) ? a : a[0];
113105
113042
 
113106
113043
  if (!isImportDefaultSpecifier(b))
113107
113044
  return false;
@@ -113112,7 +113049,7 @@ is$2.isImports = (a) => {
113112
113049
  };
113113
113050
 
113114
113051
  is$2.isExports = (a) => {
113115
- const b = !isArray$6(a) ? a : a[0];
113052
+ const b = !isArray$5(a) ? a : a[0];
113116
113053
 
113117
113054
  if (!isExportSpecifier(b))
113118
113055
  return false;
@@ -113425,7 +113362,7 @@ debug$4.createDebug = (namespace) => {
113425
113362
  const {createDebug: createDebug$5} = debug$4;
113426
113363
  const debug$3 = createDebug$5('putout:compare');
113427
113364
 
113428
- const {isArray: isArray$5} = Array;
113365
+ const {isArray: isArray$4} = Array;
113429
113366
  const isObject$4 = (a) => a && typeof a === 'object';
113430
113367
 
113431
113368
  log$5.exports = (a, b) => {
@@ -113440,7 +113377,7 @@ log$5.exports = (a, b) => {
113440
113377
 
113441
113378
  log$5.exports._parseValue = parseValue;
113442
113379
  function parseValue(a) {
113443
- if (isArray$5(a) && a[0]) {
113380
+ if (isArray$4(a) && a[0]) {
113444
113381
  const [{
113445
113382
  type,
113446
113383
  name,
@@ -113796,13 +113733,13 @@ const {extractExpression} = template$5;
113796
113733
  const addWaterMark = (a) => a;
113797
113734
 
113798
113735
  const {keys: keys$2} = Object;
113799
- const {isArray: isArray$4} = Array;
113800
- const noop$2 = () => {};
113801
- const isEmptyArray = (a) => isArray$4(a) && !a.length;
113736
+ const {isArray: isArray$3} = Array;
113737
+ const noop$1 = () => {};
113738
+ const isEmptyArray = (a) => isArray$3(a) && !a.length;
113802
113739
 
113803
113740
  const compareType = (type) => (path) => path.type === type;
113804
113741
  const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
113805
- const maybeArray$4 = (a) => isArray$4(a) ? a : [a];
113742
+ const maybeArray$4 = (a) => isArray$3(a) ? a : [a];
113806
113743
 
113807
113744
  const findParent = (path, type) => {
113808
113745
  const newPathNode = path.findParent(compareType(type));
@@ -113832,7 +113769,7 @@ compare$5.getValues = getValues$1;
113832
113769
  compare$5.setValues = setValues$1;
113833
113770
  compare$5.getTemplateValues = getTemplateValues$1;
113834
113771
 
113835
- function compare$4(path, template, options = {}, equal = noop$2) {
113772
+ function compare$4(path, template, options = {}, equal = noop$1) {
113836
113773
  const {findUp = true} = options;
113837
113774
 
113838
113775
  if (!path && !template)
@@ -113892,7 +113829,7 @@ compare$5.compareAll = (path, templateNodes, options) => {
113892
113829
 
113893
113830
  // @babel/template creates empty array directives
113894
113831
  // extra duplicate value
113895
- const ignore$2 = [
113832
+ const ignore$1 = [
113896
113833
  'loc',
113897
113834
  'start',
113898
113835
  'end',
@@ -113925,7 +113862,7 @@ function superCompareIterate(node, template) {
113925
113862
  return false;
113926
113863
 
113927
113864
  for (const key of keys$2(template)) {
113928
- if (ignore$2.includes(key))
113865
+ if (ignore$1.includes(key))
113929
113866
  continue;
113930
113867
 
113931
113868
  const nodeValue = extractExpression(node[key]);
@@ -113945,7 +113882,7 @@ function superCompareIterate(node, template) {
113945
113882
  return true;
113946
113883
  }
113947
113884
 
113948
- const tryCatch$3 = tryCatch$7;
113885
+ const tryCatch$2 = tryCatch$6;
113949
113886
 
113950
113887
  const {
113951
113888
  compareAny: compareAny$1,
@@ -114040,7 +113977,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
114040
113977
  if (!isFn$2(fn))
114041
113978
  throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
114042
113979
 
114043
- const [e] = tryCatch$3(fn, path);
113980
+ const [e] = tryCatch$2(fn, path);
114044
113981
 
114045
113982
  if (e) {
114046
113983
  e.rule = rule;
@@ -114536,7 +114473,7 @@ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
114536
114473
 
114537
114474
  const {EventEmitter} = require$$0$1;
114538
114475
 
114539
- progress.createProgress = () => {
114476
+ var createProgress$1 = progress.createProgress = () => {
114540
114477
  let pluginsCount = 0;
114541
114478
  let pluginsIndex = 0;
114542
114479
 
@@ -114590,10 +114527,10 @@ progress.createProgress = () => {
114590
114527
 
114591
114528
  var tryThrowWithReason$1 = {};
114592
114529
 
114593
- const tryCatch$2 = tryCatch$7;
114530
+ const tryCatch$1 = tryCatch$6;
114594
114531
 
114595
114532
  tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
114596
- const [error, result] = tryCatch$2(fn, ...args);
114533
+ const [error, result] = tryCatch$1(fn, ...args);
114597
114534
 
114598
114535
  if (error) {
114599
114536
  error.reason ??= 'traverse';
@@ -114690,7 +114627,7 @@ function check$4(fn) {
114690
114627
  }
114691
114628
 
114692
114629
  const {entries: entries$4} = Object;
114693
- const {isArray: isArray$3} = Array;
114630
+ const {isArray: isArray$2} = Array;
114694
114631
 
114695
114632
  var findPath$1 = (parentPath) => {
114696
114633
  let current = {
@@ -114712,7 +114649,7 @@ function findKey(path, parent) {
114712
114649
  let value;
114713
114650
 
114714
114651
  for ([key, value] of entries$4(parent)) {
114715
- if (isArray$3(value)) {
114652
+ if (isArray$2(value)) {
114716
114653
  const index = value.indexOf(node);
114717
114654
 
114718
114655
  if (index >= 0)
@@ -115116,13 +115053,13 @@ const TS_EXCLUDE = [
115116
115053
  ];
115117
115054
 
115118
115055
  declare$1.declare = (declarations) => ({
115119
- report: report$4,
115056
+ report: report$3,
115120
115057
  include: include$1,
115121
115058
  fix: fix$3(declarations),
115122
115059
  filter: filter(declarations),
115123
115060
  });
115124
115061
 
115125
- const report$4 = (path) => {
115062
+ const report$3 = (path) => {
115126
115063
  const {name} = path.node;
115127
115064
  const peaceOfName = cutName(name);
115128
115065
 
@@ -115295,16 +115232,16 @@ const fullstore$1 = fullstore$3;
115295
115232
  const driverStore = fullstore$1();
115296
115233
 
115297
115234
  const {assign} = Object;
115298
- const noop$1 = () => {};
115235
+ const noop = () => {};
115299
115236
  const returns = (a) => () => a;
115300
115237
 
115301
115238
  const defaultFS = {
115302
- renameFile: noop$1,
115303
- removeFile: noop$1,
115304
- createDirectory: noop$1,
115239
+ renameFile: noop,
115240
+ removeFile: noop,
115241
+ createDirectory: noop,
115305
115242
  readFileContent: returns(''),
115306
- writeFileContent: noop$1,
115307
- copyFile: noop$1,
115243
+ writeFileContent: noop,
115244
+ copyFile: noop,
115308
115245
  };
115309
115246
 
115310
115247
  const maybeFS$1 = assign({}, defaultFS);
@@ -115395,7 +115332,7 @@ const {
115395
115332
  } = require$$0;
115396
115333
 
115397
115334
  const {types: types$8} = bundle$1;
115398
- const tryCatch$1 = tryCatch$7;
115335
+ const tryCatch = tryCatch$6;
115399
115336
 
115400
115337
  const {
115401
115338
  setLiteralValue: setLiteralValue$1,
@@ -115418,11 +115355,11 @@ const {
115418
115355
  } = types$8;
115419
115356
 
115420
115357
  const isString$1 = (a) => typeof a === 'string';
115421
- const {isArray: isArray$2} = Array;
115422
- const maybeArray = (a) => isArray$2(a) ? a : [a];
115358
+ const {isArray: isArray$1} = Array;
115359
+ const maybeArray = (a) => isArray$1(a) ? a : [a];
115423
115360
 
115424
115361
  const toBase64 = (content) => {
115425
- const [e, result] = tryCatch$1(btoa, content);
115362
+ const [e, result] = tryCatch(btoa, content);
115426
115363
 
115427
115364
  if (e)
115428
115365
  return btoa(escape(content));
@@ -115434,7 +115371,7 @@ const fromBase64 = (content) => {
115434
115371
  if (content.includes(' '))
115435
115372
  return content;
115436
115373
 
115437
- const [e, decoded] = tryCatch$1(atob, content);
115374
+ const [e, decoded] = tryCatch(atob, content);
115438
115375
 
115439
115376
  if (!e)
115440
115377
  return unescape(decoded);
@@ -115507,7 +115444,7 @@ function findFile$5(node, name, exclude = []) {
115507
115444
  }
115508
115445
 
115509
115446
  function checkName(name) {
115510
- if (!isString$1(name) && !isArray$2(name))
115447
+ if (!isString$1(name) && !isArray$1(name))
115511
115448
  throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
115512
115449
  }
115513
115450
 
@@ -115988,7 +115925,7 @@ const {
115988
115925
  arrayExpression,
115989
115926
  } = types$6;
115990
115927
 
115991
- const {isArray: isArray$1} = Array;
115928
+ const {isArray} = Array;
115992
115929
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
115993
115930
 
115994
115931
  convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
@@ -116018,7 +115955,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
116018
115955
  const list = [];
116019
115956
 
116020
115957
  for (const name of names) {
116021
- if (isArray$1(name)) {
115958
+ if (isArray(name)) {
116022
115959
  list.push(arrayExpression([
116023
115960
  stringLiteral$2(name[0]),
116024
115961
  stringLiteral$2(name[1]),
@@ -116210,7 +116147,7 @@ const runFix = runFix$3;
116210
116147
  const mergeVisitors = mergeVisitors$1;
116211
116148
  const superFind = superFind$1;
116212
116149
  const template$2 = templateExports;
116213
- const {createProgress: createProgress$1} = progress;
116150
+ const {createProgress} = progress;
116214
116151
  const {tryThrowWithReason} = tryThrowWithReason$1;
116215
116152
 
116216
116153
  const {include} = includer;
@@ -116222,7 +116159,7 @@ const {getPath, getPosition} = getPosition$2;
116222
116159
  const debug = createDebug('putout:runner:find');
116223
116160
  const isRemoved = (a) => a?.removed;
116224
116161
 
116225
- lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress$1(), traverse = defaultTraverse}) => {
116162
+ lib.runPlugins = ({ast, shebang, fix, fixCount = 2, plugins, progress = createProgress(), traverse = defaultTraverse}) => {
116226
116163
  let places = [];
116227
116164
 
116228
116165
  const merge = once(mergeVisitors);
@@ -116398,20 +116335,16 @@ function splitPlugins(plugins, {progress}) {
116398
116335
  };
116399
116336
  }
116400
116337
 
116401
- const loader = require$$1;
116402
- const runner = lib;
116403
- const {createProgress} = progress;
116404
-
116405
- defaultOptions$4.defaultOptions = (opts = {}) => {
116338
+ const defaultOptions$1 = (opts = {}) => {
116406
116339
  const {
116407
116340
  parser = 'babel',
116408
116341
  printer = opts.printer || 'putout',
116409
116342
  fix = true,
116410
116343
  fixCount = 3,
116411
- loadPlugins = loader.loadPlugins,
116412
- loadPluginsAsync = loader.loadPluginsAsync,
116413
- runPlugins = runner.runPlugins,
116414
- progress = createProgress(),
116344
+ loadPlugins: loadPlugins$1 = loadPlugins,
116345
+ loadPluginsAsync: loadPluginsAsync$1 = loadPluginsAsync,
116346
+ runPlugins = lib.runPlugins,
116347
+ progress = createProgress$1(),
116415
116348
  } = opts;
116416
116349
 
116417
116350
  return {
@@ -116420,16 +116353,21 @@ defaultOptions$4.defaultOptions = (opts = {}) => {
116420
116353
  printer,
116421
116354
  fix,
116422
116355
  fixCount,
116423
- loadPlugins,
116424
- loadPluginsAsync,
116356
+ loadPlugins: loadPlugins$1,
116357
+ loadPluginsAsync: loadPluginsAsync$1,
116425
116358
  runPlugins,
116426
116359
  progress,
116427
116360
  };
116428
116361
  };
116429
116362
 
116430
- var transform$5 = {};
116363
+ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
116364
+ __proto__: null,
116365
+ defaultOptions: defaultOptions$1
116366
+ });
116367
+
116368
+ var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
116431
116369
 
116432
- var parseError$2 = (e, type = 'parser') => {
116370
+ const parseError$1 = (e, type = 'parser') => {
116433
116371
  const {line, column} = e.loc || {
116434
116372
  line: 1,
116435
116373
  column: 1,
@@ -116450,13 +116388,6 @@ var parseError$2 = (e, type = 'parser') => {
116450
116388
 
116451
116389
  const cutBrackets = (a) => a.replace(/\s\(\d:\d+\)/, '');
116452
116390
 
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
116391
  const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116461
116392
 
116462
116393
  // why we pass 'source' to 'transform()'?
@@ -116468,7 +116399,7 @@ const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116468
116399
  // 27 column,¬
116469
116400
  // 28 };¬
116470
116401
  //
116471
- transform$5.transform = (ast, source, opts) => {
116402
+ const transform$4 = (ast, source, opts) => {
116472
116403
  opts = defaultOptions$1(opts);
116473
116404
 
116474
116405
  const {
@@ -116484,7 +116415,7 @@ transform$5.transform = (ast, source, opts) => {
116484
116415
 
116485
116416
  const [, shebang] = cutShebang$1(source);
116486
116417
 
116487
- const [validationError] = tryCatch(validateRulesRelations, {
116418
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116488
116419
  rules,
116489
116420
  pluginNames,
116490
116421
  });
@@ -116510,7 +116441,7 @@ transform$5.transform = (ast, source, opts) => {
116510
116441
  ];
116511
116442
  };
116512
116443
 
116513
- transform$5.transformAsync = async (ast, source, opts) => {
116444
+ const transformAsync$1 = async (ast, source, opts) => {
116514
116445
  opts = defaultOptions$1(opts);
116515
116446
 
116516
116447
  const {
@@ -116526,7 +116457,7 @@ transform$5.transformAsync = async (ast, source, opts) => {
116526
116457
 
116527
116458
  const [, shebang] = cutShebang$1(source);
116528
116459
 
116529
- const [validationError] = tryCatch(validateRulesRelations, {
116460
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116530
116461
  rules,
116531
116462
  pluginNames,
116532
116463
  });
@@ -116552,78 +116483,35 @@ transform$5.transformAsync = async (ast, source, opts) => {
116552
116483
  ];
116553
116484
  };
116554
116485
 
116555
- var findPlaces$2 = {};
116486
+ var transform$5 = /*#__PURE__*/Object.freeze({
116487
+ __proto__: null,
116488
+ transform: transform$4,
116489
+ transformAsync: transformAsync$1
116490
+ });
116556
116491
 
116557
- const {transform: transform$4, transformAsync: transformAsync$1} = transform$5;
116492
+ var require$$4$1 = /*@__PURE__*/getAugmentedNamespace(transform$5);
116558
116493
 
116559
- findPlaces$2.findPlaces = (ast, source, opts) => {
116494
+ const findPlaces$2 = (ast, source, opts) => {
116560
116495
  return transform$4(ast, source, {
116561
116496
  ...opts,
116562
116497
  fix: false,
116563
116498
  });
116564
116499
  };
116565
116500
 
116566
- findPlaces$2.findPlacesAsync = async (ast, source, opts) => {
116501
+ const findPlacesAsync$1 = async (ast, source, opts) => {
116567
116502
  return await transformAsync$1(ast, source, {
116568
116503
  ...opts,
116569
116504
  fix: false,
116570
116505
  });
116571
116506
  };
116572
116507
 
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
- };
116508
+ var findPlaces$3 = /*#__PURE__*/Object.freeze({
116509
+ __proto__: null,
116510
+ findPlaces: findPlaces$2,
116511
+ findPlacesAsync: findPlacesAsync$1
116512
+ });
116625
116513
 
116626
- report$3.default;
116514
+ var require$$5 = /*@__PURE__*/getAugmentedNamespace(findPlaces$3);
116627
116515
 
116628
116516
  var traverse$5 = {};
116629
116517
 
@@ -124234,15 +124122,12 @@ keyword.isTSKeyword = (name) => {
124234
124122
 
124235
124123
  var matchFiles = {};
124236
124124
 
124237
- const {relative} = require$$0;
124238
- const ignore$1 = require$$1$2;
124239
-
124240
124125
  const isNegative = (a) => !a.indexOf('!');
124241
124126
  const positive = (a) => a.replace(/^!/, '');
124242
124127
 
124243
- var ignores$2 = (dirOpt, resolvedName, options = {}) => {
124128
+ const ignores$1 = (dirOpt, resolvedName, options = {}) => {
124244
124129
  const relativeName = relative(dirOpt, resolvedName);
124245
- const ignorer = ignore$1();
124130
+ const ignorer = noop$3();
124246
124131
  const ignoreList = mergeIgnores(options.ignore || []);
124247
124132
 
124248
124133
  ignorer.add(ignoreList);
@@ -124263,14 +124148,19 @@ function mergeIgnores(ignores) {
124263
124148
  return Array.from(noDuplicates);
124264
124149
  }
124265
124150
 
124266
- ignores$2.default;
124151
+ var ignores$2 = /*#__PURE__*/Object.freeze({
124152
+ __proto__: null,
124153
+ ignores: ignores$1
124154
+ });
124155
+
124156
+ var require$$4 = /*@__PURE__*/getAugmentedNamespace(ignores$2);
124267
124157
 
124268
124158
  const path = require$$0;
124269
124159
 
124270
124160
  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;
124161
+ const {transform: transform$1} = require$$4$1;
124162
+ const {findPlaces: findPlaces$1} = require$$5;
124163
+ const {ignores} = require$$4;
124274
124164
 
124275
124165
  const {toJS, fromJS} = json;
124276
124166
 
@@ -124345,7 +124235,7 @@ const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, prog
124345
124235
  filename: inputFilename,
124346
124236
  });
124347
124237
 
124348
- if (ignores$1(cwd, inputFilename, options))
124238
+ if (ignores(cwd, inputFilename, options))
124349
124239
  continue;
124350
124240
 
124351
124241
  allFiles.push({
@@ -124729,9 +124619,7 @@ function hasParens(path, printer = getPrinter(path)) {
124729
124619
  return /^(TS)?Parenthesized(Expression|Type)?$/.test(type);
124730
124620
  }
124731
124621
 
124732
- const {codeFrameColumns} = bundle$1;
124733
-
124734
- var codeframe$1 = ({source, error, highlightCode = true}) => {
124622
+ const codeframe$1 = ({source, error, highlightCode = true}) => {
124735
124623
  const {message, loc} = error;
124736
124624
 
124737
124625
  if (!loc)
@@ -124741,13 +124629,18 @@ var codeframe$1 = ({source, error, highlightCode = true}) => {
124741
124629
  start: loc,
124742
124630
  };
124743
124631
 
124744
- return codeFrameColumns(source, location, {
124632
+ return bundle$1.codeFrameColumns(source, location, {
124745
124633
  highlightCode,
124746
124634
  message,
124747
124635
  });
124748
124636
  };
124749
124637
 
124750
- codeframe$1.default;
124638
+ var codeframe$2 = /*#__PURE__*/Object.freeze({
124639
+ __proto__: null,
124640
+ codeframe: codeframe$1
124641
+ });
124642
+
124643
+ var require$$20 = /*@__PURE__*/getAugmentedNamespace(codeframe$2);
124751
124644
 
124752
124645
  const {traverse, types} = bundle$1;
124753
124646
  const {
@@ -124757,16 +124650,14 @@ const {
124757
124650
  template,
124758
124651
  } = parser$5;
124759
124652
 
124760
- const {cutShebang, mergeShebang} = shebang;
124761
- const {defaultOptions} = defaultOptions$4;
124762
- const {transform, transformAsync} = transform$5;
124653
+ const {cutShebang, mergeShebang} = require$$2;
124654
+ const {defaultOptions} = require$$3;
124655
+ const {transform, transformAsync} = require$$4$1;
124763
124656
 
124764
124657
  const {
124765
124658
  findPlaces,
124766
124659
  findPlacesAsync,
124767
- } = findPlaces$2;
124768
-
124769
- const isString = (a) => typeof a === 'string';
124660
+ } = require$$5;
124770
124661
 
124771
124662
  putout$1.exports = putout;
124772
124663
  var putout_2 = putout$1.exports.putout = putout;
@@ -124864,7 +124755,6 @@ var traverse_1 = putout$1.exports.traverse = traverse;
124864
124755
  var types_1 = putout$1.exports.types = types;
124865
124756
  var template_1 = putout$1.exports.template = template;
124866
124757
  var generate_1 = putout$1.exports.generate = generate;
124867
- var initReport = putout$1.exports.initReport = report$3;
124868
124758
 
124869
124759
  var operator = putout$1.exports.operator = {
124870
124760
  ...operate,
@@ -124883,14 +124773,14 @@ var operator = putout$1.exports.operator = {
124883
124773
  ...parens,
124884
124774
  };
124885
124775
 
124886
- var ignores = putout$1.exports.ignores = ignores$2;
124887
- var codeframe = putout$1.exports.codeframe = codeframe$1;
124776
+ const {codeframe} = require$$20;
124777
+ const isString = (a) => typeof a === 'string';
124778
+
124779
+ var codeframe_1 = putout$1.exports.codeframe = codeframe;
124888
124780
 
124889
124781
  function check(source) {
124890
124782
  if (!isString(source))
124891
124783
  throw Error(`☝️ Looks like 'source' has type '${typeof source}', expected: 'string'`);
124892
124784
  }
124893
124785
 
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 };
124786
+ 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 };