@putout/bundle 5.0.6 → 5.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -178,15 +178,15 @@ var versions = {};
178
178
  var release = {};
179
179
  var config = {};
180
180
 
181
- function noop$9() {}
181
+ function noop$8() {}
182
182
 
183
- var on = noop$9;
184
- var addListener = noop$9;
185
- var once$9 = noop$9;
186
- var off = noop$9;
187
- var removeListener = noop$9;
188
- var removeAllListeners = noop$9;
189
- var emit = noop$9;
183
+ var on = noop$8;
184
+ var addListener = noop$8;
185
+ var once$9 = noop$8;
186
+ var off = noop$8;
187
+ var removeListener = noop$8;
188
+ var removeAllListeners = noop$8;
189
+ var emit = noop$8;
190
190
 
191
191
  function binding(name) {
192
192
  throw new Error('process.binding is not supported');
@@ -482,7 +482,7 @@ function write (buffer, value, offset, isLE, mLen, nBytes) {
482
482
 
483
483
  var toString = {}.toString;
484
484
 
485
- var isArray$f = Array.isArray || function (arr) {
485
+ var isArray$d = Array.isArray || function (arr) {
486
486
  return toString.call(arr) == '[object Array]';
487
487
  };
488
488
 
@@ -766,7 +766,7 @@ function fromObject (that, obj) {
766
766
  return fromArrayLike(that, obj)
767
767
  }
768
768
 
769
- if (obj.type === 'Buffer' && isArray$f(obj.data)) {
769
+ if (obj.type === 'Buffer' && isArray$d(obj.data)) {
770
770
  return fromArrayLike(that, obj.data)
771
771
  }
772
772
  }
@@ -831,7 +831,7 @@ Buffer.isEncoding = function isEncoding (encoding) {
831
831
  };
832
832
 
833
833
  Buffer.concat = function concat (list, length) {
834
- if (!isArray$f(list)) {
834
+ if (!isArray$d(list)) {
835
835
  throw new TypeError('"list" argument must be an Array of Buffers')
836
836
  }
837
837
 
@@ -2752,7 +2752,7 @@ var require_jsesc$1 = __commonJS$1({
2752
2752
  var index_exports$1 = {};
2753
2753
 
2754
2754
  __export$1(index_exports$1, {
2755
- codeFrameColumns: () => codeFrameColumns$3,
2755
+ codeFrameColumns: () => codeFrameColumns$2,
2756
2756
  generate: () => generate$7,
2757
2757
  parse: () => parse$7,
2758
2758
  parseExpression: () => parseExpression$2,
@@ -36520,7 +36520,7 @@ function getMarkerLines$1(loc, source, opts) {
36520
36520
  };
36521
36521
  }
36522
36522
 
36523
- function codeFrameColumns$3(rawLines, loc, opts = {}) {
36523
+ function codeFrameColumns$2(rawLines, loc, opts = {}) {
36524
36524
  const shouldHighlight = opts.forceColor || isColorSupported$1() && opts.highlightCode;
36525
36525
  const defs = getDefs$1(shouldHighlight);
36526
36526
  const lines = rawLines.split(NEWLINE$3);
@@ -36889,7 +36889,7 @@ function parseWithCodeFrame$1(code2, parserOpts, syntacticPlaceholders) {
36889
36889
  const loc = err.loc;
36890
36890
 
36891
36891
  if (loc) {
36892
- err.message += '\n' + codeFrameColumns$3(code2, {
36892
+ err.message += '\n' + codeFrameColumns$2(code2, {
36893
36893
  start: loc,
36894
36894
  });
36895
36895
  err.code = 'BABEL_TEMPLATE_PARSE_ERROR';
@@ -47816,7 +47816,7 @@ function replaceWithSourceString$1(replacement) {
47816
47816
  const loc = err.loc;
47817
47817
 
47818
47818
  if (loc) {
47819
- err.message += ' - make sure this is an expression.\n' + codeFrameColumns$3(replacement, {
47819
+ err.message += ' - make sure this is an expression.\n' + codeFrameColumns$2(replacement, {
47820
47820
  start: {
47821
47821
  line: loc.line,
47822
47822
  column: loc.column + 1,
@@ -52148,7 +52148,7 @@ comment.parseComments = parseComments$7;
52148
52148
 
52149
52149
  const {parseComments: parseComments$6} = comment;
52150
52150
 
52151
- const noop$8 = () => {};
52151
+ const noop$7 = () => {};
52152
52152
  const parseParams = (path) => path.get('params');
52153
52153
 
52154
52154
  params.printParams = (path, printer, semantics, customization = {}) => {
@@ -52164,9 +52164,9 @@ params.printParams = (path, printer, semantics, customization = {}) => {
52164
52164
  braceOpen = '(',
52165
52165
  braceClose = ')',
52166
52166
  printSpace = print.space,
52167
- printAfterOpen = noop$8,
52168
- printBeforeClose = noop$8,
52169
- printAfterClose = noop$8,
52167
+ printAfterOpen = noop$7,
52168
+ printBeforeClose = noop$7,
52169
+ printAfterClose = noop$7,
52170
52170
  } = customization;
52171
52171
 
52172
52172
  if (typeParameters)
@@ -52964,12 +52964,12 @@ var callExpression$3 = {};
52964
52964
 
52965
52965
  const {exists: exists$c} = is$4;
52966
52966
  const {maybeParens: maybeParens$9} = maybeParens$e;
52967
- const {isArray: isArray$e} = Array;
52967
+ const {isArray: isArray$c} = Array;
52968
52968
 
52969
52969
  const parseArgs = (path) => {
52970
52970
  const argsPath = path.get('arguments');
52971
52971
 
52972
- if (!isArray$e(argsPath))
52972
+ if (!isArray$c(argsPath))
52973
52973
  return [];
52974
52974
 
52975
52975
  return argsPath;
@@ -55789,10 +55789,10 @@ maybeWriteBrace.condition = (path, printer, semantics) => {
55789
55789
  var sequenceExpressionComments = {};
55790
55790
 
55791
55791
  const {hasLeadingComment} = is$4;
55792
- const noop$7 = () => {};
55792
+ const noop$6 = () => {};
55793
55793
 
55794
- sequenceExpressionComments.printLeadingCommentLine = noop$7;
55795
- sequenceExpressionComments.printLeadingCommentBlock = noop$7;
55794
+ sequenceExpressionComments.printLeadingCommentLine = noop$6;
55795
+ sequenceExpressionComments.printLeadingCommentBlock = noop$6;
55796
55796
 
55797
55797
  sequenceExpressionComments.maybePrintComments = (path, {print}) => {
55798
55798
  if (hasLeadingComment(path)) {
@@ -58900,7 +58900,7 @@ var tsPropertySignature$1 = {exports: {}};
58900
58900
  var comments$1 = {};
58901
58901
 
58902
58902
  const {isPrev} = is$4;
58903
- const noop$6 = () => {};
58903
+ const noop$5 = () => {};
58904
58904
 
58905
58905
  comments$1.printLeadingCommentLine = (path, printer, semantics, {printComment}) => {
58906
58906
  const {print} = printer;
@@ -58917,7 +58917,7 @@ comments$1.printLeadingCommentBlock = (path, printer, semantics, {printComment})
58917
58917
  print.indent();
58918
58918
  };
58919
58919
 
58920
- comments$1.printTrailingCommentBlock = noop$6;
58920
+ comments$1.printTrailingCommentBlock = noop$5;
58921
58921
 
58922
58922
  (function (module) {
58923
58923
 
@@ -59356,7 +59356,7 @@ const {types: types$t} = bundle$1;
59356
59356
  const {createPrintSpace} = printFunctionParams$1;
59357
59357
  const {printParams: printParams$1} = params;
59358
59358
  const {isTSUnionType: isTSUnionType$1} = types$t;
59359
- const noop$5 = () => {};
59359
+ const noop$4 = () => {};
59360
59360
 
59361
59361
  tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semantics) => {
59362
59362
  const {print, indent} = printer;
@@ -59366,16 +59366,16 @@ tsTypeParameterDeclaration$1.TSTypeParameterDeclaration = (path, printer, semant
59366
59366
  printer,
59367
59367
  });
59368
59368
 
59369
- const printAfterOpen = !isNewline ? noop$5 : () => {
59369
+ const printAfterOpen = !isNewline ? noop$4 : () => {
59370
59370
  indent.inc();
59371
59371
  print.breakline();
59372
59372
  };
59373
59373
 
59374
- const printAfterClose = !isNewline ? noop$5 : () => {
59374
+ const printAfterClose = !isNewline ? noop$4 : () => {
59375
59375
  print.breakline();
59376
59376
  };
59377
59377
 
59378
- const printBeforeClose = !isNewline ? noop$5 : () => {
59378
+ const printBeforeClose = !isNewline ? noop$4 : () => {
59379
59379
  indent.dec();
59380
59380
  print.breakline();
59381
59381
  };
@@ -60136,7 +60136,7 @@ function snakeCase(str) {
60136
60136
 
60137
60137
  const process = require$$0$3;
60138
60138
  const toSnakeCase = justSnakeCase;
60139
- const {codeFrameColumns: codeFrameColumns$2} = bundle$1;
60139
+ const {codeFrameColumns: codeFrameColumns$1} = bundle$1;
60140
60140
  const {TYPES: TYPES$3} = types$19;
60141
60141
 
60142
60142
  const {stringify: stringify$7} = JSON;
@@ -60160,7 +60160,7 @@ debug$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$4 = () => {};
110641
+ const noop$3 = () => {};
110642
110642
 
110643
110643
  var empty = /*#__PURE__*/Object.freeze({
110644
110644
  __proto__: null,
110645
- default: noop$4
110645
+ default: noop$3
110646
110646
  });
110647
110647
 
110648
- var require$$1$2 = /*@__PURE__*/getAugmentedNamespace(empty);
110648
+ var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(empty);
110649
110649
 
110650
110650
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110651
110651
 
110652
110652
  // eslint-disable-next-line node/no-unsupported-features/es-syntax
110653
110653
  function privateMethods(Parser) {
110654
- const ExtendedParser = noop$4();
110654
+ const ExtendedParser = noop$3();
110655
110655
 
110656
110656
  return class extends ExtendedParser {
110657
110657
  // Parse private methods
@@ -110677,7 +110677,7 @@ var acornPrivateMethods = /*#__PURE__*/Object.freeze({
110677
110677
  default: privateMethods
110678
110678
  });
110679
110679
 
110680
- var require$$2 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110680
+ var require$$2$1 = /*@__PURE__*/getAugmentedNamespace(acornPrivateMethods);
110681
110681
 
110682
110682
  var acornStage3;
110683
110683
  var hasRequiredAcornStage3;
@@ -110688,9 +110688,9 @@ function requireAcornStage3 () {
110688
110688
 
110689
110689
  acornStage3 = function(Parser) {
110690
110690
  return Parser.extend(
110691
- require$$1$2,
110692
- require$$1$2,
110693
- require$$2
110691
+ require$$1$1,
110692
+ require$$1$1,
110693
+ require$$2$1
110694
110694
  )
110695
110695
  };
110696
110696
  return acornStage3;
@@ -110699,10 +110699,10 @@ function requireAcornStage3 () {
110699
110699
  const once$6 = onceExports;
110700
110700
 
110701
110701
  const initAcorn = once$6(() => {
110702
- const {Parser} = require$$1$2;
110702
+ const {Parser} = require$$1$1;
110703
110703
 
110704
110704
  const stage3 = requireAcornStage3();
110705
- const typescript = require$$1$2.default;
110705
+ const typescript = require$$1$1.default;
110706
110706
 
110707
110707
  return Parser.extend(typescript(), stage3);
110708
110708
  });
@@ -110819,7 +110819,7 @@ function getBabelLangExts({isTS, isFlow, isJSX}) {
110819
110819
  var espree$1 = {};
110820
110820
 
110821
110821
  const once$4 = onceExports;
110822
- const initEspree = once$4(() => require$$1$2);
110822
+ const initEspree = once$4(() => require$$1$1);
110823
110823
 
110824
110824
  espree$1.parse = function espreeParse(source) {
110825
110825
  const {parse} = initEspree();
@@ -110840,7 +110840,7 @@ espree$1.parse = function espreeParse(source) {
110840
110840
  var esprima$1 = {};
110841
110841
 
110842
110842
  const once$3 = onceExports;
110843
- const initEsprima = once$3(() => require$$1$2);
110843
+ const initEsprima = once$3(() => require$$1$1);
110844
110844
 
110845
110845
  esprima$1.parse = function esprimaParse(source) {
110846
110846
  const {parse} = initEsprima();
@@ -110857,7 +110857,7 @@ esprima$1.parse = function esprimaParse(source) {
110857
110857
  var tenko$1 = {};
110858
110858
 
110859
110859
  const once$2 = onceExports;
110860
- const initTenko = once$2(() => require$$1$2);
110860
+ const initTenko = once$2(() => require$$1$1);
110861
110861
 
110862
110862
  tenko$1.parse = (source) => {
110863
110863
  const {Tenko} = initTenko();
@@ -110874,7 +110874,7 @@ tenko$1.parse = (source) => {
110874
110874
  var hermes$1 = {};
110875
110875
 
110876
110876
  const once$1 = onceExports;
110877
- const initHermes = once$1(() => require$$1$2);
110877
+ const initHermes = once$1(() => require$$1$1);
110878
110878
 
110879
110879
  hermes$1.parse = function hermesParse(source) {
110880
110880
  const parser = initHermes();
@@ -110890,7 +110890,7 @@ hermes$1.parse = function hermesParse(source) {
110890
110890
  return parser.parse(source, options);
110891
110891
  };
110892
110892
 
110893
- var tryCatch$7 = (fn, ...args) => {
110893
+ var tryCatch$6 = (fn, ...args) => {
110894
110894
  try {
110895
110895
  return [null, fn(...args)];
110896
110896
  } catch(e) {
@@ -110898,11 +110898,13 @@ var tryCatch$7 = (fn, ...args) => {
110898
110898
  }
110899
110899
  };
110900
110900
 
110901
- const tryCatch$6 = tryCatch$7;
110901
+ var tryCatch$7 = tryCatch$6.default;
110902
+
110903
+ const tryCatch$5 = tryCatch$6;
110902
110904
 
110903
110905
  var secondChance$1 = (fn, source, messages, args) => {
110904
110906
  const [a, ...others] = args;
110905
- const [errorA, resultA] = tryCatch$6(fn, source, a);
110907
+ const [errorA, resultA] = tryCatch$5(fn, source, a);
110906
110908
 
110907
110909
  if (!errorA)
110908
110910
  return resultA;
@@ -110911,7 +110913,7 @@ var secondChance$1 = (fn, source, messages, args) => {
110911
110913
  throw errorA;
110912
110914
 
110913
110915
  for (const b of others) {
110914
- const [errorB, resultB] = tryCatch$6(fn, source, b);
110916
+ const [errorB, resultB] = tryCatch$5(fn, source, b);
110915
110917
 
110916
110918
  if (!errorB)
110917
110919
  return resultB;
@@ -111002,10 +111004,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
111002
111004
 
111003
111005
  var tryThrowWithReason$3 = {};
111004
111006
 
111005
- const tryCatch$5 = tryCatch$7;
111007
+ const tryCatch$4 = tryCatch$6;
111006
111008
 
111007
111009
  tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
111008
- const [error, result] = tryCatch$5(fn, ...args);
111010
+ const [error, result] = tryCatch$4(fn, ...args);
111009
111011
 
111010
111012
  if (error) {
111011
111013
  error.reason = 'parse';
@@ -111185,12 +111187,12 @@ var nanoMemoize = /*#__PURE__*/Object.freeze({
111185
111187
  nanomemoize: $cf838c15c8b009ba$export$22f15dd4e5be7e52
111186
111188
  });
111187
111189
 
111188
- var require$$1$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111190
+ var require$$1 = /*@__PURE__*/getAugmentedNamespace(nanoMemoize);
111189
111191
 
111190
111192
  (function (module) {
111191
111193
 
111192
111194
  const {types, template} = bundle$1;
111193
- const {nanomemoize} = require$$1$1;
111195
+ const {nanomemoize} = require$$1;
111194
111196
  const plugins = plugins$1;
111195
111197
  const options = options$1;
111196
111198
 
@@ -111282,16 +111284,14 @@ parser$5.parse = parse$4;
111282
111284
  parser$5.generate = generate$3;
111283
111285
  parser$5.template = template$9;
111284
111286
 
111285
- var shebang = {};
111286
-
111287
- shebang.mergeShebang = (shebang, source) => {
111287
+ const mergeShebang$1 = (shebang, source) => {
111288
111288
  if (!shebang)
111289
111289
  return source;
111290
111290
 
111291
111291
  return `${shebang}\n${source}`;
111292
111292
  };
111293
111293
 
111294
- shebang.cutShebang = (source) => {
111294
+ const cutShebang$1 = (source) => {
111295
111295
  if (source.indexOf('#'))
111296
111296
  return [source, ''];
111297
111297
 
@@ -111309,7 +111309,13 @@ shebang.cutShebang = (source) => {
111309
111309
  ];
111310
111310
  };
111311
111311
 
111312
- var defaultOptions$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,18 +111582,25 @@ function check$a(fn) {
111578
111582
 
111579
111583
  var tryToCatch$1 = tryToCatch.default;
111580
111584
 
111585
+ var _module = {};
111586
+
111587
+ const returns$1 = (a) => () => a;
111588
+ const noop$2 = () => {};
111589
+
111590
+ const createRequire = (url, overrides = {}) => {
111591
+ const {module = _module} = overrides;
111592
+ const {createRequire = returns$1(noop$2)} = module;
111593
+
111594
+ return createRequire(url);
111595
+ };
111596
+
111581
111597
  // How in other way to mock import using mock require in CommonJS?
111582
111598
  const simpleImport = async (url) => {
111583
111599
  const result = await import(url);
111584
111600
  return result.default || result;
111585
111601
  };
111586
111602
 
111587
- const noop$3 = () => {};
111588
-
111589
- const {
111590
- createRequire: createRequire$1 = noop$3,
111591
- } = module$1;
111592
- const require$1 = createRequire$1(import.meta.url);
111603
+ const require$1 = createRequire(import.meta.url);
111593
111604
 
111594
111605
  const {assign: assign$3} = Object;
111595
111606
  const stub$2 = () => () => {};
@@ -111685,20 +111696,20 @@ function buildPluginsDirs(name) {
111685
111696
  ];
111686
111697
  }
111687
111698
 
111688
- const isStr$4 = (a) => typeof a === 'string';
111689
- const {isArray: isArray$c} = Array;
111699
+ const isStr$3 = (a) => typeof a === 'string';
111700
+ const {isArray: isArray$a} = Array;
111690
111701
  const {entries: entries$9} = Object;
111691
111702
 
111692
111703
  const parsePluginNames = (plugins) => {
111693
111704
  const result = [];
111694
111705
 
111695
111706
  for (const plugin of plugins) {
111696
- if (isStr$4(plugin)) {
111707
+ if (isStr$3(plugin)) {
111697
111708
  result.push([plugin]);
111698
111709
  continue;
111699
111710
  }
111700
111711
 
111701
- if (isArray$c(plugin)) {
111712
+ if (isArray$a(plugin)) {
111702
111713
  const [pluginName, fn] = plugin;
111703
111714
  result.push([pluginName, fn]);
111704
111715
  continue;
@@ -111710,9 +111721,9 @@ const parsePluginNames = (plugins) => {
111710
111721
  return result;
111711
111722
  };
111712
111723
 
111713
- const {isArray: isArray$b} = Array;
111724
+ const {isArray: isArray$9} = Array;
111714
111725
  const isBool$2 = (a) => typeof a === 'boolean';
111715
- const isStr$3 = (a) => typeof a === 'string';
111726
+ const isStr$2 = (a) => typeof a === 'string';
111716
111727
  const isObj = (a) => typeof a === 'object';
111717
111728
  const {entries: entries$8} = Object;
111718
111729
  const {stringify: stringify$6} = JSON;
@@ -111720,7 +111731,7 @@ const {stringify: stringify$6} = JSON;
111720
111731
  const notSupportedError = (a) => Error(`☝️ Rule format not supported ${a}: ${typeof a}`);
111721
111732
  const rulesUsedInsteadOfMatchError = (a) => Error(`☝️ Looks like you need to change "rules" to "match" for ${stringify$6(a)}`);
111722
111733
  const stateOptionError = ({rule, value}) => Error(`☝️ ${rule}: state option can be "on" or "off" only, when used as string, received: "${value}"`);
111723
- const defaultOptions$3 = () => Object.create(null);
111734
+ const defaultOptions$4 = () => Object.create(null);
111724
111735
 
111725
111736
  const parseState = (rule, value) => {
111726
111737
  validateState(rule, value);
@@ -111742,13 +111753,13 @@ const parseRules = (rules) => {
111742
111753
  check$9(rules);
111743
111754
 
111744
111755
  for (const [rule, value] of entries$8(rules)) {
111745
- if (isStr$3(value)) {
111756
+ if (isStr$2(value)) {
111746
111757
  result.push({
111747
111758
  rule,
111748
111759
  state: parseState(rule, value),
111749
111760
  plugin,
111750
111761
  msg,
111751
- options: defaultOptions$3(),
111762
+ options: defaultOptions$4(),
111752
111763
  });
111753
111764
  continue;
111754
111765
  }
@@ -111759,12 +111770,12 @@ const parseRules = (rules) => {
111759
111770
  state: value,
111760
111771
  plugin,
111761
111772
  msg,
111762
- options: defaultOptions$3(),
111773
+ options: defaultOptions$4(),
111763
111774
  });
111764
111775
  continue;
111765
111776
  }
111766
111777
 
111767
- const looksLikeArray = isArray$b(value);
111778
+ const looksLikeArray = isArray$9(value);
111768
111779
  const looksLikeNormalArray = looksLikeArray && value.length;
111769
111780
 
111770
111781
  if (looksLikeNormalArray) {
@@ -111842,11 +111853,11 @@ const enableNestedRules = (rules) => {
111842
111853
  };
111843
111854
 
111844
111855
  function check$9(rules) {
111845
- if (isArray$b(rules))
111856
+ if (isArray$9(rules))
111846
111857
  throw Error(`☝️Looks like type of 'rules' passed to @putout/engine-loader is 'array', expected: 'object'.`);
111847
111858
  }
111848
111859
 
111849
- const defaultOptions$2 = () => Object.create(null);
111860
+ const defaultOptions$3 = () => Object.create(null);
111850
111861
 
111851
111862
  const mergeRules = ([rule, plugin], rules) => {
111852
111863
  for (const currentRule of rules) {
@@ -111867,7 +111878,7 @@ const mergeRules = ([rule, plugin], rules) => {
111867
111878
  rule,
111868
111879
  plugin,
111869
111880
  msg: '',
111870
- options: defaultOptions$2(),
111881
+ options: defaultOptions$3(),
111871
111882
  };
111872
111883
  };
111873
111884
 
@@ -111959,7 +111970,7 @@ const checkRule = (rule) => {
111959
111970
  throw Error(`☝️ Looks like plugin name type is not 'string', but: '${typeof rule}'`);
111960
111971
  };
111961
111972
 
111962
- const validateRulesRelations$1 = (options) => {
111973
+ const validateRulesRelations = (options) => {
111963
111974
  check$8(options);
111964
111975
 
111965
111976
  const {pluginNames = [], rules = {}} = options;
@@ -112007,8 +112018,8 @@ var validatePlugin = ({plugin, rule}) => {
112007
112018
  throw Error(`☝️ Cannot determine type of plugin '${rule}'. Here is list of supported plugins: https://git.io/JqcMn`);
112008
112019
  };
112009
112020
 
112010
- const {isArray: isArray$a} = Array;
112011
- const maybeTuple = (a) => isArray$a(a) ? a : ['on', a];
112021
+ const {isArray: isArray$8} = Array;
112022
+ const maybeTuple = (a) => isArray$8(a) ? a : ['on', a];
112012
112023
 
112013
112024
  // Would be great to have ability to filter
112014
112025
  // disabled plugins and prevent them from loading
@@ -112138,8 +112149,7 @@ function parseRuleName(rule) {
112138
112149
  return rule;
112139
112150
  }
112140
112151
 
112141
- const {createRequire} = module$1;
112142
- const {isArray: isArray$9} = Array;
112152
+ const {isArray: isArray$7} = Array;
112143
112153
 
112144
112154
  const loadPlugins = (options) => {
112145
112155
  check$8(options);
@@ -112171,7 +112181,7 @@ const parseRule = (rule) => rule
112171
112181
  .replace('import:@putout/plugin-', '')
112172
112182
  .replace('@putout/plugin-', '');
112173
112183
 
112174
- const maybeFromTuple = (a) => isArray$9(a) ? a[1] : a;
112184
+ const maybeFromTuple = (a) => isArray$7(a) ? a[1] : a;
112175
112185
 
112176
112186
  function loadAllPlugins({items, loadedRules}) {
112177
112187
  const plugins = [];
@@ -112230,75 +112240,6 @@ function loadOnePlugin({name, namespace}) {
112230
112240
  });
112231
112241
  }
112232
112242
 
112233
- const isStr$2 = (a) => typeof a === 'string';
112234
- const {isArray: isArray$8} = Array;
112235
-
112236
- const isOn = (a) => a === 'on';
112237
- const isOff = (a) => a === 'off';
112238
-
112239
- var parseProcessorNames = (plugins) => {
112240
- const result = [];
112241
-
112242
- for (const plugin of plugins) {
112243
- if (isStr$2(plugin)) {
112244
- result.push([plugin]);
112245
- continue;
112246
- }
112247
-
112248
- if (isArray$8(plugin)) {
112249
- const [pluginName, fn] = plugin;
112250
-
112251
- if (isOff(fn))
112252
- continue;
112253
-
112254
- if (isOn(fn)) {
112255
- result.push([pluginName]);
112256
- continue;
112257
- }
112258
-
112259
- result.push([pluginName, fn]);
112260
- continue;
112261
- }
112262
- }
112263
-
112264
- return result;
112265
- };
112266
-
112267
- const loadProcessorsAsync = async (options, simpleImport) => {
112268
- check$8(options);
112269
-
112270
- const {processors = []} = options;
112271
- const parsedProcessors = parseProcessorNames(processors);
112272
-
112273
- const loadProcessor = createAsyncLoader('processor', {
112274
- simpleImport,
112275
- });
112276
-
112277
- const list = [];
112278
-
112279
- for (const [name, fn] of parsedProcessors) {
112280
- if (fn) {
112281
- list.push(fn);
112282
- continue;
112283
- }
112284
-
112285
- list.push(loadProcessor(name));
112286
- }
112287
-
112288
- return await Promise.all(list);
112289
- };
112290
-
112291
- var lib$1 = /*#__PURE__*/Object.freeze({
112292
- __proto__: null,
112293
- createAsyncLoader: createAsyncLoader,
112294
- loadPlugins: loadPlugins,
112295
- loadPluginsAsync: loadPluginsAsync,
112296
- loadProcessorsAsync: loadProcessorsAsync,
112297
- validateRulesRelations: validateRulesRelations$1
112298
- });
112299
-
112300
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(lib$1);
112301
-
112302
112243
  var lib = {};
112303
112244
 
112304
112245
  var debug$7 = {};
@@ -112335,7 +112276,7 @@ debug$7.createDebug = (namespace) => {
112335
112276
  });
112336
112277
  };
112337
112278
 
112338
- const tryCatch$4 = tryCatch$7;
112279
+ const tryCatch$3 = tryCatch$6;
112339
112280
  const {createDebug: createDebug$7} = debug$7;
112340
112281
 
112341
112282
  const {stringify: stringify$5} = JSON;
@@ -112361,7 +112302,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
112361
112302
  };
112362
112303
 
112363
112304
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
112364
- const [e] = tryCatch$4(fix, ...chooseFixArgs({
112305
+ const [e] = tryCatch$3(fix, ...chooseFixArgs({
112365
112306
  path,
112366
112307
  pathOptions,
112367
112308
  options,
@@ -112437,8 +112378,8 @@ function validatePath(path) {
112437
112378
  throw Error(`☝️ Looks like 'push' called without a 'path' argument.`);
112438
112379
  }
112439
112380
 
112440
- const {isArray: isArray$7} = Array;
112441
- 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];
112442
112383
 
112443
112384
  var maybeArray_1 = (a) => {
112444
112385
  if (!a)
@@ -112979,7 +112920,7 @@ const isBool$1 = (a, b) => {
112979
112920
  };
112980
112921
 
112981
112922
  const isEqualType$1 = (a, b) => a.type === b.type;
112982
- const {isArray: isArray$6} = Array;
112923
+ const {isArray: isArray$5} = Array;
112983
112924
 
112984
112925
  is$2.isId = isId$2;
112985
112926
  is$2.isBool = isBool$1;
@@ -113002,7 +112943,7 @@ is$2.isAnyLiteral = (a, b) => {
113002
112943
  };
113003
112944
 
113004
112945
  is$2.isArgs = (a) => {
113005
- const b = !isArray$6(a) ? a : a[0];
112946
+ const b = !isArray$5(a) ? a : a[0];
113006
112947
 
113007
112948
  return isIdentifier$4(b, {
113008
112949
  name: ARGS,
@@ -113032,12 +112973,12 @@ is$2.isEqualTypeParams = (a, b) => {
113032
112973
  };
113033
112974
 
113034
112975
  is$2.isLinkedArgs = (a) => {
113035
- const b = !isArray$6(a) ? a : a[0];
112976
+ const b = !isArray$5(a) ? a : a[0];
113036
112977
  return isIdentifier$4(b) && LINKED_ARGS.test(b.name);
113037
112978
  };
113038
112979
 
113039
112980
  is$2.isJSXChildren = (a) => {
113040
- const b = !isArray$6(a) ? a : a[0];
112981
+ const b = !isArray$5(a) ? a : a[0];
113041
112982
 
113042
112983
  return isJSXText$2(b, {
113043
112984
  value: JSX_CHILDREN,
@@ -113045,7 +112986,7 @@ is$2.isJSXChildren = (a) => {
113045
112986
  };
113046
112987
 
113047
112988
  is$2.isJSXAttributes = (a) => {
113048
- const b = !isArray$6(a) ? a : a[0];
112989
+ const b = !isArray$5(a) ? a : a[0];
113049
112990
 
113050
112991
  if (!isJSXAttribute$1(b))
113051
112992
  return false;
@@ -113077,27 +113018,27 @@ is$2.isLinkedRegExp = (a, b) => {
113077
113018
  };
113078
113019
 
113079
113020
  is$2.isPath = (path) => Boolean(path.node);
113080
- is$2.isArray = isArray$6;
113021
+ is$2.isArray = isArray$5;
113081
113022
 
113082
113023
  is$2.isObject = (a) => {
113083
113024
  if (!a)
113084
113025
  return false;
113085
113026
 
113086
- if (isArray$6(a))
113027
+ if (isArray$5(a))
113087
113028
  return false;
113088
113029
 
113089
113030
  return typeof a === 'object';
113090
113031
  };
113091
113032
 
113092
113033
  is$2.isArrays = (a, b) => {
113093
- if (!isArray$6(a) || !isArray$6(b))
113034
+ if (!isArray$5(a) || !isArray$5(b))
113094
113035
  return false;
113095
113036
 
113096
113037
  return a.length === b.length;
113097
113038
  };
113098
113039
 
113099
113040
  is$2.isImports = (a) => {
113100
- const b = !isArray$6(a) ? a : a[0];
113041
+ const b = !isArray$5(a) ? a : a[0];
113101
113042
 
113102
113043
  if (!isImportDefaultSpecifier(b))
113103
113044
  return false;
@@ -113108,7 +113049,7 @@ is$2.isImports = (a) => {
113108
113049
  };
113109
113050
 
113110
113051
  is$2.isExports = (a) => {
113111
- const b = !isArray$6(a) ? a : a[0];
113052
+ const b = !isArray$5(a) ? a : a[0];
113112
113053
 
113113
113054
  if (!isExportSpecifier(b))
113114
113055
  return false;
@@ -113421,7 +113362,7 @@ debug$4.createDebug = (namespace) => {
113421
113362
  const {createDebug: createDebug$5} = debug$4;
113422
113363
  const debug$3 = createDebug$5('putout:compare');
113423
113364
 
113424
- const {isArray: isArray$5} = Array;
113365
+ const {isArray: isArray$4} = Array;
113425
113366
  const isObject$4 = (a) => a && typeof a === 'object';
113426
113367
 
113427
113368
  log$5.exports = (a, b) => {
@@ -113436,7 +113377,7 @@ log$5.exports = (a, b) => {
113436
113377
 
113437
113378
  log$5.exports._parseValue = parseValue;
113438
113379
  function parseValue(a) {
113439
- if (isArray$5(a) && a[0]) {
113380
+ if (isArray$4(a) && a[0]) {
113440
113381
  const [{
113441
113382
  type,
113442
113383
  name,
@@ -113792,13 +113733,13 @@ const {extractExpression} = template$5;
113792
113733
  const addWaterMark = (a) => a;
113793
113734
 
113794
113735
  const {keys: keys$2} = Object;
113795
- const {isArray: isArray$4} = Array;
113796
- const noop$2 = () => {};
113797
- 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;
113798
113739
 
113799
113740
  const compareType = (type) => (path) => path.type === type;
113800
113741
  const superPush = (array) => (a, b, c = {}) => array.push([a, b, c]);
113801
- const maybeArray$4 = (a) => isArray$4(a) ? a : [a];
113742
+ const maybeArray$4 = (a) => isArray$3(a) ? a : [a];
113802
113743
 
113803
113744
  const findParent = (path, type) => {
113804
113745
  const newPathNode = path.findParent(compareType(type));
@@ -113828,7 +113769,7 @@ compare$5.getValues = getValues$1;
113828
113769
  compare$5.setValues = setValues$1;
113829
113770
  compare$5.getTemplateValues = getTemplateValues$1;
113830
113771
 
113831
- function compare$4(path, template, options = {}, equal = noop$2) {
113772
+ function compare$4(path, template, options = {}, equal = noop$1) {
113832
113773
  const {findUp = true} = options;
113833
113774
 
113834
113775
  if (!path && !template)
@@ -113888,7 +113829,7 @@ compare$5.compareAll = (path, templateNodes, options) => {
113888
113829
 
113889
113830
  // @babel/template creates empty array directives
113890
113831
  // extra duplicate value
113891
- const ignore$2 = [
113832
+ const ignore$1 = [
113892
113833
  'loc',
113893
113834
  'start',
113894
113835
  'end',
@@ -113921,7 +113862,7 @@ function superCompareIterate(node, template) {
113921
113862
  return false;
113922
113863
 
113923
113864
  for (const key of keys$2(template)) {
113924
- if (ignore$2.includes(key))
113865
+ if (ignore$1.includes(key))
113925
113866
  continue;
113926
113867
 
113927
113868
  const nodeValue = extractExpression(node[key]);
@@ -113941,7 +113882,7 @@ function superCompareIterate(node, template) {
113941
113882
  return true;
113942
113883
  }
113943
113884
 
113944
- const tryCatch$3 = tryCatch$7;
113885
+ const tryCatch$2 = tryCatch$6;
113945
113886
 
113946
113887
  const {
113947
113888
  compareAny: compareAny$1,
@@ -114036,7 +113977,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
114036
113977
  if (!isFn$2(fn))
114037
113978
  throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
114038
113979
 
114039
- const [e] = tryCatch$3(fn, path);
113980
+ const [e] = tryCatch$2(fn, path);
114040
113981
 
114041
113982
  if (e) {
114042
113983
  e.rule = rule;
@@ -114532,7 +114473,7 @@ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
114532
114473
 
114533
114474
  const {EventEmitter} = require$$0$1;
114534
114475
 
114535
- progress.createProgress = () => {
114476
+ var createProgress$1 = progress.createProgress = () => {
114536
114477
  let pluginsCount = 0;
114537
114478
  let pluginsIndex = 0;
114538
114479
 
@@ -114586,10 +114527,10 @@ progress.createProgress = () => {
114586
114527
 
114587
114528
  var tryThrowWithReason$1 = {};
114588
114529
 
114589
- const tryCatch$2 = tryCatch$7;
114530
+ const tryCatch$1 = tryCatch$6;
114590
114531
 
114591
114532
  tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
114592
- const [error, result] = tryCatch$2(fn, ...args);
114533
+ const [error, result] = tryCatch$1(fn, ...args);
114593
114534
 
114594
114535
  if (error) {
114595
114536
  error.reason ??= 'traverse';
@@ -114686,7 +114627,7 @@ function check$4(fn) {
114686
114627
  }
114687
114628
 
114688
114629
  const {entries: entries$4} = Object;
114689
- const {isArray: isArray$3} = Array;
114630
+ const {isArray: isArray$2} = Array;
114690
114631
 
114691
114632
  var findPath$1 = (parentPath) => {
114692
114633
  let current = {
@@ -114708,7 +114649,7 @@ function findKey(path, parent) {
114708
114649
  let value;
114709
114650
 
114710
114651
  for ([key, value] of entries$4(parent)) {
114711
- if (isArray$3(value)) {
114652
+ if (isArray$2(value)) {
114712
114653
  const index = value.indexOf(node);
114713
114654
 
114714
114655
  if (index >= 0)
@@ -115112,13 +115053,13 @@ const TS_EXCLUDE = [
115112
115053
  ];
115113
115054
 
115114
115055
  declare$1.declare = (declarations) => ({
115115
- report: report$4,
115056
+ report: report$3,
115116
115057
  include: include$1,
115117
115058
  fix: fix$3(declarations),
115118
115059
  filter: filter(declarations),
115119
115060
  });
115120
115061
 
115121
- const report$4 = (path) => {
115062
+ const report$3 = (path) => {
115122
115063
  const {name} = path.node;
115123
115064
  const peaceOfName = cutName(name);
115124
115065
 
@@ -115291,16 +115232,16 @@ const fullstore$1 = fullstore$3;
115291
115232
  const driverStore = fullstore$1();
115292
115233
 
115293
115234
  const {assign} = Object;
115294
- const noop$1 = () => {};
115235
+ const noop = () => {};
115295
115236
  const returns = (a) => () => a;
115296
115237
 
115297
115238
  const defaultFS = {
115298
- renameFile: noop$1,
115299
- removeFile: noop$1,
115300
- createDirectory: noop$1,
115239
+ renameFile: noop,
115240
+ removeFile: noop,
115241
+ createDirectory: noop,
115301
115242
  readFileContent: returns(''),
115302
- writeFileContent: noop$1,
115303
- copyFile: noop$1,
115243
+ writeFileContent: noop,
115244
+ copyFile: noop,
115304
115245
  };
115305
115246
 
115306
115247
  const maybeFS$1 = assign({}, defaultFS);
@@ -115391,7 +115332,7 @@ const {
115391
115332
  } = require$$0;
115392
115333
 
115393
115334
  const {types: types$8} = bundle$1;
115394
- const tryCatch$1 = tryCatch$7;
115335
+ const tryCatch = tryCatch$6;
115395
115336
 
115396
115337
  const {
115397
115338
  setLiteralValue: setLiteralValue$1,
@@ -115414,11 +115355,11 @@ const {
115414
115355
  } = types$8;
115415
115356
 
115416
115357
  const isString$1 = (a) => typeof a === 'string';
115417
- const {isArray: isArray$2} = Array;
115418
- const maybeArray = (a) => isArray$2(a) ? a : [a];
115358
+ const {isArray: isArray$1} = Array;
115359
+ const maybeArray = (a) => isArray$1(a) ? a : [a];
115419
115360
 
115420
115361
  const toBase64 = (content) => {
115421
- const [e, result] = tryCatch$1(btoa, content);
115362
+ const [e, result] = tryCatch(btoa, content);
115422
115363
 
115423
115364
  if (e)
115424
115365
  return btoa(escape(content));
@@ -115430,7 +115371,7 @@ const fromBase64 = (content) => {
115430
115371
  if (content.includes(' '))
115431
115372
  return content;
115432
115373
 
115433
- const [e, decoded] = tryCatch$1(atob, content);
115374
+ const [e, decoded] = tryCatch(atob, content);
115434
115375
 
115435
115376
  if (!e)
115436
115377
  return unescape(decoded);
@@ -115503,7 +115444,7 @@ function findFile$5(node, name, exclude = []) {
115503
115444
  }
115504
115445
 
115505
115446
  function checkName(name) {
115506
- if (!isString$1(name) && !isArray$2(name))
115447
+ if (!isString$1(name) && !isArray$1(name))
115507
115448
  throw Error(`☝️ Looks like you forget to pass the 'name' of a file to 'findFile(filePath: Path|FilePath, name: string | string[]): FilePath'`);
115508
115449
  }
115509
115450
 
@@ -115984,7 +115925,7 @@ const {
115984
115925
  arrayExpression,
115985
115926
  } = types$6;
115986
115927
 
115987
- const {isArray: isArray$1} = Array;
115928
+ const {isArray} = Array;
115988
115929
  const maybeAddSlash = (a) => a === '/' ? a : `${a}/`;
115989
115930
 
115990
115931
  convertFilesystemToSimpleFilesystem.report = () => `Convert Filesystem to Simple Filesystem`;
@@ -116014,7 +115955,7 @@ convertFilesystemToSimpleFilesystem.fix = (root, {files}) => {
116014
115955
  const list = [];
116015
115956
 
116016
115957
  for (const name of names) {
116017
- if (isArray$1(name)) {
115958
+ if (isArray(name)) {
116018
115959
  list.push(arrayExpression([
116019
115960
  stringLiteral$2(name[0]),
116020
115961
  stringLiteral$2(name[1]),
@@ -116206,7 +116147,7 @@ const runFix = runFix$3;
116206
116147
  const mergeVisitors = mergeVisitors$1;
116207
116148
  const superFind = superFind$1;
116208
116149
  const template$2 = templateExports;
116209
- const {createProgress: createProgress$1} = progress;
116150
+ const {createProgress} = progress;
116210
116151
  const {tryThrowWithReason} = tryThrowWithReason$1;
116211
116152
 
116212
116153
  const {include} = includer;
@@ -116218,7 +116159,7 @@ const {getPath, getPosition} = getPosition$2;
116218
116159
  const debug = createDebug('putout:runner:find');
116219
116160
  const isRemoved = (a) => a?.removed;
116220
116161
 
116221
- 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}) => {
116222
116163
  let places = [];
116223
116164
 
116224
116165
  const merge = once(mergeVisitors);
@@ -116394,20 +116335,16 @@ function splitPlugins(plugins, {progress}) {
116394
116335
  };
116395
116336
  }
116396
116337
 
116397
- const loader = require$$1;
116398
- const runner = lib;
116399
- const {createProgress} = progress;
116400
-
116401
- defaultOptions$4.defaultOptions = (opts = {}) => {
116338
+ const defaultOptions$1 = (opts = {}) => {
116402
116339
  const {
116403
116340
  parser = 'babel',
116404
116341
  printer = opts.printer || 'putout',
116405
116342
  fix = true,
116406
116343
  fixCount = 3,
116407
- loadPlugins = loader.loadPlugins,
116408
- loadPluginsAsync = loader.loadPluginsAsync,
116409
- runPlugins = runner.runPlugins,
116410
- progress = createProgress(),
116344
+ loadPlugins: loadPlugins$1 = loadPlugins,
116345
+ loadPluginsAsync: loadPluginsAsync$1 = loadPluginsAsync,
116346
+ runPlugins = lib.runPlugins,
116347
+ progress = createProgress$1(),
116411
116348
  } = opts;
116412
116349
 
116413
116350
  return {
@@ -116416,16 +116353,21 @@ defaultOptions$4.defaultOptions = (opts = {}) => {
116416
116353
  printer,
116417
116354
  fix,
116418
116355
  fixCount,
116419
- loadPlugins,
116420
- loadPluginsAsync,
116356
+ loadPlugins: loadPlugins$1,
116357
+ loadPluginsAsync: loadPluginsAsync$1,
116421
116358
  runPlugins,
116422
116359
  progress,
116423
116360
  };
116424
116361
  };
116425
116362
 
116426
- var transform$5 = {};
116363
+ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
116364
+ __proto__: null,
116365
+ defaultOptions: defaultOptions$1
116366
+ });
116427
116367
 
116428
- var parseError$2 = (e, type = 'parser') => {
116368
+ var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
116369
+
116370
+ const parseError$1 = (e, type = 'parser') => {
116429
116371
  const {line, column} = e.loc || {
116430
116372
  line: 1,
116431
116373
  column: 1,
@@ -116446,13 +116388,6 @@ var parseError$2 = (e, type = 'parser') => {
116446
116388
 
116447
116389
  const cutBrackets = (a) => a.replace(/\s\(\d:\d+\)/, '');
116448
116390
 
116449
- const tryCatch = tryCatch$7;
116450
-
116451
- const {validateRulesRelations} = require$$1;
116452
- const {defaultOptions: defaultOptions$1} = defaultOptions$4;
116453
- const {cutShebang: cutShebang$1} = shebang;
116454
- const parseError$1 = parseError$2;
116455
-
116456
116391
  const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116457
116392
 
116458
116393
  // why we pass 'source' to 'transform()'?
@@ -116464,7 +116399,7 @@ const maybeParseError = (a) => !a ? [] : parseError$1(a, 'loader');
116464
116399
  // 27 column,¬
116465
116400
  // 28 };¬
116466
116401
  //
116467
- transform$5.transform = (ast, source, opts) => {
116402
+ const transform$4 = (ast, source, opts) => {
116468
116403
  opts = defaultOptions$1(opts);
116469
116404
 
116470
116405
  const {
@@ -116480,7 +116415,7 @@ transform$5.transform = (ast, source, opts) => {
116480
116415
 
116481
116416
  const [, shebang] = cutShebang$1(source);
116482
116417
 
116483
- const [validationError] = tryCatch(validateRulesRelations, {
116418
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116484
116419
  rules,
116485
116420
  pluginNames,
116486
116421
  });
@@ -116506,7 +116441,7 @@ transform$5.transform = (ast, source, opts) => {
116506
116441
  ];
116507
116442
  };
116508
116443
 
116509
- transform$5.transformAsync = async (ast, source, opts) => {
116444
+ const transformAsync$1 = async (ast, source, opts) => {
116510
116445
  opts = defaultOptions$1(opts);
116511
116446
 
116512
116447
  const {
@@ -116522,7 +116457,7 @@ transform$5.transformAsync = async (ast, source, opts) => {
116522
116457
 
116523
116458
  const [, shebang] = cutShebang$1(source);
116524
116459
 
116525
- const [validationError] = tryCatch(validateRulesRelations, {
116460
+ const [validationError] = tryCatch$7(validateRulesRelations, {
116526
116461
  rules,
116527
116462
  pluginNames,
116528
116463
  });
@@ -116548,78 +116483,35 @@ transform$5.transformAsync = async (ast, source, opts) => {
116548
116483
  ];
116549
116484
  };
116550
116485
 
116551
- var findPlaces$2 = {};
116486
+ var transform$5 = /*#__PURE__*/Object.freeze({
116487
+ __proto__: null,
116488
+ transform: transform$4,
116489
+ transformAsync: transformAsync$1
116490
+ });
116552
116491
 
116553
- const {transform: transform$4, transformAsync: transformAsync$1} = transform$5;
116492
+ var require$$4$1 = /*@__PURE__*/getAugmentedNamespace(transform$5);
116554
116493
 
116555
- findPlaces$2.findPlaces = (ast, source, opts) => {
116494
+ const findPlaces$2 = (ast, source, opts) => {
116556
116495
  return transform$4(ast, source, {
116557
116496
  ...opts,
116558
116497
  fix: false,
116559
116498
  });
116560
116499
  };
116561
116500
 
116562
- findPlaces$2.findPlacesAsync = async (ast, source, opts) => {
116501
+ const findPlacesAsync$1 = async (ast, source, opts) => {
116563
116502
  return await transformAsync$1(ast, source, {
116564
116503
  ...opts,
116565
116504
  fix: false,
116566
116505
  });
116567
116506
  };
116568
116507
 
116569
- const {isArray} = Array;
116570
- const noop = () => {};
116571
-
116572
- var report$3 = () => {
116573
- let filesCount = 0;
116574
- let errorsCount = 0;
116575
-
116576
- return async (formatter, options) => {
116577
- const {
116578
- name,
116579
- rule,
116580
- source,
116581
- places,
116582
- index = 0,
116583
- count = 1,
116584
- trace = noop,
116585
- formatterOptions = {},
116586
- } = options;
116587
-
116588
- if (!isArray(places))
116589
- throw Error(`☝️ Looks like for 'places: Places[]' you passed the wrong type: '${typeof places}'`);
116590
-
116591
- if (places.length)
116592
- ++filesCount;
116593
-
116594
- errorsCount += places.length;
116595
-
116596
- trace('progress', {
116597
- rule,
116598
- name,
116599
- options: formatterOptions,
116600
- source,
116601
- places,
116602
- index,
116603
- count,
116604
- filesCount,
116605
- errorsCount,
116606
- });
116607
-
116608
- return await formatter({
116609
- rule,
116610
- name,
116611
- options: formatterOptions,
116612
- source,
116613
- places,
116614
- index,
116615
- count,
116616
- filesCount,
116617
- errorsCount,
116618
- });
116619
- };
116620
- };
116508
+ var findPlaces$3 = /*#__PURE__*/Object.freeze({
116509
+ __proto__: null,
116510
+ findPlaces: findPlaces$2,
116511
+ findPlacesAsync: findPlacesAsync$1
116512
+ });
116621
116513
 
116622
- report$3.default;
116514
+ var require$$5 = /*@__PURE__*/getAugmentedNamespace(findPlaces$3);
116623
116515
 
116624
116516
  var traverse$5 = {};
116625
116517
 
@@ -124230,15 +124122,12 @@ keyword.isTSKeyword = (name) => {
124230
124122
 
124231
124123
  var matchFiles = {};
124232
124124
 
124233
- const {relative} = require$$0;
124234
- const ignore$1 = require$$1$2;
124235
-
124236
124125
  const isNegative = (a) => !a.indexOf('!');
124237
124126
  const positive = (a) => a.replace(/^!/, '');
124238
124127
 
124239
- var ignores$2 = (dirOpt, resolvedName, options = {}) => {
124128
+ const ignores$1 = (dirOpt, resolvedName, options = {}) => {
124240
124129
  const relativeName = relative(dirOpt, resolvedName);
124241
- const ignorer = ignore$1();
124130
+ const ignorer = noop$3();
124242
124131
  const ignoreList = mergeIgnores(options.ignore || []);
124243
124132
 
124244
124133
  ignorer.add(ignoreList);
@@ -124259,14 +124148,19 @@ function mergeIgnores(ignores) {
124259
124148
  return Array.from(noDuplicates);
124260
124149
  }
124261
124150
 
124262
- 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);
124263
124157
 
124264
124158
  const path = require$$0;
124265
124159
 
124266
124160
  const {parse: parse$2, print: print$1} = parser$5;
124267
- const {transform: transform$1} = transform$5;
124268
- const {findPlaces: findPlaces$1} = findPlaces$2;
124269
- 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;
124270
124164
 
124271
124165
  const {toJS, fromJS} = json;
124272
124166
 
@@ -124341,7 +124235,7 @@ const createScan = ({files, exclude, defaultFilename}) => (mainPath, {push, prog
124341
124235
  filename: inputFilename,
124342
124236
  });
124343
124237
 
124344
- if (ignores$1(cwd, inputFilename, options))
124238
+ if (ignores(cwd, inputFilename, options))
124345
124239
  continue;
124346
124240
 
124347
124241
  allFiles.push({
@@ -124725,9 +124619,7 @@ function hasParens(path, printer = getPrinter(path)) {
124725
124619
  return /^(TS)?Parenthesized(Expression|Type)?$/.test(type);
124726
124620
  }
124727
124621
 
124728
- const {codeFrameColumns} = bundle$1;
124729
-
124730
- var codeframe$1 = ({source, error, highlightCode = true}) => {
124622
+ const codeframe$1 = ({source, error, highlightCode = true}) => {
124731
124623
  const {message, loc} = error;
124732
124624
 
124733
124625
  if (!loc)
@@ -124737,13 +124629,18 @@ var codeframe$1 = ({source, error, highlightCode = true}) => {
124737
124629
  start: loc,
124738
124630
  };
124739
124631
 
124740
- return codeFrameColumns(source, location, {
124632
+ return bundle$1.codeFrameColumns(source, location, {
124741
124633
  highlightCode,
124742
124634
  message,
124743
124635
  });
124744
124636
  };
124745
124637
 
124746
- 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);
124747
124644
 
124748
124645
  const {traverse, types} = bundle$1;
124749
124646
  const {
@@ -124753,16 +124650,14 @@ const {
124753
124650
  template,
124754
124651
  } = parser$5;
124755
124652
 
124756
- const {cutShebang, mergeShebang} = shebang;
124757
- const {defaultOptions} = defaultOptions$4;
124758
- const {transform, transformAsync} = transform$5;
124653
+ const {cutShebang, mergeShebang} = require$$2;
124654
+ const {defaultOptions} = require$$3;
124655
+ const {transform, transformAsync} = require$$4$1;
124759
124656
 
124760
124657
  const {
124761
124658
  findPlaces,
124762
124659
  findPlacesAsync,
124763
- } = findPlaces$2;
124764
-
124765
- const isString = (a) => typeof a === 'string';
124660
+ } = require$$5;
124766
124661
 
124767
124662
  putout$1.exports = putout;
124768
124663
  var putout_2 = putout$1.exports.putout = putout;
@@ -124860,7 +124755,6 @@ var traverse_1 = putout$1.exports.traverse = traverse;
124860
124755
  var types_1 = putout$1.exports.types = types;
124861
124756
  var template_1 = putout$1.exports.template = template;
124862
124757
  var generate_1 = putout$1.exports.generate = generate;
124863
- var initReport = putout$1.exports.initReport = report$3;
124864
124758
 
124865
124759
  var operator = putout$1.exports.operator = {
124866
124760
  ...operate,
@@ -124879,14 +124773,14 @@ var operator = putout$1.exports.operator = {
124879
124773
  ...parens,
124880
124774
  };
124881
124775
 
124882
- var ignores = putout$1.exports.ignores = ignores$2;
124883
- 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;
124884
124780
 
124885
124781
  function check(source) {
124886
124782
  if (!isString(source))
124887
124783
  throw Error(`☝️ Looks like 'source' has type '${typeof source}', expected: 'string'`);
124888
124784
  }
124889
124785
 
124890
- var putoutExports = putout$1.exports;
124891
-
124892
- 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 };