Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge react-native 0.61-stable #323

Merged
merged 1,093 commits into from
Apr 28, 2020
Merged
Changes from 1 commit
Commits
Show all changes
1093 commits
Select commit Hold shift + click to select a range
08e4537
Expose JS Responder handler in Scheduler API
mdvacca Aug 2, 2019
0e067fd
Implement JS Responder Handler in Fabric Android
mdvacca Aug 2, 2019
e2f82b1
Implement JNI code to invoke Android JSResponder methods from C++
mdvacca Aug 2, 2019
e906af1
Change AndroidDrawerLayoutNativeComponent to use JS codegen for commands
elicwhite Aug 2, 2019
7c0b735
Update commands transform to use helper
elicwhite Aug 2, 2019
bc7c85f
Delete jsi::Functions before jsi::Runtime gets deleted
RSNara Aug 3, 2019
f4f08d3
Fix missing rotateZ to useAnimatedDriver Whitelist (#25938)
Titozzz Aug 5, 2019
306c8d6
Back out "[react-native][PR] Allow Animation EndResult callback to re…
osdnk Aug 5, 2019
2956eb2
Switch Platform Constansts to use typedConstants structs
osdnk Aug 5, 2019
28d5018
Fixed android bounding box (#25836)
floriancargoet Aug 5, 2019
e557901
Fix crash when tapping full screen button on video ad
sammy-SC Aug 5, 2019
3eaf245
Pop frames correctly in console.error handler
motiz88 Aug 5, 2019
a5b925d
Fix up NativeDialogManagerAndroid PR
RSNara Aug 5, 2019
c21e36d
Bump hermes to v0.1.1 (#25908)
sunnylqm Aug 5, 2019
751d0e7
Fabric PerfLogger: prevent ConcurrentModificationException
JoshuaGross Aug 5, 2019
28e18e4
iOS fixed up inconsistent boolean convertion logic in RCTPlatform
fkgozali Aug 6, 2019
76af5f9
Add ErrorUtils to global variables (#25947)
rodineijf Aug 6, 2019
7cac6a4
Update App.js (#25905)
ferdicus Aug 6, 2019
deaaab9
Fix error string in codegenNativeComponent
rickhanlonii Aug 6, 2019
cf819bf
Remove outdated React async component check
Aug 6, 2019
2e8ecab
Add tests for codegenNativeComponent
rickhanlonii Aug 7, 2019
eb92f81
Update loading pre-bundled message
rickhanlonii Aug 7, 2019
192bc1d
Add $FlowFixMeEmpty to suppressions in RN's .github.flowconfig
logandaniels Aug 7, 2019
d1d48ef
Add portable bit field implementation
davidaurelio Aug 7, 2019
f33a623
Remove style property bitmask
davidaurelio Aug 7, 2019
2c73dbd
Use `Bitfield` in `YGNode` and `YGStyle`
davidaurelio Aug 7, 2019
f94360a
Use `Bitfield` in `YGLayout`
davidaurelio Aug 7, 2019
c9b757f
Back out "[Yoga] Experiment: double invocations of measure callbacks"
davidaurelio Aug 8, 2019
4c11b55
Don't copy children in YGNodeComputeFlexBasisForChildren (#919)
Adlai-Holler Aug 8, 2019
c0c5e22
React edit text changes (#25964)
ontzic Aug 8, 2019
93f4f9d
Fix Fast Refresh on Fabric
gaearon Aug 8, 2019
d2e18a1
iOS: Revert RCT->RN prefix renaming to avoid confusion
fkgozali Aug 8, 2019
8830698
use array for passing measure callback reasons count
SidharthGuglani-zz Aug 8, 2019
57fe1f4
Commands codegen: added RCT prefix for protocols, extern C functions,…
fkgozali Aug 8, 2019
9b1465b
Add support for casting codegenNativeComponent
rickhanlonii Aug 8, 2019
c237794
Format code in ReactCommon/turbomodule/core
RSNara Aug 8, 2019
87d2f4e
Refactor TextInput.js passes strings to Java for autoCapitalize
elicwhite Aug 8, 2019
b5b6d1d
Minor improvements in native modules codegens
osdnk Aug 8, 2019
35f81f6
Add handling of nullable return value
osdnk Aug 8, 2019
52c86a9
fallback not understandable types from methods to object
osdnk Aug 8, 2019
0da4612
change name convention for modules
osdnk Aug 8, 2019
28e668e
Add pointer to generated id<NSObject>
osdnk Aug 8, 2019
0dcd57c
Fix veryfying exports in module codegen
osdnk Aug 8, 2019
305b0a2
DrawerLayoutAndroid drawerPosition now expects a string, number is de…
elicwhite Aug 8, 2019
b1b5bd4
Introduce NativeBugReporting
RSNara Aug 8, 2019
aecdee0
Introduce NativeFrameRateLogger
RSNara Aug 8, 2019
742a544
Fix forceUpdate method on useWindowDimensions (#25990)
brunolemos Aug 9, 2019
2e32b8c
Update regex used to check for codegenNativeComponent
rickhanlonii Aug 9, 2019
d2b92ff
Use eslint-plugin-prettier recommended config (#25674)
Justkant Aug 9, 2019
99487d6
Codemod fbandroid// => //fbandroid/ in xplat/js/
scottrice Aug 9, 2019
9127fb5
Manual fixes for xplat/js/react-native-github
logandaniels Aug 9, 2019
91f139b
xplat/js/react-native-github
logandaniels Aug 9, 2019
bfecb12
Remove usage of NativeModules.AccessibilityManager
RSNara Aug 9, 2019
0ccedf3
React sync for revisions 55bc393...85d05b3
elicwhite Aug 9, 2019
b1ca5be
@allow-large-files flow 0.105 xplat deploy
avikchaudhuri Aug 11, 2019
e2d55d5
chore: Link to CLA wiki and CLA form. (#26016)
JustinTRoss Aug 12, 2019
9b0adb5
Fix indentation in Gradle files (#26012)
sonicdoe Aug 12, 2019
bef87b6
improve VirtualizedList error message (#25973)
vonovak Aug 12, 2019
50fe811
Use ViewManagerDelegate if provided instead of $$PropsSetter to updat…
makovkastar Aug 12, 2019
1a92cf9
Added jitpack repository to template (#25987)
iyegoroff Aug 12, 2019
5edd1c6
- Bump CLI to ^3.0.0-alpha.1 (#26028)
thymikee Aug 12, 2019
5cde7d2
Fix handling of failed image downloads
sammy-SC Aug 12, 2019
e6debfe
Fix crash during reload on Marketplace Home
sammy-SC Aug 12, 2019
06259a7
Add Object type to schema
rickhanlonii Aug 12, 2019
76b8b1d
Add object prop tests for unchanged fixtures
rickhanlonii Aug 12, 2019
50b821d
Add view config support for Object props
rickhanlonii Aug 12, 2019
ebb412a
Add Object props support for Java
rickhanlonii Aug 12, 2019
e6c1e81
Move generateStructName to CppHelpers
rickhanlonii Aug 12, 2019
e110f04
Add support for parsing object props
rickhanlonii Aug 12, 2019
a60e581
Better error message for invalid type annotation
rickhanlonii Aug 12, 2019
3a66fc7
Add Flipper to React Native OSS by default
axe-fb Aug 12, 2019
47afa7c
Improve ModuleRegistryBuilder assertion
RSNara Aug 13, 2019
054d2fc
Move HermesSamplingProfiler to OSS
axe-fb Aug 13, 2019
a9c8103
Fix jest test crashes with animated components
sahrens Aug 13, 2019
450e4a7
Add RNTester and UITestBed as dev routes in main apps
sahrens Aug 13, 2019
e104204
URL: Do not prepend baseUrl if the URL is not a relative URL (#26009)
jeswinsimon Aug 13, 2019
427b54e
Move TextInput PropTypes to Deprecated PropTypes (#26042)
empyrical Aug 13, 2019
8a82503
fix SectionList scrollToLocation and prevent regressions (#25997)
vonovak Aug 13, 2019
724fe11
Add reexport_all_header_dependencies to (yet more) misc rules
adamjernst Aug 13, 2019
825e1c0
Commands: support Float arguments
JoshuaGross Aug 13, 2019
639da37
Use feature flag to enable view manager delegates for setting props
makovkastar Aug 14, 2019
71d7d68
fix display problems when image fails to load (#25969)
Aug 14, 2019
a5aaca7
Migrate RCTAxialGradientView to JS codegen
makovkastar Aug 14, 2019
4a9035a
hadle nullable params in generated objcpp
osdnk Aug 14, 2019
9961449
Remove multiple RTCConvert import
osdnk Aug 14, 2019
d3c30cd
fix optional key in structs in new codegen
osdnk Aug 14, 2019
024ce5d
Change type of params in methods' protocols to nongeneric
osdnk Aug 14, 2019
40dd48c
Fix name of key obtaining from dictionary in inline method in generat…
osdnk Aug 14, 2019
c0304aa
Add setMethodArgConversionSelector
osdnk Aug 14, 2019
a5ea720
Omit getConstants for codegening if object is empty
osdnk Aug 14, 2019
d00f088
Add documentation to TextInput's Flow types (#26054)
empyrical Aug 14, 2019
9a31fa5
Delete ensureComponentIsNative.js
elicwhite Aug 14, 2019
9dbe5e2
Use SoundManager in Pressability and Touchable
mdvacca Aug 14, 2019
441c00a
Revert D16543433: [Fabric][JS] Use SoundManager in Pressability and T…
mdvacca Aug 14, 2019
bf78d79
Migrate RCTImage NativeModules to CoreModules
RSNara Aug 14, 2019
a02176e
Add support for `Double` prop type
JoshuaGross Aug 14, 2019
0a39674
Support spreading locally defined types
elicwhite Aug 14, 2019
9ae866c
Support spreading locally defined types deeply
elicwhite Aug 14, 2019
ac6c747
Support deeply nested spreads
elicwhite Aug 14, 2019
5113323
Add failure tests for duplicate props with the same name
elicwhite Aug 14, 2019
0057cc9
Deprecate Text proptypes (#26055)
empyrical Aug 15, 2019
0cf1c6d
add the jni initializer to the build for sampling profiler
4-rodrigo-salazar Aug 15, 2019
a206e91
Generate super call to BaseViewManagerDelegate if delegate has no props
makovkastar Aug 15, 2019
35fc0ad
Remove vendored proguard annotation (#26069)
passy Aug 15, 2019
56f9eb3
Add Object props support for cxx
rickhanlonii Aug 15, 2019
70fc54a
Add e2e test for object props
rickhanlonii Aug 15, 2019
bc1c7b1
Add array<object> props to schema
rickhanlonii Aug 15, 2019
243ccc5
Generate array<object> props
rickhanlonii Aug 15, 2019
86eb4c7
Parse $ReadOnlyArray<$ReadOnly{}> props
rickhanlonii Aug 15, 2019
958b7aa
Add e2e tests for array object props
rickhanlonii Aug 15, 2019
996ea88
Add error message for paring unnamed params
osdnk Aug 15, 2019
269ea48
Split buck rules for component and modules
osdnk Aug 15, 2019
c8b9a3f
Support Double in when generating props for .h files, in parsing comp…
JoshuaGross Aug 15, 2019
6c3b01d
Add support for spread with ReadOnlyArray
elicwhite Aug 15, 2019
30c1196
Convert RCTImageLoader to TurboModules [4/N]
Aug 15, 2019
a380f0f
Pass RCTImageLoader into RCTSurfacePresenter [5/N]
Aug 15, 2019
0b3aeec
Pass RuntimeExecutor into RCTSurfacePresenter
Aug 15, 2019
111cb32
Fix BUCK-related React Native CI failures
mhorowitz Aug 15, 2019
6991e28
Move RCTExceptionsManager to CoreModules and make it conform to spec
Aug 16, 2019
5485238
Bump test version for cache issues
grabbou Aug 20, 2019
b356ac7
Tweak script to work with no global CLI
grabbou Aug 20, 2019
f827ea9
Revert "Remove vendored proguard annotation (#26069)"
grabbou Aug 21, 2019
612c033
Revert "Remove 's.static_framework = true' requirement for podspec (#…
grabbou Aug 22, 2019
9296ab1
[0.61.0-rc.0] Bump version numbers
grabbou Aug 22, 2019
1dd6881
Revert "[0.61.0-rc.0] Bump version numbers"
grabbou Aug 22, 2019
2575eb3
[0.61.0-rc.0] Bump version numbers
grabbou Aug 22, 2019
1dd1152
Revert "[0.61.0-rc.0] Bump version numbers"
grabbou Aug 26, 2019
6d6b532
Add RCTWeakProxy to properly deallocate RCTUIImageViewAnimated
Aug 22, 2019
104b0cc
Remove RCTUIImageViewAnimated WeakProxy gating
Aug 22, 2019
bc28eee
[0.61.0-rc.0] Bump version numbers
grabbou Aug 26, 2019
eded25d
Revert "[0.61.0-rc.0] Bump version numbers"
grabbou Aug 27, 2019
fafc58b
Update CircleCI config as per support request
grabbou Aug 27, 2019
c57bfea
[0.61.0-rc.0] Bump version numbers
grabbou Aug 27, 2019
ba5222f
Memory Leak due to JSStringRelease not called in multiple places in J…
sachinservicemax Aug 21, 2019
c0fa590
Fix Redbox on iOS
gaearon Aug 31, 2019
eb0216d
Partial RN sync
gaearon Aug 31, 2019
8d02e17
Change podspec name of yoga to Yoga
axe-fb Aug 30, 2019
e0e9a1c
Update the version of yoga podspec to match the actual version of Yog…
axe-fb Aug 30, 2019
dcf56a4
Sync Podfile
grabbou Sep 4, 2019
b153a05
Update release script
grabbou Sep 4, 2019
0356b1f
[0.61.0-rc.2] Bump version numbers
grabbou Sep 4, 2019
50d9551
TM iOS: Disable in test environment
fkgozali Sep 4, 2019
2ec83be
Revert "Revert "Remove 's.static_framework = true' requirement for po…
jtreanor Aug 22, 2019
231581c
Add missing dependencies to React-CoreModules.podspec
jtreanor Aug 22, 2019
cf5ca26
Fix incorrect `module.name_mapper` in template .flowconfig (#26330)
MoOx Sep 9, 2019
a648a71
Rename Yoga
grabbou Sep 10, 2019
fc6580e
[0.61.0-rc.3] Bump version numbers
grabbou Sep 10, 2019
e0d9cea
Fixing Yoga imports and includes on case-sensitive machines (#26416)
gabrielfurini Sep 17, 2019
930ffa2
Fix build break in MSVC (#26462)
acoates-ms Sep 17, 2019
a5353c0
Revert "Fix onDismiss in Modal"
grabbou Sep 19, 2019
06c64f5
Bump hermes to v0.2.1 (#26451)
sunnylqm Sep 18, 2019
245ac94
React Partial Sync
Sep 18, 2019
8d4e8a3
bump android gradle plugin to 3.5.0 (#26129)
dulmandakh Aug 29, 2019
afd3529
Update Gradle wrapper to 5.6 (#26079)
friederbluemle Aug 26, 2019
8750eb2
Revert "bump android gradle plugin to 3.5.0 (#26129)"
grabbou Sep 24, 2019
6830ec8
Revert "Update Gradle wrapper to 5.6 (#26079)"
grabbou Sep 24, 2019
3293792
[0.61.0] Bump version numbers
grabbou Sep 24, 2019
42ad0bb
Allow again for injecting custom root view via ReactActivityDelegate …
kmagiera Sep 19, 2019
4b1206c
Fix ShareSheet crash on iOS 13 (#26429)
tomtargosz Sep 13, 2019
2577ca5
[0.61.1] Bump version numbers
grabbou Sep 25, 2019
b2a7689
Revert "[0.61.1] Bump version numbers"
grabbou Sep 25, 2019
3aaebe6
Revert "Add generated `xcshareddata` folder to gitignore (#25451)"
grabbou Sep 25, 2019
c833f41
[0.61.1] Bump version numbers
grabbou Sep 25, 2019
a33e809
Bring back RNTester manual step
grabbou Sep 25, 2019
a7b9be4
Removing the workspace (#26566)
pvinis Sep 30, 2019
df9073a
Revert "Set rounded rectangle mask on TouchableNativeFeedback's rippl…
grabbou Oct 1, 2019
b944381
Include transform in OUTER_PROPS (#26611)
migbot Sep 30, 2019
5cf3d96
Use `warnOnce` for excessive number of callbacks error (#26508)
janicduplessis Sep 23, 2019
0b734f6
improve error message in NativeModuleRegistryBuilder.java (#26467)
vonovak Sep 30, 2019
7fd8bac
iOS13 status bar has now 3 styles (#26294)
gaodeng Sep 11, 2019
3a96f4c
[0.61.2] Bump version numbers
grabbou Oct 2, 2019
766f470
Release underlying resources when JS instance is GC'ed on Android try…
janicduplessis Sep 18, 2019
66ae1ca
Bump SoLoader to 0.8.0 (#26759)
Oct 9, 2019
1b39f67
Revert "Bump SoLoader to 0.8.0 (#26759)"
grabbou Oct 28, 2019
54bf3ae
Improve Flow Type for ScrollResponder
elicwhite Aug 28, 2019
09c4e7c
Migrate scrollResponderScrollNativeHandleToKeyboard function to take …
elicwhite Sep 20, 2019
0da6a9b
Fix exception in scrollResponderScrollNativeHandleToKeyboard when ref…
elicwhite Oct 2, 2019
2ddb76a
Fix bug where ScrollView contentInset top set to undefined wouldn't d…
elicwhite Oct 7, 2019
2027a61
Fix TimingAnimation rounding error issue (Take 2)
Oct 10, 2019
d328877
Fix ref type for Native Scroll View
elicwhite Oct 11, 2019
5051bf2
Fix selecting videos from library in iOS 13
fatalsun Oct 11, 2019
32c90eb
Fix bug in iOS13 nested text rendering
Oct 21, 2019
2fac662
Revert "Fix ref type for Native Scroll View"
grabbou Oct 28, 2019
55ee65d
Invalidate cache
grabbou Oct 29, 2019
7fa3eef
[0.61.3] Bump version numbers
grabbou Oct 29, 2019
b2d4880
Revert release and remove extraneous commits
grabbou Oct 29, 2019
6f98e77
Revert "Fix exception in scrollResponderScrollNativeHandleToKeyboard …
grabbou Oct 29, 2019
43593c7
Revert "Migrate scrollResponderScrollNativeHandleToKeyboard function …
grabbou Oct 29, 2019
18cfb31
Revert "Improve Flow Type for ScrollResponder"
grabbou Oct 29, 2019
35001d2
[0.61.3] Bump version numbers
grabbou Oct 29, 2019
b85dffa
Bump react to 16.9.0 (#27060)
pvinis Oct 31, 2019
bd12ca1
fix build with hermes on windows (#26556)
B27 Sep 26, 2019
5e702a1
Don't wrap console methods for metro logging in Chrome debugger (#26883)
rickhanlonii Oct 21, 2019
d7c9173
Reverts "Timing: Fixes timer when app get into background (#24649)" (…
radko93 Nov 4, 2019
f7d9d5f
Merge branch '0.61-stable' of github.com:facebook/react-native into 0…
grabbou Nov 4, 2019
95a5101
[0.61.4] Bump version numbers
grabbou Nov 4, 2019
51f74e7
fix: Bundle assets in monorepo (#26940)
Esemesek Nov 5, 2019
1a33607
Fix multiple `set-cookie` not aggregated correctly in response header…
Nov 5, 2019
7d311f0
- Bump CLI to ^3.0.0 (#27235)
thymikee Nov 15, 2019
86cad7d
[0.61.5] Bump version numbers
grabbou Nov 23, 2019
6c0e752
Create and checkout branch for 0.61 merge: fb61merge
anandrajeswaran Apr 15, 2020
2a3639f
First stab at 0.61 merge. All conflicts resolved, none verified
anandrajeswaran Apr 16, 2020
dea9f03
Fix up some basic merge issues with config files
anandrajeswaran Apr 16, 2020
e4dd91a
Merge branch 'master' of https://github.com/microsoft/react-native in…
anandrajeswaran Apr 16, 2020
8de7c0a
Mostly fixing bad merges and podfile moves. Gets iOS building and som…
anandrajeswaran Apr 16, 2020
bf3032d
JS is not lint free.
tom-un Apr 16, 2020
216f0c1
iOS RNTester booting
tom-un Apr 17, 2020
689e522
Update test snapshot files
tom-un Apr 17, 2020
692eb55
Get macOS building. Mostly image-related fixup with high probability …
anandrajeswaran Apr 17, 2020
4350283
Merge branch 'fb61merge' of https://github.com/microsoft/react-native…
anandrajeswaran Apr 17, 2020
8e43667
Fix iOS build breaks from last commit
anandrajeswaran Apr 17, 2020
769ab7f
Fix minor yarn lint issues to bring yarn lint parity with facebook's …
anandrajeswaran Apr 17, 2020
b8d7929
RNTester booting, but UIView is now being rejected because generated …
tom-un Apr 17, 2020
60c334d
Fix a few yarn flow-check-ios issues
anandrajeswaran Apr 17, 2020
1966177
Merge branch 'fb61merge' of https://github.com/microsoft/react-native…
anandrajeswaran Apr 17, 2020
9fc76d3
Make iOS flow clean
anandrajeswaran Apr 17, 2020
919826f
RNTester mac booting
tom-un Apr 17, 2020
c28fef3
Fix all yarn flow-check-macos issues
anandrajeswaran Apr 18, 2020
bebe43a
Merge branch 'fb61merge' of https://github.com/microsoft/react-native…
anandrajeswaran Apr 18, 2020
347aaed
Add macOS equivalents for new iOS bundles
anandrajeswaran Apr 18, 2020
7257095
Make Android pass flow check
tom-un Apr 18, 2020
ff004e7
Fixed merge conflict errors, updated upstream diff comments.
tom-un Apr 19, 2020
adfe34d
Fixed more merge comments
tom-un Apr 25, 2020
2f46607
Fixed PaperUIManager.js to add 'ios' || 'macos' case.
tom-un Apr 25, 2020
91b0370
Fix macOS unit tests.
tom-un Apr 26, 2020
0c62fe9
All macOS tests passing
tom-un Apr 26, 2020
94fd65a
Updated build scripts to build and test via Pods.
tom-un Apr 26, 2020
ed18e27
Merge branch 'master' into fb61merge
tom-un Apr 26, 2020
84e4a80
Fix lint and flow errors
tom-un Apr 26, 2020
dd91a02
Merge branch 'master' into fb61merge
tom-un Apr 26, 2020
7632871
Fix pod install
tom-un Apr 26, 2020
b995f5b
Merge branch 'fb61merge' of github.com:microsoft/react-native into fb…
tom-un Apr 26, 2020
f41f14e
Change files
tom-un Apr 26, 2020
c6c9da0
Fix build script to specify RNTesterPods.xcworkspace
tom-un Apr 26, 2020
31e0d70
Fix Release
tom-un Apr 26, 2020
d5cc9e1
Change files
tom-un Apr 27, 2020
a633289
Remove beachball change files.
tom-un Apr 27, 2020
59be43c
Fix beachball to exclude internal packages
tom-un Apr 27, 2020
c01afaa
Fix react-native-macos-init
tom-un Apr 27, 2020
210ac31
Fix react-native run-macos
tom-un Apr 27, 2020
fecf819
Fix react-native-xcode.sh to work in repo and out of repo.
tom-un Apr 27, 2020
4e2ebd3
Fix RedBox
tom-un Apr 28, 2020
49d3591
Synchronize android sources under ReactAndroid & ReactCommon with RNv…
mganandraj Apr 28, 2020
fd59f26
Patches for some of the basic build customizations. Includes (1) Nuge…
mganandraj Apr 28, 2020
bca2e81
Exclude package from beachball
tom-un Apr 28, 2020
07c17a1
Fixing the nuget configuration patches.. which was badly created last…
mganandraj Apr 28, 2020
1e287cb
V8Integration patches
mganandraj Apr 28, 2020
fa1804a
Changing patching command in pipeline definitions to only apply rebas…
mganandraj Apr 28, 2020
0f33396
Consuming downloaded third party packages for folly, glog, double-con…
mganandraj Apr 28, 2020
9910837
Fixing the pipeline hacky step to update the POM file
mganandraj Apr 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add support for casting codegenNativeComponent
Summary: Adds support for casting the codegenNativeComponent export

Reviewed By: TheSavior

Differential Revision: D16676207

fbshipit-source-id: 5e874bd5a72eb7e67e05b0f671856ae3319a335e
rickhanlonii authored and facebook-github-bot committed Aug 8, 2019
commit 9b1465b74feba3d6edbc0c7d54d7bab5cf9c4c8a
Original file line number Diff line number Diff line change
@@ -23,29 +23,27 @@ const COMMANDS_DEFINED_INLINE = `

'use strict';

const codegenNativeComponent = require('codegenNativeComponent');
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');

import type {
Int32,
BubblingEvent,
DirectEvent,
} from 'CodegenTypes';

import type {Int32} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponent} from 'codegenNativeComponent';

export type ModuleProps = $ReadOnly<{|
...ViewProps,
// No props
|}>;

export const Commands = codegenNativeCommands<{
+hotspotUpdate: (ref: React.Ref<'RCTView'>, x: Int32, y: Int32) => void;
+hotspotUpdate: (ref: React.Ref<'RCTView'>, x: Int32, y: Int32) => void,
}>({
supportedCommands: ['hotspotUpdate']
supportedCommands: ['hotspotUpdate'],
});

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

const COMMANDS_DEFINED_MULTIPLE_TIMES = `
@@ -61,16 +59,12 @@ const COMMANDS_DEFINED_MULTIPLE_TIMES = `

'use strict';

const codegenNativeComponent = require('codegenNativeComponent');
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');

import type {
Int32,
BubblingEvent,
DirectEvent,
} from 'CodegenTypes';

import type {Int32} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponent} from 'codegenNativeComponent';

interface NativeCommands {
+hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void;
@@ -82,13 +76,15 @@ export type ModuleProps = $ReadOnly<{|
|}>;

export const Commands = codegenNativeCommands<NativeCommands>({
supportedCommands: ['hotspotUpdate']
supportedCommands: ['hotspotUpdate'],
});
export const Commands2 = codegenNativeCommands<NativeCommands>({
supportedCommands: ['hotspotUpdate']
supportedCommands: ['hotspotUpdate'],
});

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

const COMMANDS_DEFINED_WITHOUT_REF = `
@@ -104,16 +100,12 @@ const COMMANDS_DEFINED_WITHOUT_REF = `

'use strict';

const codegenNativeComponent = require('codegenNativeComponent');
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');

import type {
Int32,
BubblingEvent,
DirectEvent,
} from 'CodegenTypes';

import type {Int32} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponent} from 'codegenNativeComponent';

interface NativeCommands {
+hotspotUpdate: (x: Int32, y: Int32) => void;
@@ -125,10 +117,12 @@ export type ModuleProps = $ReadOnly<{|
|}>;

export const Commands = codegenNativeCommands<NativeCommands>({
supportedCommands: ['hotspotUpdate']
supportedCommands: ['hotspotUpdate'],
});

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

const COMMANDS_DEFINED_WITH_NULLABLE_REF = `
@@ -144,16 +138,12 @@ const COMMANDS_DEFINED_WITH_NULLABLE_REF = `

'use strict';

const codegenNativeComponent = require('codegenNativeComponent');
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');

import type {
Int32,
BubblingEvent,
DirectEvent,
} from 'CodegenTypes';

import type {Int32} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponent} from 'codegenNativeComponent';

interface NativeCommands {
+hotspotUpdate: (viewRef: ?React.Ref<'RCTView'>, x: Int32, y: Int32) => void;
@@ -165,10 +155,12 @@ export type ModuleProps = $ReadOnly<{|
|}>;

export const Commands = codegenNativeCommands<NativeCommands>({
supportedCommands: ['hotspotUpdate']
supportedCommands: ['hotspotUpdate'],
});

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = `
@@ -184,20 +176,20 @@ const COMMANDS_DEFINED_WITH_MISMATCHED_METHOD_NAMES = `

'use strict';

const codegenNativeComponent = require('codegenNativeComponent');
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');

import type {
Int32,
BubblingEventHandler,
DirectEventHandler,
} from 'CodegenTypes';

import type {Int32} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponent} from 'codegenNativeComponent';

interface NativeCommands {
+hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void;
+scrollTo: (viewRef: React.Ref<'RCTView'>, y: Int32, animated: boolean) => void;
+scrollTo: (
viewRef: React.Ref<'RCTView'>,
y: Int32,
animated: boolean,
) => void;
}

export type ModuleProps = $ReadOnly<{|
@@ -206,10 +198,12 @@ export type ModuleProps = $ReadOnly<{|
|}>;

export const Commands = codegenNativeCommands<NativeCommands>({
supportedCommands: ['scrollTo']
supportedCommands: ['scrollTo'],
});

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = `
@@ -225,20 +219,20 @@ const COMMANDS_DEFINED_WITHOUT_METHOD_NAMES = `

'use strict';

const codegenNativeComponent = require('codegenNativeComponent');
const codegenNativeCommands = require('codegenNativeCommands');
const codegenNativeComponent = require('codegenNativeComponent');

import type {
Int32,
BubblingEventHandler,
DirectEventHandler,
} from 'CodegenTypes';

import type {Int32} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';
import type {NativeComponent} from 'codegenNativeComponent';

interface NativeCommands {
+hotspotUpdate: (viewRef: React.Ref<'RCTView'>, x: Int32, y: Int32) => void;
+scrollTo: (viewRef: React.Ref<'RCTView'>, y: Int32, animated: boolean) => void;
+scrollTo: (
viewRef: React.Ref<'RCTView'>,
y: Int32,
animated: boolean,
) => void;
}

export type ModuleProps = $ReadOnly<{|
@@ -248,7 +242,9 @@ export type ModuleProps = $ReadOnly<{|

export const Commands = codegenNativeCommands<NativeCommands>();

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

const NULLABLE_WITH_DEFAULT = `
@@ -266,20 +262,18 @@ const NULLABLE_WITH_DEFAULT = `

const codegenNativeComponent = require('codegenNativeComponent');

import type {
WithDefault,
Float,
} from 'CodegenTypes';

import type {WithDefault, Float} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';

import type {NativeComponent} from 'codegenNativeComponent';

export type ModuleProps = $ReadOnly<{|
...ViewProps,
nullable_with_default: ?WithDefault<Float, 1.0>,
|}>;

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = `
@@ -297,21 +291,20 @@ const NON_OPTIONAL_KEY_WITH_DEFAULT_VALUE = `

const codegenNativeComponent = require('codegenNativeComponent');

import type {
WithDefault,
Float,
} from 'CodegenTypes';

import type {WithDefault, Float} from 'CodegenTypes';
import type {ViewProps} from 'ViewPropTypes';

import type {NativeComponent} from 'codegenNativeComponent';

export type ModuleProps = $ReadOnly<{|
...ViewProps,
required_key_with_default: WithDefault<Float, 1.0>,
|}>;

export default codegenNativeComponent<ModuleProps>('Module');
export default (codegenNativeComponent<ModuleProps>(
'Module',
): NativeComponent<ModuleProps>);
`;

module.exports = {
COMMANDS_DEFINED_INLINE,
COMMANDS_DEFINED_MULTIPLE_TIMES,
Loading