mirror of https://github.com/status-im/metro.git
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
This commit is contained in:
parent
87aa1cc166
commit
b2331471d5
|
@ -145,7 +145,6 @@ type Options = {|
|
|||
+sourceExts: Array<string>,
|
||||
+transformCache: TransformCache,
|
||||
+transformModulePath: string,
|
||||
+transformTimeoutInterval: ?number,
|
||||
+watch: boolean,
|
||||
+workerPath: ?string,
|
||||
|};
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -92,7 +92,6 @@ export type Options = {|
|
|||
+sourceExts: ?Array<string>,
|
||||
+transformCache: TransformCache,
|
||||
+transformModulePath: string,
|
||||
transformTimeoutInterval?: number,
|
||||
watch?: boolean,
|
||||
workerPath: ?string,
|
||||
|};
|
||||
|
@ -161,7 +160,6 @@ class Server {
|
|||
+sourceExts: Array<string>,
|
||||
+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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue