rollup 2.70.2 → 2.72.0

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/rollup.d.ts CHANGED
@@ -864,6 +864,8 @@ export interface ChokidarOptions {
864
864
  usePolling?: boolean;
865
865
  }
866
866
 
867
+ export type RollupWatchHooks = 'onError' | 'onStart' | 'onBundleStart' | 'onBundleEnd' | 'onEnd';
868
+
867
869
  export interface WatcherOptions {
868
870
  buildDelay?: number;
869
871
  chokidar?: ChokidarOptions;
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.70.2
4
- Fri, 15 Apr 2022 05:14:21 GMT - commit 030c56fd6b186a0ddfd57d143ad703f34fd2c17a
3
+ Rollup.js v2.72.0
4
+ Thu, 05 May 2022 04:32:50 GMT - commit 19aef1315cf45b04c74c37a290cbef8072ddfa6b
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.70.2
4
- Fri, 15 Apr 2022 05:14:21 GMT - commit 030c56fd6b186a0ddfd57d143ad703f34fd2c17a
3
+ Rollup.js v2.72.0
4
+ Thu, 05 May 2022 04:32:50 GMT - commit 19aef1315cf45b04c74c37a290cbef8072ddfa6b
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -9,21 +9,21 @@
9
9
  */
10
10
  'use strict';
11
11
 
12
- const require$$0$3 = require('events');
12
+ const rollup = require('./rollup.js');
13
13
  const require$$0$1 = require('fs');
14
- const require$$0$2 = require('path');
15
14
  const require$$2 = require('util');
16
15
  const require$$1 = require('stream');
17
- const rollup = require('./rollup.js');
16
+ const require$$0$2 = require('path');
18
17
  const require$$2$1 = require('os');
18
+ const require$$0$3 = require('events');
19
19
 
20
- var chokidar$1 = {};
20
+ var chokidar = {};
21
21
 
22
22
  const fs$3 = require$$0$1;
23
23
  const { Readable } = require$$1;
24
24
  const sysPath$3 = require$$0$2;
25
25
  const { promisify: promisify$3 } = require$$2;
26
- const picomatch$1 = rollup.picomatch;
26
+ const picomatch$1 = rollup.picomatch.exports;
27
27
 
28
28
  const readdir$1 = promisify$3(fs$3.readdir);
29
29
  const stat$3 = promisify$3(fs$3.stat);
@@ -345,7 +345,7 @@ var normalizePath$2 = function(path, stripTrailing) {
345
345
 
346
346
  Object.defineProperty(anymatch$2.exports, "__esModule", { value: true });
347
347
 
348
- const picomatch = rollup.picomatch;
348
+ const picomatch = rollup.picomatch.exports;
349
349
  const normalizePath$1 = normalizePath$2;
350
350
 
351
351
  /**
@@ -663,117 +663,117 @@ var utils$3 = {};
663
663
 
664
664
  (function (exports) {
665
665
 
666
- exports.isInteger = num => {
667
- if (typeof num === 'number') {
668
- return Number.isInteger(num);
669
- }
670
- if (typeof num === 'string' && num.trim() !== '') {
671
- return Number.isInteger(Number(num));
672
- }
673
- return false;
674
- };
675
-
676
- /**
677
- * Find a node of the given type
678
- */
679
-
680
- exports.find = (node, type) => node.nodes.find(node => node.type === type);
681
-
682
- /**
683
- * Find a node of the given type
684
- */
685
-
686
- exports.exceedsLimit = (min, max, step = 1, limit) => {
687
- if (limit === false) return false;
688
- if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
689
- return ((Number(max) - Number(min)) / Number(step)) >= limit;
690
- };
691
-
692
- /**
693
- * Escape the given node with '\\' before node.value
694
- */
695
-
696
- exports.escapeNode = (block, n = 0, type) => {
697
- let node = block.nodes[n];
698
- if (!node) return;
699
-
700
- if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
701
- if (node.escaped !== true) {
702
- node.value = '\\' + node.value;
703
- node.escaped = true;
704
- }
705
- }
706
- };
707
-
708
- /**
709
- * Returns true if the given brace node should be enclosed in literal braces
710
- */
711
-
712
- exports.encloseBrace = node => {
713
- if (node.type !== 'brace') return false;
714
- if ((node.commas >> 0 + node.ranges >> 0) === 0) {
715
- node.invalid = true;
716
- return true;
717
- }
718
- return false;
719
- };
720
-
721
- /**
722
- * Returns true if a brace node is invalid.
723
- */
724
-
725
- exports.isInvalidBrace = block => {
726
- if (block.type !== 'brace') return false;
727
- if (block.invalid === true || block.dollar) return true;
728
- if ((block.commas >> 0 + block.ranges >> 0) === 0) {
729
- block.invalid = true;
730
- return true;
731
- }
732
- if (block.open !== true || block.close !== true) {
733
- block.invalid = true;
734
- return true;
735
- }
736
- return false;
737
- };
738
-
739
- /**
740
- * Returns true if a node is an open or close node
741
- */
742
-
743
- exports.isOpenOrClose = node => {
744
- if (node.type === 'open' || node.type === 'close') {
745
- return true;
746
- }
747
- return node.open === true || node.close === true;
748
- };
749
-
750
- /**
751
- * Reduce an array of text nodes.
752
- */
753
-
754
- exports.reduce = nodes => nodes.reduce((acc, node) => {
755
- if (node.type === 'text') acc.push(node.value);
756
- if (node.type === 'range') node.type = 'text';
757
- return acc;
758
- }, []);
759
-
760
- /**
761
- * Flatten an array
762
- */
763
-
764
- exports.flatten = (...args) => {
765
- const result = [];
766
- const flat = arr => {
767
- for (let i = 0; i < arr.length; i++) {
768
- let ele = arr[i];
769
- Array.isArray(ele) ? flat(ele) : ele !== void 0 && result.push(ele);
770
- }
771
- return result;
772
- };
773
- flat(args);
774
- return result;
775
- };
776
- }(utils$3));
666
+ exports.isInteger = num => {
667
+ if (typeof num === 'number') {
668
+ return Number.isInteger(num);
669
+ }
670
+ if (typeof num === 'string' && num.trim() !== '') {
671
+ return Number.isInteger(Number(num));
672
+ }
673
+ return false;
674
+ };
675
+
676
+ /**
677
+ * Find a node of the given type
678
+ */
679
+
680
+ exports.find = (node, type) => node.nodes.find(node => node.type === type);
681
+
682
+ /**
683
+ * Find a node of the given type
684
+ */
685
+
686
+ exports.exceedsLimit = (min, max, step = 1, limit) => {
687
+ if (limit === false) return false;
688
+ if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
689
+ return ((Number(max) - Number(min)) / Number(step)) >= limit;
690
+ };
691
+
692
+ /**
693
+ * Escape the given node with '\\' before node.value
694
+ */
695
+
696
+ exports.escapeNode = (block, n = 0, type) => {
697
+ let node = block.nodes[n];
698
+ if (!node) return;
699
+
700
+ if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
701
+ if (node.escaped !== true) {
702
+ node.value = '\\' + node.value;
703
+ node.escaped = true;
704
+ }
705
+ }
706
+ };
707
+
708
+ /**
709
+ * Returns true if the given brace node should be enclosed in literal braces
710
+ */
711
+
712
+ exports.encloseBrace = node => {
713
+ if (node.type !== 'brace') return false;
714
+ if ((node.commas >> 0 + node.ranges >> 0) === 0) {
715
+ node.invalid = true;
716
+ return true;
717
+ }
718
+ return false;
719
+ };
720
+
721
+ /**
722
+ * Returns true if a brace node is invalid.
723
+ */
724
+
725
+ exports.isInvalidBrace = block => {
726
+ if (block.type !== 'brace') return false;
727
+ if (block.invalid === true || block.dollar) return true;
728
+ if ((block.commas >> 0 + block.ranges >> 0) === 0) {
729
+ block.invalid = true;
730
+ return true;
731
+ }
732
+ if (block.open !== true || block.close !== true) {
733
+ block.invalid = true;
734
+ return true;
735
+ }
736
+ return false;
737
+ };
738
+
739
+ /**
740
+ * Returns true if a node is an open or close node
741
+ */
742
+
743
+ exports.isOpenOrClose = node => {
744
+ if (node.type === 'open' || node.type === 'close') {
745
+ return true;
746
+ }
747
+ return node.open === true || node.close === true;
748
+ };
749
+
750
+ /**
751
+ * Reduce an array of text nodes.
752
+ */
753
+
754
+ exports.reduce = nodes => nodes.reduce((acc, node) => {
755
+ if (node.type === 'text') acc.push(node.value);
756
+ if (node.type === 'range') node.type = 'text';
757
+ return acc;
758
+ }, []);
759
+
760
+ /**
761
+ * Flatten an array
762
+ */
763
+
764
+ exports.flatten = (...args) => {
765
+ const result = [];
766
+ const flat = arr => {
767
+ for (let i = 0; i < arr.length; i++) {
768
+ let ele = arr[i];
769
+ Array.isArray(ele) ? flat(ele) : ele !== void 0 && result.push(ele);
770
+ }
771
+ return result;
772
+ };
773
+ flat(args);
774
+ return result;
775
+ };
776
+ } (utils$3));
777
777
 
