rollup 3.7.6-0 → 3.8.1

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/LICENSE.md CHANGED
@@ -247,6 +247,23 @@ Repository: jonschlinkert/fill-range
247
247
 
248
248
  ---------------------------------------
249
249
 
250
+ ## flru
251
+ License: MIT
252
+ By: Luke Edwards
253
+ Repository: lukeed/flru
254
+
255
+ > MIT License
256
+ >
257
+ > Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
258
+ >
259
+ > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
260
+ >
261
+ > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
262
+ >
263
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
264
+
265
+ ---------------------------------------
266
+
250
267
  ## glob-parent
251
268
  License: ISC
252
269
  By: Gulp Team, Elan Shanker, Blaine Bublitz
package/dist/bin/rollup CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  /*
4
4
  @license
5
- Rollup.js v3.7.6-0
6
- Sun, 18 Dec 2022 05:56:49 GMT - commit d226f7976dc543ff814af389e183d627d4e94ed4
5
+ Rollup.js v3.8.1
6
+ Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
7
7
 
8
8
  https://github.com/rollup/rollup
9
9
 
@@ -1388,10 +1388,130 @@ function prettyMilliseconds(milliseconds, options = {}) {
1388
1388
  return options.colonNotation ? result.join('') : result.join(' ');
1389
1389
  }
1390
1390
 
1391
+ const BYTE_UNITS = [
1392
+ 'B',
1393
+ 'kB',
1394
+ 'MB',
1395
+ 'GB',
1396
+ 'TB',
1397
+ 'PB',
1398
+ 'EB',
1399
+ 'ZB',
1400
+ 'YB',
1401
+ ];
1402
+
1403
+ const BIBYTE_UNITS = [
1404
+ 'B',
1405
+ 'kiB',
1406
+ 'MiB',
1407
+ 'GiB',
1408
+ 'TiB',
1409
+ 'PiB',
1410
+ 'EiB',
1411
+ 'ZiB',
1412
+ 'YiB',
1413
+ ];
1414
+
1415
+ const BIT_UNITS = [
1416
+ 'b',
1417
+ 'kbit',
1418
+ 'Mbit',
1419
+ 'Gbit',
1420
+ 'Tbit',
1421
+ 'Pbit',
1422
+ 'Ebit',
1423
+ 'Zbit',
1424
+ 'Ybit',
1425
+ ];
1426
+
1427
+ const BIBIT_UNITS = [
1428
+ 'b',
1429
+ 'kibit',
1430
+ 'Mibit',
1431
+ 'Gibit',
1432
+ 'Tibit',
1433
+ 'Pibit',
1434
+ 'Eibit',
1435
+ 'Zibit',
1436
+ 'Yibit',
1437
+ ];
1438
+
1439
+ /*
1440
+ Formats the given number using `Number#toLocaleString`.
1441
+ - If locale is a string, the value is expected to be a locale-key (for example: `de`).
1442
+ - If locale is true, the system default locale is used for translation.
1443
+ - If no value for locale is specified, the number is returned unmodified.
1444
+ */
1445
+ const toLocaleString = (number, locale, options) => {
1446
+ let result = number;
1447
+ if (typeof locale === 'string' || Array.isArray(locale)) {
1448
+ result = number.toLocaleString(locale, options);
1449
+ } else if (locale === true || options !== undefined) {
1450
+ result = number.toLocaleString(undefined, options);
1451
+ }
1452
+
1453
+ return result;
1454
+ };
1455
+
1456
+ function prettyBytes(number, options) {
1457
+ if (!Number.isFinite(number)) {
1458
+ throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
1459
+ }
1460
+
1461
+ options = {
1462
+ bits: false,
1463
+ binary: false,
1464
+ ...options,
1465
+ };
1466
+
1467
+ const UNITS = options.bits
1468
+ ? (options.binary ? BIBIT_UNITS : BIT_UNITS)
1469
+ : (options.binary ? BIBYTE_UNITS : BYTE_UNITS);
1470
+
1471
+ if (options.signed && number === 0) {
1472
+ return ` 0 ${UNITS[0]}`;
1473
+ }
1474
+
1475
+ const isNegative = number < 0;
1476
+ const prefix = isNegative ? '-' : (options.signed ? '+' : '');
1477
+
1478
+ if (isNegative) {
1479
+ number = -number;
1480
+ }
1481
+
1482
+ let localeOptions;
1483
+
1484
+ if (options.minimumFractionDigits !== undefined) {
1485
+ localeOptions = {minimumFractionDigits: options.minimumFractionDigits};
1486
+ }
1487
+
1488
+ if (options.maximumFractionDigits !== undefined) {
1489
+ localeOptions = {maximumFractionDigits: options.maximumFractionDigits, ...localeOptions};
1490
+ }
1491
+
1492
+ if (number < 1) {
1493
+ const numberString = toLocaleString(number, options.locale, localeOptions);
1494
+ return prefix + numberString + ' ' + UNITS[0];
1495
+ }
1496
+
1497
+ const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);
1498
+ number /= (options.binary ? 1024 : 1000) ** exponent;
1499
+
1500
+ if (!localeOptions) {
1501
+ number = number.toPrecision(3);
1502
+ }
1503
+
1504
+ const numberString = toLocaleString(Number(number), options.locale, localeOptions);
1505
+
1506
+ const unit = UNITS[exponent];
1507
+
1508
+ return prefix + numberString + ' ' + unit;
1509
+ }
1510
+
1391
1511
  function printTimings(timings) {
1392
1512
  for (const [label, [time, memory, total]] of Object.entries(timings)) {
1393
1513
  const appliedColor = label[0] === '#' ? (label[1] !== '#' ? rollup.underline : rollup.bold) : (text) => text;
1394
- const row = `${label}: ${time.toFixed(0)}ms, ${rollup.prettyBytes(memory)} / ${rollup.prettyBytes(total)}`;
1514
+ const row = `${label}: ${time.toFixed(0)}ms, ${prettyBytes(memory)} / ${prettyBytes(total)}`;
1395
1515
  console.info(appliedColor(row));
1396
1516
  }
1397
1517
  }
package/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v3.7.6-0
4
- Sun, 18 Dec 2022 05:56:49 GMT - commit d226f7976dc543ff814af389e183d627d4e94ed4
3
+ Rollup.js v3.8.1
4
+ Fri, 23 Dec 2022 05:34:14 GMT - commit 571f3a83d4e24f7bfa9b085cf9736ccdf89e8251
5
5
 
6
6
  https://github.com/rollup/rollup
7
7