Summary:
Currently `YGNodeMarkDirty()` assert message displayed **without** space between 2 lines:
```
"Only leaf nodes with custom measure functionsshould manually mark themselves as dirty"
^^^^^^^^^^^^^^^
```
This minor PR fixes it :)
X-link: https://github.com/facebook/yoga/pull/1243
Reviewed By: jacdebug
Differential Revision: D44870410
Pulled By: javache
fbshipit-source-id: 58db50106e8e2980ec84c99976f569b94b739d9b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36867
This will make it consistent with rn_codegen() kwargs, and because android_package_name is not just limited to native_module's
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D44857744
fbshipit-source-id: 37a8a69b443ffc8bfbaa145b0f21270a0f3515d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36866
For consistency with internal build rules, rename this kwarg. This will make it easier to keep both internal and external usages consistent.
Changelog: [General][Changed] react-native-codegen: Buck-only: renamed src_prefix kwarg
Reviewed By: sammy-SC
Differential Revision: D44857745
fbshipit-source-id: 475658281a6c2846be42e130f81e23dfcae5856b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36616
Changelog: [iOS][Internal] - Add basic emitting of click event
This diff adds the basic implementation of click event emitting, particularlly focused on ensuring clicks are only fired if the pointer interaction ends within the same tree "branch" of elements as which it started.
Reviewed By: yungsters
Differential Revision: D44148427
fbshipit-source-id: 9e91c32fe0e1ca8a5c50e72cd819625294e070f4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36805
**Changelog:** Export macOS specific dependencies for react-native-codgen
[Internal][Changed] - RN macOS uses an older version of React Native (0.68) so we need to specify macOS specific dependencies when running codegen for RN Desktop
Reviewed By: christophpurrer
Differential Revision: D44687704
fbshipit-source-id: 9dcabc88d4abf17845db0844c952f1cb4a13e3ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36843
It already consumes .ts files for native module specs, but not for native components, so let's enable it.
Changelog: [General][Fixed] react-native-codegen Buck support: also process .ts files for native component specs
Reviewed By: cortinico
Differential Revision: D44735387
fbshipit-source-id: 7173e07280dfaec06f08347838824827ef88e31a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36840
Changelog: [Internal] - W3CPointerEvents: use description to indicate HW requirements for tests
As title. This lets users/testers know whether additional hardware is required to run each test and can give info on the test status (e.g. whether it's expected to fail). Tests with no description should be assumed to work without any special requirements.
Reviewed By: vincentriemer
Differential Revision: D44687709
fbshipit-source-id: 6a23344c4cce6917f3cf5cd3ada0c75b813b5abe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36795
This change bump the min iOS version for React Native to 13.4, to align with company guidelines.
## Changelog:
[iOS][Changed] - Moved the min iOS version to 13.4
Reviewed By: cortinico
Differential Revision: D44634663
fbshipit-source-id: 035e8fcbb395f7394f8253e3ec485ad9937531c2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36819
X-link: https://github.com/facebook/metro/pull/964
This diff creates a new hook to the Metro symbolicator. `customizeStack` aims to provide a whole stack modification hook on the output of the `/symbolicate` endpoint.
The purpose of this hook is to be able to apply callsite-based modifications to the stack trace. One such example is user-facing frame skipping APIs like FBLogger internally.
Consider the following API:
```
FBLogger('my_project')
.blameToPreviousFile()
.mustfix(
'This error should refer to the callsite of this method',
);
```
In this particular case, we'd want to skip all frames from the top that come from the same source file. To do that, we need knowledge of the entire symbolicated stack, neither a hook before symbolication nor an implementation in `symbolicator.customizeFrame` are sufficient to be able to apply this logic.
This diff creates the new hook, which allows for mutations of the entire symbolicated stack via a `symbolicator.customizeStack` hook. The default implementation of this simply returns the same stack, but it can be wrapped similar to `symbolicator.customizeFrame`.
To actually have information for this hook to act on, I've created the possibility to send additional data to the metro `/symbolicate` endpoint via an `extraData` object. This mirrors the `extraData` from https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/NativeExceptionsManager.js#L33, and I've wired up LogBox to send that object along with the symbolicate call.
Changelog:
[General][Added] - Added customizeStack hook to Metro's `/symbolicate` endpoint to allow custom frame skipping logic on a stack level.
Reviewed By: motiz88
Differential Revision: D44257733
fbshipit-source-id: 05cd57f5917a1e97b0520e772692ce64029fbf8a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36652
I can't find any usecases for them, and JavaScript stack symbolication during development should probably just exclusively be done from the JS environment.
Changelog:
[Android][Removed] - Deleted obsolete native methods DevServerHelper.symbolicateStackTrace and DevServerHelper.openStackFrameCall
Reviewed By: motiz88
Differential Revision: D44257731
fbshipit-source-id: d090ecf413526c31d5fb028507d22fc7992e74b7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36841
## Changelog:
[Internal] -
A follow-up to D44712550, which did not take into account that there may be incompatibility between app's binary and JS code.
Note that this is for VR apps only, as other platforms don't (yet) use the module in question (WebPerformance).
Reviewed By: javache
Differential Revision: D44751928
fbshipit-source-id: 6a029f5725dd45abded7dda3325debe864f29ca0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36820
## Changelog:
[Internal] -
A follow-up to the D44584166 (which was abandoned, but this change makes sense nevertheless).
This allows to selectively enable logging of certain event types regardless of whether they are observed or not. For now it's marks and measures, but potentially it may be also e.g. navigation/resource entries.
Also expands unit tests for the JS side of the `Performance` API correspondingly.
Note that "always logged" and "observed" have different semantics. An "always logged" entry won't be sent back from native to JS, unless either:
* explicitly requested via `Performance.getEntries*`
* actually observed via `PerformanceObserver`
Reviewed By: rubennorte
Differential Revision: D44712550
fbshipit-source-id: 7fc891b09bd00fa9b510d1dc059cf908d5caea07
Summary:
Just backporting to main a couple of fixes we've done in the 0.72 branch plus removing the old bash script to avoid confusion (since now it's more broken than ever)
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [FIXED] - fix the local e2e script post monorepo & metro-config work
Pull Request resolved: https://github.com/facebook/react-native/pull/36836
Test Plan:
Run `yarn test-e2e-local` successfully, both for RNTester & RNTestProject scenarios.
Here's a screenshot if RNTestProject working successfully:
<img width="1501" alt="Screenshot 2023-04-06 at 14 20 54" src="https://user-images.githubusercontent.com/16104054/230394301-49ea5752-27ad-4800-b56e-004fd88e9c44.png">
Reviewed By: rshest
Differential Revision: D44748037
Pulled By: cipolleschi
fbshipit-source-id: d00438bd766e8f228120f7bbceef2013cf9c966f
Summary:
Pointing users towards our issue tracker is not really effective as the underlying issue is a misconfiguration of their environment. I'm tweaking this error message.
## Changelog:
[INTERNAL] - Update react-native-xcode.sh to do not point users towards our issue …
Pull Request resolved: https://github.com/facebook/react-native/pull/36837
Test Plan: n/a just a string change
Reviewed By: cipolleschi
Differential Revision: D44748094
Pulled By: cortinico
fbshipit-source-id: 6d960268eb7324b86ff5e4d3d5ddf4bbe67c2349
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36832
We used to use `cleanAll` instead of `clean` to do cleaning of everything due to a bug on AGP on how clean was performed.
The bug is resolved, so we can now use `clean` properly.
Moreover, we have sporadic failures when the codegen/lib/ folder is not cleaned up. This fixes it.
Changelog:
[Internal] [Changed] - Rename cleanAll to clean and refine it
Reviewed By: cipolleschi
Differential Revision: D44745849
fbshipit-source-id: 4da5d34bcb0ee5c9f6b0e0f4e5b919bcc3171270
Summary:
Changelog: [Android] [Breaking] - Renamed FabricMountItem.* files to MountItem.* to better match the name of the struct.
Pull Request resolved: https://github.com/facebook/react-native/pull/36722
Reviewed By: cortinico, cipolleschi
Differential Revision: D44540079
fbshipit-source-id: 79d8aa7c6f6b908be52009c51c4ea2f601f788fd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36804
AnimatedObject is a more generic version of AnimatedTransform, able to handle animated values within arrays and objects. This is useful for props of native components that may need to be animated per field.
This diff adds the native (iOS) counterpart to AnimatedObject node in JS. The node handles array and map value types.
Changelog:
[Internal][Added] - Introduce ObjectAnimatedNode iOS-side node for handling array and object prop values
Reviewed By: philIip
Differential Revision: D44678162
fbshipit-source-id: 7cdc075229a55fcb450f23ba5667b3ddd48c24df
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36615
Changelog: [Internal] - Add plumbing/boilerplate for an iOS implementation of the `click` event
This diff simply adds the boilerplate necessary to hook up a click event to the fabric iOS touch handler. This diff does not contain any actual implementation of the click's behavior as that will occur in future diffs.
Reviewed By: necolas
Differential Revision: D43129366
fbshipit-source-id: 71488b893c789d21c833533471745275062c0730
Summary:
- Add a typescript project to test `CodegenSchema.d.ts`. More tests for other .d.ts files will be added in future pull requests.
- The build script scans all snapshots from `react-native/codegen`'s typescript frontend and generates .ts files for each snapshot, but they are .gitignore-ed.
- `npm run build` will build these .ts files against `CodegenSchema.d.ts` after generating them.
- A failed jest case is included to ensure CI catch it, it will be removed before merged.
bypass-github-export-checks
## Changelog:
[General] [Added] - Add react-native/codegen-typescript-test to verify .d.ts files in react-native/codegen (1)
Pull Request resolved: https://github.com/facebook/react-native/pull/36562
Test Plan:
`npm run build` in `packages/react-native-codegen-typescript-test` and see all test files appear in `__generated__`.
## Screenshot

Reviewed By: rshest
Differential Revision: D44292277
Pulled By: cipolleschi
fbshipit-source-id: 8d79fe913f9563d64c92aae7c4f4e97a24ae9a21
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36742
AnimatedObject is a more generic version of AnimatedTransform, able to handle animated values within arrays and objects. This is useful for props of native components that may need to be animated per field.
This diff adds the native (Android) counterpart to AnimatedObject node in JS. The node handles array and map value types.
Changelog:
[Internal][Added] - Introduce ObjectAnimatedNode Java-side node for handling array and object prop values
Reviewed By: mdvacca
Differential Revision: D44466563
fbshipit-source-id: bd026cbd921ec51ae17eab08417708f3272c0418
Summary:
Implement a few missing bits for `maintainVisibleContentPosition` to work with fabric. The main thing needed is to add 2 fabric renderer listener methods to allow to hook into specific parts of the rendering process. We need some code to execute before view updates are executed and after view updates are executed. The current methods that are exposed do not work for this case. `willDispatchViewUpdates` is called from JS thread, and there doesn't seem to be a way to add UI blocks that will be executed at the right time like we do in paper. `didDispatchMountItems` is called for every frame which we don't want and will cause lots of overhead.
After that we simply need to call the right methods in the new renderer listener methods.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID] [ADDED] - Add fabric support for maintainVisibleContentPosition on Android
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/35994
Test Plan: Tested in RN tester maintainVisibleContentPosition example on Android with fabric enabled.
Reviewed By: cipolleschi
Differential Revision: D44131763
Pulled By: cortinico
fbshipit-source-id: 32c0b5867d460537b18a70d472fd58052da6cf80
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36814
Working through the backlog of failing open source requirements (T139285789). Most files that are violating Copyright rules are due to the exemptions being outdated, but this file actually needs a header.
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D44705585
fbshipit-source-id: 0319be3be0726a76cd98448205f5af76343ad356
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36811
Editing frequently the `.github/workflow` folder makes harder to use the
`/rebase` command as it fails if there are edits to such folder in the middle
of a rebase.
I'm moving the .js files outside of that folder.
Changelog:
[Internal] [Changed] - Do not store scripts inside .github/workflows
Reviewed By: sshic
Differential Revision: D44705878
fbshipit-source-id: a8007d6c126dbda2a1ee9d8cb0397df5df43fd63
Summary:
Small refactor in preparation for adding `ReactNativeElement` as an alternative implementation for `ReactFabricHostComponent`.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: yungsters
Differential Revision: D44299619
fbshipit-source-id: b1bc43f6a6ae5b75dca43d7e08cd15acdc49bb79
Summary:
We recently added an implementation of the native binding for UIManager (`global.nativeFabricUIManager`) in JavaScript. This brings the logic we had in that mock in the React repository so we can properly use it for testing (as integration tests instead of unit tests).
Changelog: [internal]
bypass-github-export-checks
Reviewed By: yungsters
Differential Revision: D44298377
fbshipit-source-id: 6085df93993302c2ddce7220c73e614ad6301667
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36802
As we now support a broader range of ruby version, we don't need `update-ruby.sh` anymore
and we also don't need to call it during the set-rn-version script.
Changelog:
[Internal] [Changed] - Remove the update-ruby script as it's now unnecessary
Reviewed By: cipolleschi
Differential Revision: D44670361
fbshipit-source-id: b23abab28ccbd27408e4d76670101faeb463bc6b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36798
AnimatedObject is a more generic version of AnimatedTransform, able to handle animated values within arrays and objects. This is useful for props of native components that may need to be animated per field.
This diff hooks up AnimatedObject to AnimatedProps and AnimatedStyle for values that are arrays or objects.
Changelog:
[Internal][Added] - Modify AnimatedProps and AnimatedStyle to use AnimatedObject
Reviewed By: rshest
Differential Revision: D44637985
fbshipit-source-id: c70b9d40e40d0782c2c1a332f1f22358fe0abe64
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36785
D43553742 adds support for ObjectPreviews in CDP messages; this diff implements support in the Inspector for honoring generatePreview requests and returning ObjectPreviews in the relevant request messages.
Changelog: [Internal]
Reviewed By: mattbfb
Differential Revision: D44522932
fbshipit-source-id: 216debe36b4e61c822fa3ae513e5eba399fad019
Summary:
Adding a new github workflow script, which will run as part of the existing triage job that is triggered when an issue is labeled with the "Needs: Triage" label (this typically happens automatically when the issue is created).
This script will add an extensive list of possible labels corresponding to APIs, components, and topics (see the code for the full list).
The motivation for this change is to replace the last bit of meaningful functionality performed by react-native-bot, which will allow us to decommission that bot in favor of using github workflows for all issue and PR automation.
## Changelog:
[INTERNAL] [CHANGED] - Updated API, topic, component labeling on issues to run from a GH workflow rather than an external bot action
Pull Request resolved: https://github.com/facebook/react-native/pull/36712
Test Plan:
For examples of issues being labeled by this new script, see the open issues here: https://github.com/SlyCaptainFlint/react-native/issues
I did not test every possible label, but I tested at least one from each category (API, component, topic), and a combination of one or two of each.
Reviewed By: cortinico, cipolleschi
Differential Revision: D44593658
Pulled By: SlyCaptainFlint
fbshipit-source-id: 93758d05a70d02bed76ab0b6149271e757e0a12f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36791
This is a re-land of D44635949. It was reverted as it was a suspected cause of CircleCI fails. It turned out the diff was unrelated, and the cause was something else.
## Changelog
[Internal][Security] - Use execFileSync over exec for cases with uncontrolled absolute paths
Reviewed By: cortinico
Differential Revision: D44663132
fbshipit-source-id: dfb3d09dbfbe3312ef54bcbbc43c8b4062d787a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36781
----
Add support to msggen for types like:
* Runtime.CustomPreview
* Runtime.EntryPreview
* Runtime.ObjectPreview
* Runtime.PropertyPreview
And their related use as properties.
There was quite a gap here. The work involves:
* Upgrade devtools-protocol to 0.0.1107588 even pick up the schema definitions in the first place.
* Next problem: all the preview stuff is experimental. Had to add support to --include-experimental flag for targeting types AND properties.
* Next problem: the protocol schema for previews is cyclical. ObjectPreview refers to PropertyPreview and EntryPreview, which both refer back to ObjectPreview. msggen only allowed for DAGs. Added support for allowing cycles.
* Next problem: Forward declarations are not enough to compensate for the cyclical references, because of the incomplete type definitions. This breaks optional, vector, and simple containment. To address this:
* In the graph traversal code, where before we would error if the graph had a cycle, we allow for the cycle, but record the cyclical reference from a property on Type B's to Type A.
* Whenever we emit the definition of Type B, its references to Type A are not naked, they are now wrapped in a unique_ptr.
* However, because the unique_ptr only has a forward declaration, and not a complete type, we need to specify a custom deleter.
* Next problem: There are lots of cases where these types that now contain unique_ptrs were being copied, which no longer works. So, make all these codegen'd types move-only, and change a few places where were copying root objects, to move them instead.
* Many tests required changes to avoid copy construction/assignment that were occuring. MessageTypes are not copyable construcrtible/assignable now.
Changelog: [Internal]
Reviewed By: jpporto
Differential Revision: D43553742
fbshipit-source-id: 1e4c495aa600feb6f1901e6bc013d517ba8d8a2d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36778
Changelog: [Internal]
we can just use mockito for this suite
Reviewed By: mdvacca
Differential Revision: D44603023
fbshipit-source-id: b8f6f37fccba38990fe498d8f5e479f174ff93af
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36779
Deprecate and mark for removal com.facebook.react.common.StandardCharsets, this class was originally created because java.nio.charset.StandardCharsets only exists in Android API level 19+
As part of this diff I also migrate all internal usages of com.facebook.react.common.StandardCharsets
Changelog:
[Android][Deprecated] - Deprecate and mark for removal com.facebook.react.common.StandardCharsets, please use java.nio.charset.StandardCharsets instead
Reviewed By: rshest
Differential Revision: D44592721
fbshipit-source-id: c3f4286766209a733b466d19dc36891f12d69be1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36796
As the title says, this fixes a instacrash on template when `createRootView` is invoked with
a bundle being null. The crash was happening as the parameter, despite being not used, is
specified as `Bundle` and is not nullable. When the Java caller passes `null`, the app crashes.
Changelog:
[Android] [Fixed] - Fix a crash new app template when `createRootView` is invoked with null bundle
Reviewed By: cipolleschi
Differential Revision: D44668305
fbshipit-source-id: 1150ddac26f19765e7340878c8850d8462c6f3fd
Summary:
Adds changelog for new patches.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Changed] - add changelog entry for 0.71.6, 0.70.8 and 0.69.9
Pull Request resolved: https://github.com/facebook/react-native/pull/36792
Test Plan: N/A
Reviewed By: cortinico
Differential Revision: D44663440
Pulled By: cipolleschi
fbshipit-source-id: d84e997784c1ecfb02968fecf147b2ef558d4381
Summary:
This exposes a new method in the private interface used by React so we can merge https://github.com/facebook/react/pull/26516
We're adding support for text instances in React Native (as defined in https://github.com/react-native-community/discussions-and-proposals/pull/607). See D44632362 for the full implementation.
Changelog: [internal]
bypass-github-export-checks
Reviewed By: sammy-SC
Differential Revision: D44663223
fbshipit-source-id: 70ca3ca9d2edefaa73a396f43c2d560c6d1422f1
Summary:
Yesterday, CLI published version 11.1.1 which has a strong dependency on `react-native/metro-config` 0.72.
On `main`, all the packages we publish to test the template have version 0.73.
So, when running tests on the template, the cli was looking for a `metro-config` version 0.72, but it could not find it as verdaccio
only has version 0.73.
Together with Callstack, we released a version 12.0.0-alpha.0 of the CLI which have the right dependency on metro-config v0.73, so that
our CI can be green again.
bypass-github-export-checks
## Changelog:
[General][Fixed] - Bumped CLI dependency on main to 12.0.0-alpha.0
Pull Request resolved: https://github.com/facebook/react-native/pull/36793
Test Plan: CircleCI must be green
Reviewed By: huntie
Differential Revision: D44663381
Pulled By: cipolleschi
fbshipit-source-id: 30d341d55243318ce278a6e67a9e77ccfb90cafd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36780
Original commit changeset: 8e0ebb070768
Original Phabricator Diff: D44131032
Changelog: [Internal]
all the circleCI template tests started failing after this commit, revert!
Reviewed By: jacdebug, cortinico
Differential Revision: D44635949
fbshipit-source-id: 429167acdbee3ebf6d81491ac65896c534c18fd0
Summary:
This PR is adding examples of Turbo Modules functions throwing runtime exceptions and asserts. This should make it easier to collaborate and develop the error reporting for a new architecture that is being discussed in the React Native New Architecture Working Group -> https://github.com/reactwg/react-native-new-architecture/discussions/122.
I'm not sure what return type should be used for the JS function returning `Promise<void>` in Cxx, I used [`AsyncPromise<jsi::Value>`](https://github.com/facebook/react-native/pull/36729/files#diff-9cebc75f48fd35fd6fef71138f98dfd0ba28a754b2aab0d6fe44fd685f74ce16R135), what would you use, I've not found `void` type to use?
### Added functions
The table shows the current behavior.
<table>
<tr>
<td> Function
<td> Description
<td> Turbo Module
<td> Cxx Module
<tr>
<td> voidFuncThrows
<td> function with return type void throws a runtime exception
<td> platform error no JS stack trace
<td> JS error no native stack trace
<tr>
<td> getObjectThrows
<td> function with return type object throws a runtime exception
<td> JS error no platform stack trace
<td> JS error no native stack trace
<tr>
<td> promiseThrows
<td> function with return type promise throws a runtime exception before settling the promise
<td> platform error no JS stack trace
<td> JS error no native stack trace
<tr>
<td> voidFuncAssert
<td> function with return type void asserts
<td> platform error no JS stack trace
<td> native error no JS stack trace
<tr>
<td> getObjectAssert
<td> function with return type object asserts
<td> JS error no platform stack trace
<td> native error no JS stack trace
<tr>
<td> promiseAssert
<td> function with return type promise asserts before settling the promise
<td> platform error no JS stack trace
<td> native error no JS stack trace
</table>
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[INTERNAL] [ADDED] - Error reporting examples in rn-tester turbo modules
Pull Request resolved: https://github.com/facebook/react-native/pull/36729
Test Plan:
This PR doesn't change any RN behavior. Only shows the current state by adding an example to rn-tester.
I'm happy to add these examples to the unit/integration test, just point me to where would be a good place.
Reviewed By: rshest
Differential Revision: D44623027
Pulled By: javache
fbshipit-source-id: d9cc04852b05d810ed11d7a94f1b2d455ef554a5