From 40c2449eec0e2695fa163528969b3466c948c57b Mon Sep 17 00:00:00 2001 From: Michal Glaus Date: Thu, 22 Feb 2018 08:25:53 -0800 Subject: [PATCH] Pass numWorkers instead of maxWorkers to jest-worker Summary: **Summary** Jest Worker accepts parameter `numWorkers`, not `maxWorkers`, see: https://github.com/facebook/jest/tree/master/packages/jest-worker#numworkers-number-optional **Test plan** Closes https://github.com/facebook/metro/pull/136 Reviewed By: mjesun Differential Revision: D7036411 Pulled By: rafeca fbshipit-source-id: 5528ca4a9abe5a8e3668e83b214e10d97ba7a827 --- packages/metro/src/JSTransformer/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/metro/src/JSTransformer/index.js b/packages/metro/src/JSTransformer/index.js index 09e27dcf..6323940a 100644 --- a/packages/metro/src/JSTransformer/index.js +++ b/packages/metro/src/JSTransformer/index.js @@ -139,7 +139,7 @@ module.exports = class Transformer { } } - _makeFarm(workerPath, computeWorkerKey, exposedMethods, maxWorkers) { + _makeFarm(workerPath, computeWorkerKey, exposedMethods, numWorkers) { // We whitelist only what would work. For example `--inspect` doesn't work // in the workers because it tries to open the same debugging port. Feel // free to add more cases to the RegExp. A whitelist is preferred, to @@ -155,7 +155,7 @@ module.exports = class Transformer { computeWorkerKey, exposedMethods, forkOptions: {execArgv}, - maxWorkers, + numWorkers, }); }