vitest 0.0.113 → 0.0.117

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,12 +1,13 @@
1
- import path$5 from 'path';
2
- import fs$5 from 'fs';
1
+ import path$2 from 'path';
2
+ import fs$2 from 'fs';
3
3
  import require$$0 from 'util';
4
- import require$$0$1 from 'child_process';
5
- import { c as commonjsGlobal } from './_commonjsHelpers-c9e3b764.js';
6
- import { a as signalExit, b as onetime$1 } from './index-61c8686f.js';
7
- import require$$0$2 from 'os';
8
- import require$$0$4 from 'buffer';
9
- import require$$0$3 from 'stream';
4
+ import childProcess$1 from 'child_process';
5
+ import { p as pathKey, m as mergeStream$1, a as getStream$1, b as crossSpawn$1 } from './index-6e709f57.js';
6
+ import { a as signalExit, b as onetime$1 } from './index-648e7ab2.js';
7
+ import require$$0$1 from 'os';
8
+ import './_commonjsHelpers-c9e3b764.js';
9
+ import 'buffer';
10
+ import 'stream';
10
11
  import 'assert';
11
12
  import 'events';
12
13
 
@@ -204,13 +205,13 @@ const pLocate$1 = async (iterable, tester, options) => {
204
205
 
205
206
  var pLocate_1 = pLocate$1;
206
207
 
207
- const path$4 = path$5;
208
- const fs$4 = fs$5;
209
- const {promisify: promisify$2} = require$$0;
208
+ const path$1 = path$2;
209
+ const fs$1 = fs$2;
210
+ const {promisify: promisify$1} = require$$0;
210
211
  const pLocate = pLocate_1;
211
212
 
212
- const fsStat = promisify$2(fs$4.stat);
213
- const fsLStat = promisify$2(fs$4.lstat);
213
+ const fsStat = promisify$1(fs$1.stat);
214
+ const fsLStat = promisify$1(fs$1.lstat);
214
215
 
215
216
  const typeMappings = {
216
217
  directory: 'isDirectory',
@@ -241,7 +242,7 @@ locatePath.exports = async (paths, options) => {
241
242
 
242
243
  return pLocate(paths, async path_ => {
243
244
  try {
244
- const stat = await statFn(path$4.resolve(options.cwd, path_));
245
+ const stat = await statFn(path$1.resolve(options.cwd, path_));
245
246
  return matchType(options.type, stat);
246
247
  } catch {
247
248
  return false;
@@ -259,11 +260,11 @@ locatePath.exports.sync = (paths, options) => {
259
260
 
260
261
  checkType(options);
261
262
 
262
- const statFn = options.allowSymlinks ? fs$4.statSync : fs$4.lstatSync;
263
+ const statFn = options.allowSymlinks ? fs$1.statSync : fs$1.lstatSync;
263
264
 
264
265
  for (const path_ of paths) {
265
266
  try {
266
- const stat = statFn(path$4.resolve(options.cwd, path_));
267
+ const stat = statFn(path$1.resolve(options.cwd, path_));
267
268
 
268
269
  if (matchType(options.type, stat)) {
269
270
  return path_;
@@ -274,10 +275,10 @@ locatePath.exports.sync = (paths, options) => {
274
275
 
275
276
  var pathExists = {exports: {}};
276
277
 
277
- const fs$3 = fs$5;
278
- const {promisify: promisify$1} = require$$0;
278
+ const fs = fs$2;
279
+ const {promisify} = require$$0;
279
280
 
280
- const pAccess = promisify$1(fs$3.access);
281
+ const pAccess = promisify(fs.access);
281
282
 
282
283
  pathExists.exports = async path => {
283
284
  try {
@@ -290,7 +291,7 @@ pathExists.exports = async path => {
290
291
 
291
292
  pathExists.exports.sync = path => {
292
293
  try {
293
- fs$3.accessSync(path);
294
+ fs.accessSync(path);
294
295
  return true;
295
296
  } catch (_) {
296
297
  return false;
@@ -298,7 +299,7 @@ pathExists.exports.sync = path => {
298
299
  };
299
300
 
300
301
  (function (module) {
301
- const path = path$5;
302
+ const path = path$2;
302
303
  const locatePath$1 = locatePath.exports;
303
304
  const pathExists$1 = pathExists.exports;
304
305
 
@@ -392,619 +393,6 @@ var findUp = findUp$1.exports;
392
393
 
393
394
  var execa$2 = {exports: {}};
394
395
 
395
- var crossSpawn$1 = {exports: {}};
396
-
397
- var windows = isexe$3;
398
- isexe$3.sync = sync$2;
399
-
400
- var fs$2 = fs$5;
401
-
402
- function checkPathExt (path, options) {
403
- var pathext = options.pathExt !== undefined ?
404
- options.pathExt : process.env.PATHEXT;
405
-
406
- if (!pathext) {
407
- return true
408
- }
409
-
410
- pathext = pathext.split(';');
411
- if (pathext.indexOf('') !== -1) {
412
- return true
413
- }
414
- for (var i = 0; i < pathext.length; i++) {
415
- var p = pathext[i].toLowerCase();
416
- if (p && path.substr(-p.length).toLowerCase() === p) {
417
- return true
418
- }
419
- }
420
- return false
421
- }
422
-
423
- function checkStat$1 (stat, path, options) {
424
- if (!stat.isSymbolicLink() && !stat.isFile()) {
425
- return false
426
- }
427
- return checkPathExt(path, options)
428
- }
429
-
430
- function isexe$3 (path, options, cb) {
431
- fs$2.stat(path, function (er, stat) {
432
- cb(er, er ? false : checkStat$1(stat, path, options));
433
- });
434
- }
435
-
436
- function sync$2 (path, options) {
437
- return checkStat$1(fs$2.statSync(path), path, options)
438
- }
439
-
440
- var mode = isexe$2;
441
- isexe$2.sync = sync$1;
442
-
443
- var fs$1 = fs$5;
444
-
445
- function isexe$2 (path, options, cb) {
446
- fs$1.stat(path, function (er, stat) {
447
- cb(er, er ? false : checkStat(stat, options));
448
- });
449
- }
450
-
451
- function sync$1 (path, options) {
452
- return checkStat(fs$1.statSync(path), options)
453
- }
454
-
455
- function checkStat (stat, options) {
456
- return stat.isFile() && checkMode(stat, options)
457
- }
458
-
459
- function checkMode (stat, options) {
460
- var mod = stat.mode;
461
- var uid = stat.uid;
462
- var gid = stat.gid;
463
-
464
- var myUid = options.uid !== undefined ?
465
- options.uid : process.getuid && process.getuid();
466
- var myGid = options.gid !== undefined ?
467
- options.gid : process.getgid && process.getgid();
468
-
469
- var u = parseInt('100', 8);
470
- var g = parseInt('010', 8);
471
- var o = parseInt('001', 8);
472
- var ug = u | g;
473
-
474
- var ret = (mod & o) ||
475
- (mod & g) && gid === myGid ||
476
- (mod & u) && uid === myUid ||
477
- (mod & ug) && myUid === 0;
478
-
479
- return ret
480
- }
481
-
482
- var core$1;
483
- if (process.platform === 'win32' || commonjsGlobal.TESTING_WINDOWS) {
484
- core$1 = windows;
485
- } else {
486
- core$1 = mode;
487
- }
488
-
489
- var isexe_1 = isexe$1;
490
- isexe$1.sync = sync;
491
-
492
- function isexe$1 (path, options, cb) {
493
- if (typeof options === 'function') {
494
- cb = options;
495
- options = {};
496
- }
497
-
498
- if (!cb) {
499
- if (typeof Promise !== 'function') {
500
- throw new TypeError('callback not provided')
501
- }
502
-
503
- return new Promise(function (resolve, reject) {
504
- isexe$1(path, options || {}, function (er, is) {
505
- if (er) {
506
- reject(er);
507
- } else {
508
- resolve(is);
509
- }
510
- });
511
- })
512
- }
513
-
514
- core$1(path, options || {}, function (er, is) {
515
- // ignore EACCES because that just means we aren't allowed to run it
516
- if (er) {
517
- if (er.code === 'EACCES' || options && options.ignoreErrors) {
518
- er = null;
519
- is = false;
520
- }
521
- }
522
- cb(er, is);
523
- });
524
- }
525
-
526
- function sync (path, options) {
527
- // my kingdom for a filtered catch
528
- try {
529
- return core$1.sync(path, options || {})
530
- } catch (er) {
531
- if (options && options.ignoreErrors || er.code === 'EACCES') {
532
- return false
533
- } else {
534
- throw er
535
- }
536
- }
537
- }
538
-
539
- const isWindows = process.platform === 'win32' ||
540
- process.env.OSTYPE === 'cygwin' ||
541
- process.env.OSTYPE === 'msys';
542
-
543
- const path$3 = path$5;
544
- const COLON = isWindows ? ';' : ':';
545
- const isexe = isexe_1;
546
-
547
- const getNotFoundError = (cmd) =>
548
- Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' });
549
-
550
- const getPathInfo = (cmd, opt) => {
551
- const colon = opt.colon || COLON;
552
-
553
- // If it has a slash, then we don't bother searching the pathenv.
554
- // just check the file itself, and that's it.
555
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? ['']
556
- : (
557
- [
558
- // windows always checks the cwd first
559
- ...(isWindows ? [process.cwd()] : []),
560
- ...(opt.path || process.env.PATH ||
561
- /* istanbul ignore next: very unusual */ '').split(colon),
562
- ]
563
- );
564
- const pathExtExe = isWindows
565
- ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'
566
- : '';
567
- const pathExt = isWindows ? pathExtExe.split(colon) : [''];
568
-
569
- if (isWindows) {
570
- if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
571
- pathExt.unshift('');
572
- }
573
-
574
- return {
575
- pathEnv,
576
- pathExt,
577
- pathExtExe,
578
- }
579
- };
580
-
581
- const which$1 = (cmd, opt, cb) => {
582
- if (typeof opt === 'function') {
583
- cb = opt;
584
- opt = {};
585
- }
586
- if (!opt)
587
- opt = {};
588
-
589
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
590
- const found = [];
591
-
592
- const step = i => new Promise((resolve, reject) => {
593
- if (i === pathEnv.length)
594
- return opt.all && found.length ? resolve(found)
595
- : reject(getNotFoundError(cmd))
596
-
597
- const ppRaw = pathEnv[i];
598
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
599
-
600
- const pCmd = path$3.join(pathPart, cmd);
601
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
602
- : pCmd;
603
-
604
- resolve(subStep(p, i, 0));
605
- });
606
-
607
- const subStep = (p, i, ii) => new Promise((resolve, reject) => {
608
- if (ii === pathExt.length)
609
- return resolve(step(i + 1))
610
- const ext = pathExt[ii];
611
- isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
612
- if (!er && is) {
613
- if (opt.all)
614
- found.push(p + ext);
615
- else
616
- return resolve(p + ext)
617
- }
618
- return resolve(subStep(p, i, ii + 1))
619
- });
620
- });
621
-
622
- return cb ? step(0).then(res => cb(null, res), cb) : step(0)
623
- };
624
-
625
- const whichSync = (cmd, opt) => {
626
- opt = opt || {};
627
-
628
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
629
- const found = [];
630
-
631
- for (let i = 0; i < pathEnv.length; i ++) {
632
- const ppRaw = pathEnv[i];
633
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
634
-
635
- const pCmd = path$3.join(pathPart, cmd);
636
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd
637
- : pCmd;
638
-
639
- for (let j = 0; j < pathExt.length; j ++) {
640
- const cur = p + pathExt[j];
641
- try {
642
- const is = isexe.sync(cur, { pathExt: pathExtExe });
643
- if (is) {
644
- if (opt.all)
645
- found.push(cur);
646
- else
647
- return cur
648
- }
649
- } catch (ex) {}
650
- }
651
- }
652
-
653
- if (opt.all && found.length)
654
- return found
655
-
656
- if (opt.nothrow)
657
- return null
658
-
659
- throw getNotFoundError(cmd)
660
- };
661
-
662
- var which_1 = which$1;
663
- which$1.sync = whichSync;
664
-
665
- var pathKey$1 = {exports: {}};
666
-
667
- const pathKey = (options = {}) => {
668
- const environment = options.env || process.env;
669
- const platform = options.platform || process.platform;
670
-
671
- if (platform !== 'win32') {
672
- return 'PATH';
673
- }
674
-
675
- return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';
676
- };
677
-
678
- pathKey$1.exports = pathKey;
679
- // TODO: Remove this for the next major release
680
- pathKey$1.exports.default = pathKey;
681
-
682
- const path$2 = path$5;
683
- const which = which_1;
684
- const getPathKey = pathKey$1.exports;
685
-
686
- function resolveCommandAttempt(parsed, withoutPathExt) {
687
- const env = parsed.options.env || process.env;
688
- const cwd = process.cwd();
689
- const hasCustomCwd = parsed.options.cwd != null;
690
- // Worker threads do not have process.chdir()
691
- const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;
692
-
693
- // If a custom `cwd` was specified, we need to change the process cwd
694
- // because `which` will do stat calls but does not support a custom cwd
695
- if (shouldSwitchCwd) {
696
- try {
697
- process.chdir(parsed.options.cwd);
698
- } catch (err) {
699
- /* Empty */
700
- }
701
- }
702
-
703
- let resolved;
704
-
705
- try {
706
- resolved = which.sync(parsed.command, {
707
- path: env[getPathKey({ env })],
708
- pathExt: withoutPathExt ? path$2.delimiter : undefined,
709
- });
710
- } catch (e) {
711
- /* Empty */
712
- } finally {
713
- if (shouldSwitchCwd) {
714
- process.chdir(cwd);
715
- }
716
- }
717
-
718
- // If we successfully resolved, ensure that an absolute path is returned
719
- // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
720
- if (resolved) {
721
- resolved = path$2.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
722
- }
723
-
724
- return resolved;
725
- }
726
-
727
- function resolveCommand$1(parsed) {
728
- return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
729
- }
730
-
731
- var resolveCommand_1 = resolveCommand$1;
732
-
733
- var _escape = {};
734
-
735
- // See http://www.robvanderwoude.com/escapechars.php
736
- const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
737
-
738
- function escapeCommand(arg) {
739
- // Escape meta chars
740
- arg = arg.replace(metaCharsRegExp, '^$1');
741
-
742
- return arg;
743
- }
744
-
745
- function escapeArgument(arg, doubleEscapeMetaChars) {
746
- // Convert to string
747
- arg = `${arg}`;
748
-
749
- // Algorithm below is based on https://qntm.org/cmd
750
-
751
- // Sequence of backslashes followed by a double quote:
752
- // double up all the backslashes and escape the double quote
753
- arg = arg.replace(/(\\*)"/g, '$1$1\\"');
754
-
755
- // Sequence of backslashes followed by the end of the string
756
- // (which will become a double quote later):
757
- // double up all the backslashes
758
- arg = arg.replace(/(\\*)$/, '$1$1');
759
-
760
- // All other backslashes occur literally
761
-
762
- // Quote the whole thing:
763
- arg = `"${arg}"`;
764
-
765
- // Escape meta chars
766
- arg = arg.replace(metaCharsRegExp, '^$1');
767
-
768
- // Double escape meta chars if necessary
769
- if (doubleEscapeMetaChars) {
770
- arg = arg.replace(metaCharsRegExp, '^$1');
771
- }
772
-
773
- return arg;
774
- }
775
-
776
- _escape.command = escapeCommand;
777
- _escape.argument = escapeArgument;
778
-
779
- var shebangRegex$1 = /^#!(.*)/;
780
-
781
- const shebangRegex = shebangRegex$1;
782
-
783
- var shebangCommand$1 = (string = '') => {
784
- const match = string.match(shebangRegex);
785
-
786
- if (!match) {
787
- return null;
788
- }
789
-
790
- const [path, argument] = match[0].replace(/#! ?/, '').split(' ');
791
- const binary = path.split('/').pop();
792
-
793
- if (binary === 'env') {
794
- return argument;
795
- }
796
-
797
- return argument ? `${binary} ${argument}` : binary;
798
- };
799
-
800
- const fs = fs$5;
801
- const shebangCommand = shebangCommand$1;
802
-
803
- function readShebang$1(command) {
804
- // Read the first 150 bytes from the file
805
- const size = 150;
806
- const buffer = Buffer.alloc(size);
807
-
808
- let fd;
809
-
810
- try {
811
- fd = fs.openSync(command, 'r');
812
- fs.readSync(fd, buffer, 0, size, 0);
813
- fs.closeSync(fd);
814
- } catch (e) { /* Empty */ }
815
-
816
- // Attempt to extract shebang (null is returned if not a shebang)
817
- return shebangCommand(buffer.toString());
818
- }
819
-
820
- var readShebang_1 = readShebang$1;
821
-
822
- const path$1 = path$5;
823
- const resolveCommand = resolveCommand_1;
824
- const escape = _escape;
825
- const readShebang = readShebang_1;
826
-
827
- const isWin$1 = process.platform === 'win32';
828
- const isExecutableRegExp = /\.(?:com|exe)$/i;
829
- const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
830
-
831
- function detectShebang(parsed) {
832
- parsed.file = resolveCommand(parsed);
833
-
834
- const shebang = parsed.file && readShebang(parsed.file);
835
-
836
- if (shebang) {
837
- parsed.args.unshift(parsed.file);
838
- parsed.command = shebang;
839
-
840
- return resolveCommand(parsed);
841
- }
842
-
843
- return parsed.file;
844
- }
845
-
846
- function parseNonShell(parsed) {
847
- if (!isWin$1) {
848
- return parsed;
849
- }
850
-
851
- // Detect & add support for shebangs
852
- const commandFile = detectShebang(parsed);
853
-
854
- // We don't need a shell if the command filename is an executable
855
- const needsShell = !isExecutableRegExp.test(commandFile);
856
-
857
- // If a shell is required, use cmd.exe and take care of escaping everything correctly
858
- // Note that `forceShell` is an hidden option used only in tests
859
- if (parsed.options.forceShell || needsShell) {
860
- // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
861
- // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
862
- // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
863
- // we need to double escape them
864
- const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
865
-
866
- // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
867
- // This is necessary otherwise it will always fail with ENOENT in those cases
868
- parsed.command = path$1.normalize(parsed.command);
869
-
870
- // Escape command & arguments
871
- parsed.command = escape.command(parsed.command);
872
- parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
873
-
874
- const shellCommand = [parsed.command].concat(parsed.args).join(' ');
875
-
876
- parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
877
- parsed.command = process.env.comspec || 'cmd.exe';
878
- parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
879
- }
880
-
881
- return parsed;
882
- }
883
-
884
- function parse$1(command, args, options) {
885
- // Normalize arguments, similar to nodejs
886
- if (args && !Array.isArray(args)) {
887
- options = args;
888
- args = null;
889
- }
890
-
891
- args = args ? args.slice(0) : []; // Clone array to avoid changing the original
892
- options = Object.assign({}, options); // Clone object to avoid changing the original
893
-
894
- // Build our parsed object
895
- const parsed = {
896
- command,
897
- args,
898
- options,
899
- file: undefined,
900
- original: {
901
- command,
902
- args,
903
- },
904
- };
905
-
906
- // Delegate further parsing to shell or non-shell
907
- return options.shell ? parsed : parseNonShell(parsed);
908
- }
909
-
910
- var parse_1 = parse$1;
911
-
912
- const isWin = process.platform === 'win32';
913
-
914
- function notFoundError(original, syscall) {
915
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
916
- code: 'ENOENT',
917
- errno: 'ENOENT',
918
- syscall: `${syscall} ${original.command}`,
919
- path: original.command,
920
- spawnargs: original.args,
921
- });
922
- }
923
-
924
- function hookChildProcess(cp, parsed) {
925
- if (!isWin) {
926
- return;
927
- }
928
-
929
- const originalEmit = cp.emit;
930
-
931
- cp.emit = function (name, arg1) {
932
- // If emitting "exit" event and exit code is 1, we need to check if
933
- // the command exists and emit an "error" instead
934
- // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
935
- if (name === 'exit') {
936
- const err = verifyENOENT(arg1, parsed);
937
-
938
- if (err) {
939
- return originalEmit.call(cp, 'error', err);
940
- }
941
- }
942
-
943
- return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
944
- };
945
- }
946
-
947
- function verifyENOENT(status, parsed) {
948
- if (isWin && status === 1 && !parsed.file) {
949
- return notFoundError(parsed.original, 'spawn');
950
- }
951
-
952
- return null;
953
- }
954
-
955
- function verifyENOENTSync(status, parsed) {
956
- if (isWin && status === 1 && !parsed.file) {
957
- return notFoundError(parsed.original, 'spawnSync');
958
- }
959
-
960
- return null;
961
- }
962
-
963
- var enoent$1 = {
964
- hookChildProcess,
965
- verifyENOENT,
966
- verifyENOENTSync,
967
- notFoundError,
968
- };
969
-
970
- const cp = require$$0$1;
971
- const parse = parse_1;
972
- const enoent = enoent$1;
973
-
974
- function spawn(command, args, options) {
975
- // Parse the arguments
976
- const parsed = parse(command, args, options);
977
-
978
- // Spawn the child process
979
- const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
980
-
981
- // Hook into child process "exit" event to emit an error if the command
982
- // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
983
- enoent.hookChildProcess(spawned, parsed);
984
-
985
- return spawned;
986
- }
987
-
988
- function spawnSync(command, args, options) {
989
- // Parse the arguments
990
- const parsed = parse(command, args, options);
991
-
992
- // Spawn the child process
993
- const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
994
-
995
- // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
996
- result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
997
-
998
- return result;
999
- }
1000
-
1001
- crossSpawn$1.exports = spawn;
1002
- crossSpawn$1.exports.spawn = spawn;
1003
- crossSpawn$1.exports.sync = spawnSync;
1004
-
1005
- crossSpawn$1.exports._parse = parse;
1006
- crossSpawn$1.exports._enoent = enoent;
1007
-
1008
396
  var stripFinalNewline$1 = input => {
1009
397
  const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();
1010
398
  const CR = typeof input === 'string' ? '\r' : '\r'.charCodeAt();
@@ -1023,13 +411,13 @@ var stripFinalNewline$1 = input => {
1023
411
  var npmRunPath$1 = {exports: {}};
1024
412
 
1025
413
  (function (module) {
1026
- const path = path$5;
1027
- const pathKey = pathKey$1.exports;
414
+ const path = path$2;
415
+ const pathKey$1 = pathKey.exports;
1028
416
 
1029
417
  const npmRunPath = options => {
1030
418
  options = {
1031
419
  cwd: process.cwd(),
1032
- path: process.env[pathKey()],
420
+ path: process.env[pathKey$1()],
1033
421
  execPath: process.execPath,
1034
422
  ...options
1035
423
  };
@@ -1062,7 +450,7 @@ module.exports.env = options => {
1062
450
  };
1063
451
 
1064
452
  const env = {...options.env};
1065
- const path = pathKey({env});
453
+ const path = pathKey$1({env});
1066
454
 
1067
455
  options.path = env[path];
1068
456
  env[path] = module.exports(options);
@@ -1371,7 +759,7 @@ standard:"posix"};
1371
759
  const SIGRTMIN=34;
1372
760
  const SIGRTMAX=64;realtime.SIGRTMAX=SIGRTMAX;
1373
761
 
1374
- Object.defineProperty(signals,"__esModule",{value:true});signals.getSignals=void 0;var _os$1=require$$0$2;
762
+ Object.defineProperty(signals,"__esModule",{value:true});signals.getSignals=void 0;var _os$1=require$$0$1;
1375
763
 
1376
764
  var _core=core;
1377
765
  var _realtime$1=realtime;
@@ -1406,7 +794,7 @@ const number=supported?constantSignal:defaultNumber;
1406
794
  return {name,number,description,supported,action,forced,standard};
1407
795
  };
1408
796
 
1409
- Object.defineProperty(main,"__esModule",{value:true});main.signalsByNumber=main.signalsByName=void 0;var _os=require$$0$2;
797
+ Object.defineProperty(main,"__esModule",{value:true});main.signalsByNumber=main.signalsByName=void 0;var _os=require$$0$1;
1410
798
 
1411
799
  var _signals=signals;
1412
800
  var _realtime=realtime;
@@ -1619,7 +1007,7 @@ stdio.exports.node = options => {
1619
1007
  return [...stdio, 'ipc'];
1620
1008
  };
1621
1009
 
1622
- const os = require$$0$2;
1010
+ const os = require$$0$1;
1623
1011
  const onExit = signalExit.exports;
1624
1012
 
1625
1013
  const DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;
@@ -1761,163 +1149,8 @@ isStream$1.transform = stream =>
1761
1149
 
1762
1150
  var isStream_1 = isStream$1;
1763
1151
 
1764
- var getStream$2 = {exports: {}};
1765
-
1766
- const {PassThrough: PassThroughStream} = require$$0$3;
1767
-
1768
- var bufferStream$1 = options => {
1769
- options = {...options};
1770
-
1771
- const {array} = options;
1772
- let {encoding} = options;
1773
- const isBuffer = encoding === 'buffer';
1774
- let objectMode = false;
1775
-
1776
- if (array) {
1777
- objectMode = !(encoding || isBuffer);
1778
- } else {
1779
- encoding = encoding || 'utf8';
1780
- }
1781
-
1782
- if (isBuffer) {
1783
- encoding = null;
1784
- }
1785
-
1786
- const stream = new PassThroughStream({objectMode});
1787
-
1788
- if (encoding) {
1789
- stream.setEncoding(encoding);
1790
- }
1791
-
1792
- let length = 0;
1793
- const chunks = [];
1794
-
1795
- stream.on('data', chunk => {
1796
- chunks.push(chunk);
1797
-
1798
- if (objectMode) {
1799
- length = chunks.length;
1800
- } else {
1801
- length += chunk.length;
1802
- }
1803
- });
1804
-
1805
- stream.getBufferedValue = () => {
1806
- if (array) {
1807
- return chunks;
1808
- }
1809
-
1810
- return isBuffer ? Buffer.concat(chunks, length) : chunks.join('');
1811
- };
1812
-
1813
- stream.getBufferedLength = () => length;
1814
-
1815
- return stream;
1816
- };
1817
-
1818
- const {constants: BufferConstants} = require$$0$4;
1819
- const stream$1 = require$$0$3;
1820
- const {promisify} = require$$0;
1821
- const bufferStream = bufferStream$1;
1822
-
1823
- const streamPipelinePromisified = promisify(stream$1.pipeline);
1824
-
1825
- class MaxBufferError extends Error {
1826
- constructor() {
1827
- super('maxBuffer exceeded');
1828
- this.name = 'MaxBufferError';
1829
- }
1830
- }
1831
-
1832
- async function getStream$1(inputStream, options) {
1833
- if (!inputStream) {
1834
- throw new Error('Expected a stream');
1835
- }
1836
-
1837
- options = {
1838
- maxBuffer: Infinity,
1839
- ...options
1840
- };
1841
-
1842
- const {maxBuffer} = options;
1843
- const stream = bufferStream(options);
1844
-
1845
- await new Promise((resolve, reject) => {
1846
- const rejectPromise = error => {
1847
- // Don't retrieve an oversized buffer.
1848
- if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
1849
- error.bufferedData = stream.getBufferedValue();
1850
- }
1851
-
1852
- reject(error);
1853
- };
1854
-
1855
- (async () => {
1856
- try {
1857
- await streamPipelinePromisified(inputStream, stream);
1858
- resolve();
1859
- } catch (error) {
1860
- rejectPromise(error);
1861
- }
1862
- })();
1863
-
1864
- stream.on('data', () => {
1865
- if (stream.getBufferedLength() > maxBuffer) {
1866
- rejectPromise(new MaxBufferError());
1867
- }
1868
- });
1869
- });
1870
-
1871
- return stream.getBufferedValue();
1872
- }
1873
-
1874
- getStream$2.exports = getStream$1;
1875
- getStream$2.exports.buffer = (stream, options) => getStream$1(stream, {...options, encoding: 'buffer'});
1876
- getStream$2.exports.array = (stream, options) => getStream$1(stream, {...options, array: true});
1877
- getStream$2.exports.MaxBufferError = MaxBufferError;
1878
-
1879
- const { PassThrough } = require$$0$3;
1880
-
1881
- var mergeStream$1 = function (/*streams...*/) {
1882
- var sources = [];
1883
- var output = new PassThrough({objectMode: true});
1884
-
1885
- output.setMaxListeners(0);
1886
-
1887
- output.add = add;
1888
- output.isEmpty = isEmpty;
1889
-
1890
- output.on('unpipe', remove);
1891
-
1892
- Array.prototype.slice.call(arguments).forEach(add);
1893
-
1894
- return output
1895
-
1896
- function add (source) {
1897
- if (Array.isArray(source)) {
1898
- source.forEach(add);
1899
- return this
1900
- }
1901
-
1902
- sources.push(source);
1903
- source.once('end', remove.bind(null, source));
1904
- source.once('error', output.emit.bind(output, 'error'));
1905
- source.pipe(output, {end: false});
1906
- return this
1907
- }
1908
-
1909
- function isEmpty () {
1910
- return sources.length == 0;
1911
- }
1912
-
1913
- function remove (source) {
1914
- sources = sources.filter(function (it) { return it !== source });
1915
- if (!sources.length && output.readable) { output.end(); }
1916
- }
1917
- };
1918
-
1919
1152
  const isStream = isStream_1;
1920
- const getStream = getStream$2.exports;
1153
+ const getStream = getStream$1.exports;
1921
1154
  const mergeStream = mergeStream$1;
1922
1155
 
1923
1156
  // `input` option
@@ -2108,8 +1341,8 @@ var command = {
2108
1341
  parseCommand: parseCommand$1
2109
1342
  };
2110
1343
 
2111
- const path = path$5;
2112
- const childProcess = require$$0$1;
1344
+ const path = path$2;
1345
+ const childProcess = childProcess$1;
2113
1346
  const crossSpawn = crossSpawn$1.exports;
2114
1347
  const stripFinalNewline = stripFinalNewline$1;
2115
1348
  const npmRunPath = npmRunPath$1.exports;
@@ -2386,7 +1619,7 @@ var LOCKS = {
2386
1619
  };
2387
1620
  async function detectPackageManager(cwd = process.cwd()) {
2388
1621
  const result = await findUp(Object.keys(LOCKS), { cwd });
2389
- const agent = result ? LOCKS[path$5.basename(result)] : null;
1622
+ const agent = result ? LOCKS[path$2.basename(result)] : null;
2390
1623
  return agent;
2391
1624
  }
2392
1625
  async function installPackage(names, options = {}) {