From ffdae135fd1f46509cd59295d480893eb5a867a8 Mon Sep 17 00:00:00 2001 From: "glevi@fb.com" Date: Thu, 25 May 2017 22:54:51 -0700 Subject: [PATCH] Deploy v0.47.0 to xplat/js Reviewed By: zertosh Differential Revision: D5135644 fbshipit-source-id: f979970f8d0c4e082ec1302084d4def6652557c8 --- .flowconfig | 8 +++----- RNTester/js/RNTesterApp.ios.js | 2 +- local-cli/templates/HelloWorld/_flowconfig | 8 +++----- package.json | 2 +- .../node-haste/DependencyGraph/ResolutionRequest.js | 10 ++++++---- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.flowconfig b/.flowconfig index c12d036d1..5b28e40e6 100644 --- a/.flowconfig +++ b/.flowconfig @@ -31,8 +31,6 @@ emoji=true module.system=haste -experimental.strict_call_arity=true - munge_underscores=true module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' @@ -41,12 +39,12 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-6]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-6]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.46.0 +^0.47.0 diff --git a/RNTester/js/RNTesterApp.ios.js b/RNTester/js/RNTesterApp.ios.js index 90a94d0c8..ed452bee2 100644 --- a/RNTester/js/RNTesterApp.ios.js +++ b/RNTester/js/RNTesterApp.ios.js @@ -42,7 +42,7 @@ type Props = { const APP_STATE_KEY = 'RNTesterAppState.v2'; -const Header = ({ onBack, title}) => ( +const Header = ({ onBack, title }: { onBack?: () => mixed, title: string }) => ( {title} diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index e500bbf15..1dd3eff69 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -26,8 +26,6 @@ emoji=true module.system=haste -experimental.strict_call_arity=true - munge_underscores=true module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' @@ -36,12 +34,12 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-6]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-6]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError unsafe.enable_getters_and_setters=true [version] -^0.46.0 +^0.47.0 diff --git a/package.json b/package.json index 3be349fe0..5dd60ff07 100644 --- a/package.json +++ b/package.json @@ -227,7 +227,7 @@ "eslint-plugin-babel": "^4.1.1", "eslint-plugin-flowtype": "^2.33.0", "eslint-plugin-react": "^7.0.1", - "flow-bin": "^0.46.0", + "flow-bin": "^0.47.0", "jest": "19.0.2", "jest-repl": "19.0.2", "jest-runtime": "^19.0.3", diff --git a/packager/src/node-haste/DependencyGraph/ResolutionRequest.js b/packager/src/node-haste/DependencyGraph/ResolutionRequest.js index dfe0e6f2f..4196c3788 100644 --- a/packager/src/node-haste/DependencyGraph/ResolutionRequest.js +++ b/packager/src/node-haste/DependencyGraph/ResolutionRequest.js @@ -296,6 +296,12 @@ class ResolutionRequest { return result; } + function resolveKeyWithPromise( + [key: TModule, promise: Promise>], + ): Promise<[TModule, Array]> { + return promise.then(value => [key, value]); + } + return Promise.all([ // kicks off recursive dependency discovery, but doesn't block until it's // done @@ -901,10 +907,6 @@ function resolveWindowsPath(modulePath) { return path.resolve(modulePath); } -function resolveKeyWithPromise([key, promise]) { - return promise.then(value => [key, value]); -} - function isRelativeImport(filePath) { return /^[.][.]?(?:[/]|$)/.test(filePath); }