@parcel/workers 2.9.3 → 2.10.0

Sign up to get free protection for your applications and to get access to all the features.
package/lib/Worker.js CHANGED
@@ -42,7 +42,7 @@ class Worker extends _events().default {
42
42
  this.options = options;
43
43
  }
44
44
  async fork(forkModule) {
45
- let filteredArgs = process.execArgv.filter(v => !/^--(debug|inspect|max-old-space-size=)/.test(v));
45
+ let filteredArgs = process.execArgv.filter(v => !/^--(debug|inspect|no-opt|max-old-space-size=)/.test(v));
46
46
  for (let i = 0; i < filteredArgs.length; i++) {
47
47
  let arg = filteredArgs[i];
48
48
  let isArgWithParam = (arg === '-r' || arg === '--require') && filteredArgs[i + 1] === '@parcel/register' || arg === '--title';
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.9.3",
3
+ "version": "2.10.0",
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.9.3",
25
- "@parcel/logger": "2.9.3",
26
- "@parcel/profiler": "2.9.3",
27
- "@parcel/types": "2.9.3",
28
- "@parcel/utils": "2.9.3",
24
+ "@parcel/diagnostic": "2.10.0",
25
+ "@parcel/logger": "2.10.0",
26
+ "@parcel/profiler": "2.10.0",
27
+ "@parcel/types": "2.10.0",
28
+ "@parcel/utils": "2.10.0",
29
29
  "nullthrows": "^1.1.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@parcel/core": "^2.9.3"
32
+ "@parcel/core": "^2.10.0"
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": "db3bcae10497fa6a712fd9a135f93f26c5745454"
39
+ "gitHead": "0e235842b5b93301379bdfa626e7a4e2ee42ea98"
40
40
  }
package/src/Worker.js CHANGED
@@ -49,7 +49,7 @@ export default class Worker extends EventEmitter {
49
49
 
50
50
  async fork(forkModule: FilePath) {
51
51
  let filteredArgs = process.execArgv.filter(
52
- v => !/^--(debug|inspect|max-old-space-size=)/.test(v),
52
+ v => !/^--(debug|inspect|no-opt|max-old-space-size=)/.test(v),
53
53
  );
54
54
 
55
55
  for (let i = 0; i < filteredArgs.length; i++) {
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 {