@putout/babel 5.0.1 → 5.0.3

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.
Files changed (2) hide show
  1. package/bundle/index.js +9 -259
  2. package/package.json +1 -1
package/bundle/index.js CHANGED
@@ -42364,13 +42364,6 @@ function generate(ast, opts = {}, code2) {
42364
42364
  }
42365
42365
 
42366
42366
  // ../babel-babel/node_modules/obug/dist/core.js
42367
- function coerce(value) {
42368
- if (value instanceof Error)
42369
- return value.stack || value.message;
42370
-
42371
- return value;
42372
- }
42373
-
42374
42367
  function selectColor(colors2, namespace) {
42375
42368
  let hash = 0;
42376
42369
 
@@ -42382,35 +42375,6 @@ function selectColor(colors2, namespace) {
42382
42375
  return colors2[Math.abs(hash) % colors2.length];
42383
42376
  }
42384
42377
 
42385
- function matchesTemplate(search, template) {
42386
- let searchIndex = 0;
42387
- let templateIndex = 0;
42388
- let starIndex = -1;
42389
- let matchIndex = 0;
42390
-
42391
- while (searchIndex < search.length)
42392
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*'))
42393
- if (template[templateIndex] === '*') {
42394
- starIndex = templateIndex;
42395
- matchIndex = searchIndex;
42396
- templateIndex++;
42397
- } else {
42398
- searchIndex++;
42399
- templateIndex++;
42400
- } else if (starIndex !== -1) {
42401
- templateIndex = starIndex + 1;
42402
- matchIndex++;
42403
- searchIndex = matchIndex;
42404
- } else
42405
- return false;
42406
-
42407
-
42408
- while (templateIndex < template.length && template[templateIndex] === '*')
42409
- templateIndex++;
42410
-
42411
- return templateIndex === template.length;
42412
- }
42413
-
42414
42378
  function humanize(value) {
42415
42379
  if (value >= 1e3)
42416
42380
  return `${(value / 1e3).toFixed(1)}s`;
@@ -42420,81 +42384,7 @@ function humanize(value) {
42420
42384
 
42421
42385
  var globalNamespaces = '';
42422
42386
 
42423
- function createDebug(namespace, options) {
42424
- let prevTime;
42425
- let enableOverride;
42426
- let namespacesCache;
42427
- let enabledCache;
42428
-
42429
- const debug2 = (...args) => {
42430
- if (!debug2.enabled)
42431
- return;
42432
-
42433
- const curr = Date.now();
42434
- const diff = curr - (prevTime || curr);
42435
-
42436
- prevTime = curr;
42437
- args[0] = coerce(args[0]);
42438
-
42439
- if (typeof args[0] !== 'string')
42440
- args.unshift('%O');
42441
-
42442
- let index2 = 0;
42443
-
42444
- args[0] = args[0].replace(/%([a-z%])/gi, (match, format) => {
42445
- if (match === '%%')
42446
- return '%';
42447
-
42448
- index2++;
42449
- const formatter = options.formatters[format];
42450
-
42451
- if (typeof formatter === 'function') {
42452
- const value = args[index2];
42453
-
42454
- match = formatter.call(debug2, value);
42455
- args.splice(index2, 1);
42456
- index2--;
42457
- }
42458
-
42459
- return match;
42460
- });
42461
- options.formatArgs.call(debug2, diff, args);
42462
- debug2.log(...args);
42463
- };
42464
-
42465
- debug2.extend = function(namespace$1, delimiter = ':') {
42466
- return createDebug(this.namespace + delimiter + namespace$1, {
42467
- useColors: this.useColors,
42468
- color: this.color,
42469
- formatArgs: this.formatArgs,
42470
- formatters: this.formatters,
42471
- inspectOpts: this.inspectOpts,
42472
- log: this.log,
42473
- humanize: this.humanize,
42474
- });
42475
- };
42476
- Object.assign(debug2, options);
42477
- debug2.namespace = namespace;
42478
- Object.defineProperty(debug2, 'enabled', {
42479
- enumerable: true,
42480
- configurable: false,
42481
- get: () => {
42482
- if (enableOverride != null)
42483
- return enableOverride;
42484
-
42485
- if (namespacesCache !== globalNamespaces) {
42486
- namespacesCache = globalNamespaces;
42487
- enabledCache = enabled(namespace);
42488
- }
42489
-
42490
- return enabledCache;
42491
- },
42492
- set: (v) => {
42493
- enableOverride = v;
42494
- },
42495
- });
42496
- return debug2;
42497
- }
42387
+ function createDebug() {}
42498
42388
 
42499
42389
  var names = [];
42500
42390
  var skips = [];
@@ -42516,159 +42406,19 @@ function enable(namespaces$1) {
42516
42406
  names.push(ns);
42517
42407
  }
42518
42408
 
42519
- function enabled(name) {
42520
- for (const skip2 of skips)
42521
- if (matchesTemplate(name, skip2))
42522
- return false;
42523
-
42524
- for (const ns of names)
42525
- if (matchesTemplate(name, ns))
42526
- return true;
42527
-
42528
- return false;
42529
- }
42530
-
42531
42409
  // ../babel-babel/node_modules/obug/dist/node.js
42532
- var import_node_tty = require('tty');
42533
- var import_node_util = require('util');
42534
-
42535
- var colors = process.stderr.getColorDepth && process.stderr.getColorDepth() > 2 ? [
42536
- 20,
42537
- 21,
42538
- 26,
42539
- 27,
42540
- 32,
42541
- 33,
42542
- 38,
42543
- 39,
42544
- 40,
42545
- 41,
42546
- 42,
42547
- 43,
42548
- 44,
42549
- 45,
42550
- 56,
42551
- 57,
42552
- 62,
42553
- 63,
42554
- 68,
42555
- 69,
42556
- 74,
42557
- 75,
42558
- 76,
42559
- 77,
42560
- 78,
42561
- 79,
42562
- 80,
42563
- 81,
42564
- 92,
42565
- 93,
42566
- 98,
42567
- 99,
42568
- 112,
42569
- 113,
42570
- 128,
42571
- 129,
42572
- 134,
42573
- 135,
42574
- 148,
42575
- 149,
42576
- 160,
42577
- 161,
42578
- 162,
42579
- 163,
42580
- 164,
42581
- 165,
42582
- 166,
42583
- 167,
42584
- 168,
42585
- 169,
42586
- 170,
42587
- 171,
42588
- 172,
42589
- 173,
42590
- 178,
42591
- 179,
42592
- 184,
42593
- 185,
42594
- 196,
42595
- 197,
42596
- 198,
42597
- 199,
42598
- 200,
42599
- 201,
42600
- 202,
42601
- 203,
42602
- 204,
42603
- 205,
42604
- 206,
42605
- 207,
42606
- 208,
42607
- 209,
42608
- 214,
42609
- 215,
42610
- 220,
42611
- 221,
42612
- ] : [
42613
- 6,
42614
- 2,
42615
- 3,
42616
- 4,
42617
- 5,
42618
- 1,
42619
- ];
42410
+ var import_node_util = {
42411
+ formatWithOptions: () => false,
42412
+ inspect: () => false,
42413
+ };
42620
42414
 
42621
- var inspectOpts = Object
42622
- .keys(process.env)
42623
- .filter((key) => /^debug_/i.test(key))
42624
- .reduce((obj, key) => {
42625
- const prop = key
42626
- .slice(6)
42627
- .toLowerCase()
42628
- .replace(/_([a-z])/g, (_, k) => k.toUpperCase());
42629
- let value = process.env[key];
42630
- const lowerCase = typeof value === 'string' && value.toLowerCase();
42631
-
42632
- if (value === 'null')
42633
- value = null;
42634
- else if (lowerCase === 'yes' || lowerCase === 'on' || lowerCase === 'true' || lowerCase === 'enabled')
42635
- value = true;
42636
- else if (lowerCase === 'no' || lowerCase === 'off' || lowerCase === 'false' || lowerCase === 'disabled')
42637
- value = false;
42638
- else
42639
- value = Number(value);
42640
-
42641
- obj[prop] = value;
42642
- return obj;
42643
- }, {});
42415
+ var colors = [];
42644
42416
 
42645
- function useColors() {
42646
- return 'colors' in inspectOpts ? Boolean(inspectOpts.colors) : (0, import_node_tty.isatty)(process.stderr.fd);
42647
- }
42417
+ var inspectOpts = {};
42648
42418
 
42649
- function getDate() {
42650
- if (inspectOpts.hideDate)
42651
- return '';
42652
-
42653
- return `${ /* @__PURE__ */new Date().toISOString()} `;
42654
- }
42419
+ function useColors() {}
42655
42420
 
42656
- function formatArgs(diff, args) {
42657
- const {namespace: name, useColors: useColors$1} = this;
42658
-
42659
- if (useColors$1) {
42660
- const c = this.color;
42661
- const colorCode = `\x1B[3${c < 8 ? c : `8;5;${c}`}`;
42662
- const prefix2 = ` ${colorCode};1m${name} \x1B[0m`;
42663
-
42664
- args[0] = prefix2 + args[0]
42665
- .split('\n')
42666
- .join(`
42667
- ${prefix2}`);
42668
- args.push(`${colorCode}m+${this.humanize(diff)}\x1B[0m`);
42669
- } else
42670
- args[0] = `${getDate()}${name} ${args[0]}`;
42671
- }
42421
+ function formatArgs() {}
42672
42422
 
42673
42423
  function log(...args) {
42674
42424
  process.stderr.write(`${(0, import_node_util.formatWithOptions)(this.inspectOpts, ...args)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/babel",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Babel 8 in CommonJS",