dillon1000/react
Commit
Browse files Transform updates to support Flow this annotation syntax (#25918)
Flow introduced a new syntax to annotated the context type of a function, this tries to update the rest and add 1 example usage. - 2b1fb91a55deb9b7b60452cb57184c2f182a42fd already added the changes required for eslint. - Jest transform is updated to use the recommended `hermes-parser` which can parse current and Flow syntax and will be updated in the future. - Rollup uses a new plugin to strip the flow types. This isn't ideal as the npm module is deprecated in favor of using `hermes-parser`, but I couldn't figure out how to integrate that with Rollup.
Changed paths16 files
First-parent comparisonpackage.json ModifiedM packages/react-dom-bindings/src/shared/DOMNamespaces.js ModifiedM packages/react-dom-bindings/src/shared/ReactControlledValuePropTypes.js ModifiedM packages/react-dom-bindings/src/shared/assertValidProps.js ModifiedM packages/react-dom/src/test-utils/ReactTestUtils.js ModifiedM packages/react-native-renderer/src/legacy-events/ResponderEventPlugin.js ModifiedM packages/react-server/src/ReactFizzServer.js ModifiedM packages/react/src/ReactForwardRef.js ModifiedM packages/react/src/ReactMemo.js ModifiedM packages/shared/forks/invokeGuardedCallbackImpl.www.js ModifiedA scripts/babel/getComments.js AddedM scripts/babel/transform-react-version-pragma.js ModifiedM scripts/babel/transform-test-gate-pragma.js ModifiedM scripts/jest/preprocessor.js ModifiedM scripts/rollup/build.js ModifiedM yarn.lock ModifiedPatch
Files changed
Rendering syntax-highlighted changes…