rollup 4.18.1 → 4.19.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/dist/bin/rollup CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
3
  @license
4
- Rollup.js v4.18.1
5
- Mon, 08 Jul 2024 15:24:39 GMT - commit 21f9a4949358b60801c948cd4777d7a39d9e6de0
4
+ Rollup.js v4.19.1
5
+ Sat, 27 Jul 2024 04:53:31 GMT - commit 8b967917c2923dc6a02ca1238261387aefa2cb2f
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
@@ -1307,6 +1307,9 @@ function prettyMilliseconds(milliseconds, options) {
1307
1307
 
1308
1308
  options = {...options};
1309
1309
 
1310
+ const sign = milliseconds < 0 ? '-' : '';
1311
+ milliseconds = milliseconds < 0 ? -milliseconds : milliseconds; // Cannot use `Math.abs()` because of BigInt support.
1312
+
1310
1313
  if (options.colonNotation) {
1311
1314
  options.compact = false;
1312
1315
  options.formatSubMilliseconds = false;
@@ -1336,7 +1339,7 @@ function prettyMilliseconds(milliseconds, options) {
1336
1339
  return;
1337
1340
  }
1338
1341
 
1339
- valueString = valueString ?? String(value);
1342
+ valueString ??= String(value);
1340
1343
  if (options.colonNotation) {
1341
1344
  const wholeDigits = valueString.includes('.') ? valueString.split('.')[0].length : valueString.length;
1342
1345
  const minLength = result.length > 0 ? 2 : 1;
@@ -1415,7 +1418,7 @@ function prettyMilliseconds(milliseconds, options) {
1415
1418
  }
1416
1419
 
1417
1420
  if (result.length === 0) {
1418
- return '0' + (options.verbose ? ' milliseconds' : 'ms');
1421
+ return sign + '0' + (options.verbose ? ' milliseconds' : 'ms');
1419
1422
  }
1420
1423
 
1421
1424
  const separator = options.colonNotation ? ':' : ' ';
@@ -1423,7 +1426,7 @@ function prettyMilliseconds(milliseconds, options) {
1423
1426
  result = result.slice(0, Math.max(options.unitCount, 1));
1424
1427
  }
1425
1428
 
1426
- return result.join(separator);
1429
+ return sign + result.join(separator);
1427
1430
  }
1428
1431
 
1429
1432
  const BYTE_UNITS = [
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.18.1
4
- Mon, 08 Jul 2024 15:24:39 GMT - commit 21f9a4949358b60801c948cd4777d7a39d9e6de0
3
+ Rollup.js v4.19.1
4
+ Sat, 27 Jul 2024 04:53:31 GMT - commit 8b967917c2923dc6a02ca1238261387aefa2cb2f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.18.1
4
- Mon, 08 Jul 2024 15:24:39 GMT - commit 21f9a4949358b60801c948cd4777d7a39d9e6de0
3
+ Rollup.js v4.19.1
4
+ Sat, 27 Jul 2024 04:53:31 GMT - commit 8b967917c2923dc6a02ca1238261387aefa2cb2f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
package/dist/es/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v4.18.1
4
- Mon, 08 Jul 2024 15:24:39 GMT - commit 21f9a4949358b60801c948cd4777d7a39d9e6de0
3
+ Rollup.js v4.19.1
4
+ Sat, 27 Jul 2024 04:53:31 GMT - commit 8b967917c2923dc6a02ca1238261387aefa2cb2f
5
5
 
6
6
  https://github.com/rollup/rollup
7
7