From b2331471d5d994870dc0a0e64511e33075479d5d Mon Sep 17 00:00:00 2001 From: Miguel Jimenez Esun Date: Wed, 23 Aug 2017 07:45:40 -0700 Subject: [PATCH] Remove the timeout Summary: We were not using the timeout at all, so we decided to remove it. Also, the current value is pretty high, so it should never fail unless there's something really bad. Reviewed By: jeanlauliac Differential Revision: D5640839 fbshipit-source-id: 3eaa567a6828902376fe5df9fe3f4e96b83a23bd --- packages/metro-bundler/src/Bundler/index.js | 1 - packages/metro-bundler/src/JSTransformer/index.js | 3 +-- packages/metro-bundler/src/Server/index.js | 3 --- packages/metro-bundler/src/index.js | 1 - 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/metro-bundler/src/Bundler/index.js b/packages/metro-bundler/src/Bundler/index.js index 6ef685e9..57801fa3 100644 --- a/packages/metro-bundler/src/Bundler/index.js +++ b/packages/metro-bundler/src/Bundler/index.js @@ -145,7 +145,6 @@ type Options = {| +sourceExts: Array, +transformCache: TransformCache, +transformModulePath: string, - +transformTimeoutInterval: ?number, +watch: boolean, +workerPath: ?string, |}; diff --git a/packages/metro-bundler/src/JSTransformer/index.js b/packages/metro-bundler/src/JSTransformer/index.js index 31acd048..5cc187d1 100644 --- a/packages/metro-bundler/src/JSTransformer/index.js +++ b/packages/metro-bundler/src/JSTransformer/index.js @@ -172,8 +172,7 @@ class Transformer { if (error.type === 'TimeoutError') { const timeoutErr = new Error( `TimeoutError: transforming ${fileName} took longer than ` + - `${TRANSFORM_TIMEOUT_INTERVAL / 1000} seconds.\n` + - "You can adjust timeout via the 'transformTimeoutInterval' option", + `${TRANSFORM_TIMEOUT_INTERVAL / 1000} seconds.\n`, ); /* $FlowFixMe: monkey-patch Error */ timeoutErr.type = 'TimeoutError'; diff --git a/packages/metro-bundler/src/Server/index.js b/packages/metro-bundler/src/Server/index.js index 4aac9e94..6bcdc9a8 100644 --- a/packages/metro-bundler/src/Server/index.js +++ b/packages/metro-bundler/src/Server/index.js @@ -92,7 +92,6 @@ export type Options = {| +sourceExts: ?Array, +transformCache: TransformCache, +transformModulePath: string, - transformTimeoutInterval?: number, watch?: boolean, workerPath: ?string, |}; @@ -161,7 +160,6 @@ class Server { +sourceExts: Array, +transformCache: TransformCache, +transformModulePath: string, - transformTimeoutInterval: ?number, watch: boolean, workerPath: ?string, }; @@ -216,7 +214,6 @@ class Server { sourceExts: options.sourceExts || defaults.sourceExts, transformCache: options.transformCache, transformModulePath: options.transformModulePath, - transformTimeoutInterval: options.transformTimeoutInterval, watch: options.watch || false, workerPath: options.workerPath, }; diff --git a/packages/metro-bundler/src/index.js b/packages/metro-bundler/src/index.js index 06f0bdbf..16fb03e1 100644 --- a/packages/metro-bundler/src/index.js +++ b/packages/metro-bundler/src/index.js @@ -154,7 +154,6 @@ function toServerOptions(options: Options): ServerOptions { sourceExts: options.sourceExts, transformCache: options.transformCache || TransformCaching.useTempDir(), transformModulePath: options.transformModulePath, - transformTimeoutInterval: options.transformTimeoutInterval, watch: typeof options.watch === 'boolean' ? options.watch : !!options.nonPersistent, workerPath: options.workerPath, };