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,23 +1,25 @@
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
8
8
 
9
9
  Released under the MIT License.
10
10
  */
11
- import sysPath, { sep, resolve } from 'path';
12
- import util from 'util';
13
- import { createCommonjsModule, defaultOnWarn, ensureArray as ensureArray$1, warnUnknownOptions, getAugmentedNamespace, fseventsImporter, rollupInternal } from './rollup.js';
14
- import require$$0$2 from 'events';
15
- import fs from 'fs';
16
- import require$$0$1 from 'stream';
17
- import require$$1$1, { platform } from 'os';
11
+ import require$$0$2, { sep, resolve } from 'path';
12
+ import require$$0$1 from 'util';
13
+ import { defaultOnWarn, ensureArray as ensureArray$1, warnUnknownOptions, getAugmentedNamespace, fseventsImporter, rollupInternal } from './rollup.js';
14
+ import require$$0$3 from 'events';
15
+ import fs$4 from 'fs';
16
+ import require$$1 from 'stream';
17
+ import require$$2, { platform } from 'os';
18
18
  import 'crypto';
19
19
 
20
- var utils = createCommonjsModule(function (module, exports) {
20
+ var utils = {};
21
+
22
+ (function (exports) {
21
23
 
22
24
  exports.isInteger = num => {
23
25
  if (typeof num === 'number') {
@@ -129,16 +131,18 @@ exports.flatten = (...args) => {
129
131
  flat(args);
130
132
  return result;
131
133
  };
132
- });
134
+ }(utils));
135
+
136
+ const utils$1 = utils;
133
137
 
134
138
  var stringify = (ast, options = {}) => {
135
139
  let stringify = (node, parent = {}) => {
136
- let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
140
+ let invalidBlock = options.escapeInvalid && utils$1.isInvalidBrace(parent);
137
141
  let invalidNode = node.invalid === true && options.escapeInvalid === true;
138
142
  let output = '';
139
143
 
140
144
  if (node.value) {
141
- if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
145
+ if ((invalidBlock || invalidNode) && utils$1.isOpenOrClose(node)) {
142
146
  return '\\' + node.value;
143
147
  }
144
148
  return node.value;
@@ -183,10 +187,10 @@ var isNumber = function(num) {
183
187
  * Released under the MIT License.
184
188
  */
185
189
 
186
-
190
+ const isNumber$1 = isNumber;
187
191
 
188
192
  const toRegexRange = (min, max, options) => {
189
- if (isNumber(min) === false) {
193
+ if (isNumber$1(min) === false) {
190
194
  throw new TypeError('toRegexRange: expected the first argument to be a number');
191
195
  }
192
196
 
@@ -194,7 +198,7 @@ const toRegexRange = (min, max, options) => {
194
198
  return String(min);
195
199
  }
196
200
 
197
- if (isNumber(max) === false) {
201
+ if (isNumber$1(max) === false) {
198
202
  throw new TypeError('toRegexRange: expected the second argument to be a number.');
199
203
  }
200
204
 
@@ -470,8 +474,8 @@ var toRegexRange_1 = toRegexRange;
470
474
  * Licensed under the MIT License.
471
475
  */
472
476
 
473
-
474
-
477
+ const util = require$$0$1;
478
+ const toRegexRange$1 = toRegexRange_1;
475
479
 
476
480
  const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
477
481
 
@@ -483,7 +487,7 @@ const isValidValue = value => {
483
487
  return typeof value === 'number' || (typeof value === 'string' && value !== '');
484
488
  };
485
489
 
486
- const isNumber$1 = num => Number.isInteger(+num);
490
+ const isNumber$2 = num => Number.isInteger(+num);
487
491
 
488
492
  const zeros = input => {
489
493
  let value = `${input}`;
@@ -555,7 +559,7 @@ const toSequence = (parts, options) => {
555
559
 
556
560
  const toRange = (a, b, isNumbers, options) => {
557
561
  if (isNumbers) {
558
- return toRegexRange_1(a, b, { wrap: false, ...options });
562
+ return toRegexRange$1(a, b, { wrap: false, ...options });
559
563
  }
560
564
 
561
565
  let start = String.fromCharCode(a);
@@ -571,7 +575,7 @@ const toRegex = (start, end, options) => {
571
575
  let prefix = options.capture ? '' : '?:';
572
576
  return wrap ? `(${prefix}${start.join('|')})` : start.join('|');
573
577
  }
574
- return toRegexRange_1(start, end, options);
578
+ return toRegexRange$1(start, end, options);
575
579
  };
576
580
 
577
581
  const rangeError = (...args) => {
@@ -643,7 +647,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
643
647
  };
644
648
 
645
649
  const fillLetters = (start, end, step = 1, options = {}) => {
646
- if ((!isNumber$1(start) && start.length > 1) || (!isNumber$1(end) && end.length > 1)) {
650
+ if ((!isNumber$2(start) && start.length > 1) || (!isNumber$2(end) && end.length > 1)) {
647
651
  return invalidRange(start, end, options);
648
652
  }
649
653
 
@@ -697,12 +701,12 @@ const fill = (start, end, step, options = {}) => {
697
701
  if (opts.capture === true) opts.wrap = true;
698
702
  step = step || opts.step || 1;
699
703
 
700
- if (!isNumber$1(step)) {
704
+ if (!isNumber$2(step)) {
701
705
  if (step != null && !isObject(step)) return invalidStep(step, opts);
702
706
  return fill(start, end, 1, step);
703
707
  }
704
708
 
705
- if (isNumber$1(start) && isNumber$1(end)) {
709
+ if (isNumber$2(start) && isNumber$2(end)) {
706
710
  return fillNumbers(start, end, step, opts);
707
711
  }
708
712
 
@@ -711,9 +715,12 @@ const fill = (start, end, step, options = {}) => {
711
715
 
712
716
  var fillRange = fill;
713
717
 
718
+ const fill$1 = fillRange;
719
+ const utils$2 = utils;
720
+
714
721
  const compile = (ast, options = {}) => {
715
722
  let walk = (node, parent = {}) => {
716
- let invalidBlock = utils.isInvalidBrace(parent);
723
+ let invalidBlock = utils$2.isInvalidBrace(parent);
717
724
  let invalidNode = node.invalid === true && options.escapeInvalid === true;
718
725
  let invalid = invalidBlock === true || invalidNode === true;
719
726
  let prefix = options.escapeInvalid === true ? '\\' : '';
@@ -743,8 +750,8 @@ const compile = (ast, options = {}) => {
743
750
  }
744
751
 
745
752
  if (node.nodes && node.ranges > 0) {
746
- let args = utils.reduce(node.nodes);
747
- let range = fillRange(...args, { ...options, wrap: false, toRegex: true });
753
+ let args = utils$2.reduce(node.nodes);
754
+ let range = fill$1(...args, { ...options, wrap: false, toRegex: true });
748
755
 
749
756
  if (range.length !== 0) {
750
757
  return args.length > 1 && range.length > 1 ? `(${range})` : range;
@@ -764,6 +771,10 @@ const compile = (ast, options = {}) => {
764
771
 
765
772
  var compile_1 = compile;
766
773
 
774
+ const fill$2 = fillRange;
775
+ const stringify$2 = stringify;
776
+ const utils$3 = utils;
777
+
767
778
  const append = (queue = '', stash = '', enclose = false) => {
768
779
  let result = [];
769
780
 
@@ -772,7 +783,7 @@ const append = (queue = '', stash = '', enclose = false) => {
772
783
 
773
784
  if (!stash.length) return queue;
774
785
  if (!queue.length) {
775
- return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
786
+ return enclose ? utils$3.flatten(stash).map(ele => `{${ele}}`) : stash;
776
787
  }
777
788
 
778
789
  for (let item of queue) {
@@ -787,7 +798,7 @@ const append = (queue = '', stash = '', enclose = false) => {
787
798
  }
788
799
  }
789
800
  }
790
- return utils.flatten(result);
801
+ return utils$3.flatten(result);
791
802
  };
792
803
 
793
804
  const expand = (ast, options = {}) => {
@@ -805,7 +816,7 @@ const expand = (ast, options = {}) => {
805
816
  }
806
817
 
807
818
  if (node.invalid || node.dollar) {
808
- q.push(append(q.pop(), stringify(node, options)));
819
+ q.push(append(q.pop(), stringify$2(node, options)));
809
820
  return;
810
821
  }
811
822
 
@@ -815,15 +826,15 @@ const expand = (ast, options = {}) => {
815
826
  }
816
827
 
817
828
  if (node.nodes && node.ranges > 0) {
818
- let args = utils.reduce(node.nodes);
829
+ let args = utils$3.reduce(node.nodes);
819
830
 
820
- if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
831
+ if (utils$3.exceedsLimit(...args, options.step, rangeLimit)) {
821
832
  throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
822
833
  }
823
834
 
824
- let range = fillRange(...args, options);
835
+ let range = fill$2(...args, options);
825
836
  if (range.length === 0) {
826
- range = stringify(node, options);
837
+ range = stringify$2(node, options);
827
838
  }
828
839
 
829
840
  q.push(append(q.pop(), range));
@@ -831,7 +842,7 @@ const expand = (ast, options = {}) => {
831
842
  return;
832
843
  }
833
844
 
834
- let enclose = utils.encloseBrace(node);
845
+ let enclose = utils$3.encloseBrace(node);
835
846
  let queue = node.queue;
836
847
  let block = node;
837
848
 
@@ -867,7 +878,7 @@ const expand = (ast, options = {}) => {
867
878
  return queue;
868
879
  };
869
880
 
870
- return utils.flatten(walk(ast));
881
+ return utils$3.flatten(walk(ast));
871
882
  };
872
883
 
873
884
  var expand_1 = expand;
@@ -928,6 +939,8 @@ var constants = {
928
939
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
929
940
  };
930
941
 
942
+ const stringify$3 = stringify;
943
+
931
944
  /**
932
945
  * Constants
933
946
  */
@@ -1169,7 +1182,7 @@ const parse = (input, options = {}) => {
1169
1182
  if (block.ranges > 0) {
1170
1183
  block.ranges = 0;
1171
1184
  let open = block.nodes.shift();
1172
- block.nodes = [open, { type: 'text', value: stringify(block) }];
1185
+ block.nodes = [open, { type: 'text', value: stringify$3(block) }];
1173
1186
  }
1174
1187
 
1175
1188
  push({ type: 'comma', value });
@@ -1255,6 +1268,11 @@ const parse = (input, options = {}) => {
1255
1268
 
1256
1269
  var parse_1 = parse;
1257
1270
 
1271
+ const stringify$4 = stringify;
1272
+ const compile$1 = compile_1;
1273
+ const expand$1 = expand_1;
1274
+ const parse$1 = parse_1;
1275
+
1258
1276
  /**
1259
1277
  * Expand the given pattern or create a regex-compatible string.
1260
1278
  *
@@ -1305,7 +1323,7 @@ const braces = (input, options = {}) => {
1305
1323
  * @api public
1306
1324
  */
1307
1325
 
1308
- braces.parse = (input, options = {}) => parse_1(input, options);
1326
+ braces.parse = (input, options = {}) => parse$1(input, options);
1309
1327
 
1310
1328
  /**
1311
1329
  * Creates a braces string from an AST, or an AST node.
@@ -1323,9 +1341,9 @@ braces.parse = (input, options = {}) => parse_1(input, options);
1323
1341
 
1324
1342
  braces.stringify = (input, options = {}) => {
1325
1343
  if (typeof input === 'string') {
1326
- return stringify(braces.parse(input, options), options);
1344
+ return stringify$4(braces.parse(input, options), options);
1327
1345
  }
1328
- return stringify(input, options);
1346
+ return stringify$4(input, options);
1329
1347
  };
1330
1348
 
1331
1349
  /**
@@ -1347,7 +1365,7 @@ braces.compile = (input, options = {}) => {
1347
1365
  if (typeof input === 'string') {
1348
1366
  input = braces.parse(input, options);
1349
1367
  }
1350
- return compile_1(input, options);
1368
+ return compile$1(input, options);
1351
1369
  };
1352
1370
 
1353
1371
  /**
@@ -1372,7 +1390,7 @@ braces.expand = (input, options = {}) => {
1372
1390
  input = braces.parse(input, options);
1373
1391
  }
1374
1392
 
1375
- let result = expand_1(input, options);
1393
+ let result = expand$1(input, options);
1376
1394
 
1377
1395
  // filter out empty strings if specified
1378
1396
  if (options.noempty === true) {
@@ -1419,6 +1437,9 @@ braces.create = (input, options = {}) => {
1419
1437
 
1420
1438
  var braces_1 = braces;
1421
1439
 
1440
+ var utils$4 = {};
1441
+
1442
+ const path = require$$0$2;
1422
1443
  const WIN_SLASH = '\\\\/';
1423
1444
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1424
1445
 
@@ -1571,7 +1592,7 @@ var constants$1 = {
1571
1592
  CHAR_VERTICAL_LINE: 124, /* | */
1572
1593
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */
1573
1594
 
1574
- SEP: sysPath.sep,
1595
+ SEP: path.sep,
1575
1596
 
1576
1597
  /**
1577
1598
  * Create EXTGLOB_CHARS
@@ -1596,9 +1617,9 @@ var constants$1 = {
1596
1617
  }
1597
1618
  };
1598
1619
 
1599
- var utils$1 = createCommonjsModule(function (module, exports) {
1600
-
1620
+ (function (exports) {
1601
1621
 
1622
+ const path = require$$0$2;
1602
1623
  const win32 = process.platform === 'win32';
1603
1624
  const {
1604
1625
  REGEX_BACKSLASH,
@@ -1631,7 +1652,7 @@ exports.isWindows = options => {
1631
1652
  if (options && typeof options.windows === 'boolean') {
1632
1653
  return options.windows;
1633
1654
  }
1634
- return win32 === true || sysPath.sep === '\\';
1655
+ return win32 === true || path.sep === '\\';
1635
1656
  };
1636
1657
 
1637
1658
  exports.escapeLast = (input, char, lastIdx) => {
@@ -1660,8 +1681,9 @@ exports.wrapOutput = (input, state = {}, options = {}) => {
1660
1681
  }
1661
1682
  return output;
1662
1683
  };
1663
- });
1684
+ }(utils$4));
1664
1685
 
1686
+ const utils$5 = utils$4;
1665
1687
  const {
1666
1688
  CHAR_ASTERISK, /* * */
1667
1689
  CHAR_AT, /* @ */
@@ -1971,10 +1993,10 @@ const scan = (input, options) => {
1971
1993
  }
1972
1994
 
1973
1995
  if (opts.unescape === true) {
1974
- if (glob) glob = utils$1.removeBackslashes(glob);
1996
+ if (glob) glob = utils$5.removeBackslashes(glob);
1975
1997
 
1976
1998
  if (base && backslashes === true) {
1977
- base = utils$1.removeBackslashes(base);
1999
+ base = utils$5.removeBackslashes(base);
1978
2000
  }
1979
2001
  }
1980
2002
 
@@ -2043,6 +2065,9 @@ const scan = (input, options) => {
2043
2065
 
2044
2066
  var scan_1 = scan;
2045
2067
 
2068
+ const constants$2 = constants$1;
2069
+ const utils$6 = utils$4;
2070
+
2046
2071
  /**
2047
2072
  * Constants
2048
2073
  */
@@ -2053,7 +2078,7 @@ const {
2053
2078
  REGEX_NON_SPECIAL_CHARS,
2054
2079
  REGEX_SPECIAL_CHARS_BACKREF,
2055
2080
  REPLACEMENTS
2056
- } = constants$1;
2081
+ } = constants$2;
2057
2082
 
2058
2083
  /**
2059
2084
  * Helpers
@@ -2085,7 +2110,7 @@ const syntaxError = (type, char) => {
2085
2110
  * @return {Object}
2086
2111
  */
2087
2112
 
2088
- const parse$1 = (input, options) => {
2113
+ const parse$2 = (input, options) => {
2089
2114
  if (typeof input !== 'string') {
2090
2115
  throw new TypeError('Expected a string');
2091
2116
  }
@@ -2104,11 +2129,11 @@ const parse$1 = (input, options) => {
2104
2129
  const tokens = [bos];
2105
2130
 
2106
2131
  const capture = opts.capture ? '' : '?:';
2107
- const win32 = utils$1.isWindows(options);
2132
+ const win32 = utils$6.isWindows(options);
2108
2133
 
2109
2134
  // create constants based on platform, for windows or posix
2110
- const PLATFORM_CHARS = constants$1.globChars(win32);
2111
- const EXTGLOB_CHARS = constants$1.extglobChars(PLATFORM_CHARS);
2135
+ const PLATFORM_CHARS = constants$2.globChars(win32);
2136
+ const EXTGLOB_CHARS = constants$2.extglobChars(PLATFORM_CHARS);
2112
2137
 
2113
2138
  const {
2114
2139
  DOT_LITERAL,
@@ -2160,7 +2185,7 @@ const parse$1 = (input, options) => {
2160
2185
  tokens
2161
2186
  };
2162
2187
 
2163
- input = utils$1.removePrefix(input, state);
2188
+ input = utils$6.removePrefix(input, state);
2164
2189
  len = input.length;
2165
2190
 
2166
2191
  const extglobs = [];
@@ -2340,7 +2365,7 @@ const parse$1 = (input, options) => {
2340
2365
  return state;
2341
2366
  }
2342
2367
 
2343
- state.output = utils$1.wrapOutput(output, state, options);
2368
+ state.output = utils$6.wrapOutput(output, state, options);
2344
2369
  return state;
2345
2370
  }
2346
2371
 
@@ -2453,7 +2478,7 @@ const parse$1 = (input, options) => {
2453
2478
  */
2454
2479
 
2455
2480
  if (state.quotes === 1 && value !== '"') {
2456
- value = utils$1.escapeRegex(value);
2481
+ value = utils$6.escapeRegex(value);
2457
2482
  prev.value += value;
2458
2483
  append({ value });
2459
2484
  continue;
@@ -2543,11 +2568,11 @@ const parse$1 = (input, options) => {
2543
2568
 
2544
2569
  // when literal brackets are explicitly disabled
2545
2570
  // assume we should match with a regex character class
2546
- if (opts.literalBrackets === false || utils$1.hasRegexChars(prevValue)) {
2571
+ if (opts.literalBrackets === false || utils$6.hasRegexChars(prevValue)) {
2547
2572
  continue;
2548
2573
  }
2549
2574
 
2550
- const escaped = utils$1.escapeRegex(prev.value);
2575
+ const escaped = utils$6.escapeRegex(prev.value);
2551
2576
  state.output = state.output.slice(0, -prev.value.length);
2552
2577
 
2553
2578
  // when literal brackets are explicitly enabled
@@ -2719,7 +2744,7 @@ const parse$1 = (input, options) => {
2719
2744
  const next = peek();
2720
2745
  let output = value;
2721
2746
 
2722
- if (next === '<' && !utils$1.supportsLookbehinds()) {
2747
+ if (next === '<' && !utils$6.supportsLookbehinds()) {
2723
2748
  throw new Error('Node.js v10 or higher is required for regex lookbehinds');
2724
2749
  }
2725
2750
 
@@ -2979,19 +3004,19 @@ const parse$1 = (input, options) => {
2979
3004
 
2980
3005
  while (state.brackets > 0) {
2981
3006
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));
2982
- state.output = utils$1.escapeLast(state.output, '[');
3007
+ state.output = utils$6.escapeLast(state.output, '[');
2983
3008
  decrement('brackets');
2984
3009
  }
2985
3010
 
2986
3011
  while (state.parens > 0) {
2987
3012
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));
2988
- state.output = utils$1.escapeLast(state.output, '(');
3013
+ state.output = utils$6.escapeLast(state.output, '(');
2989
3014
  decrement('parens');
2990
3015
  }
2991
3016
 
2992
3017
  while (state.braces > 0) {
2993
3018
  if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));
2994
- state.output = utils$1.escapeLast(state.output, '{');
3019
+ state.output = utils$6.escapeLast(state.output, '{');
2995
3020
  decrement('braces');
2996
3021
  }
2997
3022
 
@@ -3021,7 +3046,7 @@ const parse$1 = (input, options) => {
3021
3046
  * impact when none of the fast paths match.
3022
3047
  */
3023
3048
 
3024
- parse$1.fastpaths = (input, options) => {
3049
+ parse$2.fastpaths = (input, options) => {
3025
3050
  const opts = { ...options };
3026
3051
  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$1, opts.maxLength) : MAX_LENGTH$1;
3027
3052
  const len = input.length;
@@ -3030,7 +3055,7 @@ parse$1.fastpaths = (input, options) => {
3030
3055
  }
3031
3056
 
3032
3057
  input = REPLACEMENTS[input] || input;
3033
- const win32 = utils$1.isWindows(options);
3058
+ const win32 = utils$6.isWindows(options);
3034
3059
 
3035
3060
  // create constants based on platform, for windows or posix
3036
3061
  const {
@@ -3043,7 +3068,7 @@ parse$1.fastpaths = (input, options) => {
3043
3068
  NO_DOTS_SLASH,
3044
3069
  STAR,
3045
3070
  START_ANCHOR
3046
- } = constants$1.globChars(win32);
3071
+ } = constants$2.globChars(win32);
3047
3072
 
3048
3073
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
3049
3074
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
@@ -3098,7 +3123,7 @@ parse$1.fastpaths = (input, options) => {
3098
3123
  }
3099
3124
  };
3100
3125
 
3101
- const output = utils$1.removePrefix(input, state);
3126
+ const output = utils$6.removePrefix(input, state);
3102
3127
  let source = create(output);
3103
3128
 
3104
3129
  if (source && opts.strictSlashes !== true) {
@@ -3108,8 +3133,13 @@ parse$1.fastpaths = (input, options) => {
3108
3133
  return source;
3109
3134
  };
3110
3135
 
3111
- var parse_1$1 = parse$1;
3136
+ var parse_1$1 = parse$2;
3112
3137
 
3138
+ const path$1 = require$$0$2;
3139
+ const scan$1 = scan_1;
3140
+ const parse$3 = parse_1$1;
3141
+ const utils$7 = utils$4;
3142
+ const constants$3 = constants$1;
3113
3143
  const isObject$1 = val => val && typeof val === 'object' && !Array.isArray(val);
3114
3144
 
3115
3145
  /**
@@ -3154,7 +3184,7 @@ const picomatch = (glob, options, returnState = false) => {
3154
3184
  }
3155
3185
 
3156
3186
  const opts = options || {};
3157
- const posix = utils$1.isWindows(options);
3187
+ const posix = utils$7.isWindows(options);
3158
3188
  const regex = isState
3159
3189
  ? picomatch.compileRe(glob, options)
3160
3190
  : picomatch.makeRe(glob, options, false, true);
@@ -3229,7 +3259,7 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3229
3259
  }
3230
3260
 
3231
3261
  const opts = options || {};
3232
- const format = opts.format || (posix ? utils$1.toPosixSlashes : null);
3262
+ const format = opts.format || (posix ? utils$7.toPosixSlashes : null);
3233
3263
  let match = input === glob;
3234
3264
  let output = (match && format) ? format(input) : input;
3235
3265
 
@@ -3263,9 +3293,9 @@ picomatch.test = (input, regex, options, { glob, posix } = {}) => {
3263
3293
  * @api public
3264
3294
  */
3265
3295
 
3266
- picomatch.matchBase = (input, glob, options, posix = utils$1.isWindows(options)) => {
3296
+ picomatch.matchBase = (input, glob, options, posix = utils$7.isWindows(options)) => {
3267
3297
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
3268
- return regex.test(sysPath.basename(input));
3298
+ return regex.test(path$1.basename(input));
3269
3299
  };
3270
3300
 
3271
3301
  /**
@@ -3303,7 +3333,7 @@ picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str
3303
3333
 
3304
3334
  picomatch.parse = (pattern, options) => {
3305
3335
  if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));
3306
- return parse_1$1(pattern, { ...options, fastpaths: false });
3336
+ return parse$3(pattern, { ...options, fastpaths: false });
3307
3337
  };
3308
3338
 
3309
3339
  /**
@@ -3333,7 +3363,7 @@ picomatch.parse = (pattern, options) => {
3333
3363
  * @api public
3334
3364
  */
3335
3365
 
3336
- picomatch.scan = (input, options) => scan_1(input, options);
3366
+ picomatch.scan = (input, options) => scan$1(input, options);
3337
3367
 
3338
3368
  /**
3339
3369
  * Create a regular expression from a parsed glob pattern.
@@ -3390,11 +3420,11 @@ picomatch.makeRe = (input, options, returnOutput = false, returnState = false) =
3390
3420
  }
3391
3421
 
3392
3422
  if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {
3393
- output = parse_1$1.fastpaths(input, options);
3423
+ output = parse$3.fastpaths(input, options);
3394
3424
  }
3395
3425
 
3396
3426
  if (output === undefined) {
3397
- parsed = parse_1$1(input, options);
3427
+ parsed = parse$3(input, options);
3398
3428
  parsed.prefix = prefix + (parsed.prefix || '');
3399
3429
  } else {
3400
3430
  parsed.output = output;
@@ -3435,7 +3465,7 @@ picomatch.toRegex = (source, options) => {
3435
3465
  * @return {Object}
3436
3466
  */
3437
3467
 
3438
- picomatch.constants = constants$1;
3468
+ picomatch.constants = constants$3;
3439
3469
 
3440
3470
  /**
3441
3471
  * Expose "picomatch"
@@ -3445,6 +3475,10 @@ var picomatch_1 = picomatch;
3445
3475
 
3446
3476
  var picomatch$1 = picomatch_1;
3447
3477
 
3478
+ const util$1 = require$$0$1;
3479
+ const braces$1 = braces_1;
3480
+ const picomatch$2 = picomatch$1;
3481
+ const utils$8 = utils$4;
3448
3482
  const isEmptyString = val => typeof val === 'string' && (val === '' || val === './');
3449
3483
 
3450
3484
  /**
@@ -3482,7 +3516,7 @@ const micromatch = (list, patterns, options) => {
3482
3516
  };
3483
3517
 
3484
3518
  for (let i = 0; i < patterns.length; i++) {
3485
- let isMatch = picomatch$1(String(patterns[i]), { ...options, onResult }, true);
3519
+ let isMatch = picomatch$2(String(patterns[i]), { ...options, onResult }, true);
3486
3520
  let negated = isMatch.state.negated || isMatch.state.negatedExtglob;
3487
3521
  if (negated) negatives++;
3488
3522
 
@@ -3542,7 +3576,7 @@ micromatch.match = micromatch;
3542
3576
  * @api public
3543
3577
  */
3544
3578
 
3545
- micromatch.matcher = (pattern, options) => picomatch$1(pattern, options);
3579
+ micromatch.matcher = (pattern, options) => picomatch$2(pattern, options);
3546
3580
 
3547
3581
  /**
3548
3582
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -3561,7 +3595,7 @@ micromatch.matcher = (pattern, options) => picomatch$1(pattern, options);
3561
3595
  * @api public
3562
3596
  */
3563
3597
 
3564
- micromatch.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
3598
+ micromatch.isMatch = (str, patterns, options) => picomatch$2(patterns, options)(str);
3565
3599
 
3566
3600
  /**
3567
3601
  * Backwards compatibility
@@ -3628,7 +3662,7 @@ micromatch.not = (list, patterns, options = {}) => {
3628
3662
 
3629
3663
  micromatch.contains = (str, pattern, options) => {
3630
3664
  if (typeof str !== 'string') {
3631
- throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3665
+ throw new TypeError(`Expected a string: "${util$1.inspect(str)}"`);
3632
3666
  }
3633
3667
 
3634
3668
  if (Array.isArray(pattern)) {
@@ -3669,7 +3703,7 @@ micromatch.contains = (str, pattern, options) => {
3669
3703
  */
3670
3704
 
3671
3705
  micromatch.matchKeys = (obj, patterns, options) => {
3672
- if (!utils$1.isObject(obj)) {
3706
+ if (!utils$8.isObject(obj)) {
3673
3707
  throw new TypeError('Expected the first argument to be an object');
3674
3708
  }
3675
3709
  let keys = micromatch(Object.keys(obj), patterns, options);
@@ -3701,7 +3735,7 @@ micromatch.some = (list, patterns, options) => {
3701
3735
  let items = [].concat(list);
3702
3736
 
3703
3737
  for (let pattern of [].concat(patterns)) {
3704
- let isMatch = picomatch$1(String(pattern), options);
3738
+ let isMatch = picomatch$2(String(pattern), options);
3705
3739
  if (items.some(item => isMatch(item))) {
3706
3740
  return true;
3707
3741
  }
@@ -3737,7 +3771,7 @@ micromatch.every = (list, patterns, options) => {
3737
3771
  let items = [].concat(list);
3738
3772
 
3739
3773
  for (let pattern of [].concat(patterns)) {
3740
- let isMatch = picomatch$1(String(pattern), options);
3774
+ let isMatch = picomatch$2(String(pattern), options);
3741
3775
  if (!items.every(item => isMatch(item))) {
3742
3776
  return false;
3743
3777
  }
@@ -3774,10 +3808,10 @@ micromatch.every = (list, patterns, options) => {
3774
3808
 
3775
3809
  micromatch.all = (str, patterns, options) => {
3776
3810
  if (typeof str !== 'string') {
3777
- throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
3811
+ throw new TypeError(`Expected a string: "${util$1.inspect(str)}"`);
3778
3812
  }
3779
3813
 
3780
- return [].concat(patterns).every(p => picomatch$1(p, options)(str));
3814
+ return [].concat(patterns).every(p => picomatch$2(p, options)(str));
3781
3815
  };
3782
3816
 
3783
3817
  /**
@@ -3800,9 +3834,9 @@ micromatch.all = (str, patterns, options) => {
3800
3834
  */
3801
3835
 
3802
3836
  micromatch.capture = (glob, input, options) => {
3803
- let posix = utils$1.isWindows(options);
3804
- let regex = picomatch$1.makeRe(String(glob), { ...options, capture: true });
3805
- let match = regex.exec(posix ? utils$1.toPosixSlashes(input) : input);
3837
+ let posix = utils$8.isWindows(options);
3838
+ let regex = picomatch$2.makeRe(String(glob), { ...options, capture: true });
3839
+ let match = regex.exec(posix ? utils$8.toPosixSlashes(input) : input);
3806
3840
 
3807
3841
  if (match) {
3808
3842
  return match.slice(1).map(v => v === void 0 ? '' : v);
@@ -3825,7 +3859,7 @@ micromatch.capture = (glob, input, options) => {
3825
3859
  * @api public
3826
3860
  */
3827
3861
 
3828
- micromatch.makeRe = (...args) => picomatch$1.makeRe(...args);
3862
+ micromatch.makeRe = (...args) => picomatch$2.makeRe(...args);
3829
3863
 
3830
3864
  /**
3831
3865
  * Scan a glob pattern to separate the pattern into segments. Used
@@ -3841,7 +3875,7 @@ micromatch.makeRe = (...args) => picomatch$1.makeRe(...args);
3841
3875
  * @api public
3842
3876
  */
3843
3877
 
3844
- micromatch.scan = (...args) => picomatch$1.scan(...args);
3878
+ micromatch.scan = (...args) => picomatch$2.scan(...args);
3845
3879
 
3846
3880
  /**
3847
3881
  * Parse a glob pattern to create the source string for a regular
@@ -3860,8 +3894,8 @@ micromatch.scan = (...args) => picomatch$1.scan(...args);
3860
3894
  micromatch.parse = (patterns, options) => {
3861
3895
  let res = [];
3862
3896
  for (let pattern of [].concat(patterns || [])) {
3863
- for (let str of braces_1(String(pattern), options)) {
3864
- res.push(picomatch$1.parse(str, options));
3897
+ for (let str of braces$1(String(pattern), options)) {
3898
+ res.push(picomatch$2.parse(str, options));
3865
3899
  }
3866
3900
  }
3867
3901
  return res;
@@ -3889,7 +3923,7 @@ micromatch.braces = (pattern, options) => {
3889
3923
  if ((options && options.nobrace === true) || !/\{.*\}/.test(pattern)) {
3890
3924
  return [pattern];
3891
3925
  }
3892
- return braces_1(pattern, options);
3926
+ return braces$1(pattern, options);
3893
3927
  };
3894
3928
 
3895
3929
  /**
@@ -4101,16 +4135,20 @@ function mergeOutputOptions(config, overrides, warn) {
4101
4135
  sourcemapFile: getOption('sourcemapFile'),
4102
4136
  sourcemapPathTransform: getOption('sourcemapPathTransform'),
4103
4137
  strict: getOption('strict'),
4104
- systemNullSetters: getOption('systemNullSetters')
4138
+ systemNullSetters: getOption('systemNullSetters'),
4139
+ validate: getOption('validate')
4105
4140
  };
4106
4141
  warnUnknownOptions(config, Object.keys(outputOptions), 'output options', warn);
4107
4142
  return outputOptions;
4108
4143
  }
4109
4144
 
4110
- const { Readable } = require$$0$1;
4111
-
4112
- const { promisify } = util;
4145
+ var chokidar = {};
4113
4146
 
4147
+ const fs = fs$4;
4148
+ const { Readable } = require$$1;
4149
+ const sysPath = require$$0$2;
4150
+ const { promisify } = require$$0$1;
4151
+ const picomatch$3 = picomatch$1;
4114
4152
 
4115
4153
  const readdir = promisify(fs.readdir);
4116
4154
  const stat = promisify(fs.stat);
@@ -4141,7 +4179,7 @@ const normalizeFilter = filter => {
4141
4179
  if (typeof filter === 'function') return filter;
4142
4180
 
4143
4181
  if (typeof filter === 'string') {
4144
- const glob = picomatch$1(filter.trim());
4182
+ const glob = picomatch$3(filter.trim());
4145
4183
  return entry => glob(entry.basename);
4146
4184
  }
4147
4185
 
@@ -4151,9 +4189,9 @@ const normalizeFilter = filter => {
4151
4189
  for (const item of filter) {
4152
4190
  const trimmed = item.trim();
4153
4191
  if (trimmed.charAt(0) === BANG) {
4154
- negative.push(picomatch$1(trimmed.slice(1)));
4192
+ negative.push(picomatch$3(trimmed.slice(1)));
4155
4193
  } else {
4156
- positive.push(picomatch$1(trimmed));
4194
+ positive.push(picomatch$3(trimmed));
4157
4195
  }
4158
4196
  }
4159
4197
 
@@ -4387,12 +4425,15 @@ readdirp.default = readdirp;
4387
4425
 
4388
4426
  var readdirp_1 = readdirp;
4389
4427
 
4428
+ var anymatch = {exports: {}};
4429
+
4390
4430
  /*!
4391
4431
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
4392
4432
  *
4393
4433
  * Copyright (c) 2014-2018, Jon Schlinkert.
4394
4434
  * Released under the MIT License.
4395
4435
  */
4436
+
4396
4437
  var normalizePath = function(path, stripTrailing) {
4397
4438
  if (typeof path !== 'string') {
4398
4439
  throw new TypeError('expected path to be a string');
@@ -4422,6 +4463,11 @@ var normalizePath = function(path, stripTrailing) {
4422
4463
  return prefix + segs.join('/');
4423
4464
  };
4424
4465
 
4466
+ Object.defineProperty(anymatch.exports, "__esModule", { value: true });
4467
+
4468
+ const picomatch$4 = picomatch$1;
4469
+ const normalizePath$1 = normalizePath;
4470
+
4425
4471
  /**
4426
4472
  * @typedef {(testString: string) => boolean} AnymatchFn
4427
4473
  * @typedef {string|RegExp|AnymatchFn} AnymatchPattern
@@ -4441,7 +4487,7 @@ const createPattern = (matcher, options) => {
4441
4487
  return matcher;
4442
4488
  }
4443
4489
  if (typeof matcher === 'string') {
4444
- const glob = picomatch$1(matcher, options);
4490
+ const glob = picomatch$4(matcher, options);
4445
4491
  return (string) => matcher === string || glob(string);
4446
4492
  }
4447
4493
  if (matcher instanceof RegExp) {
@@ -4464,7 +4510,7 @@ const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
4464
4510
  throw new TypeError('anymatch: second argument must be a string: got ' +
4465
4511
  Object.prototype.toString.call(_path))
4466
4512
  }
4467
- const path = normalizePath(_path);
4513
+ const path = normalizePath$1(_path);
4468
4514
 
4469
4515
  for (let index = 0; index < negPatterns.length; index++) {
4470
4516
  const nglob = negPatterns[index];
@@ -4490,7 +4536,7 @@ const matchPatterns = (patterns, negPatterns, args, returnIndex) => {
4490
4536
  * @param {object} options
4491
4537
  * @returns {boolean|number|Function}
4492
4538
  */
4493
- const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
4539
+ const anymatch$1 = (matchers, testString, options = DEFAULT_OPTIONS) => {
4494
4540
  if (matchers == null) {
4495
4541
  throw new TypeError('anymatch: specify first argument');
4496
4542
  }
@@ -4502,7 +4548,7 @@ const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
4502
4548
  const negatedGlobs = mtchers
4503
4549
  .filter(item => typeof item === 'string' && item.charAt(0) === BANG$1)
4504
4550
  .map(item => item.slice(1))
4505
- .map(item => picomatch$1(item, opts));
4551
+ .map(item => picomatch$4(item, opts));
4506
4552
  const patterns = mtchers.map(matcher => createPattern(matcher, opts));
4507
4553
 
4508
4554
  if (testString == null) {
@@ -4515,8 +4561,8 @@ const anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {
4515
4561
  return matchPatterns(patterns, negatedGlobs, testString, returnIndex);
4516
4562
  };
4517
4563
 
4518
- anymatch.default = anymatch;
4519
- var anymatch_1 = anymatch;
4564
+ anymatch$1.default = anymatch$1;
4565
+ anymatch.exports = anymatch$1;
4520
4566
 
4521
4567
  /*!
4522
4568
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
@@ -4524,6 +4570,7 @@ var anymatch_1 = anymatch;
4524
4570
  * Copyright (c) 2014-2016, Jon Schlinkert.
4525
4571
  * Licensed under the MIT License.
4526
4572
  */
4573
+
4527
4574
  var isExtglob = function isExtglob(str) {
4528
4575
  if (typeof str !== 'string' || str === '') {
4529
4576
  return false;
@@ -4545,6 +4592,7 @@ var isExtglob = function isExtglob(str) {
4545
4592
  * Released under the MIT License.
4546
4593
  */
4547
4594
 
4595
+ var isExtglob$1 = isExtglob;
4548
4596
  var chars = { '{': '}', '(': ')', '[': ']'};
4549
4597
  var strictRegex = /\\(.)|(^!|\*|[\].+)]\?|\[[^\\\]]+\]|\{[^\\}]+\}|\(\?[:!=][^\\)]+\)|\([^|]+\|[^\\)]+\))/;
4550
4598
  var relaxedRegex = /\\(.)|(^!|[*?{}()[\]]|\(\?)/;
@@ -4554,7 +4602,7 @@ var isGlob = function isGlob(str, options) {
4554
4602
  return false;
4555
4603
  }
4556
4604
 
4557
- if (isExtglob(str)) {
4605
+ if (isExtglob$1(str)) {
4558
4606
  return true;
4559
4607
  }
4560
4608
 
@@ -4586,8 +4634,9 @@ var isGlob = function isGlob(str, options) {
4586
4634
  return false;
4587
4635
  };
4588
4636
 
4589
- var pathPosixDirname = sysPath.posix.dirname;
4590
- var isWin32 = require$$1$1.platform() === 'win32';
4637
+ var isGlob$1 = isGlob;
4638
+ var pathPosixDirname = require$$0$2.posix.dirname;
4639
+ var isWin32 = require$$2.platform() === 'win32';
4591
4640
 
4592
4641
  var slash = '/';
4593
4642
  var backslash = /\\/g;
@@ -4619,7 +4668,7 @@ var globParent = function globParent(str, opts) {
4619
4668
  // remove path parts that are globby
4620
4669
  do {
4621
4670
  str = pathPosixDirname(str);
4622
- } while (isGlob(str) || globby.test(str));
4671
+ } while (isGlob$1(str) || globby.test(str));
4623
4672
 
4624
4673
  // remove escape chars and return result
4625
4674
  return str.replace(escaped, '$1');
@@ -4888,13 +4937,18 @@ var require$$0 = [
4888
4937
 
4889
4938
  var binaryExtensions = require$$0;
4890
4939
 
4891
- const extensions = new Set(binaryExtensions);
4940
+ const path$2 = require$$0$2;
4941
+ const binaryExtensions$1 = binaryExtensions;
4892
4942
 
4893
- var isBinaryPath = filePath => extensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
4943
+ const extensions = new Set(binaryExtensions$1);
4894
4944
 
4895
- var constants$2 = createCommonjsModule(function (module, exports) {
4945
+ var isBinaryPath = filePath => extensions.has(path$2.extname(filePath).slice(1).toLowerCase());
4896
4946
 
4897
- const {sep} = sysPath;
4947
+ var constants$4 = {};
4948
+
4949
+ (function (exports) {
4950
+
4951
+ const {sep} = require$$0$2;
4898
4952
  const {platform} = process;
4899
4953
 
4900
4954
  exports.EV_ALL = 'all';
@@ -4955,10 +5009,12 @@ exports.IDENTITY_FN = val => val;
4955
5009
  exports.isWindows = platform === 'win32';
4956
5010
  exports.isMacos = platform === 'darwin';
4957
5011
  exports.isLinux = platform === 'linux';
4958
- });
4959
-
4960
- const { promisify: promisify$1 } = util;
5012
+ }(constants$4));
4961
5013
 
5014
+ const fs$1 = fs$4;
5015
+ const sysPath$1 = require$$0$2;
5016
+ const { promisify: promisify$1 } = require$$0$1;
5017
+ const isBinaryPath$1 = isBinaryPath;
4962
5018
  const {
4963
5019
  isWindows,
4964
5020
  isLinux,
@@ -4976,15 +5032,15 @@ const {
4976
5032
  STR_END,
4977
5033
  BRACE_START,
4978
5034
  STAR: STAR$1
4979
- } = constants$2;
5035
+ } = constants$4;
4980
5036
 
4981
5037
  const THROTTLE_MODE_WATCH = 'watch';
4982
5038
 
4983
- const open = promisify$1(fs.open);
4984
- const stat$1 = promisify$1(fs.stat);
4985
- const lstat$1 = promisify$1(fs.lstat);
4986
- const close = promisify$1(fs.close);
4987
- const fsrealpath = promisify$1(fs.realpath);
5039
+ const open = promisify$1(fs$1.open);
5040
+ const stat$1 = promisify$1(fs$1.stat);
5041
+ const lstat$1 = promisify$1(fs$1.lstat);
5042
+ const close = promisify$1(fs$1.close);
5043
+ const fsrealpath = promisify$1(fs$1.realpath);
4988
5044
 
4989
5045
  const statMethods = { lstat: lstat$1, stat: stat$1 };
4990
5046
 
@@ -5066,12 +5122,12 @@ function createFsWatchInstance(path, options, listener, errHandler, emitRaw) {
5066
5122
  // case the file's watcher misses it (and rely on throttling to de-dupe)
5067
5123
  if (evPath && path !== evPath) {
5068
5124
  fsWatchBroadcast(
5069
- sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)
5125
+ sysPath$1.resolve(path, evPath), KEY_LISTENERS, sysPath$1.join(path, evPath)
5070
5126
  );
5071
5127
  }
5072
5128
  };
5073
5129
  try {
5074
- return fs.watch(path, options, handleEvent);
5130
+ return fs$1.watch(path, options, handleEvent);
5075
5131
  } catch (error) {
5076
5132
  errHandler(error);
5077
5133
  }
@@ -5190,7 +5246,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
5190
5246
 
5191
5247
  const copts = cont && cont.options;
5192
5248
  if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
5193
- fs.unwatchFile(fullPath);
5249
+ fs$1.unwatchFile(fullPath);
5194
5250
  cont = undefined;
5195
5251
  }
5196
5252
 
@@ -5207,7 +5263,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
5207
5263
  listeners: listener,
5208
5264
  rawEmitters: rawEmitter,
5209
5265
  options,
5210
- watcher: fs.watchFile(fullPath, options, (curr, prev) => {
5266
+ watcher: fs$1.watchFile(fullPath, options, (curr, prev) => {
5211
5267
  foreach(cont.rawEmitters, (rawEmitter) => {
5212
5268
  rawEmitter(EV_CHANGE, fullPath, {curr, prev});
5213
5269
  });
@@ -5228,7 +5284,7 @@ const setFsWatchFileListener = (path, fullPath, options, handlers) => {
5228
5284
  delFromSet(cont, KEY_RAW, rawEmitter);
5229
5285
  if (isEmptySet(cont.listeners)) {
5230
5286
  FsWatchFileInstances.delete(fullPath);
5231
- fs.unwatchFile(fullPath);
5287
+ fs$1.unwatchFile(fullPath);
5232
5288
  cont.options = cont.watcher = undefined;
5233
5289
  Object.freeze(cont);
5234
5290
  }
@@ -5256,17 +5312,17 @@ constructor(fsW) {
5256
5312
  */
5257
5313
  _watchWithNodeFs(path, listener) {
5258
5314
  const opts = this.fsw.options;
5259
- const directory = sysPath.dirname(path);
5260
- const basename = sysPath.basename(path);
5315
+ const directory = sysPath$1.dirname(path);
5316
+ const basename = sysPath$1.basename(path);
5261
5317
  const parent = this.fsw._getWatchedDir(directory);
5262
5318
  parent.add(basename);
5263
- const absolutePath = sysPath.resolve(path);
5319
+ const absolutePath = sysPath$1.resolve(path);
5264
5320
  const options = {persistent: opts.persistent};
5265
5321
  if (!listener) listener = EMPTY_FN;
5266
5322
 
5267
5323
  let closer;
5268
5324
  if (opts.usePolling) {
5269
- options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?
5325
+ options.interval = opts.enableBinaryInterval && isBinaryPath$1(basename) ?
5270
5326
  opts.binaryInterval : opts.interval;
5271
5327
  closer = setFsWatchFileListener(path, absolutePath, options, {
5272
5328
  listener,
@@ -5293,8 +5349,8 @@ _handleFile(file, stats, initialAdd) {
5293
5349
  if (this.fsw.closed) {
5294
5350
  return;
5295
5351
  }
5296
- const dirname = sysPath.dirname(file);
5297
- const basename = sysPath.basename(file);
5352
+ const dirname = sysPath$1.dirname(file);
5353
+ const basename = sysPath$1.basename(file);
5298
5354
  const parent = this.fsw._getWatchedDir(dirname);
5299
5355
  // stats is always present
5300
5356
  let prevStats = stats;
@@ -5392,7 +5448,7 @@ async _handleSymlink(entry, directory, path, item) {
5392
5448
 
5393
5449
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
5394
5450
  // Normalize the directory name on Windows
5395
- directory = sysPath.join(directory, EMPTY_STR);
5451
+ directory = sysPath$1.join(directory, EMPTY_STR);
5396
5452
 
5397
5453
  if (!wh.hasGlob) {
5398
5454
  throttler = this.fsw._throttle('readdir', directory, 1000);
@@ -5412,7 +5468,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
5412
5468
  return;
5413
5469
  }
5414
5470
  const item = entry.path;
5415
- let path = sysPath.join(directory, item);
5471
+ let path = sysPath$1.join(directory, item);
5416
5472
  current.add(item);
5417
5473
 
5418
5474
  if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {
@@ -5430,7 +5486,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
5430
5486
  this.fsw._incrReadyCount();
5431
5487
 
5432
5488
  // ensure relativeness of path is preserved in case of watcher reuse
5433
- path = sysPath.join(dir, sysPath.relative(dir, path));
5489
+ path = sysPath$1.join(dir, sysPath$1.relative(dir, path));
5434
5490
 
5435
5491
  this._addToNodeFs(path, initialAdd, wh, depth + 1);
5436
5492
  }
@@ -5456,7 +5512,7 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
5456
5512
  // a path may have been filtered out of this readdir, but
5457
5513
  // shouldn't be removed because it matches a different glob
5458
5514
  (!wh.hasGlob || wh.filterPath({
5459
- fullPath: sysPath.resolve(directory, item)
5515
+ fullPath: sysPath$1.resolve(directory, item)
5460
5516
  }));
5461
5517
  }).forEach((item) => {
5462
5518
  this.fsw._remove(directory, item);
@@ -5482,14 +5538,14 @@ _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
5482
5538
  * @returns {Promise<Function>} closer for the watcher instance.
5483
5539
  */
5484
5540
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {
5485
- const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
5486
- const tracked = parentDir.has(sysPath.basename(dir));
5541
+ const parentDir = this.fsw._getWatchedDir(sysPath$1.dirname(dir));
5542
+ const tracked = parentDir.has(sysPath$1.basename(dir));
5487
5543
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
5488
5544
  if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats);
5489
5545
  }
5490
5546
 
5491
5547
  // ensure dir is tracked (harmless if redundant)
5492
- parentDir.add(sysPath.basename(dir));
5548
+ parentDir.add(sysPath$1.basename(dir));
5493
5549
  this.fsw._getWatchedDir(dir);
5494
5550
  let throttler;
5495
5551
  let closer;
@@ -5548,7 +5604,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
5548
5604
  const follow = this.fsw.options.followSymlinks && !path.includes(STAR$1) && !path.includes(BRACE_START);
5549
5605
  let closer;
5550
5606
  if (stats.isDirectory()) {
5551
- const absPath = sysPath.resolve(path);
5607
+ const absPath = sysPath$1.resolve(path);
5552
5608
  const targetPath = follow ? await fsrealpath(path) : path;
5553
5609
  if (this.fsw.closed) return;
5554
5610
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
@@ -5560,7 +5616,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
5560
5616
  } else if (stats.isSymbolicLink()) {
5561
5617
  const targetPath = follow ? await fsrealpath(path) : path;
5562
5618
  if (this.fsw.closed) return;
5563
- const parent = sysPath.dirname(wh.watchPath);
5619
+ const parent = sysPath$1.dirname(wh.watchPath);
5564
5620
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
5565
5621
  this.fsw._emit(EV_ADD, wh.watchPath, stats);
5566
5622
  closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);
@@ -5568,7 +5624,7 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
5568
5624
 
5569
5625
  // preserve this symlink's target path
5570
5626
  if (targetPath !== undefined) {
5571
- this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);
5627
+ this.fsw._symlinkPaths.set(sysPath$1.resolve(path), targetPath);
5572
5628
  }
5573
5629
  } else {
5574
5630
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
@@ -5590,13 +5646,17 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
5590
5646
 
5591
5647
  var nodefsHandler = NodeFsHandler;
5592
5648
 
5593
- var require$$1 = /*@__PURE__*/getAugmentedNamespace(fseventsImporter);
5649
+ var fseventsHandler = {exports: {}};
5650
+
5651
+ var require$$3 = /*@__PURE__*/getAugmentedNamespace(fseventsImporter);
5594
5652
 
5595
- const { promisify: promisify$2 } = util;
5653
+ const fs$2 = fs$4;
5654
+ const sysPath$2 = require$$0$2;
5655
+ const { promisify: promisify$2 } = require$$0$1;
5596
5656
 
5597
5657
  let fsevents;
5598
5658
  try {
5599
- fsevents = require$$1.getFsEvents();
5659
+ fsevents = require$$3.getFsEvents();
5600
5660
  } catch (error) {
5601
5661
  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);
5602
5662
  }
@@ -5637,13 +5697,13 @@ const {
5637
5697
  FUNCTION_TYPE,
5638
5698
  EMPTY_FN: EMPTY_FN$1,
5639
5699
  IDENTITY_FN
5640
- } = constants$2;
5700
+ } = constants$4;
5641
5701
 
5642
5702
  const Depth = (value) => isNaN(value) ? {} : {depth: value};
5643
5703
 
5644
- const stat$2 = promisify$2(fs.stat);
5645
- const lstat$2 = promisify$2(fs.lstat);
5646
- const realpath$1 = promisify$2(fs.realpath);
5704
+ const stat$2 = promisify$2(fs$2.stat);
5705
+ const lstat$2 = promisify$2(fs$2.lstat);
5706
+ const realpath$1 = promisify$2(fs$2.realpath);
5647
5707
 
5648
5708
  const statMethods$1 = { stat: stat$2, lstat: lstat$2 };
5649
5709
 
@@ -5694,8 +5754,8 @@ const createFSEventsInstance = (path, callback) => {
5694
5754
  * @returns {Function} closer
5695
5755
  */
5696
5756
  function setFSEventsListener(path, realPath, listener, rawEmitter) {
5697
- let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path;
5698
- const parentPath = sysPath.dirname(watchPath);
5757
+ let watchPath = sysPath$2.extname(path) ? sysPath$2.dirname(path) : path;
5758
+ const parentPath = sysPath$2.dirname(watchPath);
5699
5759
  let cont = FSEventsWatchers.get(watchPath);
5700
5760
 
5701
5761
  // If we've accumulated a substantial number of paths that
@@ -5706,14 +5766,14 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) {
5706
5766
  watchPath = parentPath;
5707
5767
  }
5708
5768
 
5709
- const resolvedPath = sysPath.resolve(path);
5769
+ const resolvedPath = sysPath$2.resolve(path);
5710
5770
  const hasSymlink = resolvedPath !== realPath;
5711
5771
 
5712
5772
  const filteredListener = (fullPath, flags, info) => {
5713
5773
  if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);
5714
5774
  if (
5715
5775
  fullPath === resolvedPath ||
5716
- !fullPath.indexOf(resolvedPath + sysPath.sep)
5776
+ !fullPath.indexOf(resolvedPath + sysPath$2.sep)
5717
5777
  ) listener(fullPath, flags, info);
5718
5778
  };
5719
5779
 
@@ -5721,7 +5781,7 @@ function setFSEventsListener(path, realPath, listener, rawEmitter) {
5721
5781
  // modifies `watchPath` to the parent path when it finds a match
5722
5782
  let watchedParent = false;
5723
5783
  for (const watchedPath of FSEventsWatchers.keys()) {
5724
- if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {
5784
+ if (realPath.indexOf(sysPath$2.resolve(watchedPath) + sysPath$2.sep) === 0) {
5725
5785
  watchPath = watchedPath;
5726
5786
  cont = FSEventsWatchers.get(watchPath);
5727
5787
  watchedParent = true;
@@ -5786,7 +5846,7 @@ const canUse = () => fsevents && FSEventsWatchers.size < 128;
5786
5846
  // determines subdirectory traversal levels from root to path
5787
5847
  const calcDepth = (path, root) => {
5788
5848
  let i = 0;
5789
- while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;
5849
+ while (!path.indexOf(root) && (path = sysPath$2.dirname(path)) !== root) i++;
5790
5850
  return i;
5791
5851
  };
5792
5852
 
@@ -5897,13 +5957,13 @@ _watchWithFsEvents(watchPath, realPath, transform, globFilter) {
5897
5957
  opts.depth !== undefined &&
5898
5958
  calcDepth(fullPath, realPath) > opts.depth
5899
5959
  ) return;
5900
- const path = transform(sysPath.join(
5901
- watchPath, sysPath.relative(watchPath, fullPath)
5960
+ const path = transform(sysPath$2.join(
5961
+ watchPath, sysPath$2.relative(watchPath, fullPath)
5902
5962
  ));
5903
5963
  if (globFilter && !globFilter(path)) return;
5904
5964
  // ensure directories are tracked
5905
- const parent = sysPath.dirname(path);
5906
- const item = sysPath.basename(path);
5965
+ const parent = sysPath$2.dirname(path);
5966
+ const item = sysPath$2.basename(path);
5907
5967
  const watchedDir = this.fsw._getWatchedDir(
5908
5968
  info.type === FSEVENT_TYPE_DIRECTORY ? path : parent
5909
5969
  );
@@ -5979,7 +6039,7 @@ async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
5979
6039
  if (linkTarget && linkTarget !== DOT_SLASH) {
5980
6040
  aliasedPath = path.replace(linkTarget, linkPath);
5981
6041
  } else if (path !== DOT_SLASH) {
5982
- aliasedPath = sysPath.join(linkPath, path);
6042
+ aliasedPath = sysPath$2.join(linkPath, path);
5983
6043
  }
5984
6044
  return transform(aliasedPath);
5985
6045
  }, false, curDepth);
@@ -5998,8 +6058,8 @@ async _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {
5998
6058
  emitAdd(newPath, stats, processPath, opts, forceAdd) {
5999
6059
  const pp = processPath(newPath);
6000
6060
  const isDir = stats.isDirectory();
6001
- const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));
6002
- const base = sysPath.basename(pp);
6061
+ const dirObj = this.fsw._getWatchedDir(sysPath$2.dirname(pp));
6062
+ const base = sysPath$2.basename(pp);
6003
6063
 
6004
6064
  // ensure empty dirs get tracked
6005
6065
  if (isDir) this.fsw._getWatchedDir(pp);
@@ -6015,7 +6075,7 @@ initWatch(realPath, path, wh, processPath) {
6015
6075
  if (this.fsw.closed) return;
6016
6076
  const closer = this._watchWithFsEvents(
6017
6077
  wh.watchPath,
6018
- sysPath.resolve(realPath || wh.watchPath),
6078
+ sysPath$2.resolve(realPath || wh.watchPath),
6019
6079
  processPath,
6020
6080
  wh.globFilter
6021
6081
  );
@@ -6065,14 +6125,14 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
6065
6125
  }
6066
6126
  if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;
6067
6127
 
6068
- const joinedPath = sysPath.join(wh.watchPath, entry.path);
6128
+ const joinedPath = sysPath$2.join(wh.watchPath, entry.path);
6069
6129
  const {fullPath} = entry;
6070
6130
 
6071
6131
  if (wh.followSymlinks && entry.stats.isSymbolicLink()) {
6072
6132
  // preserve the current depth here since it can't be derived from
6073
6133
  // real paths past the symlink
6074
6134
  const curDepth = opts.depth === undefined ?
6075
- undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;
6135
+ undefined : calcDepth(joinedPath, sysPath$2.resolve(wh.watchPath)) + 1;
6076
6136
 
6077
6137
  this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);
6078
6138
  } else {
@@ -6109,23 +6169,22 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
6109
6169
 
6110
6170
  }
6111
6171
 
6112
- var fseventsHandler = FsEventsHandler;
6113
- var canUse_1 = canUse;
6114
- fseventsHandler.canUse = canUse_1;
6115
-
6116
- const { EventEmitter } = require$$0$2;
6117
-
6118
-
6119
- const { promisify: promisify$3 } = util;
6120
-
6121
- const anymatch$1 = anymatch_1.default;
6122
-
6123
-
6124
-
6125
-
6126
-
6127
-
6128
-
6172
+ fseventsHandler.exports = FsEventsHandler;
6173
+ fseventsHandler.exports.canUse = canUse;
6174
+
6175
+ const { EventEmitter } = require$$0$3;
6176
+ const fs$3 = fs$4;
6177
+ const sysPath$3 = require$$0$2;
6178
+ const { promisify: promisify$3 } = require$$0$1;
6179
+ const readdirp$1 = readdirp_1;
6180
+ const anymatch$2 = anymatch.exports.default;
6181
+ const globParent$1 = globParent;
6182
+ const isGlob$2 = isGlob;
6183
+ const braces$2 = braces_1;
6184
+ const normalizePath$2 = normalizePath;
6185
+
6186
+ const NodeFsHandler$1 = nodefsHandler;
6187
+ const FsEventsHandler$1 = fseventsHandler.exports;
6129
6188
  const {
6130
6189
  EV_ALL,
6131
6190
  EV_READY,
@@ -6162,10 +6221,10 @@ const {
6162
6221
 
6163
6222
  isWindows: isWindows$1,
6164
6223
  isMacos
6165
- } = constants$2;
6224
+ } = constants$4;
6166
6225
 
6167
- const stat$3 = promisify$3(fs.stat);
6168
- const readdir$1 = promisify$3(fs.readdir);
6226
+ const stat$3 = promisify$3(fs$3.stat);
6227
+ const readdir$1 = promisify$3(fs$3.readdir);
6169
6228
 
6170
6229
  /**
6171
6230
  * @typedef {String} Path
@@ -6229,21 +6288,21 @@ const toUnix = (string) => {
6229
6288
 
6230
6289
  // Our version of upath.normalize
6231
6290
  // TODO: this is not equal to path-normalize module - investigate why
6232
- const normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));
6291
+ const normalizePathToUnix = (path) => toUnix(sysPath$3.normalize(toUnix(path)));
6233
6292
 
6234
6293
  const normalizeIgnored = (cwd = EMPTY_STR$1) => (path) => {
6235
6294
  if (typeof path !== STRING_TYPE) return path;
6236
- return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));
6295
+ return normalizePathToUnix(sysPath$3.isAbsolute(path) ? path : sysPath$3.join(cwd, path));
6237
6296
  };
6238
6297
 
6239
6298
  const getAbsolutePath = (path, cwd) => {
6240
- if (sysPath.isAbsolute(path)) {
6299
+ if (sysPath$3.isAbsolute(path)) {
6241
6300
  return path;
6242
6301
  }
6243
6302
  if (path.startsWith(BANG$2)) {
6244
- return BANG$2 + sysPath.join(cwd, path.slice(1));
6303
+ return BANG$2 + sysPath$3.join(cwd, path.slice(1));
6245
6304
  }
6246
- return sysPath.join(cwd, path);
6305
+ return sysPath$3.join(cwd, path);
6247
6306
  };
6248
6307
 
6249
6308
  const undef = (opts, key) => opts[key] === undefined;
@@ -6282,7 +6341,7 @@ class DirEntry {
6282
6341
  await readdir$1(dir);
6283
6342
  } catch (err) {
6284
6343
  if (this._removeWatcher) {
6285
- this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
6344
+ this._removeWatcher(sysPath$3.dirname(dir), sysPath$3.basename(dir));
6286
6345
  }
6287
6346
  }
6288
6347
  }
@@ -6318,12 +6377,12 @@ class WatchHelper {
6318
6377
  this.fsw = fsw;
6319
6378
  this.path = path = path.replace(REPLACER_RE, EMPTY_STR$1);
6320
6379
  this.watchPath = watchPath;
6321
- this.fullWatchPath = sysPath.resolve(watchPath);
6380
+ this.fullWatchPath = sysPath$3.resolve(watchPath);
6322
6381
  this.hasGlob = watchPath !== path;
6323
6382
  /** @type {object|boolean} */
6324
6383
  if (path === EMPTY_STR$1) this.hasGlob = false;
6325
6384
  this.globSymlink = this.hasGlob && follow ? undefined : false;
6326
- this.globFilter = this.hasGlob ? anymatch$1(path, undefined, ANYMATCH_OPTS) : false;
6385
+ this.globFilter = this.hasGlob ? anymatch$2(path, undefined, ANYMATCH_OPTS) : false;
6327
6386
  this.dirParts = this.getDirParts(path);
6328
6387
  this.dirParts.forEach((parts) => {
6329
6388
  if (parts.length > 1) parts.pop();
@@ -6348,8 +6407,8 @@ class WatchHelper {
6348
6407
  }
6349
6408
 
6350
6409
  entryPath(entry) {
6351
- return sysPath.join(this.watchPath,
6352
- sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))
6410
+ return sysPath$3.join(this.watchPath,
6411
+ sysPath$3.relative(this.watchPath, this.checkGlobSymlink(entry))
6353
6412
  );
6354
6413
  }
6355
6414
 
@@ -6367,9 +6426,9 @@ class WatchHelper {
6367
6426
  getDirParts(path) {
6368
6427
  if (!this.hasGlob) return [];
6369
6428
  const parts = [];
6370
- const expandedPath = path.includes(BRACE_START$1) ? braces_1.expand(path) : [path];
6429
+ const expandedPath = path.includes(BRACE_START$1) ? braces$2.expand(path) : [path];
6371
6430
  expandedPath.forEach((path) => {
6372
- parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
6431
+ parts.push(sysPath$3.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));
6373
6432
  });
6374
6433
  return parts;
6375
6434
  }
@@ -6381,7 +6440,7 @@ class WatchHelper {
6381
6440
  this.unmatchedGlob = !this.dirParts.some((parts) => {
6382
6441
  return parts.every((part, i) => {
6383
6442
  if (part === GLOBSTAR) globstar = true;
6384
- return globstar || !entryParts[0][i] || anymatch$1(part, entryParts[0][i], ANYMATCH_OPTS);
6443
+ return globstar || !entryParts[0][i] || anymatch$2(part, entryParts[0][i], ANYMATCH_OPTS);
6385
6444
  });
6386
6445
  });
6387
6446
  }
@@ -6434,7 +6493,7 @@ constructor(_opts) {
6434
6493
  if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;
6435
6494
 
6436
6495
  // If we can't use fsevents, ensure the options reflect it's disabled.
6437
- const canUseFsEvents = fseventsHandler.canUse();
6496
+ const canUseFsEvents = FsEventsHandler$1.canUse();
6438
6497
  if (!canUseFsEvents) opts.useFsEvents = false;
6439
6498
 
6440
6499
  // Use polling on Mac if not using fsevents.
@@ -6494,9 +6553,9 @@ constructor(_opts) {
6494
6553
 
6495
6554
  // Initialize with proper watcher.
6496
6555
  if (opts.useFsEvents) {
6497
- this._fsEventsHandler = new fseventsHandler(this);
6556
+ this._fsEventsHandler = new FsEventsHandler$1(this);
6498
6557
  } else {
6499
- this._nodeFsHandler = new nodefsHandler(this);
6558
+ this._nodeFsHandler = new NodeFsHandler$1(this);
6500
6559
  }
6501
6560
 
6502
6561
  // You’re frozen when your heart’s not open.
@@ -6521,10 +6580,10 @@ add(paths_, _origAdd, _internal) {
6521
6580
  const absPath = getAbsolutePath(path, cwd);
6522
6581
 
6523
6582
  // Check `path` instead of `absPath` because the cwd portion can't be a glob
6524
- if (disableGlobbing || !isGlob(path)) {
6583
+ if (disableGlobbing || !isGlob$2(path)) {
6525
6584
  return absPath;
6526
6585
  }
6527
- return normalizePath(absPath);
6586
+ return normalizePath$2(absPath);
6528
6587
  });
6529
6588
  }
6530
6589
 
@@ -6562,7 +6621,7 @@ add(paths_, _origAdd, _internal) {
6562
6621
  ).then(results => {
6563
6622
  if (this.closed) return;
6564
6623
  results.filter(item => item).forEach(item => {
6565
- this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));
6624
+ this.add(sysPath$3.dirname(item), sysPath$3.basename(_origAdd || item));
6566
6625
  });
6567
6626
  });
6568
6627
  }
@@ -6582,9 +6641,9 @@ unwatch(paths_) {
6582
6641
 
6583
6642
  paths.forEach((path) => {
6584
6643
  // convert to absolute path unless relative path already matches
6585
- if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {
6586
- if (cwd) path = sysPath.join(cwd, path);
6587
- path = sysPath.resolve(path);
6644
+ if (!sysPath$3.isAbsolute(path) && !this._closers.has(path)) {
6645
+ if (cwd) path = sysPath$3.join(cwd, path);
6646
+ path = sysPath$3.resolve(path);
6588
6647
  }
6589
6648
 
6590
6649
  this._closePath(path);
@@ -6637,7 +6696,7 @@ close() {
6637
6696
  getWatched() {
6638
6697
  const watchList = {};
6639
6698
  this._watched.forEach((entry, dir) => {
6640
- const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;
6699
+ const key = this.options.cwd ? sysPath$3.relative(this.options.cwd, dir) : dir;
6641
6700
  watchList[key || ONE_DOT] = entry.getChildren().sort();
6642
6701
  });
6643
6702
  return watchList;
@@ -6665,8 +6724,8 @@ async _emit(event, path, val1, val2, val3) {
6665
6724
  if (this.closed) return;
6666
6725
 
6667
6726
  const opts = this.options;
6668
- if (isWindows$1) path = sysPath.normalize(path);
6669
- if (opts.cwd) path = sysPath.relative(opts.cwd, path);
6727
+ if (isWindows$1) path = sysPath$3.normalize(path);
6728
+ if (opts.cwd) path = sysPath$3.relative(opts.cwd, path);
6670
6729
  /** @type Array<any> */
6671
6730
  const args = [event, path];
6672
6731
  if (val3 !== undefined) args.push(val1, val2, val3);
@@ -6727,7 +6786,7 @@ async _emit(event, path, val1, val2, val3) {
6727
6786
  if (opts.alwaysStat && val1 === undefined &&
6728
6787
  (event === EV_ADD$2 || event === EV_ADD_DIR$2 || event === EV_CHANGE$2)
6729
6788
  ) {
6730
- const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
6789
+ const fullPath = opts.cwd ? sysPath$3.join(opts.cwd, path) : path;
6731
6790
  let stats;
6732
6791
  try {
6733
6792
  stats = await stat$3(fullPath);
@@ -6809,14 +6868,14 @@ _awaitWriteFinish(path, threshold, event, awfEmit) {
6809
6868
  let timeoutHandler;
6810
6869
 
6811
6870
  let fullPath = path;
6812
- if (this.options.cwd && !sysPath.isAbsolute(path)) {
6813
- fullPath = sysPath.join(this.options.cwd, path);
6871
+ if (this.options.cwd && !sysPath$3.isAbsolute(path)) {
6872
+ fullPath = sysPath$3.join(this.options.cwd, path);
6814
6873
  }
6815
6874
 
6816
6875
  const now = new Date();
6817
6876
 
6818
6877
  const awaitWriteFinish = (prevStat) => {
6819
- fs.stat(fullPath, (err, curStat) => {
6878
+ fs$3.stat(fullPath, (err, curStat) => {
6820
6879
  if (err || !this._pendingWrites.has(path)) {
6821
6880
  if (err && err.code !== 'ENOENT') awfEmit(err);
6822
6881
  return;
@@ -6877,10 +6936,10 @@ _isIgnored(path, stats) {
6877
6936
 
6878
6937
  const ignored = ign && ign.map(normalizeIgnored(cwd));
6879
6938
  const paths = arrify$1(ignored)
6880
- .filter((path) => typeof path === STRING_TYPE && !isGlob(path))
6939
+ .filter((path) => typeof path === STRING_TYPE && !isGlob$2(path))
6881
6940
  .map((path) => path + SLASH_GLOBSTAR);
6882
6941
  const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);
6883
- this._userIgnored = anymatch$1(list, undefined, ANYMATCH_OPTS);
6942
+ this._userIgnored = anymatch$2(list, undefined, ANYMATCH_OPTS);
6884
6943
  }
6885
6944
 
6886
6945
  return this._userIgnored([path, stats]);
@@ -6897,7 +6956,7 @@ _isntIgnored(path, stat) {
6897
6956
  * @returns {WatchHelper} object containing helpers for this path
6898
6957
  */
6899
6958
  _getWatchHelpers(path, depth) {
6900
- const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);
6959
+ const watchPath = depth || this.options.disableGlobbing || !isGlob$2(path) ? path : globParent$1(path);
6901
6960
  const follow = this.options.followSymlinks;
6902
6961
 
6903
6962
  return new WatchHelper(path, watchPath, follow, this);
@@ -6913,7 +6972,7 @@ _getWatchHelpers(path, depth) {
6913
6972
  */
6914
6973
  _getWatchedDir(directory) {
6915
6974
  if (!this._boundRemove) this._boundRemove = this._remove.bind(this);
6916
- const dir = sysPath.resolve(directory);
6975
+ const dir = sysPath$3.resolve(directory);
6917
6976
  if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));
6918
6977
  return this._watched.get(dir);
6919
6978
  }
@@ -6949,8 +7008,8 @@ _remove(directory, item, isDirectory) {
6949
7008
  // if what is being deleted is a directory, get that directory's paths
6950
7009
  // for recursive deleting and cleaning of watched object
6951
7010
  // if it is not a directory, nestedDirectoryChildren will be empty array
6952
- const path = sysPath.join(directory, item);
6953
- const fullPath = sysPath.resolve(path);
7011
+ const path = sysPath$3.join(directory, item);
7012
+ const fullPath = sysPath$3.resolve(path);
6954
7013
  isDirectory = isDirectory != null
6955
7014
  ? isDirectory
6956
7015
  : this._watched.has(path) || this._watched.has(fullPath);
@@ -6988,7 +7047,7 @@ _remove(directory, item, isDirectory) {
6988
7047
 
6989
7048
  // If we wait for this file to be fully written, cancel the wait.
6990
7049
  let relPath = path;
6991
- if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);
7050
+ if (this.options.cwd) relPath = sysPath$3.relative(this.options.cwd, path);
6992
7051
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
6993
7052
  const event = this._pendingWrites.get(relPath).cancelWait();
6994
7053
  if (event === EV_ADD$2) return;
@@ -7013,8 +7072,8 @@ _remove(directory, item, isDirectory) {
7013
7072
  */
7014
7073
  _closePath(path) {
7015
7074
  this._closeFile(path);
7016
- const dir = sysPath.dirname(path);
7017
- this._getWatchedDir(dir).remove(sysPath.basename(path));
7075
+ const dir = sysPath$3.dirname(path);
7076
+ this._getWatchedDir(dir).remove(sysPath$3.basename(path));
7018
7077
  }
7019
7078
 
7020
7079
  /**
@@ -7046,7 +7105,7 @@ _addPathCloser(path, closer) {
7046
7105
  _readdirp(root, opts) {
7047
7106
  if (this.closed) return;
7048
7107
  const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
7049
- let stream = readdirp_1(root, options);
7108
+ let stream = readdirp$1(root, options);
7050
7109
  this._streams.add(stream);
7051
7110
  stream.once(STR_CLOSE, () => {
7052
7111
  stream = undefined;
@@ -7063,7 +7122,7 @@ _readdirp(root, opts) {
7063
7122
  }
7064
7123
 
7065
7124
  // Export FSWatcher class
7066
- var FSWatcher_1 = FSWatcher;
7125
+ chokidar.FSWatcher = FSWatcher;
7067
7126
 
7068
7127
  /**
7069
7128
  * Instantiates watcher with paths to be tracked.
@@ -7077,12 +7136,7 @@ const watch = (paths, options) => {
7077
7136
  return watcher;
7078
7137
  };
7079
7138
 
7080
- var watch_1 = watch;
7081
-
7082
- var chokidar = {
7083
- FSWatcher: FSWatcher_1,
7084
- watch: watch_1
7085
- };
7139
+ chokidar.watch = watch;
7086
7140
 
7087
7141
  class FileWatcher {
7088
7142
  constructor(task, chokidarOptions) {