778
778
  const utils$2 = utils$3;
779
779
 
@@ -2079,6 +2079,8 @@ braces$1.create = (input, options = {}) => {
2079
2079
 
2080
2080
  var braces_1 = braces$1;
2081
2081
 
2082
+ var binaryExtensions$1 = {exports: {}};
2083
+
2082
2084
  const require$$0 = [
2083
2085
  "3dm",
2084
2086
  "3ds",
@@ -2340,10 +2342,12 @@ const require$$0 = [
2340
2342
  "zipx"
2341
2343
  ];
2342
2344
 
2343
- var binaryExtensions$1 = require$$0;
2345
+ (function (module) {
2346
+ module.exports = require$$0;
2347
+ } (binaryExtensions$1));
2344
2348
 
2345
2349
  const path = require$$0$2;
2346
- const binaryExtensions = binaryExtensions$1;
2350
+ const binaryExtensions = binaryExtensions$1.exports;
2347
2351
 
2348
2352
  const extensions = new Set(binaryExtensions);
2349
2353
 
@@ -2353,70 +2357,70 @@ var constants = {};
2353
2357
 
2354
2358
  (function (exports) {
2355
2359
 
2356
- const {sep} = require$$0$2;
2357
- const {platform} = process;
2358
- const os = require$$2$1;
2359
-
2360
- exports.EV_ALL = 'all';
2361
- exports.EV_READY = 'ready';
2362
- exports.EV_ADD = 'add';
2363
- exports.EV_CHANGE = 'change';
2364
- exports.EV_ADD_DIR = 'addDir';
2365
- exports.EV_UNLINK = 'unlink';
2366
- exports.EV_UNLINK_DIR = 'unlinkDir';
2367
- exports.EV_RAW = 'raw';
2368
- exports.EV_ERROR = 'error';
2369
-
2370
- exports.STR_DATA = 'data';
2371
- exports.STR_END = 'end';
2372
- exports.STR_CLOSE = 'close';
2373
-
2374
- exports.FSEVENT_CREATED = 'created';
2375
- exports.FSEVENT_MODIFIED = 'modified';
2376
- exports.FSEVENT_DELETED = 'deleted';
2377
- exports.FSEVENT_MOVED = 'moved';
2378
- exports.FSEVENT_CLONED = 'cloned';
2379
- exports.FSEVENT_UNKNOWN = 'unknown';
2380
- exports.FSEVENT_TYPE_FILE = 'file';
2381
- exports.FSEVENT_TYPE_DIRECTORY = 'directory';
2382
- exports.FSEVENT_TYPE_SYMLINK = 'symlink';
2383
-
2384
- exports.KEY_LISTENERS = 'listeners';
2385
- exports.KEY_ERR = 'errHandlers';
2386
- exports.KEY_RAW = 'rawEmitters';
2387
- exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
2388
-
2389
- exports.DOT_SLASH = `.${sep}`;
2390
-
2391
- exports.BACK_SLASH_RE = /\\/g;
2392
- exports.DOUBLE_SLASH_RE = /\/\//;
2393
- exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
2394
- exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
2395
- exports.REPLACER_RE = /^\.[/\\]/;
2396
-
2397
- exports.SLASH = '/';
2398
- exports.SLASH_SLASH = '//';
2399
- exports.BRACE_START = '{';
2400
- exports.BANG = '!';
2401
- exports.ONE_DOT = '.';
2402
- exports.TWO_DOTS = '..';
2403
- exports.STAR = '*';
2404
- exports.GLOBSTAR = '**';
2405
- exports.ROOT_GLOBSTAR = '/**/*';
2406
- exports.SLASH_GLOBSTAR = '/**';
2407
- exports.DIR_SUFFIX = 'Dir';
2408
- exports.ANYMATCH_OPTS = {dot: true};
2409
- exports.STRING_TYPE = 'string';
2410
- exports.FUNCTION_TYPE = 'function';
2411
- exports.EMPTY_STR = '';
2412
- exports.EMPTY_FN = () => {};
2413
- exports.IDENTITY_FN = val => val;
2414
-
2415
- exports.isWindows = platform === 'win32';
2416
- exports.isMacos = platform === 'darwin';
2417
- exports.isLinux = platform === 'linux';
2418
- exports.isIBMi = os.type() === 'OS400';
2419
- }(constants));
2360
+ const {sep} = require$$0$2;
2361
+ const {platform} = process;
2362
+ const os = require$$2$1;
2363
+
2364
+ exports.EV_ALL = 'all';
2365
+ exports.EV_READY = 'ready';
2366
+ exports.EV_ADD = 'add';
2367
+ exports.EV_CHANGE = 'change';
2368
+ exports.EV_ADD_DIR = 'addDir';
2369
+ exports.EV_UNLINK = 'unlink';
2370
+ exports.EV_UNLINK_DIR = 'unlinkDir';
2371
+ exports.EV_RAW = 'raw';
2372
+ exports.EV_ERROR = 'error';
2373
+
2374
+ exports.STR_DATA = 'data';
2375
+ exports.STR_END = 'end';
2376
+ exports.STR_CLOSE = 'close';
2377
+
2378
+ exports.FSEVENT_CREATED = 'created';
2379
+ exports.FSEVENT_MODIFIED = 'modified';
2380
+ exports.FSEVENT_DELETED = 'deleted';
2381
+ exports.FSEVENT_MOVED = 'moved';
2382
+ exports.FSEVENT_CLONED = 'cloned';
2383
+ exports.FSEVENT_UNKNOWN = 'unknown';
2384
+ exports.FSEVENT_TYPE_FILE = 'file';
2385
+ exports.FSEVENT_TYPE_DIRECTORY = 'directory';
2386
+ exports.FSEVENT_TYPE_SYMLINK = 'symlink';
2387
+
2388
+ exports.KEY_LISTENERS = 'listeners';
2389
+ exports.KEY_ERR = 'errHandlers';
2390
+ exports.KEY_RAW = 'rawEmitters';
2391
+ exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
2392
+
2393
+ exports.DOT_SLASH = `.${sep}`;
2394
+
2395
+ exports.BACK_SLASH_RE = /\\/g;
2396
+ exports.DOUBLE_SLASH_RE = /\/\//;
2397
+ exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
2398
+ exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
2399
+ exports.REPLACER_RE = /^\.[/\\]/;
2400
+
2401
+ exports.SLASH = '/';
2402
+ exports.SLASH_SLASH = '//';
2403
+ exports.BRACE_START = '{';
2404
+ exports.BANG = '!';
2405
+ exports.ONE_DOT = '.';
2406
+ exports.TWO_DOTS = '..';
2407
+ exports.STAR = '*';
2408
+ exports.GLOBSTAR = '**';
2409
+ exports.ROOT_GLOBSTAR = '/**/*';
2410
+ exports.SLASH_GLOBSTAR = '/**';
2411
+ exports.DIR_SUFFIX = 'Dir';
2412
+ exports.ANYMATCH_OPTS = {dot: true};
2413
+ exports.STRING_TYPE = 'string';
2414
+ exports.FUNCTION_TYPE = 'function';
2415
+ exports.EMPTY_STR = '';
2416
+ exports.EMPTY_FN = () => {};
2417
+ exports.IDENTITY_FN = val => val;
2418
+
2419
+ exports.isWindows = platform === 'win32';
2420
+ exports.isMacos = platform === 'darwin';
2421
+ exports.isLinux = platform === 'linux';
2422
+ exports.isIBMi = os.type() === 'OS400';
2423
+ } (constants));
2420
2424
 
