Граф коммитов

22626 Коммитов

Автор SHA1 Сообщение Дата
Andy Chou 2b62e19a78 iOS 14 Support new DatePicker styles
Summary:
Adding support for DatePickerStyles on iOS13.4+

Changelog:
[iOS][Added] - Expose UIDatePickerStyles as a prop for DatePickerIOS

Reviewed By: PeteTheHeat

Differential Revision: D27948608

fbshipit-source-id: fcc16c630148818d9db0c9eef8363f8592b13791
2021-04-22 22:27:22 -07:00
Xuan Huang 5127c71d67 Upgrade npm ssri to fix security vulnerability
Summary:
Changelog: [internal]

`ssri` usages came from `webpack` so we ran
`yarn upgrade "webpack"`.

Reviewed By: dulinriley

Differential Revision: D27922406

fbshipit-source-id: cddca21a8035d3bd303f8cea82afe2264b35eed1
2021-04-22 12:16:18 -07:00
Peter Laraia 42b6e6682c Fix crash - check if backgroundColor is null before trying to fetch it in ViewProps isLayoutOnly
Summary:
Noticed while working in MobileHome with android device, when interacting with the Tasks change progress/priority components (MobileHomeTasksDetailsSelectorToken), which provides `borderRadius` style and `backgroundColor: ifSelected ? value : null`, and when `backgroundColor` is `null`, the line changed in this diff crashes (throwing the `NoSuchKeyException` at `ReadableNativeMap:110` [because of isNull check on `ReadableNativeMap:107`])

Changelog:
[Android][Fixed] - Fixed crash when using style borderRadius: any with backgroundColor: null

Reviewed By: JoshuaGross

Differential Revision: D27932828

fbshipit-source-id: 801b04c856ee9dc5a36bbf3e6e3d81de9b1e81a1
2021-04-22 10:41:38 -07:00
David Vacca b67dc01d1d Replace int -> int32_t
Summary:
This diff replaces all usages of int by int32_t. This is to ensure we always use a fixed size for int that matches what's expected on Java.

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27915608

fbshipit-source-id: 634c45796dda1d4434c3ad6ff3e199931c22940b
2021-04-22 09:50:23 -07:00
Kevin Gozali 6155ad0438 iOS: allow disabling packager access at runtime
Summary:
Allow disabling packager access based on the app runtime environment, e.g. running tests.

Changelog: [Internal]

Differential Revision: D27903019

fbshipit-source-id: cafa25e93efab3cf8e96d60a8fc03de8abb833f4
2021-04-22 08:15:28 -07:00
Rick Hanlon 96930fad13 Flip useTransition tuple
Summary:
This diff flips the order of the tuple returned by useTransition.

See here for more info: https://github.com/facebook/react/pull/20976

Changelog: internal

Reviewed By: gaearon

Differential Revision: D27928490

fbshipit-source-id: a1896f92ef24382012fa3be1ef043752e62b21e7
2021-04-21 20:29:34 -07:00
Peter Argany 2c34946662 Bridgeless support for RCTSourceCode
Summary:
Changelog: [Internal]

`RCTSourceCode` uses the bridge to export bundleURL. This adds bridgeless support.

Reviewed By: mdvacca

Differential Revision: D27925767

fbshipit-source-id: 46e93f54abfe8d27ace1241317fa22f24be717fe
2021-04-21 17:11:53 -07:00
Luna Wei ca8a75536e Add scrollToEnd ability to viewability tests
Summary:
Changelog:
[Internal] - RNTester FlatList and SectionList examples to add prop for scrolling to end of list.

Reviewed By: kacieb

Differential Revision: D27816830

