rollup 4.27.2 → 4.27.4
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/dist/bin/rollup +76 -64
- package/dist/es/getLogFilter.js +2 -2
- package/dist/es/parseAst.js +2 -2
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/node-entry.js +519 -906
- package/dist/es/shared/parseAst.js +3 -3
- package/dist/es/shared/watch.js +3 -3
- package/dist/getLogFilter.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/parseAst.js +2 -2
- package/dist/rollup.js +2 -2
- package/dist/shared/fsevents-importer.js +2 -2
- package/dist/shared/index.js +3 -3
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/parseAst.js +2 -2
- package/dist/shared/rollup.js +556 -903
- package/dist/shared/watch-cli.js +20 -4
- package/dist/shared/watch.js +3 -3
- package/package.json +30 -30
package/dist/bin/rollup
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*
|
|
3
3
|
@license
|
|
4
|
-
Rollup.js v4.27.
|
|
5
|
-
|
|
4
|
+
Rollup.js v4.27.4
|
|
5
|
+
Sat, 23 Nov 2024 06:59:50 GMT - commit e805b546405a4e6cfccd3fe73e9f4df770023824
|
|
6
6
|
|
|
7
7
|
https://github.com/rollup/rollup
|
|
8
8
|
|
|
@@ -15,8 +15,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
15
15
|
const process$1 = require('node:process');
|
|
16
16
|
const rollup = require('../shared/rollup.js');
|
|
17
17
|
const require$$2 = require('util');
|
|
18
|
-
const require$$0
|
|
19
|
-
const require$$0 = require('fs');
|
|
18
|
+
const require$$0 = require('path');
|
|
19
|
+
const require$$0$1 = require('fs');
|
|
20
20
|
const parseAst_js = require('../shared/parseAst.js');
|
|
21
21
|
const fseventsImporter = require('../shared/fsevents-importer.js');
|
|
22
22
|
const promises = require('node:fs/promises');
|
|
@@ -1219,8 +1219,8 @@ const parser = new YargsParser({
|
|
|
1219
1219
|
return env;
|
|
1220
1220
|
},
|
|
1221
1221
|
format: require$$2.format,
|
|
1222
|
-
normalize: require$$0
|
|
1223
|
-
resolve: require$$0
|
|
1222
|
+
normalize: require$$0.normalize,
|
|
1223
|
+
resolve: require$$0.resolve,
|
|
1224
1224
|
// TODO: figure out a way to combine ESM and CJS coverage, such that
|
|
1225
1225
|
// we can exercise all the lines below:
|
|
1226
1226
|
require: (path) => {
|
|
@@ -1229,7 +1229,7 @@ const parser = new YargsParser({
|
|
|
1229
1229
|
}
|
|
1230
1230
|
else if (path.match(/\.json$/)) {
|
|
1231
1231
|
// Addresses: https://github.com/yargs/yargs/issues/2040
|
|
1232
|
-
return JSON.parse(require$$0.readFileSync(path, 'utf8'));
|
|
1232
|
+
return JSON.parse(require$$0$1.readFileSync(path, 'utf8'));
|
|
1233
1233
|
}
|
|
1234
1234
|
else {
|
|
1235
1235
|
throw Error('only .json config files are supported in ESM');
|
|
@@ -1426,67 +1426,79 @@ function prettyMilliseconds(milliseconds, options) {
|
|
|
1426
1426
|
const parsed = parseMilliseconds(milliseconds);
|
|
1427
1427
|
const days = BigInt(parsed.days);
|
|
1428
1428
|
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1429
|
+
if (options.hideYearAndDays) {
|
|
1430
|
+
add((BigInt(days) * 24n) + BigInt(parsed.hours), 'hour', 'h');
|
|
1431
|
+
} else {
|
|
1432
|
+
if (options.hideYear) {
|
|
1433
|
+
add(days, 'day', 'd');
|
|
1434
|
+
} else {
|
|
1435
|
+
add(days / 365n, 'year', 'y');
|
|
1436
|
+
add(days % 365n, 'day', 'd');
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
add(Number(parsed.hours), 'hour', 'h');
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1432
1442
|
add(Number(parsed.minutes), 'minute', 'm');
|
|
1433
1443
|
|
|
1434
|
-
if (
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1444
|
+
if (!options.hideSeconds) {
|
|
1445
|
+
if (
|
|
1446
|
+
options.separateMilliseconds
|
|
1447
|
+
|| options.formatSubMilliseconds
|
|
1448
|
+
|| (!options.colonNotation && milliseconds < 1000)
|
|
1449
|
+
) {
|
|
1450
|
+
const seconds = Number(parsed.seconds);
|
|
1451
|
+
const milliseconds = Number(parsed.milliseconds);
|
|
1452
|
+
const microseconds = Number(parsed.microseconds);
|
|
1453
|
+
const nanoseconds = Number(parsed.nanoseconds);
|
|
1454
|
+
|
|
1455
|
+
add(seconds, 'second', 's');
|
|
1456
|
+
|
|
1457
|
+
if (options.formatSubMilliseconds) {
|
|
1458
|
+
add(milliseconds, 'millisecond', 'ms');
|
|
1459
|
+
add(microseconds, 'microsecond', 'µs');
|
|
1460
|
+
add(nanoseconds, 'nanosecond', 'ns');
|
|
1461
|
+
} else {
|
|
1462
|
+
const millisecondsAndBelow
|
|
1463
|
+
= milliseconds
|
|
1464
|
+
+ (microseconds / 1000)
|
|
1465
|
+
+ (nanoseconds / 1e6);
|
|
1466
|
+
|
|
1467
|
+
const millisecondsDecimalDigits
|
|
1468
|
+
= typeof options.millisecondsDecimalDigits === 'number'
|
|
1469
|
+
? options.millisecondsDecimalDigits
|
|
1470
|
+
: 0;
|
|
1471
|
+
|
|
1472
|
+
const roundedMilliseconds = millisecondsAndBelow >= 1
|
|
1473
|
+
? Math.round(millisecondsAndBelow)
|
|
1474
|
+
: Math.ceil(millisecondsAndBelow);
|
|
1475
|
+
|
|
1476
|
+
const millisecondsString = millisecondsDecimalDigits
|
|
1477
|
+
? millisecondsAndBelow.toFixed(millisecondsDecimalDigits)
|
|
1478
|
+
: roundedMilliseconds;
|
|
1479
|
+
|
|
1480
|
+
add(
|
|
1481
|
+
Number.parseFloat(millisecondsString),
|
|
1482
|
+
'millisecond',
|
|
1483
|
+
'ms',
|
|
1484
|
+
millisecondsString,
|
|
1485
|
+
);
|
|
1486
|
+
}
|
|
1450
1487
|
} else {
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
const millisecondsString = millisecondsDecimalDigits
|
|
1466
|
-
? millisecondsAndBelow.toFixed(millisecondsDecimalDigits)
|
|
1467
|
-
: roundedMilliseconds;
|
|
1468
|
-
|
|
1469
|
-
add(
|
|
1470
|
-
Number.parseFloat(millisecondsString),
|
|
1471
|
-
'millisecond',
|
|
1472
|
-
'ms',
|
|
1473
|
-
millisecondsString,
|
|
1474
|
-
);
|
|
1488
|
+
const seconds = (
|
|
1489
|
+
(isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds)
|
|
1490
|
+
/ 1000
|
|
1491
|
+
) % 60;
|
|
1492
|
+
const secondsDecimalDigits
|
|
1493
|
+
= typeof options.secondsDecimalDigits === 'number'
|
|
1494
|
+
? options.secondsDecimalDigits
|
|
1495
|
+
: 1;
|
|
1496
|
+
const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
|
|
1497
|
+
const secondsString = options.keepDecimalsOnWholeSeconds
|
|
1498
|
+
? secondsFixed
|
|
1499
|
+
: secondsFixed.replace(/\.0+$/, '');
|
|
1500
|
+
add(Number.parseFloat(secondsString), 'second', 's', secondsString);
|
|
1475
1501
|
}
|
|
1476
|
-
} else {
|
|
1477
|
-
const seconds = (
|
|
1478
|
-
(isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds)
|
|
1479
|
-
/ 1000
|
|
1480
|
-
) % 60;
|
|
1481
|
-
const secondsDecimalDigits
|
|
1482
|
-
= typeof options.secondsDecimalDigits === 'number'
|
|
1483
|
-
? options.secondsDecimalDigits
|
|
1484
|
-
: 1;
|
|
1485
|
-
const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
|
|
1486
|
-
const secondsString = options.keepDecimalsOnWholeSeconds
|
|
1487
|
-
? secondsFixed
|
|
1488
|
-
: secondsFixed.replace(/\.0+$/, '');
|
|
1489
|
-
add(Number.parseFloat(secondsString), 'second', 's', secondsString);
|
|
1490
1502
|
}
|
|
1491
1503
|
|
|
1492
1504
|
if (result.length === 0) {
|
package/dist/es/getLogFilter.js
CHANGED
package/dist/es/parseAst.js
CHANGED
package/dist/es/rollup.js
CHANGED