@parcel/workers 2.0.0-nightly.1395 → 2.0.0-nightly.1399

Sign up to get free protection for your applications and to get access to all the features.
package/lib/WorkerFarm.js CHANGED
@@ -515,7 +515,7 @@ class WorkerFarm extends _events().default {
515
515
  }
516
516
  }
517
517
  static getNumWorkers() {
518
- return process.env.PARCEL_WORKERS ? parseInt(process.env.PARCEL_WORKERS, 10) : Math.ceil((0, _cpuCount.default)() / 2);
518
+ return process.env.PARCEL_WORKERS ? parseInt(process.env.PARCEL_WORKERS, 10) : Math.min(4, Math.ceil((0, _cpuCount.default)() / 2));
519
519
  }
520
520
  static isWorker() {
521
521
  return !!_childState.child;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/workers",
3
- "version": "2.0.0-nightly.1395+ce58970eb",
3
+ "version": "2.0.0-nightly.1399+5d875a272",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -21,20 +21,20 @@
21
21
  "node": ">= 12.0.0"
22
22
  },
23
23
  "dependencies": {
24
- "@parcel/diagnostic": "2.0.0-nightly.1395+ce58970eb",
25
- "@parcel/logger": "2.0.0-nightly.1395+ce58970eb",
26
- "@parcel/profiler": "2.9.4-nightly.3018+ce58970eb",
27
- "@parcel/types": "2.0.0-nightly.1395+ce58970eb",
28
- "@parcel/utils": "2.0.0-nightly.1395+ce58970eb",
24
+ "@parcel/diagnostic": "2.0.0-nightly.1399+5d875a272",
25
+ "@parcel/logger": "2.0.0-nightly.1399+5d875a272",
26
+ "@parcel/profiler": "2.9.4-nightly.3022+5d875a272",
27
+ "@parcel/types": "2.0.0-nightly.1399+5d875a272",
28
+ "@parcel/utils": "2.0.0-nightly.1399+5d875a272",
29
29
  "nullthrows": "^1.1.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@parcel/core": "2.0.0-nightly.1393+ce58970eb"
32
+ "@parcel/core": "2.0.0-nightly.1397+5d875a272"
33
33
  },
34
34
  "browser": {
35
35
  "./src/cpuCount.js": false,
36
36
  "./src/process/ProcessWorker.js": false,
37
37
  "./src/threads/ThreadsWorker.js": false
38
38
  },
39
- "gitHead": "ce58970eb70cc8c8dcf9cd6e6506761021e0cc7e"
39
+ "gitHead": "5d875a2720e1fd3636ff107b1dec2254d32d25b9"
40
40
  }
package/src/WorkerFarm.js CHANGED
@@ -628,7 +628,7 @@ export default class WorkerFarm extends EventEmitter {
628
628
  static getNumWorkers(): number {
629
629
  return process.env.PARCEL_WORKERS
630
630
  ? parseInt(process.env.PARCEL_WORKERS, 10)
631
- : Math.ceil(cpuCount() / 2);
631
+ : Math.min(4, Math.ceil(cpuCount() / 2));
632
632
  }
633
633
 
634
634
  static isWorker(): boolean {