@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.
@@ -60103,7 +60103,7 @@ function objectPlugin(plugin, path, printer, semantics) {
60103
60103
 
60104
60104
  var debug$9 = {};
60105
60105
 
60106
- var require$$0$3 = /*@__PURE__*/getAugmentedNamespace(_polyfillNode_process);
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$3;
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(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,7 @@ hermes$1.parse = function hermesParse(source) {
110890
110892
  return parser.parse(source, options);
110891
110893
  };
110892
110894
 
110893
- var tryCatch$6 = (fn, ...args) => {
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$7 = tryCatch$6.default;
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$5 = tryCatch$6;
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$5(fn, source, a);
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$5(fn, source, b);
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$4 = tryCatch$6;
111015
+ const tryCatch$6 = require$$0$3;
111008
111016
 
111009
111017
  tryThrowWithReason$3.tryThrowWithReason = (fn, ...args) => {
111010
- const [error, result] = tryCatch$4(fn, ...args);
111018
+ const [error, result] = tryCatch$6(fn, ...args);
111011
111019
 
111012
111020
  if (error) {
111013
111021
  error.reason = 'parse';
@@ -112276,7 +112284,15 @@ debug$7.createDebug = (namespace) => {
112276
112284
  });
112277
112285
  };
112278
112286
 
112279
- const tryCatch$3 = tryCatch$6;
112287
+ var tryCatch$5 = (fn, ...args) => {
112288
+ try {
112289
+ return [null, fn(...args)];
112290
+ } catch(e) {
112291
+ return [e];
112292
+ }
112293
+ };
112294
+
112295
+ const tryCatch$4 = tryCatch$5;
112280
112296
  const {createDebug: createDebug$7} = debug$7;
112281
112297
 
112282
112298
  const {stringify: stringify$5} = JSON;
@@ -112302,7 +112318,7 @@ const chooseFixArgs = ({path, pathOptions, options}) => {
112302
112318
  };
112303
112319
 
112304
112320
  const tryToFix = (fix, {path, pathOptions, position, options}) => {
112305
- const [e] = tryCatch$3(fix, ...chooseFixArgs({
112321
+ const [e] = tryCatch$4(fix, ...chooseFixArgs({
112306
112322
  path,
112307
112323
  pathOptions,
112308
112324
  options,
@@ -113882,7 +113898,7 @@ function superCompareIterate(node, template) {
113882
113898
  return true;
113883
113899
  }
113884
113900
 
113885
- const tryCatch$2 = tryCatch$6;
113901
+ const tryCatch$3 = tryCatch$5;
113886
113902
 
113887
113903
  const {
113888
113904
  compareAny: compareAny$1,
@@ -113977,7 +113993,7 @@ const wrapWithCheck = ({rule, nodesInclude, nodesExclude, fn}) => (path) => {
113977
113993
  if (!isFn$2(fn))
113978
113994
  throw Error(`☝️ Looks like provided visitor is not a function: ${stringify$2(fn)}. More on using Traverser: https://git.io/JqcMn`);
113979
113995
 
113980
- const [e] = tryCatch$2(fn, path);
113996
+ const [e] = tryCatch$3(fn, path);
113981
113997
 
113982
113998
  if (e) {
113983
113999
  e.rule = rule;
@@ -114527,10 +114543,10 @@ var createProgress$1 = progress.createProgress = () => {
114527
114543
 
114528
114544
  var tryThrowWithReason$1 = {};
114529
114545
 
114530
- const tryCatch$1 = tryCatch$6;
114546
+ const tryCatch$2 = tryCatch$5;
114531
114547
 
114532
114548
  tryThrowWithReason$1.tryThrowWithReason = (fn, ...args) => {
114533
- const [error, result] = tryCatch$1(fn, ...args);
114549
+ const [error, result] = tryCatch$2(fn, ...args);
114534
114550
 
114535
114551
  if (error) {
114536
114552
  error.reason ??= 'traverse';
@@ -115332,7 +115348,7 @@ const {
115332
115348
  } = require$$0;
115333
115349
 
115334
115350
  const {types: types$8} = bundle$1;
115335
- const tryCatch = tryCatch$6;
115351
+ const tryCatch$1 = tryCatch$5;
115336
115352
 
115337
115353
  const {
115338
115354
  setLiteralValue: setLiteralValue$1,
@@ -115359,7 +115375,7 @@ const {isArray: isArray$1} = Array;
115359
115375
  const maybeArray = (a) => isArray$1(a) ? a : [a];
115360
115376
 
115361
115377
  const toBase64 = (content) => {
115362
- const [e, result] = tryCatch(btoa, content);
115378
+ const [e, result] = tryCatch$1(btoa, content);
115363
115379
 
115364
115380
  if (e)
115365
115381
  return btoa(escape(content));
@@ -115371,7 +115387,7 @@ const fromBase64 = (content) => {
115371
115387
  if (content.includes(' '))
115372
115388
  return content;
115373
115389
 
115374
- const [e, decoded] = tryCatch(atob, content);
115390
+ const [e, decoded] = tryCatch$1(atob, content);
115375
115391
 
115376
115392
  if (!e)
115377
115393
  return unescape(decoded);
@@ -116367,6 +116383,14 @@ var defaultOptions$2 = /*#__PURE__*/Object.freeze({
116367
116383
 
116368
116384
  var require$$3 = /*@__PURE__*/getAugmentedNamespace(defaultOptions$2);
116369
116385
 
116386
+ const tryCatch = (fn, ...args) => {
116387
+ try {
116388
+ return [null, fn(...args)];
116389
+ } catch(e) {
116390
+ return [e];
116391
+ }
116392
+ };
116393
+
116370
116394
  const parseError$1 = (e, type = 'parser') => {
116371
116395
  const {line, column} = e.loc || {
116372
116396
  line: 1,
@@ -116415,7 +116439,7 @@ const transform$4 = (ast, source, opts) => {
116415
116439
 
116416
116440
  const [, shebang] = cutShebang$1(source);
116417
116441
 
116418
- const [validationError] = tryCatch$7(validateRulesRelations, {
116442
+ const [validationError] = tryCatch(validateRulesRelations, {
116419
116443
  rules,
116420
116444
  pluginNames,
116421
116445
  });
@@ -116457,7 +116481,7 @@ const transformAsync$1 = async (ast, source, opts) => {
116457
116481
 
116458
116482
  const [, shebang] = cutShebang$1(source);
116459
116483
 
116460
- const [validationError] = tryCatch$7(validateRulesRelations, {
116484
+ const [validationError] = tryCatch(validateRulesRelations, {
116461
116485
  rules,
116462
116486
  pluginNames,
116463
116487
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/bundle",
3
- "version": "5.0.8",
3
+ "version": "5.0.9",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout bundle suitable for Deno and Browsers",