2421
2425
  const fs$2 = require$$0$1;
2422
2426
  const sysPath$2 = require$$0$2;
@@ -4544,7 +4548,7 @@ _readdirp(root, opts) {
4544
4548
  }
4545
4549
 
4546
4550
  // Export FSWatcher class
4547
- chokidar$1.FSWatcher = FSWatcher;
4551
+ chokidar.FSWatcher = FSWatcher;
4548
4552
 
4549
4553
  /**
4550
4554
  * Instantiates watcher with paths to be tracked.
@@ -4558,9 +4562,7 @@ const watch = (paths, options) => {
4558
4562
  return watcher;
4559
4563
  };
4560
4564
 
4561
- chokidar$1.watch = watch;
4562
-
4563
- const chokidar = chokidar$1;
4565
+ chokidar.watch = watch;
4564
4566
 
4565
4567
  exports.chokidar = chokidar;
4566
4568
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.70.2
4
- Fri, 15 Apr 2022 05:14:21 GMT - commit 030c56fd6b186a0ddfd57d143ad703f34fd2c17a
3
+ Rollup.js v2.72.0
4
+ Thu, 05 May 2022 04:32:50 GMT - commit 19aef1315cf45b04c74c37a290cbef8072ddfa6b
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -13,8 +13,8 @@ const require$$0$1 = require('fs');
13
13
  const require$$0 = require('path');
14
14
  const process$1 = require('process');
15
15
  const url = require('url');
16
- const tty = require('tty');
17
16
  const rollup = require('./rollup.js');
17
+ const tty = require('tty');
18
18
  const mergeOptions = require('./mergeOptions.js');
19
19
 
20
20
  function _interopNamespaceDefault(e) {
@@ -614,7 +614,9 @@ async function loadConfigFromBundledFile(fileName, bundledCode) {
614
614
  module._compile(bundledCode, requiredFileName);
615
615
  }
616
616
  else {
617
- defaultLoader(module, requiredFileName);
617
+ if (defaultLoader) {
618
+ defaultLoader(module, requiredFileName);
619
+ }
618
620
  }
619
621
  };
620
622
  delete require.cache[resolvedFileName];
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.70.2
4
- Fri, 15 Apr 2022 05:14:21 GMT - commit 030c56fd6b186a0ddfd57d143ad703f34fd2c17a
3
+ Rollup.js v2.72.0
4
+ Thu, 05 May 2022 04:32:50 GMT - commit 19aef1315cf45b04c74c37a290cbef8072ddfa6b
5
5
 
6
6
  https://github.com/rollup/rollup
7
7