From 30dfe7ada3b5adf1f5b426e53ca5747c2af2b9ca Mon Sep 17 00:00:00 2001 From: Raphael Amorim Date: Wed, 13 Dec 2017 01:33:17 -0200 Subject: [PATCH] Update flow (0.61.0) and declare context type --- .flowconfig | 2 +- appveyor.yml | 2 +- package.json | 2 +- packages/react-reconciler/src/ReactFiberHostContext.js | 4 ++-- yarn.lock | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.flowconfig b/.flowconfig index a577fa72c607d..473e96a77ffb9 100644 --- a/.flowconfig +++ b/.flowconfig @@ -39,4 +39,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError [version] -^0.57.3 +^0.61.0 diff --git a/appveyor.yml b/appveyor.yml index 8d95f5b7cd676..74f5edb92b65e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -30,7 +30,7 @@ install: test_script: - node --version - yarn lint -# - yarn flow (TODO: investigate why it fails on Windows) + - yarn flow - yarn build - yarn test diff --git a/package.json b/package.json index 76eae284f7e63..75f972bf8839a 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "fbjs": "^0.8.16", "fbjs-scripts": "^0.6.0", "filesize": "^3.5.6", - "flow-bin": "^0.57.3", + "flow-bin": "^0.61.0", "git-branch": "^0.3.0", "glob": "^6.0.4", "glob-stream": "^6.1.0", diff --git a/packages/react-reconciler/src/ReactFiberHostContext.js b/packages/react-reconciler/src/ReactFiberHostContext.js index 4a8e857b4b8cf..7bb479b821ff2 100644 --- a/packages/react-reconciler/src/ReactFiberHostContext.js +++ b/packages/react-reconciler/src/ReactFiberHostContext.js @@ -82,8 +82,8 @@ export default function( } function pushHostContext(fiber: Fiber): void { - const rootInstance = requiredContext(rootInstanceStackCursor.current); - const context = requiredContext(contextStackCursor.current); + const rootInstance: C = requiredContext(rootInstanceStackCursor.current); + const context: CX = requiredContext(contextStackCursor.current); const nextContext = getChildHostContext(context, fiber.type, rootInstance); // Don't push this Fiber's context unless it's unique. diff --git a/yarn.lock b/yarn.lock index e3a24d42b72e6..f067319a2cf7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1979,9 +1979,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.57.3: - version "0.57.3" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.57.3.tgz#843fb80a821b6d0c5847f7bb3f42365ffe53b27b" +flow-bin@^0.61.0: + version "0.61.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.61.0.tgz#d0473a8c35dbbf4de573823f4932124397d32d35" for-in@^1.0.1: version "1.0.2"