Flow upgrade to 0.145

Fixed a RN library definition that defined `CustomEvent` as a reference to itself.

ghstack-source-id: 90da2e316f
Pull Request resolved: https://github.com/facebook/react/pull/25409
This commit is contained in:
Jan Kassens 2022-10-04 10:50:31 -04:00
parent 00a2f81508
commit d3c6c16a03
5 changed files with 18 additions and 10 deletions

View File

@ -63,7 +63,7 @@
"eslint-plugin-react-internal": "link:./scripts/eslint-rules",
"fbjs-scripts": "1.2.0",
"filesize": "^6.0.1",
"flow-bin": "^0.143.0",
"flow-bin": "^0.145.0",
"glob": "^7.1.6",
"glob-stream": "^6.1.0",
"google-closure-compiler": "^20200517.0.0",

View File

@ -122,9 +122,6 @@ export default function getListeners(
detail: syntheticEvent.nativeEvent,
});
eventInst.isTrusted = true;
// setSyntheticEvent is present on the React Native Event shim.
// It is used to forward method calls on Event to the underlying SyntheticEvent.
// $FlowFixMe
eventInst.setSyntheticEvent(syntheticEvent);
listenerObj.listener(eventInst, ...args);

View File

@ -50,4 +50,4 @@ munge_underscores=false
%REACT_RENDERER_FLOW_OPTIONS%
[version]
^0.143.0
^0.145.0

View File

@ -143,7 +143,18 @@ declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface'
emit: (channel: string, event: RawEventEmitterEvent) => string,
...
};
declare export var CustomEvent: CustomEvent;
declare export class CustomEvent {
isTrusted: boolean;
constructor(
name: string,
{
detail: any,
},
): void;
setSyntheticEvent(event: any): void;
}
}
declare module 'react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore' {

View File

@ -7911,10 +7911,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.143.0:
version "0.143.1"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.143.1.tgz#2ff825dfd85e84531b0ae780842cb1c2a9743cd2"
integrity sha512-6S6bgZ/pghBzEUELXkwFH/bsHT+GBMo8ftHDYs0SSJ+1e6NRdFfqxcYhaTvAK8zteSfQLZBIoec6G4WPPp4qQg==
flow-bin@^0.145.0:
version "0.145.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.145.0.tgz#922f7c3568caaa5eb64621ec536deb56b24d1795"
integrity sha512-+9fi9BMxRBtSWC1x0hWggWTb8Vih+AC7wyvLAX5wR1m6u2lF2HLtixXqy2GX8bWgaynSEJR5lmPxYYC4wMI8cA==
fluent-syntax@0.13.0:
version "0.13.0"