@putout/bundle 5.0.8 → 5.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bundle/putout.js CHANGED
@@ -60103,7 +60103,7 @@ function objectPlugin(plugin, path, printer, semantics) {
60103
60103
 
60104
60104
  var debug$8 = {};
60105
60105
 
60106
- var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_process);
60106
+ var require$$0$7 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_process);
60107
60107
 
60108
60108
  var justSnakeCase = snakeCase;
60109
60109
 
@@ -60134,7 +60134,7 @@ function snakeCase(str) {
60134
60134
  .join('_');
60135
60135
  }
60136
60136
 
60137
- const process = require$$0$3;
60137
+ const process = require$$0$7;
60138
60138
  const toSnakeCase = justSnakeCase;
60139
60139
  const {codeFrameColumns: codeFrameColumns$1} = bundle$1;
60140
60140
  const {TYPES: TYPES$3} = types$19;
@@ -60868,12 +60868,14 @@ babel$2.print = (ast, options) => {
60868
60868
  ...options,
60869
60869
  };
60870
60870
 
60871
- let {code} = generate$6(ast, {
60872
- ...source && {
60871
+ let {code} = generate$6(
60872
+ ast,
60873
+ source && {
60873
60874
  experimental_preserveFormat: true,
60874
60875
  retainLines: true,
60875
60876
  },
60876
- }, source);
60877
+ source,
60878
+ );
60877
60879
 
60878
60880
  if (code[0] === '\n')
60879
60881
  code = code.trimStart();
@@ -110890,7 +110892,9 @@ hermes$1.parse = function hermesParse(source) {
110890
110892
  return parser.parse(source, options);
110891
110893
  };
110892
110894
 
110893
- var tryCatch$6 = (fn, ...args) => {
110895
+ var tryCatch$l = {exports: {}};
110896
+
110897
+ const tryCatch$j = (fn, ...args) => {
110894
110898
  try {
110895
110899
  return [null, fn(...args)];
110896
110900
  } catch(e) {
@@ -110898,13 +110902,26 @@ var tryCatch$6 = (fn, ...args) => {
110898
110902
  }
110899
110903
  };
110900
110904
 
110901
- var tryCatch$7 = tryCatch$6.default;
110905
+ var tryCatch$k = /*#__PURE__*/Object.freeze({
110906
+ __proto__: null,
110907
+ default: tryCatch$j,
110908
+ tryCatch: tryCatch$j
110909
+ });
110910
+
110911
+ var require$$0$6 = /*@__PURE__*/getAugmentedNamespace(tryCatch$k);
110902
110912
 
110903
- const tryCatch$5 = tryCatch$6;
110913
+ const {tryCatch: tryCatch$i} = require$$0$6;
110914
+
110915
+ tryCatch$l.exports = tryCatch$i;
110916
+ tryCatch$l.exports.tryCatch = tryCatch$i;
110917
+
110918
+ var tryCatchExports$2 = tryCatch$l.exports;
110919
+
110920
+ const tryCatch$h = tryCatchExports$2;
110904
110921
 
110905
110922
  var secondChance$1 = (fn, source, messages, args) => {
110906
110923
  const [a, ...others] = args;
110907
- const [errorA, resultA] = tryCatch$5(fn, source, a);
110924
+ const [errorA, resultA] = tryCatch$h(fn, source, a);
110908
110925
 
110909
110926
  if (!errorA)
110910
110927
  return resultA;
@@ -110913,7 +110930,7 @@ var secondChance$1 = (fn, source, messages, args) => {
110913
110930
  throw errorA;
110914
110931
 
110915
110932
  for (const b of others) {
110916
- const [errorB, resultB] = tryCatch$5(fn, source, b);
110933
+ const [errorB, resultB] = tryCatch$h(fn, source, b);
110917
110934
 
110918
110935
  if (!errorB)
110919
110936
  return resultB;
@@ -111004,10 +111021,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
111004
111021
 
111005
111022
  var tryThrowWithReason$3 = {};
111006
111023
 
111007
- const tryCatch$4 = tryCatch$6;
111024
+ const tryCatch$g = tryCatchExports$2;
111008
111025
 
111009
111026
  tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
111010
- const [error, result] = tryCatch$4(fn, ...args);
111027
+ const [error, result] = tryCatch$g(fn, ...args);
111011
111028
 
111012
111029
  if (error) {
111013
111030
  error.reason = 'parse';
@@ -112512,9 +112529,9 @@ var browser = /*#__PURE__*/Object.freeze({
112512
112529
  namespaces: namespaces
112513
112530
  });
112514
112531
 
112515
- var require$$0$2 = /*@__PURE__*/getAugmentedNamespace(browser);
112532
+ var require$$0$5 = /*@__PURE__*/getAugmentedNamespace(browser);
112516
112533
 
112517
- const {createDebug: createDebug$8} = require$$0$2;
112534
+ const {createDebug: createDebug$8} = require$$0$5;
112518
112535
 
112519
112536
  debug$6.createDebug = (namespace) => {
112520
112537
  const log = createDebug$8(namespace, {
@@ -112535,7 +112552,32 @@ debug$6.createDebug = (namespace) => {
112535
112552
  });
112536
112553
  };
112537
112554
 
112538
- const tryCatch$3 = tryCatch$6;
112555
+ var tryCatch$f = {exports: {}};
112556
+
112557
+ const tryCatch$d = (fn, ...args) => {
112558
+ try {
112559
+ return [null, fn(...args)];
112560
+ } catch(e) {
112561
+ return [e];
112562
+ }
112563
+ };
112564
+
112565
+ var tryCatch$e = /*#__PURE__*/Object.freeze({
112566
+ __proto__: null,
112567
+ default: tryCatch$d,
112568
+ tryCatch: tryCatch$d
112569
+ });
112570
+
112571
+ var require$$0$4 = /*@__PURE__*/getAugmentedNamespace(tryCatch$e);
112572
+
112573
+ const {tryCatch: tryCatch$c} = require$$0$4;
112574
+
112575
+ tryCatch$f.exports = tryCatch$c;
112576
+ tryCatch$f.exports.tryCatch = tryCatch$c;
112577
+
112578
+ var tryCatchExports$1 = tryCatch$f.exports;
112579
+
112580
+ const tryCatch$b = tryCatchExports$1;
112539
112581
  const {createDebug: createDebug$7} = debug$6;
112540
112582
 
112541
112583
  const {stringify: stringify$5} = JSON;
@@ -112561,7 +112603,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
112561
112603
  };
112562
112604
 
112563
112605
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
112564
- const [e] = tryCatch$3(fix, ...chooseFixArgs({
112606
+ const [e] = tryCatch$b(fix, ...chooseFixArgs({
112565
112607
  path,
112566
112608
  pathOptions,
112567
112609
  options,
@@ -113599,18 +113641,18 @@ var log$5 = {exports: {}};
113599
113641
 
113600
113642
  var debug$4 = {};
113601
113643
 
113602
- const {createDebug: createDebug$6} = require$$0$2;
113644
+ const {createDebug: createDebug$6} = require$$0$5;
113603
113645
 
113604
113646
  debug$4.createDebug = (namespace) => {
113605
113647
  const log = createDebug$6(namespace);
113606
113648
 
113607
113649
  return new Proxy(log, {
113608
113650
  apply(target, thisArg, args) {
113609
- commonjsGlobal.__putout_debug?.(namespace, ...args);
113651
+ globalThis.__putout_debug?.(namespace, ...args);
113610
113652
  return target(...args);
113611
113653
  },
113612
113654
  get(target, prop) {
113613
- if (commonjsGlobal.__putout_debug?.[prop])
113655
+ if (globalThis.__putout_debug?.[prop])
113614
113656
  return true;
113615
113657
 
113616
113658
  return target[prop];
@@ -114141,7 +114183,7 @@ function superCompareIterate(node, template) {
114141
114183
  return true;
114142
114184
  }
114143
114185
 
114144
- const tryCatch$2 = tryCatch$6;
114186
+ const tryCatch$a = tryCatchExports$1;
114145
114187
 
114146
114188
  const {
114147
114189
  compareAny: compareAny$1,
@@ -114236,7 +114278,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
114236
114278
  if (!isFn$2(fn))
114237
114279
  throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
114238
114280
 
114239
- const [e] = tryCatch$2(fn, path);
114281
+ const [e] = tryCatch$a(fn, path);
114240
114282
 
114241
114283
  if (e) {
114242
114284
  e.rule = rule;
@@ -114728,9 +114770,9 @@ var _polyfillNode_events = /*#__PURE__*/Object.freeze({
114728
114770
  default: EventEmitter$1
114729
114771
  });
114730
114772
 
114731
- var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
114773
+ var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
114732
114774
 
114733
- const {EventEmitter} = require$$0$1;
114775
+ const {EventEmitter} = require$$0$3;
114734
114776
 
114735
114777
  var createProgress$1 = progress.createProgress = () => {
114736
114778
  let pluginsCount = 0;
@@ -114786,10 +114828,10 @@ var createProgress$1 = progress.createProgress = () => {
114786
114828
 
114787
114829
  var tryThrowWithReason$1 = {};
114788
114830
 
114789
- const tryCatch$1 = tryCatch$6;
114831
+ const tryCatch$9 = tryCatchExports$1;
114790
114832
 
114791
114833
  tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
114792
- const [error, result] = tryCatch$1(fn, ...args);
114834
+ const [error, result] = tryCatch$9(fn, ...args);
114793
114835
 
114794
114836
  if (error) {
114795
114837
  error.reason ??= 'traverse';
@@ -115483,7 +115525,32 @@ var scanner = {};
115483
115525
 
115484
115526
  var filesystem = {};
115485
115527
 
115486
- var require$$0 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path$1);
115528
+ var require$$0$2 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_path$1);
115529
+
115530
+ var tryCatch$8 = {exports: {}};
115531
+
115532
+ const tryCatch$6 = (fn, ...args) => {
115533
+ try {
115534
+ return [null, fn(...args)];
115535
+ } catch(e) {
115536
+ return [e];
115537
+ }
115538
+ };
115539
+
115540
+ var tryCatch$7 = /*#__PURE__*/Object.freeze({
115541
+ __proto__: null,
115542
+ default: tryCatch$6,
115543
+ tryCatch: tryCatch$6
115544
+ });
115545
+
115546
+ var require$$0$1 = /*@__PURE__*/getAugmentedNamespace(tryCatch$7);
115547
+
115548
+ const {tryCatch: tryCatch$5} = require$$0$1;
115549
+
115550
+ tryCatch$8.exports = tryCatch$5;
115551
+ tryCatch$8.exports.tryCatch = tryCatch$5;
115552
+
115553
+ var tryCatchExports = tryCatch$8.exports;
115487
115554
 
115488
115555
  var maybeFs = {};
115489
115556
 
@@ -115588,10 +115655,10 @@ const {
115588
115655
  join: join$2,
115589
115656
  basename: basename$1,
115590
115657
  dirname: dirname$1,
115591
- } = require$$0;
115658
+ } = require$$0$2;
115592
115659
 
115593
115660
  const {types: types$8} = bundle$1;
115594
- const tryCatch = tryCatch$6;
115661
+ const tryCatch$4 = tryCatchExports;
115595
115662
 
115596
115663
  const {
115597
115664
  setLiteralValue: setLiteralValue$1,
@@ -115618,7 +115685,7 @@ const {isArray: isArray$1} = Array;
115618
115685
  const maybeArray = (a) => isArray$1(a) ? a : [a];
115619
115686
 
115620
115687
  const toBase64 = (content) => {
115621
- const [e, result] = tryCatch(btoa, content);
115688
+ const [e, result] = tryCatch$4(btoa, content);
115622
115689
 
115623
115690
  if (e)
115624
115691
  return btoa(escape(content));
@@ -115630,7 +115697,7 @@ const fromBase64 = (content) => {
115630
115697
  if (content.includes(' '))
115631
115698
  return content;
115632
115699
 
115633
- const [e, decoded] = tryCatch(atob, content);
115700
+ const [e, decoded] = tryCatch$4(atob, content);
115634
115701
 
115635
115702
  if (!e)
115636
115703
  return unescape(decoded);
@@ -116029,7 +116096,7 @@ filesystem.start = maybeFS.start;
116029
116096
 
116030
116097
  var convertSimpleFilesystemToFilesystem = {};
116031
116098
 
116032
- const {basename, dirname} = require$$0;
116099
+ const {basename, dirname} = require$$0$2;
116033
116100
  const {types: types$7} = bundle$1;
116034
116101
  const {
116035
116102
  createDirectory,
@@ -116626,6 +116693,29 @@ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
116626
116693
 
116627
116694
  var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
116628
116695
 
116696
+ var tryCatch$3 = {exports: {}};
116697
+
116698
+ const tryCatch$1 = (fn, ...args) => {
116699
+ try {
116700
+ return [null, fn(...args)];
116701
+ } catch(e) {
116702
+ return [e];
116703
+ }
116704
+ };
116705
+
116706
+ var tryCatch$2 = /*#__PURE__*/Object.freeze({
116707
+ __proto__: null,
116708
+ default: tryCatch$1,
116709
+ tryCatch: tryCatch$1
116710
+ });
116711
+
116712
+ var require$$0 = /*@__PURE__*/getAugmentedNamespace(tryCatch$2);
116713
+
116714
+ const {tryCatch} = require$$0;
116715
+
116716
+ tryCatch$3.exports = tryCatch;
116717
+ var tryCatch_2 = tryCatch$3.exports.tryCatch = tryCatch;
116718
+
116629
116719
  const parseError$1 = (e, type = 'parser') => {
116630
116720
  const {line, column} = e.loc || {
116631
116721
  line: 1,
@@ -116674,7 +116764,7 @@ const transform$4 = (ast, source, opts) => {
116674
116764
 
116675
116765
  const [, shebang] = cutShebang$1(source);
116676
116766
 
116677
- const [validationError] = tryCatch$7(validateRulesRelations, {
116767
+ const [validationError] = tryCatch_2(validateRulesRelations, {
116678
116768
  rules,
116679
116769
  pluginNames,
116680
116770
  });
@@ -116716,7 +116806,7 @@ const transformAsync$1 = async (ast, source, opts) => {
116716
116806
 
116717
116807
  const [, shebang] = cutShebang$1(source);
116718
116808
 
116719
- const [validationError] = tryCatch$7(validateRulesRelations, {
116809
+ const [validationError] = tryCatch_2(validateRulesRelations, {
116720
116810
  rules,
116721
116811
  pluginNames,
116722
116812
  });
@@ -124414,7 +124504,7 @@ var ignores$2 = /*#__PURE__*/Object.freeze({
124414
124504
 
124415
124505
  var require$$4 = /*@__PURE__*/getAugmentedNamespace(ignores$2);
124416
124506
 
124417
- const path = require$$0;
124507
+ const path = require$$0$2;
124418
124508
 
124419
124509
  const {parse: parse$2, print: print$1} = parser$5;
124420
124510
  const {transform: transform$1} = require$$4$1;
@@ -124630,7 +124720,7 @@ function parseOptions(inputFilename, rawOptions) {
124630
124720
 
124631
124721
  var renameFiles = {};
124632
124722
 
124633
- const {join} = require$$0;
124723
+ const {join} = require$$0$2;
124634
124724
 
124635
124725
  const {
124636
124726
  getParentDirectory,