diff --git a/package.json b/package.json index 6b7571870f..b3c2542034 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "eslint-plugin-react-internal": "link:./scripts/eslint-rules", "fbjs-scripts": "1.2.0", "filesize": "^6.0.1", - "flow-bin": "^0.176.0", + "flow-bin": "^0.182.0", "glob": "^7.1.6", "glob-stream": "^6.1.0", "google-closure-compiler": "^20200517.0.0", diff --git a/packages/react-devtools-inline/src/backend.js b/packages/react-devtools-inline/src/backend.js index 234c7f5f88..97d2368ac1 100644 --- a/packages/react-devtools-inline/src/backend.js +++ b/packages/react-devtools-inline/src/backend.js @@ -80,6 +80,7 @@ export function activate( bridge, }: { bridge?: BackendBridge, + // $FlowFixMe[incompatible-exact] } = {}, ): void { if (bridge == null) { diff --git a/packages/react-devtools-inline/src/frontend.js b/packages/react-devtools-inline/src/frontend.js index 1e5ea336a4..272fbba0b9 100644 --- a/packages/react-devtools-inline/src/frontend.js +++ b/packages/react-devtools-inline/src/frontend.js @@ -62,6 +62,7 @@ export function initialize( }: { bridge?: FrontendBridge, store?: Store, + // $FlowFixMe[incompatible-exact] } = {}, ): React.AbstractComponent { if (bridge == null) { diff --git a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-fb.js b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-fb.js index 59b8e61a42..41d7d0aa11 100644 --- a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-fb.js +++ b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-fb.js @@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true; import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default'; import typeof * as ExportsType from './DevToolsFeatureFlags.core-fb'; -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +// Flow magic to verify the exports of this file match the original version. +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-oss.js b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-oss.js index 8102c6b751..1811dc3411 100644 --- a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-oss.js +++ b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.core-oss.js @@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true; import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default'; import typeof * as ExportsType from './DevToolsFeatureFlags.core-oss'; -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +// Flow magic to verify the exports of this file match the original version. +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-fb.js b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-fb.js index 76d5546efb..ffe795786b 100644 --- a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-fb.js +++ b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-fb.js @@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true; import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default'; import typeof * as ExportsType from './DevToolsFeatureFlags.extension-fb'; -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +// Flow magic to verify the exports of this file match the original version. +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-oss.js b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-oss.js index 2e6cabf4b5..b006b25e7d 100644 --- a/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-oss.js +++ b/packages/react-devtools-shared/src/config/DevToolsFeatureFlags.extension-oss.js @@ -29,7 +29,5 @@ export const enableProfilerComponentTree = true; import typeof * as FeatureFlagsType from './DevToolsFeatureFlags.default'; import typeof * as ExportsType from './DevToolsFeatureFlags.extension-oss'; -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +// Flow magic to verify the exports of this file match the original version. +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js b/packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js index 58377f9696..bafaf237d4 100644 --- a/packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js +++ b/packages/react-devtools-shared/src/devtools/views/Settings/SettingsModal.js @@ -82,6 +82,7 @@ function SettingsModalImpl(_: {}) { case 'components': view = ; break; + // $FlowFixMe[incompatible-type] is this missing in TabID? case 'debugging': view = ; break; diff --git a/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js b/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js index 0658e14134..dbe7444014 100644 --- a/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js +++ b/packages/react-dom-bindings/src/client/ReactDOMFloatClient.js @@ -657,6 +657,7 @@ function acquireStyleResource(resource: StyleResource): Instance { } } resource.count++; + // $FlowFixMe[incompatible-return] found when upgrading Flow return resource.instance; } diff --git a/packages/react-dom-bindings/src/events/forks/EventListener-www.js b/packages/react-dom-bindings/src/events/forks/EventListener-www.js index b9f20cca80..1055979bcf 100644 --- a/packages/react-dom-bindings/src/events/forks/EventListener-www.js +++ b/packages/react-dom-bindings/src/events/forks/EventListener-www.js @@ -66,7 +66,4 @@ export function removeEventListener( } // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): EventListenerType): EventListenerShimType): EventListenerType); diff --git a/packages/react/src/ReactStartTransition.js b/packages/react/src/ReactStartTransition.js index 678daf9832..daafea7e9e 100644 --- a/packages/react/src/ReactStartTransition.js +++ b/packages/react/src/ReactStartTransition.js @@ -26,7 +26,9 @@ export function startTransition( if (enableTransitionTracing) { if (options !== undefined && options.name !== undefined) { + // $FlowFixMe[incompatible-use] found when upgrading Flow ReactCurrentBatchConfig.transition.name = options.name; + // $FlowFixMe[incompatible-use] found when upgrading Flow ReactCurrentBatchConfig.transition.startTime = -1; } } @@ -46,6 +48,7 @@ export function startTransition( 'Otherwise concurrent mode guarantees are off the table.', ); } + // $FlowFixMe[incompatible-use] found when upgrading Flow currentTransition._updatedFibers.clear(); } } diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js index 7138679c53..6e9aaacf0e 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js @@ -23,7 +23,4 @@ // update the test configuration. // // Flow magic to verify the exports of this file match the original version. -// // eslint-disable-next-line no-unused-vars -// type Check<_X, Y: _X, X: Y = _X> = null; -// // eslint-disable-next-line no-unused-expressions -// (null: Check); +// ((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.native-fb.js b/packages/shared/forks/ReactFeatureFlags.native-fb.js index 821f947415..beafb67bf0 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-fb.js +++ b/packages/shared/forks/ReactFeatureFlags.native-fb.js @@ -86,8 +86,6 @@ export const enableTransitionTracing = false; export const enableFloat = false; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.native-oss.js b/packages/shared/forks/ReactFeatureFlags.native-oss.js index c63c218700..3fdedac111 100644 --- a/packages/shared/forks/ReactFeatureFlags.native-oss.js +++ b/packages/shared/forks/ReactFeatureFlags.native-oss.js @@ -75,8 +75,6 @@ export const enableTransitionTracing = false; export const enableFloat = false; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.js index 665c42cb8f..ce7afbcef7 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.js @@ -75,8 +75,6 @@ export const enableTransitionTracing = false; export const enableFloat = false; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js index c48df6576e..7d9054bfeb 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.native.js @@ -73,8 +73,6 @@ export const enableTransitionTracing = false; export const enableFloat = false; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js index d4e135d655..38278fbc93 100644 --- a/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js +++ b/packages/shared/forks/ReactFeatureFlags.test-renderer.www.js @@ -77,8 +77,6 @@ export const enableTransitionTracing = false; export const enableFloat = false; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.testing.js b/packages/shared/forks/ReactFeatureFlags.testing.js index f77ed6fa13..308aaed94d 100644 --- a/packages/shared/forks/ReactFeatureFlags.testing.js +++ b/packages/shared/forks/ReactFeatureFlags.testing.js @@ -75,8 +75,6 @@ export const enableTransitionTracing = false; export const enableFloat = false; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.testing.www.js b/packages/shared/forks/ReactFeatureFlags.testing.www.js index 1c78538140..89b24c8ed6 100644 --- a/packages/shared/forks/ReactFeatureFlags.testing.www.js +++ b/packages/shared/forks/ReactFeatureFlags.testing.www.js @@ -76,8 +76,6 @@ export const enableTransitionTracing = false; export const enableFloat = false; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/packages/shared/forks/ReactFeatureFlags.www.js b/packages/shared/forks/ReactFeatureFlags.www.js index f8566f9ecb..1811c9bf7c 100644 --- a/packages/shared/forks/ReactFeatureFlags.www.js +++ b/packages/shared/forks/ReactFeatureFlags.www.js @@ -112,8 +112,6 @@ export const enableUseMutableSource = true; export const enableCustomElementPropertySupport = __EXPERIMENTAL__; export const useModernStrictMode = false; + // Flow magic to verify the exports of this file match the original version. -// eslint-disable-next-line no-unused-vars -type Check<_X, Y: _X, X: Y = _X> = null; -// eslint-disable-next-line no-unused-expressions -(null: Check); +((((null: any): ExportsType): FeatureFlagsType): ExportsType); diff --git a/scripts/flow/config/flowconfig b/scripts/flow/config/flowconfig index 470bd08692..fadeb06f0b 100644 --- a/scripts/flow/config/flowconfig +++ b/scripts/flow/config/flowconfig @@ -48,4 +48,4 @@ munge_underscores=false %REACT_RENDERER_FLOW_OPTIONS% [version] -^0.176.0 +^0.182.0 diff --git a/yarn.lock b/yarn.lock index e5bf340809..696a20379a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7912,10 +7912,10 @@ flatted@^2.0.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== -flow-bin@^0.176.0: - version "0.176.3" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.176.3.tgz#d32de04e044ab474afe543b9fd245608bb6a6ac8" - integrity sha512-lbNqgjr2GlGLAEVp5+dhG4LdnFE7ekbvVNifAdlvTx58/nE8GrCOMiUwEQy4dLnfL2NIRMk2dbEVTrugeQJ3mA== +flow-bin@^0.182.0: + version "0.182.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.182.0.tgz#1dacbd72465743670412ada015d3182deda6f966" + integrity sha512-Ux90c2sMfoV/VVjOEFT2OHFJFnyfoIbTK/5AKAMnU4Skfru1G+FyS5YLu3XxQl0R6mpA9+rrFlPfYZq/5B+J3w== fluent-syntax@0.13.0: version "0.13.0"