From 7bc25f5eceb4b2b66c068fd3db631eecc51a0bab Mon Sep 17 00:00:00 2001 From: Jean Lauliac Date: Tue, 31 Jan 2017 03:55:53 -0800 Subject: [PATCH] packager: JSTransform cleanup: remove opts.worker Summary: it's not used from any callsite as far as I can see. Reviewed By: davidaurelio Differential Revision: D4481699 fbshipit-source-id: 4cf63ef7953d6cfc58e7ef4f22ecb99bf51e76a0 --- .../react-packager/src/JSTransformer/index.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/packager/react-packager/src/JSTransformer/index.js b/packager/react-packager/src/JSTransformer/index.js index 03380daf0..24b8484b8 100644 --- a/packager/react-packager/src/JSTransformer/index.js +++ b/packager/react-packager/src/JSTransformer/index.js @@ -39,9 +39,6 @@ const validateOpts = declareOpts({ type:'string', required: false, }, - worker: { - type: 'string', - }, methods: { type: 'array', default: [], @@ -50,7 +47,6 @@ const validateOpts = declareOpts({ type Options = { transformModulePath?: ?string, - worker?: ?string, methods?: ?Array, }; @@ -90,7 +86,6 @@ class Transformer { _opts: { transformModulePath?: ?string, - worker: ?string, methods: Array, }; _workers: {[name: string]: mixed}; @@ -112,16 +107,7 @@ class Transformer { const {transformModulePath} = opts; - if (opts.worker) { - this._workers = - makeFarm(opts.worker, opts.methods, TRANSFORM_TIMEOUT_INTERVAL); - opts.methods.forEach(name => { - /* $FlowFixMe: assigning the class object fields directly is - * questionable, because it's prone to conflicts. */ - this[name] = this._workers[name]; - }); - } - else if (transformModulePath) { + if (transformModulePath) { this._transformModulePath = require.resolve(transformModulePath); this._workers = makeFarm(