@putout/bundle 5.0.8 → 5.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/putout.js +47 -23
- package/bundle/putout.min.js +2 -2
- package/bundle/putout.slim.js +47 -23
- package/package.json +1 -1
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$4 = /*@__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$4;
|
|
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(
|
|
60872
|
-
|
|
60871
|
+
let {code} = generate$6(
|
|
60872
|
+
ast,
|
|
60873
|
+
source && {
|
|
60873
60874
|
experimental_preserveFormat: true,
|
|
60874
60875
|
retainLines: true,
|
|
60875
60876
|
},
|
|
60876
|
-
|
|
60877
|
+
source,
|
|
60878
|
+
);
|
|
60877
60879
|
|
|
60878
60880
|
if (code[0] === '\n')
|
|
60879
60881
|
code = code.trimStart();
|
|
@@ -110890,7 +110892,7 @@ hermes$1.parse = function hermesParse(source) {
|
|
|
110890
110892
|
return parser.parse(source, options);
|
|
110891
110893
|
};
|
|
110892
110894
|
|
|
110893
|
-
|
|
110895
|
+
const tryCatch$8 = (fn, ...args) => {
|
|
110894
110896
|
try {
|
|
110895
110897
|
return [null, fn(...args)];
|
|
110896
110898
|
} catch(e) {
|
|
@@ -110898,13 +110900,19 @@ var tryCatch$6 = (fn, ...args) => {
|
|
|
110898
110900
|
}
|
|
110899
110901
|
};
|
|
110900
110902
|
|
|
110901
|
-
var tryCatch$
|
|
110903
|
+
var tryCatch$9 = /*#__PURE__*/Object.freeze({
|
|
110904
|
+
__proto__: null,
|
|
110905
|
+
default: tryCatch$8,
|
|
110906
|
+
tryCatch: tryCatch$8
|
|
110907
|
+
});
|
|
110908
|
+
|
|
110909
|
+
var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(tryCatch$9);
|
|
110902
110910
|
|
|
110903
|
-
const tryCatch$
|
|
110911
|
+
const tryCatch$7 = require$$0$3;
|
|
110904
110912
|
|
|
110905
110913
|
var secondChance$1 = (fn, source, messages, args) => {
|
|
110906
110914
|
const [a, ...others] = args;
|
|
110907
|
-
const [errorA, resultA] = tryCatch$
|
|
110915
|
+
const [errorA, resultA] = tryCatch$7(fn, source, a);
|
|
110908
110916
|
|
|
110909
110917
|
if (!errorA)
|
|
110910
110918
|
return resultA;
|
|
@@ -110913,7 +110921,7 @@ var secondChance$1 = (fn, source, messages, args) => {
|
|
|
110913
110921
|
throw errorA;
|
|
110914
110922
|
|
|
110915
110923
|
for (const b of others) {
|
|
110916
|
-
const [errorB, resultB] = tryCatch$
|
|
110924
|
+
const [errorB, resultB] = tryCatch$7(fn, source, b);
|
|
110917
110925
|
|
|
110918
110926
|
if (!errorB)
|
|
110919
110927
|
return resultB;
|
|
@@ -111004,10 +111012,10 @@ function customParse(source, {parser, printer, isTS, isJSX, isRecovery}) {
|
|
|
111004
111012
|
|
|
111005
111013
|
var tryThrowWithReason$3 = {};
|
|
111006
111014
|
|
|
111007
|
-
const tryCatch$
|
|
111015
|
+
const tryCatch$6 = require$$0$3;
|
|
111008
111016
|
|
|
111009
111017
|
tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
|
|
111010
|
-
const [error, result] = tryCatch$
|
|
111018
|
+
const [error, result] = tryCatch$6(fn, ...args);
|
|
111011
111019
|
|
|
111012
111020
|
if (error) {
|
|
111013
111021
|
error.reason = 'parse';
|
|
@@ -112535,7 +112543,15 @@ debug$6.createDebug = (namespace) => {
|
|
|
112535
112543
|
});
|
|
112536
112544
|
};
|
|
112537
112545
|
|
|
112538
|
-
|
|
112546
|
+
var tryCatch$5 = (fn, ...args) => {
|
|
112547
|
+
try {
|
|
112548
|
+
return [null, fn(...args)];
|
|
112549
|
+
} catch(e) {
|
|
112550
|
+
return [e];
|
|
112551
|
+
}
|
|
112552
|
+
};
|
|
112553
|
+
|
|
112554
|
+
const tryCatch$4 = tryCatch$5;
|
|
112539
112555
|
const {createDebug: createDebug$7} = debug$6;
|
|
112540
112556
|
|
|
112541
112557
|
const {stringify: stringify$5} = JSON;
|
|
@@ -112561,7 +112577,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
|
|
|
112561
112577
|
};
|
|
112562
112578
|
|
|
112563
112579
|
const tryToFix = (fix, {path, pathOptions, position, options}) => {
|
|
112564
|
-
const [e] = tryCatch$
|
|
112580
|
+
const [e] = tryCatch$4(fix, ...chooseFixArgs({
|
|
112565
112581
|
path,
|
|
112566
112582
|
pathOptions,
|
|
112567
112583
|
options,
|
|
@@ -114141,7 +114157,7 @@ function superCompareIterate(node, template) {
|
|
|
114141
114157
|
return true;
|
|
114142
114158
|
}
|
|
114143
114159
|
|
|
114144
|
-
const tryCatch$
|
|
114160
|
+
const tryCatch$3 = tryCatch$5;
|
|
114145
114161
|
|
|
114146
114162
|
const {
|
|
114147
114163
|
compareAny: compareAny$1,
|
|
@@ -114236,7 +114252,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
|
|
|
114236
114252
|
if (!isFn$2(fn))
|
|
114237
114253
|
throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
|
|
114238
114254
|
|
|
114239
|
-
const [e] = tryCatch$
|
|
114255
|
+
const [e] = tryCatch$3(fn, path);
|
|
114240
114256
|
|
|
114241
114257
|
if (e) {
|
|
114242
114258
|
e.rule = rule;
|
|
@@ -114786,10 +114802,10 @@ var createProgress$1 = progress.createProgress = () => {
|
|
|
114786
114802
|
|
|
114787
114803
|
var tryThrowWithReason$1 = {};
|
|
114788
114804
|
|
|
114789
|
-
const tryCatch$
|
|
114805
|
+
const tryCatch$2 = tryCatch$5;
|
|
114790
114806
|
|
|
114791
114807
|
tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
|
|
114792
|
-
const [error, result] = tryCatch$
|
|
114808
|
+
const [error, result] = tryCatch$2(fn, ...args);
|
|
114793
114809
|
|
|
114794
114810
|
if (error) {
|
|
114795
114811
|
error.reason ??= 'traverse';
|
|
@@ -115591,7 +115607,7 @@ const {
|
|
|
115591
115607
|
} = require$$0;
|
|
115592
115608
|
|
|
115593
115609
|
const {types: types$8} = bundle$1;
|
|
115594
|
-
const tryCatch = tryCatch$
|
|
115610
|
+
const tryCatch$1 = tryCatch$5;
|
|
115595
115611
|
|
|
115596
115612
|
const {
|
|
115597
115613
|
setLiteralValue: setLiteralValue$1,
|
|
@@ -115618,7 +115634,7 @@ const {isArray: isArray$1} = Array;
|
|
|
115618
115634
|
const maybeArray = (a) => isArray$1(a) ? a : [a];
|
|
115619
115635
|
|
|
115620
115636
|
const toBase64 = (content) => {
|
|
115621
|
-
const [e, result] = tryCatch(btoa, content);
|
|
115637
|
+
const [e, result] = tryCatch$1(btoa, content);
|
|
115622
115638
|
|
|
115623
115639
|
if (e)
|
|
115624
115640
|
return btoa(escape(content));
|
|
@@ -115630,7 +115646,7 @@ const fromBase64 = (content) => {
|
|
|
115630
115646
|
if (content.includes(' '))
|
|
115631
115647
|
return content;
|
|
115632
115648
|
|
|
115633
|
-
const [e, decoded] = tryCatch(atob, content);
|
|
115649
|
+
const [e, decoded] = tryCatch$1(atob, content);
|
|
115634
115650
|
|
|
115635
115651
|
if (!e)
|
|
115636
115652
|
return unescape(decoded);
|
|
@@ -116626,6 +116642,14 @@ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
|
|
|
116626
116642
|
|
|
116627
116643
|
var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
|
|
116628
116644
|
|
|
116645
|
+
const tryCatch = (fn, ...args) => {
|
|
116646
|
+
try {
|
|
116647
|
+
return [null, fn(...args)];
|
|
116648
|
+
} catch(e) {
|
|
116649
|
+
return [e];
|
|
116650
|
+
}
|
|
116651
|
+
};
|
|
116652
|
+
|
|
116629
116653
|
const parseError$1 = (e, type = 'parser') => {
|
|
116630
116654
|
const {line, column} = e.loc || {
|
|
116631
116655
|
line: 1,
|
|
@@ -116674,7 +116698,7 @@ const transform$4 = (ast, source, opts) => {
|
|
|
116674
116698
|
|
|
116675
116699
|
const [, shebang] = cutShebang$1(source);
|
|
116676
116700
|
|
|
116677
|
-
const [validationError] = tryCatch
|
|
116701
|
+
const [validationError] = tryCatch(validateRulesRelations, {
|
|
116678
116702
|
rules,
|
|
116679
116703
|
pluginNames,
|
|
116680
116704
|
});
|
|
@@ -116716,7 +116740,7 @@ const transformAsync$1 = async (ast, source, opts) => {
|
|
|
116716
116740
|
|
|
116717
116741
|
const [, shebang] = cutShebang$1(source);
|
|
116718
116742
|
|
|
116719
|
-
const [validationError] = tryCatch
|
|
116743
|
+
const [validationError] = tryCatch(validateRulesRelations, {
|
|
116720
116744
|
rules,
|
|
116721
116745
|
pluginNames,
|
|
116722
116746
|
});
|