Skip to content

Commit

Permalink
Flow upgrade to 0.145
Browse files Browse the repository at this point in the history
Fixed a RN library definition that defined `CustomEvent` as a reference to itself.

ghstack-source-id: 90da2e316f4caf3e5ff1172982f02d0a87a45ecb
Pull Request resolved: #25409
  • Loading branch information
kassens committed Oct 4, 2022
1 parent 00a2f81 commit d3c6c16
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 0 additions & 3 deletions packages/react-native-renderer/src/ReactNativeGetListeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion scripts/flow/config/flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ munge_underscores=false
%REACT_RENDERER_FLOW_OPTIONS%

[version]
^0.143.0
^0.145.0
13 changes: 12 additions & 1 deletion scripts/flow/react-native-host-hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==

[email protected]:
version "0.13.0"
Expand Down

0 comments on commit d3c6c16

Please sign in to comment.