@jsenv/test 3.0.6 → 3.0.8

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.
@@ -6405,7 +6405,6 @@ To fix this warning:
6405
6405
  failFastAbortController.abort();
6406
6406
  return;
6407
6407
  }
6408
- await startAsMuchAsPossible();
6409
6408
  };
6410
6409
  const startAsMuchAsPossible = async () => {
6411
6410
  const promises = [];
@@ -6430,19 +6429,14 @@ To fix this warning:
6430
6429
  const usedMemory = totalMemory - availableMemory;
6431
6430
  if (usedMemory > parallel.maxMemory) {
6432
6431
  // retry after Xms in case memory usage decreases
6433
- const promise = (async () => {
6434
- await operation.wait(200);
6435
- await startAsMuchAsPossible();
6436
- })();
6432
+ const promise = operation.wait(200);
6437
6433
  promises.push(promise);
6434
+ break;
6438
6435
  }
6439
6436
 
6440
6437
  if (cpuUsage.overall.active > parallel.maxCpu) {
6441
6438
  // retry after Xms in case cpu usage decreases
6442
- const promise = (async () => {
6443
- await operation.wait(200);
6444
- await startAsMuchAsPossible();
6445
- })();
6439
+ const promise = operation.wait(200);
6446
6440
  promises.push(promise);
6447
6441
  break;
6448
6442
  }
@@ -6456,12 +6450,14 @@ To fix this warning:
6456
6450
  break;
6457
6451
  }
6458
6452
  if (execution) {
6459
- promises.push(start(execution));
6453
+ const promise = start(execution);
6454
+ promises.push(promise);
6460
6455
  }
6461
6456
  }
6462
6457
  if (promises.length) {
6463
6458
  await Promise.all(promises);
6464
6459
  promises.length = 0;
6460
+ await startAsMuchAsPossible();
6465
6461
  }
6466
6462
  };
6467
6463
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/test",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,7 +39,7 @@
39
39
  "@c88/v8-coverage": "0.1.1",
40
40
  "@jsenv/abort": "4.3.0",
41
41
  "@jsenv/ast": "6.0.2",
42
- "@jsenv/filesystem": "4.6.3",
42
+ "@jsenv/filesystem": "4.6.4",
43
43
  "@jsenv/github-check-run": "0.1.9",
44
44
  "@jsenv/humanize": "1.0.0",
45
45
  "@jsenv/plugin-supervisor": "1.4.2",
@@ -821,7 +821,6 @@ To fix this warning:
821
821
  failFastAbortController.abort();
822
822
  return;
823
823
  }
824
- await startAsMuchAsPossible();
825
824
  };
826
825
  const startAsMuchAsPossible = async () => {
827
826
  const promises = [];
@@ -846,19 +845,14 @@ To fix this warning:
846
845
  const usedMemory = totalMemory - availableMemory;
847
846
  if (usedMemory > parallel.maxMemory) {
848
847
  // retry after Xms in case memory usage decreases
849
- const promise = (async () => {
850
- await operation.wait(200);
851
- await startAsMuchAsPossible();
852
- })();
848
+ const promise = operation.wait(200);
853
849
  promises.push(promise);
850
+ break;
854
851
  }
855
852
 
856
853
  if (cpuUsage.overall.active > parallel.maxCpu) {
857
854
  // retry after Xms in case cpu usage decreases
858
- const promise = (async () => {
859
- await operation.wait(200);
860
- await startAsMuchAsPossible();
861
- })();
855
+ const promise = operation.wait(200);
862
856
  promises.push(promise);
863
857
  break;
864
858
  }
@@ -872,12 +866,14 @@ To fix this warning:
872
866
  break;
873
867
  }
874
868
  if (execution) {
875
- promises.push(start(execution));
869
+ const promise = start(execution);
870
+ promises.push(promise);
876
871
  }
877
872
  }
878
873
  if (promises.length) {
879
874
  await Promise.all(promises);
880
875
  promises.length = 0;
876
+ await startAsMuchAsPossible();
881
877
  }
882
878
  };
883
879