@putout/bundle 5.0.9 → 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 +103 -37
- package/bundle/putout.min.js +1 -1
- package/bundle/putout.slim.js +103 -37
- package/package.json +2 -2
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$
|
|
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$
|
|
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;
|
|
@@ -110892,7 +110892,9 @@ hermes$1.parse = function hermesParse(source) {
|
|
|
110892
110892
|
return parser.parse(source, options);
|
|
110893
110893
|
};
|
|
110894
110894
|
|
|
110895
|
-
|
|
110895
|
+
var tryCatch$l = {exports: {}};
|
|
110896
|
+
|
|
110897
|
+
const tryCatch$j = (fn, ...args) => {
|
|
110896
110898
|
try {
|
|
110897
110899
|
return [null, fn(...args)];
|
|
110898
110900
|
} catch(e) {
|
|
@@ -110900,19 +110902,26 @@ const tryCatch$8 = (fn, ...args) => {
|
|
|
110900
110902
|
}
|
|
110901
110903
|
};
|
|
110902
110904
|
|
|
110903
|
-
var tryCatch$
|
|
110905
|
+
var tryCatch$k = /*#__PURE__*/Object.freeze({
|
|
110904
110906
|
__proto__: null,
|
|
110905
|
-
default: tryCatch$
|
|
110906
|
-
tryCatch: tryCatch$
|
|
110907
|
+
default: tryCatch$j,
|
|
110908
|
+
tryCatch: tryCatch$j
|
|
110907
110909
|
});
|
|
110908
110910
|
|
|
110909
|
-
var require$$0$
|
|
110911
|
+
var require$$0$6 = /*@__PURE__*/getAugmentedNamespace(tryCatch$k);
|
|
110912
|
+
|
|
110913
|
+
const {tryCatch: tryCatch$i} = require$$0$6;
|
|
110914
|
+
|
|
110915
|
+
tryCatch$l.exports = tryCatch$i;
|
|
110916
|
+
tryCatch$l.exports.tryCatch = tryCatch$i;
|
|
110910
110917
|
|
|
110911
|
-
|
|
110918
|
+
var tryCatchExports$2 = tryCatch$l.exports;
|
|
110919
|
+
|
|
110920
|
+
const tryCatch$h = tryCatchExports$2;
|
|
110912
110921
|
|
|
110913
110922
|
var secondChance$1 = (fn, source, messages, args) => {
|
|
110914
110923
|
const [a, ...others] = args;
|
|
110915
|
-
const [errorA, resultA] = tryCatch$
|
|
110924
|
+
const [errorA, resultA] = tryCatch$h(fn, source, a);
|
|
110916
110925
|
|
|
110917
110926
|
if (!errorA)
|
|
110918
110927
|
return resultA;
|
|
@@ -110921,7 +110930,7 @@ var secondChance$1 = (fn, source, messages, args) => {
|
|
|
110921
110930
|
throw errorA;
|
|
110922
110931
|
|
|
110923
110932
|
for (const b of others) {
|
|
110924
|
-
const [errorB, resultB] = tryCatch$
|
|
110933
|
+
const [errorB, resultB] = tryCatch$h(fn, source, b);
|
|
110925
110934
|
|
|
110926
110935
|
if (!errorB)
|
|
110927
110936
|
return resultB;
|
|
@@ -111012,10 +111021,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
|
|
|
111012
111021
|
|
|
111013
111022
|
var tryThrowWithReason$3 = {};
|
|
111014
111023
|
|
|
111015
|
-
const tryCatch$
|
|
111024
|
+
const tryCatch$g = tryCatchExports$2;
|
|
111016
111025
|
|
|
111017
111026
|
tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
|
|
111018
|
-
const [error, result] = tryCatch$
|
|
111027
|
+
const [error, result] = tryCatch$g(fn, ...args);
|
|
111019
111028
|
|
|
111020
111029
|
if (error) {
|
|
111021
111030
|
error.reason = 'parse';
|
|
@@ -112520,9 +112529,9 @@ var browser = /*#__PURE__*/Object.freeze({
|
|
|
112520
112529
|
namespaces: namespaces
|
|
112521
112530
|
});
|
|
112522
112531
|
|
|
112523
|
-
var require$$0$
|
|
112532
|
+
var require$$0$5 = /*@__PURE__*/getAugmentedNamespace(browser);
|
|
112524
112533
|
|
|
112525
|
-
const {createDebug: createDebug$8} = require$$0$
|
|
112534
|
+
const {createDebug: createDebug$8} = require$$0$5;
|
|
112526
112535
|
|
|
112527
112536
|
debug$6.createDebug = (namespace) => {
|
|
112528
112537
|
const log = createDebug$8(namespace, {
|
|
@@ -112543,7 +112552,9 @@ debug$6.createDebug = (namespace) => {
|
|
|
112543
112552
|
});
|
|
112544
112553
|
};
|
|
112545
112554
|
|
|
112546
|
-
var tryCatch$
|
|
112555
|
+
var tryCatch$f = {exports: {}};
|
|
112556
|
+
|
|
112557
|
+
const tryCatch$d = (fn, ...args) => {
|
|
112547
112558
|
try {
|
|
112548
112559
|
return [null, fn(...args)];
|
|
112549
112560
|
} catch(e) {
|
|
@@ -112551,7 +112562,22 @@ var tryCatch$5 = (fn, ...args) => {
|
|
|
112551
112562
|
}
|
|
112552
112563
|
};
|
|
112553
112564
|
|
|
112554
|
-
|
|
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;
|
|
112555
112581
|
const {createDebug: createDebug$7} = debug$6;
|
|
112556
112582
|
|
|
112557
112583
|
const {stringify: stringify$5} = JSON;
|
|
@@ -112577,7 +112603,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
|
|
|
112577
112603
|
};
|
|
112578
112604
|
|
|
112579
112605
|
const tryToFix = (fix, {path, pathOptions, position, options}) => {
|
|
112580
|
-
const [e] = tryCatch$
|
|
112606
|
+
const [e] = tryCatch$b(fix, ...chooseFixArgs({
|
|
112581
112607
|
path,
|
|
112582
112608
|
pathOptions,
|
|
112583
112609
|
options,
|
|
@@ -113615,18 +113641,18 @@ var log$5 = {exports: {}};
|
|
|
113615
113641
|
|
|
113616
113642
|
var debug$4 = {};
|
|
113617
113643
|
|
|
113618
|
-
const {createDebug: createDebug$6} = require$$0$
|
|
113644
|
+
const {createDebug: createDebug$6} = require$$0$5;
|
|
113619
113645
|
|
|
113620
113646
|
debug$4.createDebug = (namespace) => {
|
|
113621
113647
|
const log = createDebug$6(namespace);
|
|
113622
113648
|
|
|
113623
113649
|
return new Proxy(log, {
|
|
113624
113650
|
apply(target, thisArg, args) {
|
|
113625
|
-
|
|
113651
|
+
globalThis.__putout_debug?.(namespace, ...args);
|
|
113626
113652
|
return target(...args);
|
|
113627
113653
|
},
|
|
113628
113654
|
get(target, prop) {
|
|
113629
|
-
if (
|
|
113655
|
+
if (globalThis.__putout_debug?.[prop])
|
|
113630
113656
|
return true;
|
|
113631
113657
|
|
|
113632
113658
|
return target[prop];
|
|
@@ -114157,7 +114183,7 @@ function superCompareIterate(node, template) {
|
|
|
114157
114183
|
return true;
|
|
114158
114184
|
}
|
|
114159
114185
|
|
|
114160
|
-
const tryCatch$
|
|
114186
|
+
const tryCatch$a = tryCatchExports$1;
|
|
114161
114187
|
|
|
114162
114188
|
const {
|
|
114163
114189
|
compareAny: compareAny$1,
|
|
@@ -114252,7 +114278,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
|
|
|
114252
114278
|
if (!isFn$2(fn))
|
|
114253
114279
|
throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
|
|
114254
114280
|
|
|
114255
|
-
const [e] = tryCatch$
|
|
114281
|
+
const [e] = tryCatch$a(fn, path);
|
|
114256
114282
|
|
|
114257
114283
|
if (e) {
|
|
114258
114284
|
e.rule = rule;
|
|
@@ -114744,9 +114770,9 @@ var _polyfillNode_events = /*#__PURE__*/Object.freeze({
|
|
|
114744
114770
|
default: EventEmitter$1
|
|
114745
114771
|
});
|
|
114746
114772
|
|
|
114747
|
-
var require$$0$
|
|
114773
|
+
var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_events);
|
|
114748
114774
|
|
|
114749
|
-
const {EventEmitter} = require$$0$
|
|
114775
|
+
const {EventEmitter} = require$$0$3;
|
|
114750
114776
|
|
|
114751
114777
|
var createProgress$1 = progress.createProgress = () => {
|
|
114752
114778
|
let pluginsCount = 0;
|
|
@@ -114802,10 +114828,10 @@ var createProgress$1 = progress.createProgress = () => {
|
|
|
114802
114828
|
|
|
114803
114829
|
var tryThrowWithReason$1 = {};
|
|
114804
114830
|
|
|
114805
|
-
const tryCatch$
|
|
114831
|
+
const tryCatch$9 = tryCatchExports$1;
|
|
114806
114832
|
|
|
114807
114833
|
tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
|
|
114808
|
-
const [error, result] = tryCatch$
|
|
114834
|
+
const [error, result] = tryCatch$9(fn, ...args);
|
|
114809
114835
|
|
|
114810
114836
|
if (error) {
|
|
114811
114837
|
error.reason ??= 'traverse';
|
|
@@ -115499,7 +115525,32 @@ var scanner = {};
|
|
|
115499
115525
|
|
|
115500
115526
|
var filesystem = {};
|
|
115501
115527
|
|
|
115502
|
-
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;
|
|
115503
115554
|
|
|
115504
115555
|
var maybeFs = {};
|
|
115505
115556
|
|
|
@@ -115604,10 +115655,10 @@ const {
|
|
|
115604
115655
|
join: join$2,
|
|
115605
115656
|
basename: basename$1,
|
|
115606
115657
|
dirname: dirname$1,
|
|
115607
|
-
} = require$$0;
|
|
115658
|
+
} = require$$0$2;
|
|
115608
115659
|
|
|
115609
115660
|
const {types: types$8} = bundle$1;
|
|
115610
|
-
const tryCatch$
|
|
115661
|
+
const tryCatch$4 = tryCatchExports;
|
|
115611
115662
|
|
|
115612
115663
|
const {
|
|
115613
115664
|
setLiteralValue: setLiteralValue$1,
|
|
@@ -115634,7 +115685,7 @@ const {isArray: isArray$1} = Array;
|
|
|
115634
115685
|
const maybeArray = (a) => isArray$1(a) ? a : [a];
|
|
115635
115686
|
|
|
115636
115687
|
const toBase64 = (content) => {
|
|
115637
|
-
const [e, result] = tryCatch$
|
|
115688
|
+
const [e, result] = tryCatch$4(btoa, content);
|
|
115638
115689
|
|
|
115639
115690
|
if (e)
|
|
115640
115691
|
return btoa(escape(content));
|
|
@@ -115646,7 +115697,7 @@ const fromBase64 = (content) => {
|
|
|
115646
115697
|
if (content.includes(' '))
|
|
115647
115698
|
return content;
|
|
115648
115699
|
|
|
115649
|
-
const [e, decoded] = tryCatch$
|
|
115700
|
+
const [e, decoded] = tryCatch$4(atob, content);
|
|
115650
115701
|
|
|
115651
115702
|
if (!e)
|
|
115652
115703
|
return unescape(decoded);
|
|
@@ -116045,7 +116096,7 @@ filesystem.start = maybeFS.start;
|
|
|
116045
116096
|
|
|
116046
116097
|
var convertSimpleFilesystemToFilesystem = {};
|
|
116047
116098
|
|
|
116048
|
-
const {basename, dirname} = require$$0;
|
|
116099
|
+
const {basename, dirname} = require$$0$2;
|
|
116049
116100
|
const {types: types$7} = bundle$1;
|
|
116050
116101
|
const {
|
|
116051
116102
|
createDirectory,
|
|
@@ -116642,7 +116693,9 @@ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
|
|
|
116642
116693
|
|
|
116643
116694
|
var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
|
|
116644
116695
|
|
|
116645
|
-
|
|
116696
|
+
var tryCatch$3 = {exports: {}};
|
|
116697
|
+
|
|
116698
|
+
const tryCatch$1 = (fn, ...args) => {
|
|
116646
116699
|
try {
|
|
116647
116700
|
return [null, fn(...args)];
|
|
116648
116701
|
} catch(e) {
|
|
@@ -116650,6 +116703,19 @@ const tryCatch = (fn, ...args) => {
|
|
|
116650
116703
|
}
|
|
116651
116704
|
};
|
|
116652
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
|
+
|
|
116653
116719
|
const parseError$1 = (e, type = 'parser') => {
|
|
116654
116720
|
const {line, column} = e.loc || {
|
|
116655
116721
|
line: 1,
|
|
@@ -116698,7 +116764,7 @@ const transform$4 = (ast, source, opts) => {
|
|
|
116698
116764
|
|
|
116699
116765
|
const [, shebang] = cutShebang$1(source);
|
|
116700
116766
|
|
|
116701
|
-
const [validationError] =
|
|
116767
|
+
const [validationError] = tryCatch_2(validateRulesRelations, {
|
|
116702
116768
|
rules,
|
|
116703
116769
|
pluginNames,
|
|
116704
116770
|
});
|
|
@@ -116740,7 +116806,7 @@ const transformAsync$1 = async (ast, source, opts) => {
|
|
|
116740
116806
|
|
|
116741
116807
|
const [, shebang] = cutShebang$1(source);
|
|
116742
116808
|
|
|
116743
|
-
const [validationError] =
|
|
116809
|
+
const [validationError] = tryCatch_2(validateRulesRelations, {
|
|
116744
116810
|
rules,
|
|
116745
116811
|
pluginNames,
|
|
116746
116812
|
});
|
|
@@ -124438,7 +124504,7 @@ var ignores$2 = /*#__PURE__*/Object.freeze({
|
|
|
124438
124504
|
|
|
124439
124505
|
var require$$4 = /*@__PURE__*/getAugmentedNamespace(ignores$2);
|
|
124440
124506
|
|
|
124441
|
-
const path = require$$0;
|
|
124507
|
+
const path = require$$0$2;
|
|
124442
124508
|
|
|
124443
124509
|
const {parse: parse$2, print: print$1} = parser$5;
|
|
124444
124510
|
const {transform: transform$1} = require$$4$1;
|
|
@@ -124654,7 +124720,7 @@ function parseOptions(inputFilename, rawOptions) {
|
|
|
124654
124720
|
|
|
124655
124721
|
var renameFiles = {};
|
|
124656
124722
|
|
|
124657
|
-
const {join} = require$$0;
|
|
124723
|
+
const {join} = require$$0$2;
|
|
124658
124724
|
|
|
124659
124725
|
const {
|
|
124660
124726
|
getParentDirectory,
|