fbshipit-source-id: 6b4bd4cb9a651f4a4e9045d600cc219a6ba2e39b
2021-04-21 15:09:33 -07:00
Pavlos Vinieratos 73844712b6 Fixing the git attrs for all the people and all the files and all future (#31128)
Summary:
We have had problems with `.gitattributes`, `.bat` and `.pbxproj` (Xcode) files for a while. The two main concerns were:
- Xcode project files not diffing correctly.
- Windows files having messed up line endings.
This PR fixes both issues, hopefully forever.

After seeing the diffs from v0.63 -> v0.64 and the changes in https://github.com/facebook/react-native/pull/29792, I, again, felt that this is going to cause problems, so I looked into both issues.

I started with `git check-attr -a Artsy.xcodeproj/project.pbxproj` after removing the `.gitattributes` file that contained `*.pbxproj -text` and there are no "guessed" attributes that would break things, and diffing and checking in worked well with the current git version. I agree this is not needed, so I left it out.

I looked into what it was doing before, and it was telling git (for the xcode project file) to "unset text", which means (according to https://git-scm.com/docs/gitattributes#_text) that it should not try to do any line ending changes when checking in that file. At some point git must have done this, and that's why it was needed, but no more, so it's safe and good to get rid of this, as it helps with nothing anymore.

Now for the bat files. We don't need any extra instructions for `gradle` and `*.sh` files as they are guessed correctly, so these are also safe to keep removed (https://github.com/facebook/react-native/pull/29792/files#diff-618cd5b83d62060ba3d027e314a21ceaf75d36067ff820db126642944145393eL5).

But we do need the `*.bat` instruction. I noticed that when working on macOS there were two problems that made things funky.
- One, is that the editor (usually vscode but not the important) would convert line endings to lf when editing a bat file.
- Two, is that git thought the files are lf line endings.

To fix the first one, I added a rule in `.editorconfig` (that's whats important, when any editor just supports editorconfig, but all my editors do). I can't believe how we missed that for sooooo long {emoji:1f605}!

To fix the second, I added the `.gitattributes` instruction **and** `renormalize`d the files (https://git-scm.com/docs/git-add#Documentation/git-add.txt---renormalize and https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings). I think the problem all along was that even though the files had crlf, git still thought they were using lf.

After the editorconfig change and the renormalization, everything behaves correctly and as expected. Changing bat files on macOS and Windows is fine now, producing only the smallest change needed, no random line ending diffs. Also here is a screenshot of one of the files actually crlf. It's these tiny things at the end of each line {emoji:1f453}.
<img width="612" alt="Screenshot 2021-03-10 at 12 20 28" src="https://user-images.githubusercontent.com/100233/110630943-ef536280-819d-11eb-9212-dbd70f038a44.png">

I have tested this on macOS and Windows, doing changes in both bat and xcode files, and verified that diffing and checking in files works well.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[General] [Added] - Added an `.editorconfig` file to help with default line endings for Windows files.

[Internal] [Fixed] - Added a rule in `.editorconfig` and `.gitattributes` to help with default line endings for Windows files.

Pull Request resolved: https://github.com/facebook/react-native/pull/31128

Test Plan: Feel free to go on a macOS or Windows machine (or both) and, using any editor that supports editorconfig, do any change in a `.bat` file. Then look at your git diff in terminal or gui or whatever you use, and then look at the sky and smile. It's fixed. The diff is just your change. Everything is as it should {emoji:1f49c}.

Reviewed By: nadiia

Differential Revision: D27914636

Pulled By: hramos

fbshipit-source-id: fc4e53a4fa42cb13e29686669e8de1679c2242e7
2021-04-21 11:27:32 -07:00
Andrei Shikov 6fda118116 Show surfaceId when logging IntBufferBatchMountItem
Summary:
Adds surface id for string logs of the IntBufferBatchMountItem to help debug updates with multiple surfaces.

Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D27884232

fbshipit-source-id: c5ec65585830f7aa5b902603bcd1e91b61cfe4c1
2021-04-21 10:32:18 -07:00
David Vacca 091197be5e Fix MapBufferBuilder::ensureDynamicDataSpace
Summary:
There was a subtle bug in MapBufferBuilder::ensureDynamicDataSpace where in some situations allowed MapBufferBuilder to use unowned memory.

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D27904642

fbshipit-source-id: de447633349094b0e8c5cb5e377dd31f5bfd1471
2021-04-21 10:27:57 -07:00
David Vacca b614afc613 Refactor MapBufferBuilder to use int to store size of Mapbuffer data
Summary:
Refactor MapBufferBuilder to use int to store size of Mapbuffer data

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D27904646

fbshipit-source-id: 6b8b96fdd30184b6d35c1d612743eae653854d6d
2021-04-21 10:27:57 -07:00
David Vacca 668d71aa0b Refactor dataSize to use int instead of short
Summary:
DynamicData can contain a big amount of data, refactoring type to use int instead of short

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27904643

fbshipit-source-id: 157064b280e27a9c7c4a4f55af310392b178feda
2021-04-21 10:27:57 -07:00
David Vacca f946001c4e Change type of MapBufferBuilder.dynamicDataSize variable
Summary:
Dynamicdata can contain long datastructures, increasing type of MapBufferBuilder.dynamicDataSize to int

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27904647

fbshipit-source-id: ccbccf9328a6aa301aa3f9bf5c1b3c20f56e2a19
2021-04-21 10:27:57 -07:00
David Vacca 8cdba40987 Fix MapBuffer.getString() method
Summary:
found a bug in MapBuffer.getString() method, this diff is fixing it

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27904644

fbshipit-source-id: 746812235539ff75c5ce53c6f872ede9779fa1fa
2021-04-21 10:27:57 -07:00
David Vacca e92be1c14b Add extra asserts and early deallocation in ReadableMapBuffer::importByteBufferAllocateDirect
Summary:
Add extra asserts and early deallocation in ReadableMapBuffer::importByteBufferAllocateDirect

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27904645

fbshipit-source-id: 075a007c4ec5e005b839add054bd68c233b65801
2021-04-21 10:27:57 -07:00
David Vacca 64844d900a Refactor names of ReadableMapBuffer class variables
Summary:
Refactor names of ReadableMapBuffer class variables

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27867056

fbshipit-source-id: de96429cbd1142e14fa74f7f953d560ba5918954
2021-04-21 10:27:57 -07:00
Rick Hanlon 42dceaf21c React Native sync for revisions f7cdc89...bd7f4a0
Summary:
This sync includes the following changes:
- **[bd7f4a013](https://github.com/facebook/react/commit/bd7f4a013 )**: Fix sloppy factoring in `performSyncWorkOnRoot` ([#21246](https://github.com/facebook/react/pull/21246)) //<Andrew Clark>//
- **[78120032d](https://github.com/facebook/react/commit/78120032d )**: Remove `flushDiscreteUpdates` from end of event ([#21223](https://github.com/facebook/react/pull/21223)) //<Andrew Clark>//
- **[a3a7adb83](https://github.com/facebook/react/commit/a3a7adb83 )**: Turn off enableSyncDefaultUpdates in test renderer ([#21319](https://github.com/facebook/react/pull/21319)) //<Ricky>//
- **[cdb6b4c55](https://github.com/facebook/react/commit/cdb6b4c55 )**: Only hide outermost host nodes when Offscreen is hidden ([#21250](https://github.com/facebook/react/pull/21250)) //<Brian Vaughn>//
- **[b9c6a2b30](https://github.com/facebook/react/commit/b9c6a2b30 )**: Remove LayoutStatic check from commit phase ([#21249](https://github.com/facebook/react/pull/21249)) //<Brian Vaughn>//
- **[af1a4cbf7](https://github.com/facebook/react/commit/af1a4cbf7 )**: Revert expiration for retry lanes ([#21300](https://github.com/facebook/react/pull/21300)) //<Andrew Clark>//
- **[cc4b431da](https://github.com/facebook/react/commit/cc4b431da )**: Mark boundary as client rendered even if aborting fallback ([#21294](https://github.com/facebook/react/pull/21294)) //<Sebastian Markbåge>//

Changelog:
[General][Changed] - React Native sync for revisions f7cdc89...bd7f4a0

jest_e2e[run_all_tests]

Reviewed By: JoshuaGross

Differential Revision: D27909257

fbshipit-source-id: 36ec4cf1de9df109f1fe1542031df10a693baae0
2021-04-21 09:58:51 -07:00
Pieter Vanderwerff 06f52f7667 Deploy v0.149.0 to xplat
Summary: Changelog: [Internal]

Reviewed By: gkz

Differential Revision: D27896693

fbshipit-source-id: 2db8eea616bb6e482903cbfa6fc6d40262e958c6
2021-04-20 19:01:24 -07:00
Paige Sun d90253da36 iOS: Fix InputAccessoryView disappearing when inputAccessoryViewID exists
Summary:
InputAccessoryView disappears on Fabric (not Paper) when the text prop changes.

Changelog: [Fabric] [iOS] Fix InputAccessoryView disappearing when inputAccessoryViewID exists

Differential Revision: D27721549

fbshipit-source-id: 163dfcf0a8d5226453f4de356650a6ba82bee10b
2021-04-20 12:50:25 -07:00
David Vacca 69a48ec9d4 Fix importByteBufferAllocateDirect method
Summary:
This diff fixes the importByteBufferAllocateDirect method.
This was tested enabling importByteBufferAllocateDirect in ReadableMapBuffer.java

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27867055

fbshipit-source-id: 9ef5e93ff6c7903782598dde1c499daa82cd467b
2021-04-20 12:13:48 -07:00
David Vacca c9a69de962 Add TODOs and Tasks into TODOs
Summary:
Add TODOs and Tasks into TODOs

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27865470

fbshipit-source-id: fcc7f86b0e6b290bf9f691a2dafea18d8addf782
2021-04-20 12:13:48 -07:00
David Vacca 19d881d838 integrate asserts in ReadableMapBuffer
Summary:
This diff integrates asserts in ReadableMapBuffer

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864305

fbshipit-source-id: 0e7802a33cbf5ccfb4b845fffd14f8517bed70ec
2021-04-20 12:13:48 -07:00
David Vacca a32a636909 Fix assert in mapbufferBuilder
Summary:
This diff fixes an assert in mapbufferBuilder

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864306

fbshipit-source-id: fbeb812906441c50bf51ca71566fcd6f6e494322
2021-04-20 12:13:48 -07:00
David Vacca 0bb05789b2 Add assert in constructor of MapBuffer
Summary:
This diff adds an assert in the constructor of MapBuffer to ensure that we always access valid memory

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864310

fbshipit-source-id: bd3870b6df1dbc5181fc5d852eb0ccbc32a8a951
2021-04-20 12:13:48 -07:00
David Vacca 7d326a98f6 Refactor MapBuffer::getCount
Summary:
EZ refactor of MapBuffer::getCount and removal of TODO

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864307

fbshipit-source-id: 14138090b3f2b45de8e0a3941abec990edb427ed
2021-04-20 12:13:48 -07:00
David Vacca e2b9c61998 Add assertion when building MapBuffer
Summary:
This diff adds an assertion when trying to build a MapBuffer with invalid data

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864309

fbshipit-source-id: 6601388e56be18ded0675f92cce009a577828c16
2021-04-20 12:13:47 -07:00
David Vacca 4d9973fa59 Use explicit initial values for internal data of MapBufferBuilder
Summary:
Use explicit initial values for internal data of MapBufferBuilder

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864311

fbshipit-source-id: 1e861d90da5ba52dfe560630b50aa4e1e741f66c
2021-04-20 12:13:47 -07:00
David Vacca 8b5ad95a30 Use explicit initial values for internal data of MapBuffer
Summary:
Use explicit initial values for internal data of MapBuffer

changelog: [internal] internal

Reviewed By: sammy-SC

Differential Revision: D27864308

fbshipit-source-id: f90fb34735ba190b9ca96da245f3c478640eb537
2021-04-20 12:13:47 -07:00
Lulu Wu 49af5e7385 Create and show DatePickerDialogFragment in UI thread
Summary:
Fix 'An Unexpected error occurred' in Messenger Kids caused by DatePickerDialog.

Changelog:
[Android][Fixed] - Create and show DatePickerDialogFragment in UI thread

Differential Revision: D27882121

fbshipit-source-id: 2490a8178e5986222105bfbc16e7c0de471baa02
2021-04-20 09:27:02 -07:00
Samuel Susla e9016f8b73 Handle $$typeof call in RuntimeSchedulerBinding
Summary:
Changelog: [internal]

Explicitly return undefined for `$$typeof` inside RuntimeSchedulerBinding.

React calls `$$typeof` on RuntimeScheduler. To make sure assert only triggers if unsupported value is requested, it needs to be explicitly handled

Reviewed By: mdvacca

Differential Revision: D27854472

fbshipit-source-id: 515c68d92b291cc274f5370c45e49302534e6f9c
2021-04-20 09:22:23 -07:00
Samuel Susla 090ab0a08d Fix typo in runtime scheduler mobile config
Summary:
Changelog: [internal]

Fix typo in runtime scheduler mobile config.

Reviewed By: mdvacca

Differential Revision: D27841843

fbshipit-source-id: fa76d5f49b37fa62a4b69e8e50a883aa98864e94
2021-04-20 09:22:23 -07:00
Samuel Susla a8d0dd6646 Implement task continuation
Summary:
Changelog: [internal]

Scheduler's callback have option to add more work inside callback. This work stays on top of the priority queue and gives React ability to flush all work synchronously if need.

This diff adds use of `shouldYield_` to the workLoop. For now, it always evaluates to false. In the future when we allow access to the scheduler to native, it will allow yielding.

Relevant code in JavaScript:
https://github.com/facebook/react/blob/master/packages/scheduler/src/forks/SchedulerNoDOM.js#L190

Reviewed By: mdvacca

Differential Revision: D27823528

fbshipit-source-id: 016101e41eb7c41c2ac5abb55f803814867b8517
2021-04-20 09:22:23 -07:00
Samuel Susla ed76719f24 Pass hardcoded false argument to scheduled callbacks
Summary:
changelog: [internal]

Callback function in React is expecting a boolean parameter indicating whether the callback timed out. React team is removing it, that's why we only pass in hardcoded false.

Reviewed By: mdvacca

Differential Revision: D27794562

fbshipit-source-id: b96a7b31560524b8f38ad3bb0dbdb3b3b32ac97b
2021-04-20 09:22:23 -07:00
Rubén Norte 158e17f6a0 Fix incorrect warning on NativeEventEmitter when nativeModule is null
Summary: Changelog: [Internal]

Reviewed By: ShikaSD

Differential Revision: D27881851

fbshipit-source-id: 3b1cba618a86aff1e1c7ffbc0ea5d7047713d30a
2021-04-20 08:45:42 -07:00
Andrei Shikov de318cd318 React Native sync for revisions c9aab1c...f7cdc89
Summary:
This sync includes the following changes:
- **[f7cdc8936](https://github.com/facebook/react/commit/f7cdc8936 )**: Also turn off enableSyncDefaultUpdates in RN test renderer ([#21293](https://github.com/facebook/react/pull/21293)) //<Ricky>//
- **[4c9eb2af1](https://github.com/facebook/react/commit/4c9eb2af1 )**: Add dynamic flags to React Native ([#21291](https://github.com/facebook/react/pull/21291)) //<Ricky>//
- **[9eddfbf5a](https://github.com/facebook/react/commit/9eddfbf5a )**: [Fizz] Two More Fixes ([#21288](https://github.com/facebook/react/pull/21288)) //<Sebastian Markbåge>//
- **[11b07597e](https://github.com/facebook/react/commit/11b07597e )**: Fix classes ([#21283](https://github.com/facebook/react/pull/21283)) //<Sebastian Markbåge>//
- **[96d00b9bb](https://github.com/facebook/react/commit/96d00b9bb )**: [Fizz] Random Fixes ([#21277](https://github.com/facebook/react/pull/21277)) //<Sebastian Markbåge>//
- **[81ef53953](https://github.com/facebook/react/commit/81ef53953 )**: Always insert a dummy node with an ID into fallbacks ([#21272](https://github.com/facebook/react/pull/21272)) //<Sebastian Markbåge>//
- **[a4a940d7a](https://github.com/facebook/react/commit/a4a940d7a )**: [Fizz] Add unsupported Portal/Scope components ([#21261](https://github.com/facebook/react/pull/21261)) //<Sebastian Markbåge>//
- **[f4d7a0f1e](https://github.com/facebook/react/commit/f4d7a0f1e )**: Implement useOpaqueIdentifier ([#21260](https://github.com/facebook/react/pull/21260)) //<Sebastian Markbåge>//
- **[dde875dfb](https://github.com/facebook/react/commit/dde875dfb )**: [Fizz] Implement Hooks ([#21257](https://github.com/facebook/react/pull/21257)) //<Sebastian Markbåge>//
- **[a597c2f5d](https://github.com/facebook/react/commit/a597c2f5d )**: [Fizz] Fix reentrancy bug ([#21270](https://github.com/facebook/react/pull/21270)) //<Sebastian Markbåge>//
- **[15e779d92](https://github.com/facebook/react/commit/15e779d92 )**: Reconciler should inject its own version into DevTools hook ([#21268](https://github.com/facebook/react/pull/21268)) //<Brian Vaughn>//
- **[4f76a28c9](https://github.com/facebook/react/commit/4f76a28c9 )**: [Fizz] Implement New Context ([#21255](https://github.com/facebook/react/pull/21255)) //<Sebastian Markbåge>//
- **[82ef450e0](https://github.com/facebook/react/commit/82ef450e0 )**: remove obsolete SharedArrayBuffer ESLint config ([#21259](https://github.com/facebook/react/pull/21259)) //<Henry Q. Dineen>//
- **[dbadfa2c3](https://github.com/facebook/react/commit/dbadfa2c3 )**: [Fizz] Classes Follow Up ([#21253](https://github.com/facebook/react/pull/21253)) //<Sebastian Markbåge>//
- **[686b635b7](https://github.com/facebook/react/commit/686b635b7 )**: Prevent reading canonical property of null ([#21242](https://github.com/facebook/react/pull/21242)) //<Joshua Gross>//
- **[bb88ce95a](https://github.com/facebook/react/commit/bb88ce95a )**: Bugfix: Don't rely on `finishedLanes` for passive effects ([#21233](https://github.com/facebook/react/pull/21233)) //<Andrew Clark>//
- **[343710c92](https://github.com/facebook/react/commit/343710c92 )**: [Fizz] Fragments and Iterable support ([#21228](https://github.com/facebook/react/pull/21228)) //<Sebastian Markbåge>//
- **[933880b45](https://github.com/facebook/react/commit/933880b45 )**: Make time-slicing opt-in ([#21072](https://github.com/facebook/react/pull/21072)) //<Ricky>//
- **[b0407b55f](https://github.com/facebook/react/commit/b0407b55f )**: Support more empty types ([#21225](https://github.com/facebook/react/pull/21225)) //<Sebastian Markbåge>//
- **[39713716a](https://github.com/facebook/react/commit/39713716a )**: Merge isObject branches ([#21226](https://github.com/facebook/react/pull/21226)) //<Sebastian Markbåge>//
- **[8a4a59c72](https://github.com/facebook/react/commit/8a4a59c72 )**: Remove textarea special case from child fiber ([#21222](https://github.com/facebook/react/pull/21222)) //<Sebastian Markbåge>//
- **[dc108b0f5](https://github.com/facebook/react/commit/dc108b0f5 )**: Track which fibers scheduled the current render work ([#15658](https://github.com/facebook/react/pull/15658)) //<Brian Vaughn>//
- **[6ea749170](https://github.com/facebook/react/commit/6ea749170 )**: Fix typo in comment ([#21214](https://github.com/facebook/react/pull/21214)) //<inokawa>//
- **[b38ac13f9](https://github.com/facebook/react/commit/b38ac13f9 )**: DevTools: Add post-commit hook ([#21183](https://github.com/facebook/react/pull/21183)) //<Brian Vaughn>//
- **[b943aeba8](https://github.com/facebook/react/commit/b943aeba8 )**: Fix: Passive effect updates are never sync ([#21215](https://github.com/facebook/react/pull/21215)) //<Andrew Clark>//
- **[d389c54d1](https://github.com/facebook/react/commit/d389c54d1 )**: Offscreen: Use JS stack to track hidden/unhidden subtree state ([#21211](https://github.com/facebook/react/pull/21211)) //<Brian Vaughn>//
- **[c486dc1a4](https://github.com/facebook/react/commit/c486dc1a4 )**: Remove unnecessary processUpdateQueue ([#21199](https://github.com/facebook/react/pull/21199)) //<Sebastian Markbåge>//
- **[cf45a623a](https://github.com/facebook/react/commit/cf45a623a )**: [Fizz] Implement Classes ([#21200](https://github.com/facebook/react/pull/21200)) //<Sebastian Markbåge>//
- **[75c616554](https://github.com/facebook/react/commit/75c616554 )**: Include actual type of `Profiler#id` on type mismatch ([#20306](https://github.com/facebook/react/pull/20306)) //<Sebastian Silbermann>//
- **[1214b302e](https://github.com/facebook/react/commit/1214b302e )**: test: Fix "couldn't locate all inline snapshots" ([#21205](https://github.com/facebook/react/pull/21205)) //<Sebastian Silbermann>//
- **[1a02d2792](https://github.com/facebook/react/commit/1a02d2792 )**: style: delete unused isHost check ([#21203](https://github.com/facebook/react/pull/21203)) //<wangao>//
- **[782f689ca](https://github.com/facebook/react/commit/782f689ca )**: Don't double invoke getDerivedStateFromProps for module pattern ([#21193](https://github.com/facebook/react/pull/21193)) //<Sebastian Markbåge>//
- **[e90c76a65](https://github.com/facebook/react/commit/e90c76a65 )**: Revert "Offscreen: Use JS stack to track hidden/unhidden subtree state" ([#21194](https://github.com/facebook/react/pull/21194)) //<Brian Vaughn>//
- **[1f8583de8](https://github.com/facebook/react/commit/1f8583de8 )**: Offscreen: Use JS stack to track hidden/unhidden subtree state ([#21192](https://github.com/facebook/react/pull/21192)) //<Brian Vaughn>//
- **[ad6e6ec7b](https://github.com/facebook/react/commit/ad6e6ec7b )**: [Fizz] Prepare Recursive Loop for More Types ([#21186](https://github.com/facebook/react/pull/21186)) //<Sebastian Markbåge>//
- **[172e89b4b](https://github.com/facebook/react/commit/172e89b4b )**: Reland Remove redundant initial of isArray ([#21188](https://github.com/facebook/react/pull/21188)) //<Sebastian Markbåge>//
- **[7c1ba2b57](https://github.com/facebook/react/commit/7c1ba2b57 )**: Proposed new Suspense layout effect semantics ([#21079](https://github.com/facebook/react/pull/21079)) //<Brian Vaughn>//
- **[316aa3686](https://github.com/facebook/react/commit/316aa3686 )**: [Scheduler] Fix de-opt caused by out-of-bounds access ([#21147](https://github.com/facebook/react/pull/21147)) //<Andrey Marchenko>//
- **[b4f119cdf](https://github.com/facebook/react/commit/b4f119cdf )**: Revert "Remove redundant initial of isArray ([#21163](https://github.com/facebook/react/pull/21163))" //<Sebastian Markbage>//
- **[c03197063](https://github.com/facebook/react/commit/c03197063 )**: Revert "apply prettier ([#21165](https://github.com/facebook/react/pull/21165))" //<Sebastian Markbage>//
- **[94fd1214d](https://github.com/facebook/react/commit/94fd1214d )**: apply prettier ([#21165](https://github.com/facebook/react/pull/21165)) //<Behnam Mohammadi>//
- **[b130a0f5c](https://github.com/facebook/react/commit/b130a0f5c )**: Remove redundant initial of isArray ([#21163](https://github.com/facebook/react/pull/21163)) //<Behnam Mohammadi>//
- **[2c9fef32d](https://github.com/facebook/react/commit/2c9fef32d )**: Remove redundant initial of hasOwnProperty ([#21134](https://github.com/facebook/react/pull/21134)) //<Behnam Mohammadi>//
- **[1cf9978d8](https://github.com/facebook/react/commit/1cf9978d8 )**: Don't pass internals to callbacks ([#21161](https://github.com/facebook/react/pull/21161)) //<Sebastian Markbåge>//
- **[b9e4c10e9](https://github.com/facebook/react/commit/b9e4c10e9 )**: [Fizz] Implement all the DOM attributes and special cases ([#21153](https://github.com/facebook/react/pull/21153)) //<Sebastian Markbåge>//
- **[f8ef4ff57](https://github.com/facebook/react/commit/f8ef4ff57 )**: Flush discrete passive effects before paint ([#21150](https://github.com/facebook/react/pull/21150)) //<Andrew Clark>//
- **[b48b38af6](https://github.com/facebook/react/commit/b48b38af6 )**: Support nesting of startTransition and flushSync (alt) ([#21149](https://github.com/facebook/react/pull/21149)) //<Sebastian Markbåge>//

Changelog:
[General][Changed] - React Native sync for revisions c9aab1c...f7cdc89

jest_e2e[run_all_tests]

Reviewed By: rickhanlonii

Differential Revision: D27740113

fbshipit-source-id: 6e27204d78e3e16ed205170006cb97c0d6bfa957
2021-04-20 05:51:09 -07:00
Gijs Weterings f1d1e23b27 bump react-native-github's metro version to v0.66.0
Summary:
Updates the Metro packages used in RN to v0.66.0, excluding the Metro server, which isn't a direct dependency.

Changelog:
[Internal]

Metro changelog:
https://github.com/facebook/metro/releases/tag/v0.66.0

Reviewed By: motiz88

Differential Revision: D27879399

fbshipit-source-id: e4014772d1fed2c93b32993fa2519f4e179a25a5
2021-04-20 05:21:31 -07:00
Dulmandakh 7258afeea3 bump gradle wrapper to 6.8.3 (#31347)
Summary:
This is preparation for Gradle 7.0 version, which supports Apple Silicon natively.

## Changelog

[Android] [Changed] - Bump gradle wrapper to 6.8.3

Pull Request resolved: https://github.com/facebook/react-native/pull/31347

Reviewed By: mdvacca

Differential Revision: D27864707

Pulled By: yungsters

fbshipit-source-id: 97246cb915d6fd4ad92962f6701c4d36bbde38b5
2021-04-19 14:25:32 -07:00
Rubén Norte 114be1d217 Check existence of native methods before calling them in NativeEventEmitter
Summary:
Check the existence of `addListener` and `removeListeners` in the native module passed to `NativeEventEmitter` to determine if it can be used.

Changelog: [General][Changed] Show warning when native module without `addListener` or `removeListeners` is passed to `NativeEventEmitter`

Reviewed By: yungsters

Differential Revision: D27851425

fbshipit-source-id: c0ad3ba65a9239f5bf84548dab36e8dfbc51058a
2021-04-19 13:14:38 -07:00
Kevin Gozali 1fc1873c21 iOS: introduced 2 levels of architecture enforcement
Summary:
To prepare for the new architecture, introduce the following enforcement:
* Defining `RCT_NEW_ARCHITECTURE` in the build flag automatically enables violation reporting
  * At runtime, call RCTEnableNewArchitectureViolationReporting() to enable/disable reporting - it takes effect with the future violations
* When violation reporting is enabled:
  * RCTWarnNotAllowedForNewArchitecture(): log warning about a violation, but doesn't assert
  * RCTEnforceNotAllowedForNewArchitecture(): assert when a violation happen

Also in this commit:
* Add warning when RCTRegisterModule() is called as a side effect of RCT_EXPORT_MODULE(). Many modules still need this, so we can't enforce it yet.
* Add enforcement when the bridge is initialize, because the new architecture cannot have the bridge.

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D27847359

fbshipit-source-id: a8c4a8151cec3915ec707ce6b78f860af4bb0708
2021-04-18 23:01:52 -07:00
Nadiia D 17be3a0032 Remove legacy context API usage
Summary:
Changelog:
[General][Removed] - Remove legacy context API usage in AppContainer

Reviewed By: kacieb

Differential Revision: D27681097

fbshipit-source-id: 7391be577955171ade5b8fd53cf274900f88e7ca
2021-04-18 16:40:40 -07:00
Pedro Veras 2052bb63b5 Allow inspector to compile in fbcode
Summary:
The fbcode version of Skylight needs this and it is already compiling fine

Changelog: [Internal]

Reviewed By: dulinriley

Differential Revision: D27765879

fbshipit-source-id: 18aca2756f39326fb90397a10a67583db84076fd
2021-04-17 08:32:52 -07:00
Kacie Bawiec 2824b68ee8 Remove defaultProps from KeyboardAvoidingView
Summary:
Changelog:
[General][Removed] Remove defaultProps from KeyboardAvoidingView

Reviewed By: lunaleaps

Differential Revision: D27770146

fbshipit-source-id: 61d56c50978cc67287d56349283959b9a32c9a0b
2021-04-16 18:30:22 -07:00
Héctor Ramos bdfe2a5179 Avoid encoding local path in Podfile.lock
Summary:
The `SPEC CHECKSUM` for `FBReactNativeSpec` in `packages/rn-tester/Podfile.lock` and in standalone apps's `ios/Podfile.lock` varies between development machines. This is caused by local paths in the output of `pod ipc spec FBReactNativeSpec.podspec`, such as `output_files` and `prepare_command`. This causes the Podfile.lock to constantly change when pod install is run on different developers' machines.

The codegen script and CocoaPods configuration have been updated to use relative paths.

Closes https://github.com/facebook/react-native/issues/31193

Changelog: [Internal] [Codegen] Avoid encoding local path in Podfile.lock

Reviewed By: fkgozali

Differential Revision: D27754337

fbshipit-source-id: 2f5607d4e1ce21489f28f394cb852c36cace6798
2021-04-16 14:42:34 -07:00
Carlos Cuesta 697164077c Disable `accessibilityState` when `TouchableWithoutFeedback` is `disabled` (#31297)
Summary:
Disable `accessibilityState` when the `TouchableWithoutFeedback` is `disabled`. This fixes https://github.com/facebook/react-native/issues/30953

## Changelog

[General] [Changed] - Disable `accessibilityState` when the `TouchableWithoutFeedback` is `disabled`.

Pull Request resolved: https://github.com/facebook/react-native/pull/31297

Test Plan: Tested the `TouchableWithoutFeedback` component on an Android device

Reviewed By: nadiia

Differential Revision: D27770689

Pulled By: kacieb

fbshipit-source-id: a317246021354ed288b093f8a5e6fbba43d3a04e
2021-04-16 14:37:38 -07:00
Riley Dulin 9e21d54cfc Depend on fbjni directly instead of native/fb
Summary:
The Inspector uses fbjni/JThread.h on Android platforms to get a Java
thread (with a class loader). Use a smaller scope dependency to bring
in fewer things.

Changelog: [Internal]

Reviewed By: neildhar

Differential Revision: D27799508

fbshipit-source-id: 3e1e00cf65596d12c9128fe636ed970238f4aba2
2021-04-16 11:48:21 -07:00
Samuel Susla 318e9f283e Execute multiple tasks within single dispatch
Summary:
Changelog: [internal]

This brings native scheduler close to React's scheduler. React's scheduler executes all tasks in the queue within a single dispatch (they use setTimeout(0) for dispatch) and makes sure to not schedule two dispatches.

Relevant JS code:
https://github.com/facebook/react/blob/master/packages/scheduler/src/forks/SchedulerNoDOM.js#L359

Reviewed By: JoshuaGross

Differential Revision: D27793200

fbshipit-source-id: 4af13d95cfe4d33d0945f25929ccbea5f9ce5710
2021-04-16 08:16:41 -07:00
Tim Yung d46c87efe4 Back out "Update React DevTools deps from 4.6 -> 4.12"
Summary:
Reverts D27764688 (5a2693d78f) due to a bug with "Invalid hook call." being erroneously reported. We will upgrade again after that bug is resolved.

Changelog:
[Internal]

Reviewed By: fkgozali

Differential Revision: D27813660

fbshipit-source-id: 84a12f19cf1bb7e8aebef0da3ff6f7022c391d3e
2021-04-15 21:16:29 -07:00
Héctor Ramos ae07c53d0b Resolve "fatal: not a git repository" error outside of git repositories
Summary:
CocoaPods will display a "fatal: not a git repository" when these podspecs are consumed within Facebook's internal Mercurial repository due to the reliance on `git` to obtain the current commit hash.

In these cases, the podspec is being consumed locally and the commit hash is unnecessary.

The error is removed by avoiding the use of `git` if the current working directory is not a git repository (or any of the parent directories).

Changelog:
[Internal] [iOS] - Remove CocoaPods error within Facebook's repository

Reviewed By: fkgozali

Differential Revision: D27750974

fbshipit-source-id: 99159611c580baf5526f116948c5ff60e1c02e5c
2021-04-15 13:30:31 -07:00
Ramanpreet Nara e1eb938c9d Create rn_codegen BUCK macro (#31340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/31340

Changelog: [Internal]

Reviewed By: yungsters

Differential Revision: D27669950

fbshipit-source-id: 3129d87da8f74d896c0b9e82799b8896b3ed7635
2021-04-15 13:27:38 -07:00