rollup 2.38.3 → 2.39.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.
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.38.3
4
- Mon, 01 Feb 2021 06:15:21 GMT - commit 683cf48a5278987f08ff3958074c49a80b1ae3eb
3
+ Rollup.js v2.39.1
4
+ Tue, 23 Feb 2021 05:45:51 GMT - commit a8a56fc29978cef41dde28f8f14e3b29119768d5
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -11,14 +11,16 @@
11
11
  'use strict';
12
12
 
13
13
  var require$$0$2 = require('events');
14
- var fs = require('fs');
15
- var sysPath = require('path');
16
- var util = require('util');
17
- var require$$0$1 = require('stream');
14
+ var fs$4 = require('fs');
15
+ var path$3 = require('path');
16
+ var require$$0$1 = require('util');
17
+ var require$$1 = require('stream');
18
+ var require$$2 = require('os');
18
19
  var rollup = require('./rollup.js');
19
- var require$$1$1 = require('os');
20
20
 
21
- var utils = rollup.createCommonjsModule(function (module, exports) {
21
+ var utils = {};
22
+
23
+ (function (exports) {
22
24
 
23
25
  exports.isInteger = num => {
24
26
  if (typeof num === 'number') {
@@ -130,16 +132,18 @@ exports.flatten = (...args) => {
130
132
  flat(args);
131
133
  return result;
132
134
  };
133
- });
135
+ }(utils));
136
+
137
+ const utils$1 = utils;
134
138
 
135
139
  var stringify = (ast, options = {}) => {
136
140
  let stringify = (node, parent = {}) => {
137
- let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
141
+ let invalidBlock = options.escapeInvalid && utils$1.isInvalidBrace(parent);
138
142
  let invalidNode = node.invalid === true && options.escapeInvalid === true;
139
143
  let output = '';
140
144
 
141
145
  if (node.value) {
142
- if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
146
+ if ((invalidBlock || invalidNode) && utils$1.isOpenOrClose(node)) {
143
147
  return '\\' + node.value;
144
148
  }
145
149
  return node.value;
@@ -184,10 +188,10 @@ var isNumber = function(num) {
184
188
  * Released under the MIT License.
185
189
  */
186
190
 
187
-
191
+ const isNumber$1 = isNumber;
188
192
 
189
193
  const toRegexRange = (min, max, options) => {
190
- if (isNumber(min) === false) {
194
+ if (isNumber$1(min) === false) {
191
195
  throw new TypeError('toRegexRange: expected the first argument to be a number');
192
196
  }
193
197
 
@@ -195,7 +199,7 @@ const toRegexRange = (min, max, options) => {
195
199
  return String(min);
196
200
  }
197
201
 
198
- if (isNumber(max) === false) {
202
+ if (isNumber$1(max) === false) {
199
203
  throw new TypeError('toRegexRange: expected the second argument to be a number.');
200
204
  }
201
205
 
@@ -471,8 +475,8 @@ var toRegexRange_1 = toRegexRange;
471
475
  * Licensed under the MIT License.
472
476
  */
473
477
 
474
-
475
-
478
+ const util = require$$0$1;
479
+ const toRegexRange$1 = toRegexRange_1;
476
480
 
477
481
  const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
478
482
 
@@ -484,7 +488,7 @@ const isValidValue = value => {
484
488
  return typeof value === 'number' || (typeof value === 'string' && value !== '');
485
489
  };
486
490
 
487
- const isNumber$1 = num => Number.isInteger(+num);
491
+ const isNumber$2 = num => Number.isInteger(+num);
488
492
 
489
493
  const zeros = input => {
490
494
  let value = `${input}`;
@@ -556,7 +560,7 @@ const toSequence = (parts, options) => {
556
560
 
557
561
  const toRange = (a, b, isNumbers, options) => {
558
562
  if (isNumbers) {
559
- return toRegexRange_1(a, b, { wrap: false, ...options });
563
+ return toRegexRange$1(a, b, { wrap: false, ...options });
560
564
  }
561
565
 
562
566
  let start = String.fromCharCode(a);
@@ -572,7 +576,7 @@ const toRegex = (start, end, options) => {
572
576
  let prefix = options.capture ? '' : '?:';
573
577
  return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
574
578
  }
575
- return toRegexRange_1(start, end, options);
579
+ return toRegexRange$1(start, end, options);
576
580
  };
577
581
 
578
582
  const rangeError = (...args) => {
@@ -644,7 +648,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
644
648
  };
645
649
 
646
650
  const fillLetters = (start, end, step = 1, options = {}) => {
647
- if ((!isNumber$1(start) && start.length > 1) || (!isNumber$1(end) && end.length > 1)) {
651
+ if ((!isNumber$2(start) && start.length > 1) || (!isNumber$2(end) && end.length > 1)) {
648
652
  return invalidRange(start, end, options);
649
653
  }
650
654
 
@@ -698,12 +702,12 @@ const fill = (start, end, step, options = {}) => {
698
702
  if (opts.capture === true) opts.wrap = true;
699
703
  step = step || opts.step || 1;
700
704
 
701
- if (!isNumber$1(step)) {
705
+ if (!isNumber$2(step)) {
702
706
  if (step != null && !isObject(step)) return invalidStep(step, opts);
703
707
  return fill(start, end, 1, step);
704
708
  }
705
709
 
706
- if (isNumber$1(start) && isNumber$1(end)) {
710
+ if (isNumber$2(start) && isNumber$2(end)) {
707
711
  return fillNumbers(start, end, step, opts);
708
712
  }
709
713
 
@@ -712,9 +716,12 @@ const fill = (start, end, step, options = {}) => {
712
716
 
713
717
  var fillRange = fill;
714
718
 
719
+ const fill$1 = fillRange;
720
+ const utils$2 = utils;
721
+
715
722
  const compile = (ast, options = {}) => {
716
723
  let walk = (node, parent = {}) => {
717
- let invalidBlock = utils.isInvalidBrace(parent);
724
+ let invalidBlock = utils$2.isInvalidBrace(parent);
718
725
  let invalidNode = node.invalid === true && options.escapeInvalid === true;
719
726
  let invalid = invalidBlock === true || invalidNode === true;
720
727
  let prefix = options.escapeInvalid === true ? '\\' : '';
@@ -744,8 +751,8 @@ const compile = (ast, options = {}) => {
744
751
  }
745
752
 
746
753
  if (node.nodes && node.ranges > 0) {
747
- let args = utils.reduce(node.nodes);
748
- let range = fillRange(...args, { ...options, wrap: false, toRegex: true });
754
+ let args = utils$2.reduce(node.nodes);
755
+ let range = fill$1(...args, { ...options, wrap: false, toRegex: true });
749
756
 
750
757
  if (range.length !== 0) {
751
758
  return args.length > 1 && range.length > 1 ? `(${range})` : range;
@@ -765,6 +772,10 @@ const compile = (ast, options = {}) => {
765
772
 
766
773
  var compile_1 = compile;
767
774
 
775
+ const fill$2 = fillRange;
776
+ const stringify$2 = stringify;
777
+ const utils$3 = utils;
778
+
768
779
  const append = (queue = '', stash = '', enclose = false) => {
769
780
  let result = [];
770
781
 
@@ -773,7 +784,7 @@ const append = (queue = '', stash = '', enclose = false) => {
773
784
 
774
785
  if (!stash.length) return queue;
775
786
  if (!queue.length) {
776
- return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
787
+ return enclose ? utils$3.flatten(stash).map(ele => `{${ele}}`) : stash;
777
788
  }
778
789
 
779
790
  for (let item of queue) {
@@ -788,7 +799,7 @@ const append = (queue = '', stash = '', enclose = false) => {
788
799
  }
789
800
  }
790
801
  }
791
- return utils.flatten(result);
802
+ return utils$3.flatten(result);
792
803
  };
793
804
 
794
805
  const expand = (ast, options = {}) => {
@@ -806,7 +817,7 @@ const expand = (ast, options = {}) => {
806
817
  }
807
818
 
808
819
  if (node.invalid || node.dollar) {
809
- q.push(append(q.pop(), stringify(node, options)));
820
+ q.push(append(q.pop(), stringify$2(node, options)));
810
821
  return;
811
822
  }
812
823
 
@@ -816,15 +827,15 @@ const expand = (ast, options = {}) => {
816
827
  }
817
828
 
818
829
  if (node.nodes && node.ranges > 0) {
819
- let args = utils.reduce(node.nodes);
830
+ let args = utils$3.reduce(node.nodes);
820
831
 
821
- if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
832
+ if (utils$3.exceedsLimit(...args, options.step, rangeLimit)) {
822
833
  throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
823
834
  }
824
835
 
825
- let range = fillRange(...args, options);
836
+ let range = fill$2(...args, options);
826
837
  if (range.length === 0) {
827
- range = stringify(node, options);
838
+ range = stringify$2(node, options);
828
839
  }
829
840
 
830
841
  q.push(append(q.pop(), range));
@@ -832,7 +843,7 @@ const expand = (ast, options = {}) => {
832
843
  return;
833
844
  }
834
845
 
835
- let enclose = utils.encloseBrace(node);
846
+ let enclose = utils$3.encloseBrace(node);
836
847
  let queue = node.queue;
837
848
  let block = node;
838
849
 
@@ -868,7 +879,7 @@ const expand = (ast, options = {}) => {
868
879
  return queue;
869
880
  };
870
881
 
871
- return utils.flatten(walk(ast));
882
+ return utils$3.flatten(walk(ast));
872
883
  };
873
884
 
874
885
  var expand_1 = expand;
@@ -929,6 +940,8 @@ var constants = {
929
940
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
930
941
  };
931
942
 
943
+ const stringify$3 = stringify;
944
+
932
945
  /**
933
946
  * Constants
934
947
  */
@@ -1170,7 +1183,7 @@ const parse = (input, options = {}) => {
1170
1183
  if (block.ranges > 0) {
1171
1184
  block.ranges = 0;
1172
1185
  let open = block.nodes.shift();
1173
- block.nodes = [open, { type: 'text', value: stringify(block) }];
1186
+ block.nodes = [open, { type: 'text', value: stringify$3(block) }];
1174
1187
  }
1175
1188
 
1176
1189
  push({ type: 'comma', value });
@@ -1256,6 +1269,11 @@ const parse = (input, options = {}) => {
1256
1269
 
1257
1270
  var parse_1 = parse;
1258
1271
 
1272
+ const stringify$4 = stringify;
1273
+ const compile$1 = compile_1;
1274
+ const expand$1 = expand_1;
1275
+ const parse$1 = parse_1;
1276
+
1259
1277
  /**
1260
1278
  * Expand the given pattern or create a regex-compatible string.
1261
1279
  *
@@ -1306,7 +1324,7 @@ const braces = (input, options = {}) => {
1306
1324
  * @api public
1307
1325
  */
1308
1326
 
1309
- braces.parse = (input, options = {}) => parse_1(input, options);
1327
+ braces.parse = (input, options = {}) => parse$1(input, options);
1310
1328
 
1311
1329
  /**
1312
1330
  * Creates a braces string from an AST, or an AST node.
@@ -1324,9 +1342,9 @@ braces.parse = (input, options = {}) => parse_1(input, options);
1324
1342
 
1325
1343
  braces.stringify = (input, options = {}) => {
1326
1344
  if (typeof input === 'string') {
1327
- return stringify(braces.parse(input, options), options);
1345
+ return stringify$4(braces.parse(input, options), options);
1328
1346
  }
1329
- return stringify(input, options);
1347
+ return stringify$4(input, options);
1330
1348
  };
1331
1349
 
1332
1350
  /**
@@ -1348,7 +1366,7 @@ braces.compile = (input, options = {}) => {
1348
1366
  if (typeof input === 'string') {
1349
1367
  input = braces.parse(input, options);
1350
1368
  }
1351
- return compile_1(input, options);
1369
+ return compile$1(input, options);
1352
1370
  };
1353
1371
 
1354
1372
  /**
@@ -1373,7 +1391,7 @@ braces.expand = (input, options = {}) => {
1373
1391
  input = braces.parse(input, options);
1374
1392
  }
1375
1393
 
1376
- let result = expand_1(input, options);
1394
+ let result = expand$1(input, options);
1377
1395
 
1378
1396
  // filter out empty strings if specified
1379
1397
  if (options.noempty === true) {
@@ -1420,6 +1438,9 @@ braces.create = (input, options = {}) => {
1420
1438
 
1421
1439
  var braces_1 = braces;
1422
1440
 
1441
+ var utils$4 = {};
1442
+
1443
+ const path = path$3;
1423
1444
  const WIN_SLASH = '\\\\/';
1424
1445
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1425
1446
 
@@ -1572,7 +1593,7 @@ var constants$1 = {
1572
1593
  CHAR_VERTICAL_LINE: 124, /* | */
1573
1594
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
1574
1595
 
1575
- SEP: sysPath.sep,
1596
+ SEP: path.sep,
1576
1597
 
1577
1598
  /**
1578
1599
  * Create EXTGLOB_CHARS
@@ -1597,9 +1618,9 @@ var constants$1 = {
1597
1618
  }
1598
1619
  };
1599
1620
 
1600
- var utils$1 = rollup.createCommonjsModule(function (module, exports) {
1601
-
1621
+ (function (exports) {
1602
1622
 
1623
+ const path = path$3;
1603
1624
  const win32 = process.platform === 'win32';
1604
1625
  const {
1605
1626
  REGEX_BACKSLASH,
@@ -1632,7 +1653,7 @@ exports.isWindows = options => {
1632
1653
  if (options && typeof options.windows === 'boolean') {
1633
1654
  return options.windows;
1634
1655
  }
1635
- return win32 === true || sysPath.sep === '\\';
1656
+ return win32 === true || path.sep === '\\';
1636
1657
  };
1637
1658
 
1638
1659
  exports.escapeLast = (input, char, lastIdx) => {
@@ -1661,8 +1682,9 @@ exports.wrapOutput = (input, state = {}, options = {}) => {
1661
1682
  }
1662
1683
  return output;
1663
1684
  };
1664
- });
1685
+ }(utils$4));
1665
1686
 
1687
+ const utils$5 = utils$4;
1666
1688
  const {
1667
1689
  CHAR_ASTERISK, /* * */
1668
1690
  CHAR_AT, /* @ */
@@ -1972,10 +1994,10 @@ const scan = (input, options) => {
1972
1994
  }
1973
1995
 
1974
1996
  if (opts.unescape === true) {
1975
- if (glob) glob = utils$1.removeBackslashes(glob);
1997
+ if (glob) glob = utils$5.removeBackslashes(glob);
1976
1998
 
1977
1999
  if (base && backslashes === true) {
1978
- base = utils$1.removeBackslashes(base);
2000
+ base = utils$5.removeBackslashes(base);
1979
2001
  }
1980
2002
  }
1981
2003
 
@@ -2044,6 +2066,9 @@ const scan = (input, options) => {
2044
2066
 
2045
2067
  var scan_1 = scan;
2046
2068
 
2069
+ const constants$2 = constants$1;
2070
+ const utils$6 = utils$4;
2071
+
2047
2072
  /**
2048
2073
  * Constants
2049
2074
  */
@@ -2054,7 +2079,7 @@ const {
2054
2079
  REGEX_NON_SPECIAL_CHARS,
2055
2080
  REGEX_SPECIAL_CHARS_BACKREF,
2056
2081
  REPLACEMENTS
2057
- } = constants$1;
2082
+ } = constants$2;
2058
2083
 
2059
2084
  /**
2060
2085
  * Helpers
@@ -2086,7 +2111,7 @@ const syntaxError = (type, char) => {
2086
2111
  * @return {Object}
2087
2112
  */
2088
2113
 
2089
- const parse$1 = (input, options) => {
2114
+ const parse$2 = (input, options) => {
2090
2115
  if (typeof input !== 'string') {
2091
2116
  throw new TypeError('Expected a string');
2092
2117
  }
@@ -2105,11 +2130,11 @@ const parse$1 = (input, options) => {
2105
2130
  const tokens = [bos];
2106
2131
 
2107
2132
  const capture = opts.capture ? '' : '?:';
2108
- const win32 = utils$1.isWindows(options);
2133
+ const win32 = utils$6.isWindows(options);
2109
2134
 
2110
2135
  // create constants based on platform, for windows or posix
2111
- const PLATFORM_CHARS = constants$1.globChars(win32);
2112
- const EXTGLOB_CHARS = constants$1.extglobChars(PLATFORM_CHARS);
2136
+ const PLATFORM_CHARS = constants$2.globChars(win32);
2137
+ const EXTGLOB_CHARS = constants$2.extglobChars(PLATFORM_CHARS);
2113
2138
 
2114
2139
  const {
2115
2140
  DOT_LITERAL,
@@ -2161,7 +2186,7 @@ const parse$1 = (input, options) => {
2161
2186
  tokens
2162
2187
  };
2163
2188
 
2164
- input = utils$1.removePrefix(input, state);
2189
+ input = utils$6.removePrefix(input, state);
2165
2190
  len = input.length;
2166
2191
 
2167
2192
  const extglobs = [];
@@ -2341,7 +2366,7 @@ const parse$1 = (input, options) => {
2341
2366
  return state;
2342
2367
  }
2343
2368
 
2344
- state.output = utils$1.wrapOutput(output, state, options);
2369
+ state.output = utils$6.wrapOutput(output, state, options);
2345
2370
  return state;
2346
2371
  }
2347
2372
 
@@ -2454,7 +2479,7 @@ const parse$1 = (input, options) => {
2454
2479
  */
2455
2480
 
2456
2481
  if (state.quotes === 1 && value !== '"') {
2457
- value = utils$1.escapeRegex(value);
2482
+ value = utils$6.escapeRegex(value);
2458
2483
  prev.value += value;
2459
2484
  append({ value });
2460
2485
  continue;
@@ -2544,11 +2569,11 @@ const parse$1 = (input, options) => {
2544
2569
 
2545
2570
  // when literal brackets are explicitly disabled
2546
2571
  // assume we should match with a regex character class
2547
- if (opts.literalBrackets === false || utils$1.hasRegexChars(prevValue)) {
2572
+ if (opts.literalBrackets === false || utils$6.hasRegexChars(prevValue)) {
2548
2573
  continue;
2549
2574
  }
2550
2575
 
2551
- const escaped = utils$1.escapeRegex(prev.value);
2576
+ const escaped = utils$6.escapeRegex(prev.value);
2552
2577
  state.output = state.output.slice(0, -prev.value.length);
2553
2578
 
2554
2579
  // when literal brackets are explicitly enabled
@@ -2720,7 +2745,7 @@ const parse$1 = (input, options) => {
2720
2745
  const next = peek();
2721
2746
  let output = value;
2722
2747
 
2723
- if (next === '<' && !utils$1.supportsLookbehinds()) {
2748
+ if (next === '<' && !utils$6.supportsLookbehinds()) {
2724
2749
  throw new Error('Node.js v10 or higher is required for regex lookbehinds');
2725
2750
  }
2726
2751
 
@@ -2980,19 +3005,19 @@ const parse$1 = (input, options) => {
2980
3005
 
2981
3006
  while (state.brackets > 0) {
2982
3007
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
2983
- state.output = utils$1.escapeLast(state.output, '[');
3008
+ state.output = utils$6.escapeLast(state.output, '[');
2984
3009
  decrement('brackets');
2985
3010
  }
2986
3011
 
2987
3012
  while (state.parens > 0) {
2988
3013
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
2989
- state.output = utils$1.escapeLast(state.output, '(');
3014
+ state.output = utils$6.escapeLast(state.output, '(');
2990
3015
  decrement('parens');
2991
3016
  }
2992
3017
 
2993
3018
  while (state.braces > 0) {
2994
3019
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
2995
- state.output = utils$1.escapeLast(state.output, '{');
3020
+ state.output = utils$6.escapeLast(state.output, '{');
2996
3021
  decrement('braces');
2997
3022
  }
2998
3023
 
@@ -3022,7 +3047,7 @@ const parse$1 = (input, options) => {
3022
3047
  * impact when none of the fast paths match.
3023
3048
  */
3024
3049
 
3025
- parse$1.fastpaths = (input, options) => {
3050
+ parse$2.fastpaths = (input, options) => {
3026
3051
  const opts = { ...options };
3027
3052
  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$1, opts.maxLength) : MAX_LENGTH$1;
3028
3053
  const len = input.length;
@@ -3031,7 +3056,7 @@ parse$1.fastpaths = (input, options) => {
3031
3056
  }
3032
3057
 
3033
3058
  input = REPLACEMENTS[input] || input;
3034
- const win32 = utils$1.isWindows(options);
3059
+ const win32 = utils$6.isWindows(options);
3035
3060
 
3036
3061
  // create constants based on platform, for windows or posix
3037
3062
  const {
@@ -3044,7 +3069,7 @@ parse$1.fastpaths = (input, options) => {
3044
3069
  NO_DOTS_SLASH,
3045
3070
  STAR,
3046
3071
  START_ANCHOR
3047
- } = constants$1.globChars(win32);
3072
+ } = constants$2.globChars(win32);
3048
3073
 
3049
3074
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
3050
3075
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
@@ -3099,7 +3124,7 @@ parse$1.fastpaths = (input, options) => {
3099
3124
  }
3100
3125
  };
3101
3126
 
3102
- const output = utils$1.removePrefix(input, state);
3127
+ const output = utils$6.removePrefix(input, state);
3103
3128
  let source = create(output);
3104
3129
 
3105
3130
  if (source && opts.strictSlashes !== true) {
@@ -3109,8 +3134,13 @@ parse$1.fastpaths = (input, options) => {
3109
3134
  return source;
3110
3135
  };
3111
3136
 
3112
- var parse_1$1 = parse$1;
3137
+ var parse_1$1 = parse$2;
3113
3138
 
3139
+ const path$1 = path$3;
3140
+ const scan$1 = scan_1;
3141
+ const parse$3 = parse_1$1;
3142
+ const utils$7 = utils$4;
3143
+ const constants$3 = constants$1;
3114
3144
  const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
3115
3145
 
3116
3146
  /**
@@ -3155,7 +3185,7 @@ const picomatch = (glob, options, returnState = false) => {
3155
3185
  }
3156
3186
 
3157
3187
  const opts = options || {};
3158
- const posix = utils$1.isWindows(options);
3188
+ const posix = utils$7.isWindows(options);
3159
3189
  const regex = isState
3160
3190
  ? picomatch.compileRe(glob, options)
3161
3191
  : picomatch.makeRe(glob, options, false, true);
@@ -3230,7 +3260,7 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3230
3260
  }
3231
3261
 
3232
3262
  const opts = options || {};
3233
- const format = opts.format || (posix ? utils$1.toPosixSlashes : null);
3263
+ const format = opts.format || (posix ? utils$7.toPosixSlashes : null);
3234
3264
  let match = input === glob;
3235
3265
  let output = (match && format) ? format(input) : input;
3236
3266
 
@@ -3264,9 +3294,9 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3264
3294
  * @api public
3265
3295
  */
3266
3296
 
3267
- picomatch.matchBase = (input, glob, options, posix = utils$1.isWindows(options)) => {
3297
+ picomatch.matchBase = (input, glob, options, posix = utils$7.isWindows(options)) => {
3268
3298
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
3269
- return regex.test(sysPath.basename(input));
3299
+ return regex.test(path$1.basename(input));
3270
3300
  };
3271
3301
 
3272
3302
  /**
@@ -3304,7 +3334,7 @@ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str
3304
3334
 
3305
3335
  picomatch.parse = (pattern, options) => {
3306
3336
  if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
3307
- return parse_1$1(pattern, { ...options, fastpaths: false });
3337
+ return parse$3(pattern, { ...options, fastpaths: false });
3308
3338
  };
3309
3339
 
3310
3340
  /**
@@ -3334,7 +3364,7 @@ picomatch.parse = (pattern, options) => {
3334
3364
  * @api public
3335
3365
  */
3336
3366
 
3337
- picomatch.scan = (input, options) => scan_1(input, options);
3367
+ picomatch.scan = (input, options) => scan$1(input, options);
3338
3368
 
3339
3369
  /**
3340
3370
  * Create a regular expression from a parsed glob pattern.
@@ -3391,11 +3421,11 @@ picomatch.makeRe = (input, options, returnOutput = false, returnState = false) =
3391
3421
  }
3392
3422
 
3393
3423
  if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
3394
- output = parse_1$1.fastpaths(input, options);
3424
+ output = parse$3.fastpaths(input, options);
3395
3425
  }
3396
3426
 
3397
3427
  if (output === undefined) {
3398
- parsed = parse_1$1(input, options);
3428
+ parsed = parse$3(input, options);
3399
3429
  parsed.prefix = prefix + (parsed.prefix || '');
3400
3430
  } else {
3401
3431
  parsed.output = output;
@@ -3436,7 +3466,7 @@ picomatch.toRegex = (source, options) => {
3436
3466
  * @return {Object}
3437
3467
  */
3438
3468
 
3439
- picomatch.constants = constants$1;
3469
+ picomatch.constants = constants$3;
3440
3470
 
3441
3471
  /**
3442
3472
  * Expose "picomatch"
@@ -3446,10 +3476,13 @@ var picomatch_1 = picomatch;
3446
3476
 
3447
3477
  var picomatch$1 = picomatch_1;
3448
3478
 
3449
- const { Readable } = require$$0$1;
3450
-
3451
- const { promisify } = util;
3479
+ var chokidar = {};
3452
3480
 
3481
+ const fs = fs$4;
3482
+ const { Readable } = require$$1;
3483
+ const sysPath = path$3;
3484
+ const { promisify } = require$$0$1;
3485
+ const picomatch$2 = picomatch$1;
3453
3486
 
3454
3487
  const readdir = promisify(fs.readdir);
3455
3488
  const stat = promisify(fs.stat);
@@ -3480,7 +3513,7 @@ const normalizeFilter = filter => {
3480
3513
  if (typeof filter === 'function') return filter;
3481
3514
 
3482
3515
  if (typeof filter === 'string') {
3483
- const glob = picomatch$1(filter.trim());
3516
+ const glob = picomatch$2(filter.trim());
3484
3517
  return entry => glob(entry.basename);
3485
3518
  }
3486
3519
 
@@ -3490,9 +3523,9 @@ const normalizeFilter = filter => {
3490
3523
  for (const item of filter) {
3491
3524
  const trimmed = item.trim();
3492
3525
  if (trimmed.charAt(0) === BANG) {
3493
- negative.push(picomatch$1(trimmed.slice(1)));
3526
+ negative.push(picomatch$2(trimmed.slice(1)));
3494
3527
  } else {
3495
- positive.push(picomatch$1(trimmed));
3528
+ positive.push(picomatch$2(trimmed));
3496
3529
  }
3497
3530
  }
3498
3531
 
@@ -3726,12 +3759,15 @@ readdirp.default = readdirp;
3726
3759
 
3727
3760
  var readdirp_1 = readdirp;
3728
3761
 
3762
+ var anymatch = {exports: {}};
3763
+
3729
3764
  /*!
3730
3765
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
3731
3766
  *
3732
3767
  * Copyright (c) 2014-2018, Jon Schlinkert.
3733
3768
  * Released under the MIT License.
3734
3769
  */
3770
+
3735
3771
  var normalizePath = function(path, stripTrailing) {
3736
3772
  if (typeof path !== 'string') {
3737
3773
  throw new TypeError('expected path to be a string');
@@ -3761,6 +3797,11 @@ var normalizePath = function(path, stripTrailing) {
3761
3797
  return prefix + segs.join('/');
3762
3798
  };
3763
3799
 
3800
+ Object.defineProperty(anymatch.exports, "__esModule", { value: true });
3801
+
3802
+ const picomatch$3 = picomatch$1;
3803
+ const normalizePath$1 = normalizePath;
3804
+
3764
3805
  /**
3765
3806
  * @typedef {(testString: string) => boolean} AnymatchFn
3766
3807
  * @typedef {string|RegExp|AnymatchFn} AnymatchPattern
@@ -3780,7 +3821,7 @@ const createPattern = (matcher, options) => {
3780
3821
  return matcher;
3781
3822
  }
3782
3823
  if (typeof matcher === 'string') {
3783
- const glob = picomatch$1(matcher, options);
3824
+ const glob = picomatch$3(matcher, options);
3784
3825
  return (string) => matcher === string || glob(string);
3785
3826
  }
3786
3827
  if (matcher instanceof RegExp) {
@@ -3803,7 +3844,7 @@ const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
3803
3844
  throw new TypeError('anymatch: second argument must be a string: got ' +
3804
3845
  Object.prototype.toString.call(_path))
3805
3846
  }
3806
- const path = normalizePath(_path);
3847
+ const path = normalizePath$1(_path);
3807
3848
 
3808
3849
  for (let index = 0; index < negPatterns.length; index++) {
3809
3850
  const nglob = negPatterns[index];
@@ -3829,7 +3870,7 @@ const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
3829
3870
  * @param {object} options
3830
3871
  * @returns {boolean|number|Function}
3831
3872
  */
3832
- const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
3873
+ const anymatch$1 = (matchers, testString, options = DEFAULT_OPTIONS) => {
3833
3874
  if (matchers == null) {
3834
3875
  throw new TypeError('anymatch: specify first argument');
3835
3876
  }
@@ -3841,7 +3882,7 @@ const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
3841
3882
  const negatedGlobs = mtchers
3842
3883
  .filter(item => typeof item === 'string' && item.charAt(0) === BANG$1)
3843
3884
  .map(item => item.slice(1))
3844
- .map(item => picomatch$1(item, opts));
3885
+ .map(item => picomatch$3(item, opts));
3845
3886
  const patterns = mtchers.map(matcher => createPattern(matcher, opts));
3846
3887
 
3847
3888
  if (testString == null) {
@@ -3854,8 +3895,8 @@ const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
3854
3895
  return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
3855
3896
  };
3856
3897
 
3857
- anymatch.default = anymatch;
3858
- var anymatch_1 = anymatch;
3898
+ anymatch$1.default = anymatch$1;
3899
+ anymatch.exports = anymatch$1;
3859
3900
 
3860
3901
  /*!
3861
3902
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
@@ -3863,6 +3904,7 @@ var anymatch_1 = anymatch;
3863
3904
  * Copyright (c) 2014-2016, Jon Schlinkert.
3864
3905
  * Licensed under the MIT License.
3865
3906
  */
3907
+
3866
3908
  var isExtglob = function isExtglob(str) {
3867
3909
  if (typeof str !== 'string' || str === '') {
3868
3910
  return false;
@@ -3884,6 +3926,7 @@ var isExtglob = function isExtglob(str) {
3884
3926
  * Released under the MIT License.
3885
3927
  */
3886
3928
 
3929
+ var isExtglob$1 = isExtglob;
3887
3930
  var chars = { '{': '}', '(': ')', '[': ']'};
3888
3931
  var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
3889
3932
  var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
@@ -3893,7 +3936,7 @@ var isGlob = function isGlob(str, options) {
3893
3936
  return false;
3894
3937
  }
3895
3938
 
3896
- if (isExtglob(str)) {
3939
+ if (isExtglob$1(str)) {
3897
3940
  return true;
3898
3941
  }
3899
3942
 
@@ -3925,8 +3968,9 @@ var isGlob = function isGlob(str, options) {
3925
3968
  return false;
3926
3969
  };
3927
3970
 
3928
- var pathPosixDirname = sysPath.posix.dirname;
3929
- var isWin32 = require$$1$1.platform() === 'win32';
3971
+ var isGlob$1 = isGlob;
3972
+ var pathPosixDirname = path$3.posix.dirname;
3973
+ var isWin32 = require$$2.platform() === 'win32';
3930
3974
 
3931
3975
  var slash = '/';
3932
3976
  var backslash = /\\/g;
@@ -3958,7 +4002,7 @@ var globParent = function globParent(str, opts) {
3958
4002
  // remove path parts that are globby
3959
4003
  do {
3960
4004
  str = pathPosixDirname(str);
3961
- } while (isGlob(str) || globby.test(str));
4005
+ } while (isGlob$1(str) || globby.test(str));
3962
4006
 
3963
4007
  // remove escape chars and return result
3964
4008
  return str.replace(escaped, '$1');
@@ -4227,13 +4271,18 @@ var require$$0 = [
4227
4271
 
4228
4272
  var binaryExtensions = require$$0;
4229
4273
 
4230
- const extensions = new Set(binaryExtensions);
4274
+ const path$2 = path$3;
4275
+ const binaryExtensions$1 = binaryExtensions;
4231
4276
 
4232
- var isBinaryPath = filePath => extensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
4277
+ const extensions = new Set(binaryExtensions$1);
4233
4278
 
4234
- var constants$2 = rollup.createCommonjsModule(function (module, exports) {
4279
+ var isBinaryPath = filePath => extensions.has(path$2.extname(filePath).slice(1).toLowerCase());
4235
4280
 
4236
- const {sep} = sysPath;
4281
+ var constants$4 = {};
4282
+
4283
+ (function (exports) {
4284
+
4285
+ const {sep} = path$3;
4237
4286
  const {platform} = process;
4238
4287
 
4239
4288
  exports.EV_ALL = 'all';
@@ -4294,10 +4343,12 @@ exports.IDENTITY_FN = val => val;
4294
4343
  exports.isWindows = platform === 'win32';
4295
4344
  exports.isMacos = platform === 'darwin';
4296
4345
  exports.isLinux = platform === 'linux';
4297
- });
4298
-
4299
- const { promisify: promisify$1 } = util;
4346
+ }(constants$4));
4300
4347
 
4348
+ const fs$1 = fs$4;
4349
+ const sysPath$1 = path$3;
4350
+ const { promisify: promisify$1 } = require$$0$1;
4351
+ const isBinaryPath$1 = isBinaryPath;
4301
4352
  const {
4302
4353
  isWindows,
4303
4354
  isLinux,
@@ -4315,15 +4366,15 @@ const {
4315
4366
  STR_END,
4316
4367
  BRACE_START,
4317
4368
  STAR: STAR$1
4318
- } = constants$2;
4369
+ } = constants$4;
4319
4370
 
4320
4371
  const THROTTLE_MODE_WATCH = 'watch';
4321
4372
 
4322
- const open = promisify$1(fs.open);
4323
- const stat$1 = promisify$1(fs.stat);
4324
- const lstat$1 = promisify$1(fs.lstat);
4325
- const close = promisify$1(fs.close);
4326
- const fsrealpath = promisify$1(fs.realpath);
4373
+ const open = promisify$1(fs$1.open);
4374
+ const stat$1 = promisify$1(fs$1.stat);
4375
+ const lstat$1 = promisify$1(fs$1.lstat);
4376
+ const close = promisify$1(fs$1.close);
4377
+ const fsrealpath = promisify$1(fs$1.realpath);
4327
4378
 
4328
4379
  const statMethods = { lstat: lstat$1, stat: stat$1 };
4329
4380
 
@@ -4405,12 +4456,12 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
4405
4456
  // case the file's watcher misses it (and rely on throttling to de-dupe)
4406
4457
  if (evPath && path !== evPath) {
4407
4458
  fsWatchBroadcast(
4408
- sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)
4459
+ sysPath$1.resolve(path, evPath), KEY_LISTENERS, sysPath$1.join(path, evPath)
4409
4460
  );
4410
4461
  }
4411
4462
  };
4412
4463
  try {
4413
- return fs.watch(path, options, handleEvent);
4464
+ return fs$1.watch(path, options, handleEvent);
4414
4465
  } catch (error) {
4415
4466
  errHandler(error);
4416
4467
  }
@@ -4529,7 +4580,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
4529
4580
 
4530
4581
  const copts = cont && cont.options;
4531
4582
  if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
4532
- fs.unwatchFile(fullPath);
4583
+ fs$1.unwatchFile(fullPath);
4533
4584
  cont = undefined;
4534
4585
  }
4535
4586
 
@@ -4546,7 +4597,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
4546
4597
  listeners: listener,
4547
4598
  rawEmitters: rawEmitter,
4548
4599
  options,
4549
- watcher: fs.watchFile(fullPath, options, (curr, prev) => {
4600
+ watcher: fs$1.watchFile(fullPath, options, (curr, prev) => {
4550
4601
  foreach(cont.rawEmitters, (rawEmitter) => {
4551
4602
  rawEmitter(EV_CHANGE, fullPath, {curr, prev});
4552
4603
  });
@@ -4567,7 +4618,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
4567
4618
  delFromSet(cont, KEY_RAW, rawEmitter);
4568
4619
  if (isEmptySet(cont.listeners)) {
4569
4620
  FsWatchFileInstances.delete(fullPath);
4570
- fs.unwatchFile(fullPath);
4621
+ fs$1.unwatchFile(fullPath);
4571
4622
  cont.options = cont.watcher = undefined;
4572
4623
  Object.freeze(cont);
4573
4624
  }
@@ -4595,17 +4646,17 @@ constructor(fsW) {
4595
4646
  */
4596
4647
  _watchWithNodeFs(path, listener) {
4597
4648
  const opts = this.fsw.options;
4598
- const directory = sysPath.dirname(path);
4599
- const basename = sysPath.basename(path);
4649
+ const directory = sysPath$1.dirname(path);
4650
+ const basename = sysPath$1.basename(path);
4600
4651
  const parent = this.fsw._getWatchedDir(directory);
4601
4652
  parent.add(basename);
4602
- const absolutePath = sysPath.resolve(path);
4653
+ const absolutePath = sysPath$1.resolve(path);
4603
4654
  const options = {persistent: opts.persistent};
4604
4655
  if (!listener) listener = EMPTY_FN;
4605
4656
 
4606
4657
  let closer;
4607
4658
  if (opts.usePolling) {
4608
- options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?
4659
+ options.interval = opts.enableBinaryInterval && isBinaryPath$1(basename) ?
4609
4660
  opts.binaryInterval : opts.interval;
4610
4661
  closer = setFsWatchFileListener(path, absolutePath, options, {
4611
4662
  listener,
@@ -4632,8 +4683,8 @@ _handleFile(file, stats, initialAdd) {
4632
4683
  if (this.fsw.closed) {
4633
4684
  return;
4634
4685
  }
4635
- const dirname = sysPath.dirname(file);
4636
- const basename = sysPath.basename(file);
4686
+ const dirname = sysPath$1.dirname(file);
4687
+ const basename = sysPath$1.basename(file);
4637
4688
  const parent = this.fsw._getWatchedDir(dirname);
4638
4689
  // stats is always present
4639
4690
  let prevStats = stats;
@@ -4731,7 +4782,7 @@ async _handleSymlink(entry, directory, path, item) {
4731
4782
 
4732
4783
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
4733
4784
  // Normalize the directory name on Windows
4734
- directory = sysPath.join(directory, EMPTY_STR);
4785
+ directory = sysPath$1.join(directory, EMPTY_STR);
4735
4786
 
4736
4787
  if (!wh.hasGlob) {
4737
4788
  throttler = this.fsw._throttle('readdir', directory, 1000);
@@ -4751,7 +4802,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
4751
4802
  return;
4752
4803
  }
4753
4804
  const item = entry.path;
4754
- let path = sysPath.join(directory, item);
4805
+ let path = sysPath$1.join(directory, item);
4755
4806
  current.add(item);
4756
4807
 
4757
4808
  if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
@@ -4769,7 +4820,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
4769
4820
  this.fsw._incrReadyCount();
4770
4821
 
4771
4822
  // ensure relativeness of path is preserved in case of watcher reuse
4772
- path = sysPath.join(dir, sysPath.relative(dir, path));
4823
+ path = sysPath$1.join(dir, sysPath$1.relative(dir, path));
4773
4824
 
4774
4825
  this._addToNodeFs(path, initialAdd, wh, depth + 1);
4775
4826
  }
@@ -4795,7 +4846,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
4795
4846
  // a path may have been filtered out of this readdir, but
4796
4847
  // shouldn't be removed because it matches a different glob
4797
4848
  (!wh.hasGlob || wh.filterPath({
4798
- fullPath: sysPath.resolve(directory, item)
4849
+ fullPath: sysPath$1.resolve(directory, item)
4799
4850
  }));
4800
4851
  }).forEach((item) => {
4801
4852
  this.fsw._remove(directory, item);
@@ -4821,14 +4872,14 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
4821
4872
  * @returns {Promise<Function>} closer for the watcher instance.
4822
4873
  */
4823
4874
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
4824
- const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
4825
- const tracked = parentDir.has(sysPath.basename(dir));
4875
+ const parentDir = this.fsw._getWatchedDir(sysPath$1.dirname(dir));
4876
+ const tracked = parentDir.has(sysPath$1.basename(dir));
4826
4877
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
4827
4878
  if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats);
4828
4879
  }
4829
4880
 
4830
4881
  // ensure dir is tracked (harmless if redundant)
4831
- parentDir.add(sysPath.basename(dir));
4882
+ parentDir.add(sysPath$1.basename(dir));
4832
4883
  this.fsw._getWatchedDir(dir);
4833
4884
  let throttler;
4834
4885
  let closer;
@@ -4887,7 +4938,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
4887
4938
  const follow = this.fsw.options.followSymlinks && !path.includes(STAR$1) && !path.includes(BRACE_START);
4888
4939
  let closer;
4889
4940
  if (stats.isDirectory()) {
4890
- const absPath = sysPath.resolve(path);
4941
+ const absPath = sysPath$1.resolve(path);
4891
4942
  const targetPath = follow ? await fsrealpath(path) : path;
4892
4943
  if (this.fsw.closed) return;
4893
4944
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -4899,7 +4950,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
4899
4950
  } else if (stats.isSymbolicLink()) {
4900
4951
  const targetPath = follow ? await fsrealpath(path) : path;
4901
4952
  if (this.fsw.closed) return;
4902
- const parent = sysPath.dirname(wh.watchPath);
4953
+ const parent = sysPath$1.dirname(wh.watchPath);
4903
4954
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
4904
4955
  this.fsw._emit(EV_ADD, wh.watchPath, stats);
4905
4956
  closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
@@ -4907,7 +4958,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
4907
4958
 
4908
4959
  // preserve this symlink's target path
4909
4960
  if (targetPath !== undefined) {
4910
- this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
4961
+ this.fsw._symlinkPaths.set(sysPath$1.resolve(path), targetPath);
4911
4962
  }
4912
4963
  } else {
4913
4964
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
@@ -4929,13 +4980,17 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
4929
4980
 
4930
4981
  var nodefsHandler = NodeFsHandler;
4931
4982
 
4932
- var require$$1 = /*@__PURE__*/rollup.getAugmentedNamespace(rollup.fseventsImporter);
4983
+ var fseventsHandler = {exports: {}};
4984
+
4985
+ var require$$3 = /*@__PURE__*/rollup.getAugmentedNamespace(rollup.fseventsImporter);
4933
4986
 
4934
- const { promisify: promisify$2 } = util;
4987
+ const fs$2 = fs$4;
4988
+ const sysPath$2 = path$3;
4989
+ const { promisify: promisify$2 } = require$$0$1;
4935
4990
 
4936
4991
  let fsevents;
4937
4992
  try {
4938
- fsevents = require$$1.getFsEvents();
4993
+ fsevents = require$$3.getFsEvents();
4939
4994
  } catch (error) {
4940
4995
  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
4941
4996
  }
@@ -4976,13 +5031,13 @@ const {
4976
5031
  FUNCTION_TYPE,
4977
5032
  EMPTY_FN: EMPTY_FN$1,
4978
5033
  IDENTITY_FN
4979
- } = constants$2;
5034
+ } = constants$4;
4980
5035
 
4981
5036
  const Depth = (value) => isNaN(value) ? {} : {depth: value};
4982
5037
 
4983
- const stat$2 = promisify$2(fs.stat);
4984
- const lstat$2 = promisify$2(fs.lstat);
4985
- const realpath$1 = promisify$2(fs.realpath);
5038
+ const stat$2 = promisify$2(fs$2.stat);
5039
+ const lstat$2 = promisify$2(fs$2.lstat);
5040
+ const realpath$1 = promisify$2(fs$2.realpath);
4986
5041
 
4987
5042
  const statMethods$1 = { stat: stat$2, lstat: lstat$2 };
4988
5043
 
@@ -5033,8 +5088,8 @@ const createFSEventsInstance = (path, callback) => {
5033
5088
  * @returns {Function} closer
5034
5089
  */
5035
5090
  function setFSEventsListener(path, realPath, listener, rawEmitter) {
5036
- let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path;
5037
- const parentPath = sysPath.dirname(watchPath);
5091
+ let watchPath = sysPath$2.extname(path) ? sysPath$2.dirname(path) : path;
5092
+ const parentPath = sysPath$2.dirname(watchPath);
5038
5093
  let cont = FSEventsWatchers.get(watchPath);
5039
5094
 
5040
5095
  // If we've accumulated a substantial number of paths that
@@ -5045,14 +5100,14 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) {
5045
5100
  watchPath = parentPath;
5046
5101
  }
5047
5102
 
5048
- const resolvedPath = sysPath.resolve(path);
5103
+ const resolvedPath = sysPath$2.resolve(path);
5049
5104
  const hasSymlink = resolvedPath !== realPath;
5050
5105
 
5051
5106
  const filteredListener = (fullPath, flags, info) => {
5052
5107
  if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
5053
5108
  if (
5054
5109
  fullPath === resolvedPath ||
5055
- !fullPath.indexOf(resolvedPath + sysPath.sep)
5110
+ !fullPath.indexOf(resolvedPath + sysPath$2.sep)
5056
5111
  ) listener(fullPath, flags, info);
5057
5112
  };
5058
5113
 
@@ -5060,7 +5115,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) {
5060
5115
  // modifies `watchPath` to the parent path when it finds a match
5061
5116
  let watchedParent = false;
5062
5117
  for (const watchedPath of FSEventsWatchers.keys()) {
5063
- if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
5118
+ if (realPath.indexOf(sysPath$2.resolve(watchedPath) + sysPath$2.sep) === 0) {
5064
5119
  watchPath = watchedPath;
5065
5120
  cont = FSEventsWatchers.get(watchPath);
5066
5121
  watchedParent = true;
@@ -5125,7 +5180,7 @@ const canUse = () => fsevents && FSEventsWatchers.size < 128;
5125
5180
  // determines subdirectory traversal levels from root to path
5126
5181
  const calcDepth = (path, root) => {
5127
5182
  let i = 0;
5128
- while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
5183
+ while (!path.indexOf(root) && (path = sysPath$2.dirname(path)) !== root) i++;
5129
5184
  return i;
5130
5185
  };
5131
5186
 
@@ -5236,13 +5291,13 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
5236
5291
  opts.depth !== undefined &&
5237
5292
  calcDepth(fullPath, realPath) > opts.depth
5238
5293
  ) return;
5239
- const path = transform(sysPath.join(
5240
- watchPath, sysPath.relative(watchPath, fullPath)
5294
+ const path = transform(sysPath$2.join(
5295
+ watchPath, sysPath$2.relative(watchPath, fullPath)
5241
5296
  ));
5242
5297
  if (globFilter && !globFilter(path)) return;
5243
5298
  // ensure directories are tracked
5244
- const parent = sysPath.dirname(path);
5245
- const item = sysPath.basename(path);
5299
+ const parent = sysPath$2.dirname(path);
5300
+ const item = sysPath$2.basename(path);
5246
5301
  const watchedDir = this.fsw._getWatchedDir(
5247
5302
  info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
5248
5303
  );
@@ -5318,7 +5373,7 @@ async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
5318
5373
  if (linkTarget && linkTarget !== DOT_SLASH) {
5319
5374
  aliasedPath = path.replace(linkTarget, linkPath);
5320
5375
  } else if (path !== DOT_SLASH) {
5321
- aliasedPath = sysPath.join(linkPath, path);
5376
+ aliasedPath = sysPath$2.join(linkPath, path);
5322
5377
  }
5323
5378
  return transform(aliasedPath);
5324
5379
  }, false, curDepth);
@@ -5337,8 +5392,8 @@ async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
5337
5392
  emitAdd(newPath, stats, processPath, opts, forceAdd) {
5338
5393
  const pp = processPath(newPath);
5339
5394
  const isDir = stats.isDirectory();
5340
- const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
5341
- const base = sysPath.basename(pp);
5395
+ const dirObj = this.fsw._getWatchedDir(sysPath$2.dirname(pp));
5396
+ const base = sysPath$2.basename(pp);
5342
5397
 
5343
5398
  // ensure empty dirs get tracked
5344
5399
  if (isDir) this.fsw._getWatchedDir(pp);
@@ -5354,7 +5409,7 @@ initWatch(realPath, path, wh, processPath) {
5354
5409
  if (this.fsw.closed) return;
5355
5410
  const closer = this._watchWithFsEvents(
5356
5411
  wh.watchPath,
5357
- sysPath.resolve(realPath || wh.watchPath),
5412
+ sysPath$2.resolve(realPath || wh.watchPath),
5358
5413
  processPath,
5359
5414
  wh.globFilter
5360
5415
  );
@@ -5404,14 +5459,14 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
5404
5459
  }
5405
5460
  if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
5406
5461
 
5407
- const joinedPath = sysPath.join(wh.watchPath, entry.path);
5462
+ const joinedPath = sysPath$2.join(wh.watchPath, entry.path);
5408
5463
  const {fullPath} = entry;
5409
5464
 
5410
5465
  if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
5411
5466
  // preserve the current depth here since it can't be derived from
5412
5467
  // real paths past the symlink
5413
5468
  const curDepth = opts.depth === undefined ?
5414
- undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
5469
+ undefined : calcDepth(joinedPath, sysPath$2.resolve(wh.watchPath)) + 1;
5415
5470
 
5416
5471
  this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
5417
5472
  } else {
@@ -5448,23 +5503,22 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
5448
5503
 
5449
5504
  }
5450
5505
 
5451
- var fseventsHandler = FsEventsHandler;
5452
- var canUse_1 = canUse;
5453
- fseventsHandler.canUse = canUse_1;
5506
+ fseventsHandler.exports = FsEventsHandler;
5507
+ fseventsHandler.exports.canUse = canUse;
5454
5508
 
5455
5509
  const { EventEmitter } = require$$0$2;
5456
-
5457
-
5458
- const { promisify: promisify$3 } = util;
5459
-
5460
- const anymatch$1 = anymatch_1.default;
5461
-
5462
-
5463
-
5464
-
5465
-
5466
-
5467
-
5510
+ const fs$3 = fs$4;
5511
+ const sysPath$3 = path$3;
5512
+ const { promisify: promisify$3 } = require$$0$1;
5513
+ const readdirp$1 = readdirp_1;
5514
+ const anymatch$2 = anymatch.exports.default;
5515
+ const globParent$1 = globParent;
5516
+ const isGlob$2 = isGlob;
5517
+ const braces$1 = braces_1;
5518
+ const normalizePath$2 = normalizePath;
5519
+
5520
+ const NodeFsHandler$1 = nodefsHandler;
5521
+ const FsEventsHandler$1 = fseventsHandler.exports;
5468
5522
  const {
5469
5523
  EV_ALL,
5470
5524
  EV_READY,
@@ -5501,10 +5555,10 @@ const {
5501
5555
 
5502
5556
  isWindows: isWindows$1,
5503
5557
  isMacos
5504
- } = constants$2;
5558
+ } = constants$4;
5505
5559
 
5506
- const stat$3 = promisify$3(fs.stat);
5507
- const readdir$1 = promisify$3(fs.readdir);
5560
+ const stat$3 = promisify$3(fs$3.stat);
5561
+ const readdir$1 = promisify$3(fs$3.readdir);
5508
5562
 
5509
5563
  /**
5510
5564
  * @typedef {String} Path
@@ -5568,21 +5622,21 @@ const toUnix = (string) => {
5568
5622
 
5569
5623
  // Our version of upath.normalize
5570
5624
  // TODO: this is not equal to path-normalize module - investigate why
5571
- const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
5625
+ const normalizePathToUnix = (path) => toUnix(sysPath$3.normalize(toUnix(path)));
5572
5626
 
5573
5627
  const normalizeIgnored = (cwd = EMPTY_STR$1) => (path) => {
5574
5628
  if (typeof path !== STRING_TYPE) return path;
5575
- return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
5629
+ return normalizePathToUnix(sysPath$3.isAbsolute(path) ? path : sysPath$3.join(cwd, path));
5576
5630
  };
5577
5631
 
5578
5632
  const getAbsolutePath = (path, cwd) => {
5579
- if (sysPath.isAbsolute(path)) {
5633
+ if (sysPath$3.isAbsolute(path)) {
5580
5634
  return path;
5581
5635
  }
5582
5636
  if (path.startsWith(BANG$2)) {
5583
- return BANG$2 + sysPath.join(cwd, path.slice(1));
5637
+ return BANG$2 + sysPath$3.join(cwd, path.slice(1));
5584
5638
  }
5585
- return sysPath.join(cwd, path);
5639
+ return sysPath$3.join(cwd, path);
5586
5640
  };
5587
5641
 
5588
5642
  const undef = (opts, key) => opts[key] === undefined;
@@ -5621,7 +5675,7 @@ class DirEntry {
5621
5675
  await readdir$1(dir);
5622
5676
  } catch (err) {
5623
5677
  if (this._removeWatcher) {
5624
- this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
5678
+ this._removeWatcher(sysPath$3.dirname(dir), sysPath$3.basename(dir));
5625
5679
  }
5626
5680
  }
5627
5681
  }
@@ -5657,12 +5711,12 @@ class WatchHelper {
5657
5711
  this.fsw = fsw;
5658
5712
  this.path = path = path.replace(REPLACER_RE, EMPTY_STR$1);
5659
5713
  this.watchPath = watchPath;
5660
- this.fullWatchPath = sysPath.resolve(watchPath);
5714
+ this.fullWatchPath = sysPath$3.resolve(watchPath);
5661
5715
  this.hasGlob = watchPath !== path;
5662
5716
  /** @type {object|boolean} */
5663
5717
  if (path === EMPTY_STR$1) this.hasGlob = false;
5664
5718
  this.globSymlink = this.hasGlob && follow ? undefined : false;
5665
- this.globFilter = this.hasGlob ? anymatch$1(path, undefined, ANYMATCH_OPTS) : false;
5719
+ this.globFilter = this.hasGlob ? anymatch$2(path, undefined, ANYMATCH_OPTS) : false;
5666
5720
  this.dirParts = this.getDirParts(path);
5667
5721
  this.dirParts.forEach((parts) => {
5668
5722
  if (parts.length > 1) parts.pop();
@@ -5687,8 +5741,8 @@ class WatchHelper {
5687
5741
  }
5688
5742
 
5689
5743
  entryPath(entry) {
5690
- return sysPath.join(this.watchPath,
5691
- sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))
5744
+ return sysPath$3.join(this.watchPath,
5745
+ sysPath$3.relative(this.watchPath, this.checkGlobSymlink(entry))
5692
5746
  );
5693
5747
  }
5694
5748
 
@@ -5706,9 +5760,9 @@ class WatchHelper {
5706
5760
  getDirParts(path) {
5707
5761
  if (!this.hasGlob) return [];
5708
5762
  const parts = [];
5709
- const expandedPath = path.includes(BRACE_START$1) ? braces_1.expand(path) : [path];
5763
+ const expandedPath = path.includes(BRACE_START$1) ? braces$1.expand(path) : [path];
5710
5764
  expandedPath.forEach((path) => {
5711
- parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
5765
+ parts.push(sysPath$3.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
5712
5766
  });
5713
5767
  return parts;
5714
5768
  }
@@ -5720,7 +5774,7 @@ class WatchHelper {
5720
5774
  this.unmatchedGlob = !this.dirParts.some((parts) => {
5721
5775
  return parts.every((part, i) => {
5722
5776
  if (part === GLOBSTAR) globstar = true;
5723
- return globstar || !entryParts[0][i] || anymatch$1(part, entryParts[0][i], ANYMATCH_OPTS);
5777
+ return globstar || !entryParts[0][i] || anymatch$2(part, entryParts[0][i], ANYMATCH_OPTS);
5724
5778
  });
5725
5779
  });
5726
5780
  }
@@ -5773,7 +5827,7 @@ constructor(_opts) {
5773
5827
  if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;
5774
5828
 
5775
5829
  // If we can't use fsevents, ensure the options reflect it's disabled.
5776
- const canUseFsEvents = fseventsHandler.canUse();
5830
+ const canUseFsEvents = FsEventsHandler$1.canUse();
5777
5831
  if (!canUseFsEvents) opts.useFsEvents = false;
5778
5832
 
5779
5833
  // Use polling on Mac if not using fsevents.
@@ -5833,9 +5887,9 @@ constructor(_opts) {
5833
5887
 
5834
5888
  // Initialize with proper watcher.
5835
5889
  if (opts.useFsEvents) {
5836
- this._fsEventsHandler = new fseventsHandler(this);
5890
+ this._fsEventsHandler = new FsEventsHandler$1(this);
5837
5891
  } else {
5838
- this._nodeFsHandler = new nodefsHandler(this);
5892
+ this._nodeFsHandler = new NodeFsHandler$1(this);
5839
5893
  }
5840
5894
 
5841
5895
  // You’re frozen when your heart’s not open.
@@ -5860,10 +5914,10 @@ add(paths_, _origAdd, _internal) {
5860
5914
  const absPath = getAbsolutePath(path, cwd);
5861
5915
 
5862
5916
  // Check `path` instead of `absPath` because the cwd portion can't be a glob
5863
- if (disableGlobbing || !isGlob(path)) {
5917
+ if (disableGlobbing || !isGlob$2(path)) {
5864
5918
  return absPath;
5865
5919
  }
5866
- return normalizePath(absPath);
5920
+ return normalizePath$2(absPath);
5867
5921
  });
5868
5922
  }
5869
5923
 
@@ -5901,7 +5955,7 @@ add(paths_, _origAdd, _internal) {
5901
5955
  ).then(results => {
5902
5956
  if (this.closed) return;
5903
5957
  results.filter(item => item).forEach(item => {
5904
- this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
5958
+ this.add(sysPath$3.dirname(item), sysPath$3.basename(_origAdd || item));
5905
5959
  });
5906
5960
  });
5907
5961
  }
@@ -5921,9 +5975,9 @@ unwatch(paths_) {
5921
5975
 
5922
5976
  paths.forEach((path) => {
5923
5977
  // convert to absolute path unless relative path already matches
5924
- if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
5925
- if (cwd) path = sysPath.join(cwd, path);
5926
- path = sysPath.resolve(path);
5978
+ if (!sysPath$3.isAbsolute(path) && !this._closers.has(path)) {
5979
+ if (cwd) path = sysPath$3.join(cwd, path);
5980
+ path = sysPath$3.resolve(path);
5927
5981
  }
5928
5982
 
5929
5983
  this._closePath(path);
@@ -5976,7 +6030,7 @@ close() {
5976
6030
  getWatched() {
5977
6031
  const watchList = {};
5978
6032
  this._watched.forEach((entry, dir) => {
5979
- const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
6033
+ const key = this.options.cwd ? sysPath$3.relative(this.options.cwd, dir) : dir;
5980
6034
  watchList[key || ONE_DOT] = entry.getChildren().sort();
5981
6035
  });
5982
6036
  return watchList;
@@ -6004,8 +6058,8 @@ async _emit(event, path, val1, val2, val3) {
6004
6058
  if (this.closed) return;
6005
6059
 
6006
6060
  const opts = this.options;
6007
- if (isWindows$1) path = sysPath.normalize(path);
6008
- if (opts.cwd) path = sysPath.relative(opts.cwd, path);
6061
+ if (isWindows$1) path = sysPath$3.normalize(path);
6062
+ if (opts.cwd) path = sysPath$3.relative(opts.cwd, path);
6009
6063
  /** @type Array<any> */
6010
6064
  const args = [event, path];
6011
6065
  if (val3 !== undefined) args.push(val1, val2, val3);
@@ -6066,7 +6120,7 @@ async _emit(event, path, val1, val2, val3) {
6066
6120
  if (opts.alwaysStat && val1 === undefined &&
6067
6121
  (event === EV_ADD$2 || event === EV_ADD_DIR$2 || event === EV_CHANGE$2)
6068
6122
  ) {
6069
- const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
6123
+ const fullPath = opts.cwd ? sysPath$3.join(opts.cwd, path) : path;
6070
6124
  let stats;
6071
6125
  try {
6072
6126
  stats = await stat$3(fullPath);
@@ -6148,14 +6202,14 @@ _awaitWriteFinish(path, threshold, event, awfEmit) {
6148
6202
  let timeoutHandler;
6149
6203
 
6150
6204
  let fullPath = path;
6151
- if (this.options.cwd && !sysPath.isAbsolute(path)) {
6152
- fullPath = sysPath.join(this.options.cwd, path);
6205
+ if (this.options.cwd && !sysPath$3.isAbsolute(path)) {
6206
+ fullPath = sysPath$3.join(this.options.cwd, path);
6153
6207
  }
6154
6208
 
6155
6209
  const now = new Date();
6156
6210
 
6157
6211
  const awaitWriteFinish = (prevStat) => {
6158
- fs.stat(fullPath, (err, curStat) => {
6212
+ fs$3.stat(fullPath, (err, curStat) => {
6159
6213
  if (err || !this._pendingWrites.has(path)) {
6160
6214
  if (err && err.code !== 'ENOENT') awfEmit(err);
6161
6215
  return;
@@ -6216,10 +6270,10 @@ _isIgnored(path, stats) {
6216
6270
 
6217
6271
  const ignored = ign && ign.map(normalizeIgnored(cwd));
6218
6272
  const paths = arrify$1(ignored)
6219
- .filter((path) => typeof path === STRING_TYPE && !isGlob(path))
6273
+ .filter((path) => typeof path === STRING_TYPE && !isGlob$2(path))
6220
6274
  .map((path) => path + SLASH_GLOBSTAR);
6221
6275
  const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
6222
- this._userIgnored = anymatch$1(list, undefined, ANYMATCH_OPTS);
6276
+ this._userIgnored = anymatch$2(list, undefined, ANYMATCH_OPTS);
6223
6277
  }
6224
6278
 
6225
6279
  return this._userIgnored([path, stats]);
@@ -6236,7 +6290,7 @@ _isntIgnored(path, stat) {
6236
6290
  * @returns {WatchHelper} object containing helpers for this path
6237
6291
  */
6238
6292
  _getWatchHelpers(path, depth) {
6239
- const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
6293
+ const watchPath = depth || this.options.disableGlobbing || !isGlob$2(path) ? path : globParent$1(path);
6240
6294
  const follow = this.options.followSymlinks;
6241
6295
 
6242
6296
  return new WatchHelper(path, watchPath, follow, this);
@@ -6252,7 +6306,7 @@ _getWatchHelpers(path, depth) {
6252
6306
  */
6253
6307
  _getWatchedDir(directory) {
6254
6308
  if (!this._boundRemove) this._boundRemove = this._remove.bind(this);
6255
- const dir = sysPath.resolve(directory);
6309
+ const dir = sysPath$3.resolve(directory);
6256
6310
  if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
6257
6311
  return this._watched.get(dir);
6258
6312
  }
@@ -6288,8 +6342,8 @@ _remove(directory, item, isDirectory) {
6288
6342
  // if what is being deleted is a directory, get that directory's paths
6289
6343
  // for recursive deleting and cleaning of watched object
6290
6344
  // if it is not a directory, nestedDirectoryChildren will be empty array
6291
- const path = sysPath.join(directory, item);
6292
- const fullPath = sysPath.resolve(path);
6345
+ const path = sysPath$3.join(directory, item);
6346
+ const fullPath = sysPath$3.resolve(path);
6293
6347
  isDirectory = isDirectory != null
6294
6348
  ? isDirectory
6295
6349
  : this._watched.has(path) || this._watched.has(fullPath);
@@ -6327,7 +6381,7 @@ _remove(directory, item, isDirectory) {
6327
6381
 
6328
6382
  // If we wait for this file to be fully written, cancel the wait.
6329
6383
  let relPath = path;
6330
- if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
6384
+ if (this.options.cwd) relPath = sysPath$3.relative(this.options.cwd, path);
6331
6385
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
6332
6386
  const event = this._pendingWrites.get(relPath).cancelWait();
6333
6387
  if (event === EV_ADD$2) return;
@@ -6352,8 +6406,8 @@ _remove(directory, item, isDirectory) {
6352
6406
  */
6353
6407
  _closePath(path) {
6354
6408
  this._closeFile(path);
6355
- const dir = sysPath.dirname(path);
6356
- this._getWatchedDir(dir).remove(sysPath.basename(path));
6409
+ const dir = sysPath$3.dirname(path);
6410
+ this._getWatchedDir(dir).remove(sysPath$3.basename(path));
6357
6411
  }
6358
6412
 
6359
6413
  /**
@@ -6385,7 +6439,7 @@ _addPathCloser(path, closer) {
6385
6439
  _readdirp(root, opts) {
6386
6440
  if (this.closed) return;
6387
6441
  const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
6388
- let stream = readdirp_1(root, options);
6442
+ let stream = readdirp$1(root, options);
6389
6443
  this._streams.add(stream);
6390
6444
  stream.once(STR_CLOSE, () => {
6391
6445
  stream = undefined;
@@ -6402,7 +6456,7 @@ _readdirp(root, opts) {
6402
6456
  }
6403
6457
 
6404
6458
  // Export FSWatcher class
6405
- var FSWatcher_1 = FSWatcher;
6459
+ chokidar.FSWatcher = FSWatcher;
6406
6460
 
6407
6461
  /**
6408
6462
  * Instantiates watcher with paths to be tracked.
@@ -6416,15 +6470,10 @@ const watch = (paths, options) => {
6416
6470
  return watcher;
6417
6471
  };
6418
6472
 
6419
- var watch_1 = watch;
6420
-
6421
- var chokidar = {
6422
- FSWatcher: FSWatcher_1,
6423
- watch: watch_1
6424
- };
6473
+ chokidar.watch = watch;
6425
6474
 
6426
6475
  exports.braces_1 = braces_1;
6427
6476
  exports.chokidar = chokidar;
6428
6477
  exports.picomatch = picomatch$1;
6429
- exports.utils = utils$1;
6478
+ exports.utils = utils$4;
6430
6479
  //# sourceMappingURL=index.js.map