@samitouri / QOS-React-2 / commits / d3c6c16a03

Flow upgrade to 0.145

Fixed a RN library definition that defined `CustomEvent` as a reference to itself. ghstack-source-id: 90da2e316f4caf3e5ff1172982f02d0a87a45ecb Pull Request resolved: https://github.com/facebook/react/pull/25409

Jan Kassens committed Oct 4, 2022 at 10:50 UTC d3c6c16a0312b4d2051d75aaf85bb5335a8a6fa6
5 files changed +18 -10
package.json
+1 -1
@@ -63,7 +63,7 @@
63 "eslint-plugin-react-internal": "link:./scripts/eslint-rules",
64 "fbjs-scripts": "1.2.0",
65 "filesize": "^6.0.1",
66 - "flow-bin": "^0.143.0",
66 + "flow-bin": "^0.145.0",
67 "glob": "^7.1.6",
68 "glob-stream": "^6.1.0",
69 "google-closure-compiler": "^20200517.0.0",
packages/react-native-renderer/src/ReactNativeGetListeners.js
-3
@@ -122,9 +122,6 @@ export default function getListeners(
122 detail: syntheticEvent.nativeEvent,
123 });
124 eventInst.isTrusted = true;
125 - // setSyntheticEvent is present on the React Native Event shim.
126 - // It is used to forward method calls on Event to the underlying SyntheticEvent.
127 - // $FlowFixMe
125 eventInst.setSyntheticEvent(syntheticEvent);
126
127 listenerObj.listener(eventInst, ...args);
scripts/flow/config/flowconfig
+1 -1
@@ -50,4 +50,4 @@ munge_underscores=false
50 %REACT_RENDERER_FLOW_OPTIONS%
51
52 [version]
53 -^0.143.0
53 +^0.145.0
scripts/flow/react-native-host-hooks.js
+12 -1
@@ -143,7 +143,18 @@ declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface'
143 emit: (channel: string, event: RawEventEmitterEvent) => string,
144 ...
145 };
146 - declare export var CustomEvent: CustomEvent;
146 + declare export class CustomEvent {
147 + isTrusted: boolean;
148 +
149 + constructor(
150 + name: string,
151 + {
152 + detail: any,
153 + },
154 + ): void;
155 +
156 + setSyntheticEvent(event: any): void;
157 + }
158 }
159
160 declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore' {
yarn.lock
+4 -4
@@ -7911,10 +7911,10 @@ flatted@^2.0.0:
7911 resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
7912 integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==
7913
7914 -flow-bin@^0.143.0:
7915 - version "0.143.1"
7916 - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.143.1.tgz#2ff825dfd85e84531b0ae780842cb1c2a9743cd2"
7917 - integrity sha512-6S6bgZ/pghBzEUELXkwFH/bsHT+GBMo8ftHDYs0SSJ+1e6NRdFfqxcYhaTvAK8zteSfQLZBIoec6G4WPPp4qQg==
7914 +flow-bin@^0.145.0:
7915 + version "0.145.0"
7916 + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.145.0.tgz#922f7c3568caaa5eb64621ec536deb56b24d1795"
7917 + integrity sha512-+9fi9BMxRBtSWC1x0hWggWTb8Vih+AC7wyvLAX5wR1m6u2lF2HLtixXqy2GX8bWgaynSEJR5lmPxYYC4wMI8cA==
7918
7919 fluent-syntax@0.13.0:
7920 version "0.13.0"