diff --git a/.flowconfig b/.flowconfig index 735e7816a..b7aa19446 100644 --- a/.flowconfig +++ b/.flowconfig @@ -52,4 +52,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError [version] -^0.65.0 +^0.66.0 diff --git a/Libraries/CameraRoll/CameraRoll.js b/Libraries/CameraRoll/CameraRoll.js index 0c91dc7fd..3bc48664f 100644 --- a/Libraries/CameraRoll/CameraRoll.js +++ b/Libraries/CameraRoll/CameraRoll.js @@ -113,8 +113,10 @@ type GetPhotosReturn = Promise<{ * Shape of the return value of the `getPhotos` function. */ const getPhotosReturnChecker = createStrictShapeTypeChecker({ - // $FlowFixMe(>=0.41.0) edges: PropTypes.arrayOf( + /* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.66 was deployed. To see the error delete this + * comment and run Flow. */ createStrictShapeTypeChecker({ node: createStrictShapeTypeChecker({ type: PropTypes.string.isRequired, diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index ab685dc75..b9eb03bd6 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -31,9 +31,6 @@ const UIManager = require('UIManager'); const ViewPropTypes = require('ViewPropTypes'); const {ViewContextTypes} = require('ViewContext'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const emptyFunction = require('fbjs/lib/emptyFunction'); const invariant = require('fbjs/lib/invariant'); const requireNativeComponent = require('requireNativeComponent'); diff --git a/Libraries/Core/InitializeCore.js b/Libraries/Core/InitializeCore.js index 3e09e5660..3e6ebb680 100644 --- a/Libraries/Core/InitializeCore.js +++ b/Libraries/Core/InitializeCore.js @@ -195,9 +195,6 @@ if (__DEV__) { // Set up inspector const JSInspector = require('JSInspector'); - /* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.56 was deployed. To see the error delete this - * comment and run Flow. */ /* $FlowFixMe(>=0.56.0 site=react_native_fb,react_native_oss) This comment * suppresses an error found when Flow v0.56 was deployed. To see the error * delete this comment and run Flow. */ diff --git a/Libraries/Experimental/SwipeableRow/SwipeableRow.js b/Libraries/Experimental/SwipeableRow/SwipeableRow.js index e03970c63..80e627376 100644 --- a/Libraries/Experimental/SwipeableRow/SwipeableRow.js +++ b/Libraries/Experimental/SwipeableRow/SwipeableRow.js @@ -22,9 +22,6 @@ const TimerMixin = require('react-timer-mixin'); const View = require('View'); const createReactClass = require('create-react-class'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const emptyFunction = require('fbjs/lib/emptyFunction'); const IS_RTL = I18nManager.isRTL; diff --git a/Libraries/Lists/FlatList.js b/Libraries/Lists/FlatList.js index dc0f5db8b..e5b4a8310 100644 --- a/Libraries/Lists/FlatList.js +++ b/Libraries/Lists/FlatList.js @@ -627,8 +627,14 @@ class FlatList extends React.PureComponent, void> { render() { if (this.props.legacyImplementation) { return ( + /* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.66 was deployed. To see the error delete + * this comment and run Flow. */ =0.66.0 site=react_native_fb) This comment suppresses + * an error found when Flow v0.66 was deployed. To see the error + * delete this comment and run Flow. */ items={this.props.data} ref={this._captureRef} /> diff --git a/Libraries/Lists/MetroListView.js b/Libraries/Lists/MetroListView.js index 906164fa9..5f22eb264 100644 --- a/Libraries/Lists/MetroListView.js +++ b/Libraries/Lists/MetroListView.js @@ -50,8 +50,6 @@ type NormalProps = { type DefaultProps = { keyExtractor: (item: Item, index: number) => string, }; -/* $FlowFixMe - the renderItem passed in from SectionList is optional there but - * required here */ type Props = NormalProps & DefaultProps; /** diff --git a/Libraries/Lists/SectionList.js b/Libraries/Lists/SectionList.js index 3dfc99bd3..2404d26f5 100644 --- a/Libraries/Lists/SectionList.js +++ b/Libraries/Lists/SectionList.js @@ -326,6 +326,9 @@ class SectionList> extends React.PureComponent< const List = this.props.legacyImplementation ? MetroListView : VirtualizedSectionList; + /* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an + * error found when Flow v0.66 was deployed. To see the error delete this + * comment and run Flow. */ return ; } diff --git a/Libraries/Lists/VirtualizedList.js b/Libraries/Lists/VirtualizedList.js index 7ca090e88..f40b44e40 100644 --- a/Libraries/Lists/VirtualizedList.js +++ b/Libraries/Lists/VirtualizedList.js @@ -52,7 +52,9 @@ type ViewabilityHelperCallbackTuple = { }; type RequiredProps = { - renderItem: renderItemType, + // TODO: Conflicts with the optional `renderItem` in + // `VirtualizedSectionList`'s props. + renderItem: $FlowFixMe, /** * The default accessor functions assume this is an Array<{key: string}> but you can override * getItem, getItemCount, and keyExtractor to handle any type of index-based data. diff --git a/Libraries/ReactNative/requireNativeComponent.js b/Libraries/ReactNative/requireNativeComponent.js index c4320c0a8..2a6c7c8ca 100644 --- a/Libraries/ReactNative/requireNativeComponent.js +++ b/Libraries/ReactNative/requireNativeComponent.js @@ -23,9 +23,6 @@ const processColor = require('processColor'); const resolveAssetSource = require('resolveAssetSource'); const sizesDiffer = require('sizesDiffer'); const verifyPropTypes = require('verifyPropTypes'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const invariant = require('fbjs/lib/invariant'); const warning = require('fbjs/lib/warning'); diff --git a/RNTester/js/CameraRollView.js b/RNTester/js/CameraRollView.js index fc1f063b2..f69a4feed 100644 --- a/RNTester/js/CameraRollView.js +++ b/RNTester/js/CameraRollView.js @@ -72,7 +72,6 @@ var propTypes = { var CameraRollView = createReactClass({ displayName: 'CameraRollView', - // $FlowFixMe(>=0.41.0) propTypes: propTypes, getDefaultProps: function(): Object { diff --git a/jest/preprocessor.js b/jest/preprocessor.js index 6bc4dc9c5..05b87ad58 100644 --- a/jest/preprocessor.js +++ b/jest/preprocessor.js @@ -11,9 +11,6 @@ 'use strict'; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const babel = require('babel-core'); /* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error * found when Flow v0.54 was deployed. To see the error delete this comment and @@ -33,9 +30,6 @@ const nodeOptions = babelRegisterOnly.config([nodeFiles]); babelRegisterOnly([]); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const transformer = require('metro/src/transformer.js'); module.exports = { process(src/*: string*/, file/*: string*/) { diff --git a/local-cli/__tests__/fs-mock-test.js b/local-cli/__tests__/fs-mock-test.js index 46a3a9f96..4928f3bd9 100644 --- a/local-cli/__tests__/fs-mock-test.js +++ b/local-cli/__tests__/fs-mock-test.js @@ -30,16 +30,10 @@ describe('fs mock', () => { it('stores content correctly', () => { fs.writeFileSync('/test', 'foobar', 'utf8'); const content = fs.readFileSync('/test', 'utf8'); - /* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.56 was deployed. To see the error delete this - * comment and run Flow. */ expect(content).toEqual('foobar'); }); it('fails on missing path', () => { - /* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.56 was deployed. To see the error delete this - * comment and run Flow. */ expect(() => fs.writeFileSync('/dir/test', 'foobar', 'utf8'), ).toThrowError('ENOENT: no such file or directory'); @@ -57,9 +51,6 @@ describe('fs mock', () => { fs.mkdirSync('/dir', 0o777); fs.writeFileSync('/dir/test', 'foobar', 'utf8'); const content = fs.readFileSync('/dir/test', 'utf8'); - /* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.56 was deployed. To see the error delete this - * comment and run Flow. */ expect(content).toEqual('foobar'); }); @@ -68,9 +59,6 @@ describe('fs mock', () => { fs.writeFileSync('/dir/test', 'foobar', 'utf8'); fs.mkdirSync('/dir', 0o777); const content = fs.readFileSync('/dir/test', 'utf8'); - /* $FlowFixMe(>=0.56.0 site=react_native_oss) This comment suppresses an - * error found when Flow v0.56 was deployed. To see the error delete this - * comment and run Flow. */ expect(content).toEqual('foobar'); }); }); diff --git a/local-cli/bundle/buildBundle.js b/local-cli/bundle/buildBundle.js index 0d1ea0679..524c1ac84 100644 --- a/local-cli/bundle/buildBundle.js +++ b/local-cli/bundle/buildBundle.js @@ -10,24 +10,12 @@ 'use strict'; const log = require('../util/log').out('bundle'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const Server = require('metro/src/Server'); const {Terminal} = require('metro-core'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const TerminalReporter = require('metro/src/lib/TerminalReporter'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const TransformCaching = require('metro/src/lib/TransformCaching'); const {defaults} = require('metro'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const outputBundle = require('metro/src/shared/output/bundle'); const path = require('path'); const saveAssets = require('./saveAssets'); @@ -40,9 +28,6 @@ import type {ConfigT} from 'metro'; const defaultAssetExts = defaults.assetExts; const defaultSourceExts = defaults.sourceExts; const defaultPlatforms = defaults.platforms; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const defaultProvidesModuleNodeModules = defaults.providesModuleNodeModules; async function buildBundle( diff --git a/local-cli/bundle/types.flow.js b/local-cli/bundle/types.flow.js index 5c164d1ad..400803064 100644 --- a/local-cli/bundle/types.flow.js +++ b/local-cli/bundle/types.flow.js @@ -8,7 +8,4 @@ */ 'use strict'; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ export type {OutputOptions, RequestOptions} from 'metro/src/shared/types.flow'; diff --git a/local-cli/server/runServer.js b/local-cli/server/runServer.js index 870652fc9..4c821465d 100644 --- a/local-cli/server/runServer.js +++ b/local-cli/server/runServer.js @@ -25,9 +25,6 @@ const copyToClipBoardMiddleware = require('./middleware/copyToClipBoardMiddlewar const defaultAssetExts = Metro.defaults.assetExts; const defaultSourceExts = Metro.defaults.sourceExts; const defaultPlatforms = Metro.defaults.platforms; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const defaultProvidesModuleNodeModules = Metro.defaults.providesModuleNodeModules; const errorhandler = require('errorhandler'); @@ -46,17 +43,11 @@ const statusPageMiddleware = require('./middleware/statusPageMiddleware.js'); const systraceProfileMiddleware = require('./middleware/systraceProfileMiddleware.js'); const webSocketProxy = require('./util/webSocketProxy.js'); -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ const TransformCaching = require('metro/src/lib/TransformCaching'); const {ASSET_REGISTRY_PATH} = require('../core/Constants'); import type {ConfigT} from 'metro'; -/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error - * found when Flow v0.54 was deployed. To see the error delete this comment and - * run Flow. */ import type {Reporter} from 'metro/src/lib/reporting'; export type Args = {| diff --git a/local-cli/templates/HelloWorld/_flowconfig b/local-cli/templates/HelloWorld/_flowconfig index 10cb8d509..080b459b2 100644 --- a/local-cli/templates/HelloWorld/_flowconfig +++ b/local-cli/templates/HelloWorld/_flowconfig @@ -51,4 +51,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError [version] -^0.65.0 +^0.66.0 diff --git a/package.json b/package.json index f57e73a70..db9bd84bf 100644 --- a/package.json +++ b/package.json @@ -214,7 +214,7 @@ "eslint-plugin-jest": "21.8.0", "eslint-plugin-prettier": "2.6.0", "eslint-plugin-react": "7.6.1", - "flow-bin": "^0.65.0", + "flow-bin": "^0.66.0", "jest": "22.3.0", "jest-junit": "3.6.0", "prettier": "1.9.1",