Summary:
We're trying to pass `jsi::Value`s directly to our view components (and convert them to java/swift types manually). That way we can pass "complex" objects to our views (such as `jsi::Object`s with `NativeState` attached, without the need to convert them to e.g. `folly::dynamic`).
On android we store our complex prop values on the `StateWrapperImpl` to pass the complex types between c++ and java/kotlin. See an example here:
https://github.com/hannojg/nitro/blob/2378fe7754294c496b2cbcd62f7109529e276427/packages/react-native-nitro-image/nitrogen/generated/android/c%2B%2B/JValueFromStateWrapper.cpp#L21-L23
```
const auto& customStateData = dynamic_cast<const ConcreteState<CustomStateData>&>(state);
CustomStateData data = customStateData.getData();
std::shared_ptr<HybridTestObjectSwiftKotlinSpec> nativeProp = data.nativeProp;
```
> (And then it might be used in java like this:)
https://github.com/hannojg/nitro/blob/2378fe7754294c496b2cbcd62f7109529e276427/packages/react-native-nitro-image/android/src/main/java/com/margelo/nitro/image/NitroExampleViewManager.java#L31-L38
```kotlin
public Object updateState(NonNull View view, ReactStylesDiffMap props, StateWrapper stateWrapper) {
StateWrapperImpl stateWrapperImpl = (StateWrapperImpl) stateWrapper;
HybridTestObjectSwiftKotlinSpec nativeProp = ValueFromStateWrapper.valueFromStateWrapper(stateWrapperImpl);
long value = nativeProp.getBigintValue();
Log.d("NitroExampleViewManager", "Value from state: " + value);
```
For that we need to be able to access the underlying state, which is what we added in this PR.
## 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
-->
[ANDROID] [ADDED] - Added `getState` method for `StateWrapperImpl`
Pull Request resolved: https://github.com/facebook/react-native/pull/48255
Test Plan: Internal change, just make sure all tests are passing
Reviewed By: cipolleschi
Differential Revision: D67196130
Pulled By: javache
fbshipit-source-id: 7da74bcddef79abd3122baaad1bfce30330ecc80
Summary:
I was getting build errors when I tried to include `StateWrapperImpl.h` in my library's code on android. The error was:

```
node_modules/react-native/ReactAndroid/build/prefab-headers/reactnative/react/fabric/StateWrapperImpl.h:11:10: fatal error: 'react/common/mapbuffer/JReadableMapBuffer.h' file not found
#include <react/common/mapbuffer/JReadableMapBuffer.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
```
The problem is that the map buffer files inside the mapbuffer folder are nested, so the prefab outcome looks like this:

Hence it can't resolve the header path.
This change removes the header prefix part as its not needed, since the nested folder structure in mapbuffer already matches what we need, see:
https://github.com/facebook/react-native/tree/main/packages/react-native/ReactAndroid/src/main/jni/react/mapbuffer
## 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
-->
[ANDROID] [FIXED] - Fixed build issue when including mapbuffer jni headers in library code
Pull Request resolved: https://github.com/facebook/react-native/pull/48243
Test Plan:
make sure the header path looks correct in the prefab build dir:

Reviewed By: cipolleschi
Differential Revision: D67200010
Pulled By: cortinico
fbshipit-source-id: 127a17392fcca0a3a07643497729979849f0a17a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48222
Changelog: [internal]
Tiny improvement over the current setup so it might help detect some current issues.
Reviewed By: yungsters
Differential Revision: D67021976
fbshipit-source-id: 7829f2ea0d839178f1a50d176b42dc0906c2e585
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48188
Yoga is full of bugs! Some of these bugs cannot be fixed without breaking large swaths of product code. To get around this, we introduced "errata" to Yoga as a mechanism to preserve bug compatibility, and an `experimental_layoutConformance` prop in React Native to create layout conformance contexts. This has allowed us to create more compliant layout behavior for XPR.
This prop was originally designed as a context-like component, so you could set a conformance level at the root of your app, and individual components could change it for compatibility. This was difficult to achieve at the time, without introducing a primitive like `LayoutConformanceView`, which itself participated in the view tree. This prop has not been the desired end-goal, since it does not make clear that it is setting a whole new context, effecting children as well!
Now that we've landed support for `display: contents`, we can achieve this desired API pretty easily.
**Before**
```
import {View} from 'react-native';
// Root of the app
<View {...props} experimental_layoutConformance="strict">
{content}
</View>
```
**After**
```
import {View, experimental_LayoutConformance as LayoutConformance} from 'react-native';
// Root of the app
<LayoutConformance mode="strict">
<View {...props}>
{content}
</View>
</LayoutConformance>
```
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66910054
fbshipit-source-id: e6a304b5c30ad3c5845a7ce2d1021996a74c2f34
Summary:
This module is no longer functional, the global method `pokeSamplingProfiler` does not exist. There are no implementations in the core of `JSCSamplingProfiler` (removed back in 2019! - https://www.internalfb.com/diff/D10473627)
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D67140119
fbshipit-source-id: 9dfe80d63e935004ef4a1956e8a7a544a2f9a8c1
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48073
Small change so we can know what the final value of the feature flag will be
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D64077789
fbshipit-source-id: 2a9e2c7ceeb18813b4556f92db547697bba966a5
Summary:
In this PR we added a change that allows the RawPropsParser to construct its RawValues directly from the `jsi::Value` instead of converting it to `folly::dynamic` first.
We added a global feature flag to turn this on, however, for migrations it might be better to use this functionality as an opt-in on a component basis. With this change `ComponentDescriptors` can now create their RawPropsParser instance with the `useRawPropsJsiValue` flag to opt into it.
(Note: a few more changes are needed to make this accessible to the `ComponentDescriptor`, for which I opened [this follow up PR here](https://github.com/facebook/react-native/pull/48232))
## 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] - Added `useRawPropsJsiValue` parameter to `RawPropsParser` to opt into skipping folly::dynamic conversions during prop parsing.
Pull Request resolved: https://github.com/facebook/react-native/pull/48231
Test Plan: Internal change / just make sure all tests are passing.
Reviewed By: NickGerleman
Differential Revision: D67139641
Pulled By: javache
fbshipit-source-id: 5b243edb8149870aad0a5a1b3998ee67997783d7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48242
This std::function is immediately invoked, no need to copy it around.
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D67093042
fbshipit-source-id: 2b863fb1857da73568afaf6f3d3c8c7bbef0d61b
Summary:
### Motivation
- We need to exclude certain prop keys from conversion to `folly::dynamic` on android for our custom use case where we pass down `jsi::object`s with NativeState attached down the props
Otherwise we run into crashes such as:

### Changes
- `dynamicFromValue` was marked as `noexcept` although it can throw, I removed the `noexcept` for correctness
- Made it so you can pass down a filter function to exclude certain props from conversion (using the existing mechanism for that)
- I think there is no way to pass a filter function and retain it in `RawProps` as that is constructed very early on in `UIManagerBinding`
## 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] - Allow passing a filter function to `BaseViewProps` to exclude certain props on android from being dynamically casted
Pull Request resolved: https://github.com/facebook/react-native/pull/48202
Test Plan:
You can try modifying for example `ScrollViewProps.cpp` and pass a fourth argument to `ViewProps` to confirm that the filtering is working:
```cpp
ScrollViewProps::ScrollViewProps(
const PropsParserContext& context,
const ScrollViewProps& sourceProps,
const RawProps& rawProps)
: ViewProps(context, sourceProps, rawProps, [&](const std::string& keyName){
return true;
}),
```
Reviewed By: NickGerleman
Differential Revision: D67088540
Pulled By: javache
fbshipit-source-id: ed8cf5d773d357dfc54553f5ccf7adf27c781d56
Summary:
Apple introduced system font families
```
font-family: system-ui;
font-family: ui-sans-serif;
font-family: ui-serif;
font-family: ui-monospace;
font-family: ui-rounded;
```
for Safari at 2020 (see https://developer.apple.com/videos/play/wwdc2020/10663/?time=872).
This PR implementation supports above font families on iOS.
bypass-github-export-checks
## Changelog:
[IOS] [ADDED] - Support system font families (system-ui, ui-sans-serif, ui-serif, ui-monospace, and ui-rounded) on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/47544
Test Plan: Run `RNTester` and view the `Text` component where shows the usage for those font families.
Reviewed By: NickGerleman
Differential Revision: D65761307
Pulled By: cipolleschi
fbshipit-source-id: 18628160b7753b314389e887cddfe9d0ec96ee1d
Summary:
This PR converts the HelloWorld app to Swift. The HelloWorld app is our internal copy of the Template and the template is now using Swift. It's important that this macroscopic changes are synched between the template and HelloWorld, otherwise we risk to ship changes that works in the helloworld app but that break the template, and therefore the next release. That already happened once this month.
## Changelog:
[Internal] - Migrate HelloWorld app to swift
Pull Request resolved: https://github.com/facebook/react-native/pull/48246
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D67143408
Pulled By: cipolleschi
fbshipit-source-id: f74412116570e44c2a394173f7d4d3b6dd85e2e5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48209
[Changelog] [Internal] - (Almost) align Android TextLayoutManager interface with iOS one
This change aligns the public API surface of `TextLayoutManager` from RN Android closer to the RN iOS one.
Reviewed By: javache
Differential Revision: D67061225
fbshipit-source-id: b06f47c7e322bdac429cefb85bf2f2a80210a64f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48223
[Changelog] [Internal] - Use ShadowNode::Traits instead of directly enable Yoga measurement
The goal of this change is to simple use ShadowNodeTraits to enable measurement of ShadowNode props
Reviewed By: NickGerleman
Differential Revision: D67114097
fbshipit-source-id: dccb0f9b83f339c07ca41678533d97191277b520
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48237
Noticed this when trying to diagnose what seemed like a stale caching issue. It effectively reverts D59917944.
D59917944 added logic to only do yarn caching on main, but it has some correctness issues:
1. We cache `node_modules` instead of the yarn cache, which may contain e.g. build artifacts, or other scratch/cache files written (such as anything that writes to `node_modules/.cache`). We really want to be caching the yarn cache, which has pristine packages before install, which I think it will also need to perform the real install anyways.
2. We key the cache on root `package.json`, which is missing a lot of information (both provided by the other `package.json` in the repo, but mostly, the lockfile resolution).
We only save cache when we're on `refs/heads/main` (so continuous builds against main), and supposedly, builds against base branch should be able to restore against those, but recent PR jobs I have seen, where `package.json` has not changed, all have `Cache not found for input keys: node-modules-068350889e87919c1c6c2c220c8d2d92db13f38820bf2efb315d1274b97bc367`
Because of the potential correctness issues, and that the strategy for limiting to main seemingly is not allowing cache to be used in PR, this diff goes back to previous solution, which may store more artifacts (but working cache should also reduce cost by making jobs run faster).
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D67140004
fbshipit-source-id: f74074a498af56b1837fa23cf80795f76935b762
Summary:
This pr tests the Old Arch on the Template app using Maestro
## Changelog:
[Internal] - Test old arch in CI with Maestro for template app
Pull Request resolved: https://github.com/facebook/react-native/pull/48244
Test Plan: GHA
Reviewed By: cortinico
Differential Revision: D67141524
Pulled By: cipolleschi
fbshipit-source-id: bef3a9b6fec9d7c91d858d534a2d00e91f1842b5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48238
Use the helper module we have, which has better type-safety and less code duplication.
Changelog: [Internal]
Reviewed By: fabriziocucci
Differential Revision: D67139572
fbshipit-source-id: 39ae9119d97f937b30ad6e7451468cbb3cc37a84
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48235
Recursively calling runTask is not supported, as the inner call will no-op since we're already executing the eventloop.
Currently errors are not correctly propagated, but this at least makes it so that we don't attempt to schedule the task either, which could lead to incorrect assumptions being made.
Changelog: [internal]
Reviewed By: rubennorte
Differential Revision: D67107664
fbshipit-source-id: e665a96671f4812308d87aec3b880ce2009328e2
Summary:
In this PR we introduced a new mechanism for `RawPropsParser` to construct its RawValues directly from `jsi::Value` instead of converting it to `folly::dynamic` first:
- https://github.com/facebook/react-native/pull/48047/
In this PR we added a parameter to `RawPropsParser` to opt-into using the above described mechanism:
- https://github.com/facebook/react-native/pull/48231
Whats missing is that `RawPropsParser` was default constructed in `ComponentProvider` and there is no way to pass a custom instance (where you'd for example set the above described parameter). This PR adds support for that.
## 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] - Add `RawPropsParser` as optional parameter to Concrete-/ComponentDescriptor
Pull Request resolved: https://github.com/facebook/react-native/pull/48232
Test Plan: Internal change, just make sure all CI tests are passing.
Reviewed By: cipolleschi
Differential Revision: D67135357
Pulled By: javache
fbshipit-source-id: 45f384d42314976c16cae10d5ea0419d13fd0889
Summary:
`react_native_assert` on iOS uses glog under the hood, and https://github.com/facebook/react-native/pull/47911 added usage to a new podspec, which means new entire binary under some build modes. Need to add missing dependency I think?
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/48241
Test Plan: tes_ios_helloworld passes with DynamicLibraries
Reviewed By: cipolleschi
Differential Revision: D67141052
Pulled By: NickGerleman
fbshipit-source-id: 299a499f40e9b54c4aca5d6e1c95c43ce933fb2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48224
Changelog: [General][Fixed] Removed unnecessary state updates in React to reflect the current state of looping animations.
This enables that feature flag by default and prepares for an incoming cleanup.
Reviewed By: yungsters, dmytrorykun
Differential Revision: D67109980
fbshipit-source-id: 3c98731221b0fb01a8d49d537df859fe23c0ae45
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48229
Changelog: [internal]
The type definitions for these objects (the exported value by the `ReactNativeFeatureFlags` module, and the input value for `ReactNativeFeatureFlags.override()` method) were writable objects, which is incorrect and causes other problems down the line.
This just makes them read-only.
Reviewed By: yungsters
Differential Revision: D67109719
fbshipit-source-id: 8d56e05042587a53cdd05e51b4207ef27ace2d91
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48225
Fixes https://github.com/facebook/react-native/issues/47762
The weak event emitter in AttributedString attributes is causing a serialization error when typing into a TextInput in a Mac Catalyst build. We can resolve this by not putting the event emitters in the attributed string, but this is likely to cause other issues with event handling for nested <Text> components.
## Changelog
[iOS][Fixed] - Workaround for Mac Catalyst TextInput crash due to serialization attempt of WeakEventEmitter
Reviewed By: NickGerleman
Differential Revision: D66664583
fbshipit-source-id: efdfbcb0db4d5e6b9bf7c14f9bbb221faae2d724
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48200
Wires up `Performance.mark()` events, completing support for User Timings in Fusebox.
Other changes:
- Refactors `reportMeasure` to receive a `duration`.
- Fixes conversion for time values (ms -> µs) in emitted trace events.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D66704283
fbshipit-source-id: 352abbade26eb976e793481dde04463431bf2eb7
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48043
Adds a new `PerformanceTracing` API to replace `ReactPerfLogger` and `FuseboxTracer`.
- Mostly a clone of `FuseboxTracer`, with small refactorings.
- Exposes a new `CdpTracing.h` header, intended for shared CDP/Chrome types (that will later propagate through to the runtime impl of `performance.mark,measure()`).
- These live in a new `jsinspector_tracing` library, to avoid a dependency cycle.
**Key change**: With both diffs, `PerformanceTracer` is added to `PerformanceEntryReporter` to initially wire up the `performance.measure` event — replacing the previous routing.
- `FuseboxTracer` remains load-bearing for the out-of-tree call to `stopTracingAndWriteToFile()`.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D66650181
fbshipit-source-id: 9092257f23cdb8746e69f5ff3eb7dbf4c8142938
Summary:
When running the linter locally, noise is generated from the `packages/react-native/ReactAndroid/build` folder. This folder does not need to be checked, as it is already excluded in the [.gitignore](https://github.com/facebook/react-native/blob/main/.gitignore#L33).
## Changelog:
[INTERNAL] - Exclude `packages/react-native/ReactAndroid/build` from lint checks
Pull Request resolved: https://github.com/facebook/react-native/pull/48217
Test Plan:
```bash
yarn lint
```
Reviewed By: huntie
Differential Revision: D67134035
Pulled By: cortinico
fbshipit-source-id: f314c8601d6a3bf8ac6ebed67bdc392c6a6aeba8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48227
This option is on by default in Flow v0.256
Reviewed By: gkz
Differential Revision: D67117062
fbshipit-source-id: 1595afe48178529ad43b33a215d84ff225cf9fa9
Summary:
In react-native-windows our static analysis tools report an error for `timeoutForSchedulerPriority` due to cases where it may not always return a value. This is an upstreaming of the patch we have to fix that error.
## Changelog:
[INTERNAL] [FIXED] - Fix no return static analysis error in SchedulerPriorityUtils.h
Pull Request resolved: https://github.com/facebook/react-native/pull/47911
Test Plan: Building should be sufficient.
Reviewed By: christophpurrer
Differential Revision: D66992063
Pulled By: NickGerleman
fbshipit-source-id: 999fea328d0c66ad92314f537e41beff5856c285
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47946
Object creation with custom prototype can currently be done, but it is
unnecessarily convoluted. Users have to call into the global object to
get the `Object.create` function, then call it with the custom
prototype.
This diff adds a JSI API for Object.create(prototype) to make it easy
for users.
Changelog: [Internal]
Reviewed By: avp
Differential Revision: D66485209
fbshipit-source-id: 32018f847190ac16f695f011a78be0c45c4c4659
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47996
Getting and setting an Object's prototype is convoluted. Users have to
call into the global object to get the method, then call it.
This diff adds a JSI API for Object.getPrototype and Object.setPrototype
to make it easy for users.
Changelog: [Internal]
Reviewed By: fbmal7
Differential Revision: D66562549
fbshipit-source-id: 85a2e49deb9d00500544de4cc5ab123c4717398e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48208
[Changelog] [Internal] - Remove unused (Android) TextLayoutManager getter
This getter
```
void* getNativeTextLayoutManager() const;
```
is not used on Android and different in signature to the iOS one:
```
std::shared_ptr<void> getNativeTextLayoutManager() const;
```
Deleting it for now to make future code sharing between various platforms easier.
This change removes further the by now discouraged pattern of:
```
using SharedTextLayoutManager = std::shared_ptr<const TextLayoutManager>;
```
and changes callers to use
```
std::shared_ptr<const TextLayoutManager>;
```
directly.
Reviewed By: javache
Differential Revision: D67059514
fbshipit-source-id: b94dc7f664083c5c62c4ba7defca480549ca9dc1
Summary:
# Summary
I'm working to get the main `react-native` package parsable by modern
Flow tooling (both `flow-bundler`, `flow-api-translator`).
This diff trivially removes some redundant Flow comment syntax in
`ReactNativeTypes.js`, which fixes parsing under these newer tools.
## How did you test this change?
Files were pasted into `react-native-github` under fbsource, where Flow
validates ✅.
DiffTrain build for [92b62f500c3fca44a9dc9ead936ef3bf19481f02](https://github.com/facebook/react/commit/92b62f500c3fca44a9dc9ead936ef3bf19481f02)
Reviewed By: huntie
Differential Revision: D67100354
Pulled By: hoxyq
fbshipit-source-id: 575e4bd8ceefad15576273920a263ae89d027cad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48216
The `React-graphics` podspec is manually excluding some paths from the source_files but this approach is error prone. For esample changes that added new paths that must be excluded can create failures.
This change the podspec file to explicitly add only the files that iOS requires.
## Changelog:
[iOS][Changed] - Explicitly define the source files for React-graphics
## Facebook:
This change is necessary because we added the macos platform that was not included before and now we can't build RNTester from fbsource using the internal pipeline.
Reviewed By: hoxyq
Differential Revision: D67095677
fbshipit-source-id: 701d5938f6e141a313be62c8f930a089e1d6ee96
Summary:
### Motivation:
We are looking for a way to access the "raw" jsi value in our fabric view components, so that we can pass complex types like `HostObjects` or `jsi::Object` with `NativeState` attached to our components directly.
Currently the props are converted from `jsi::Object` to `folly::dynamic`, which prevents us from accessing these values directly.
### Changes
This PR is a implementation of the proposal discussed here:
- https://github.com/facebook/react-native/pull/44966#issuecomment-2503915245
These changes extend `RawValue` so that it can be directly constructed from `RawValue(Runtime*, jsi::Value&)` (not just from `folly::dynamic`).
`RawValue`s are created by the `RawPropParser.cpp`. By default it will use the `RawValue(folly::dynamic)` constructor, but we added a feature flag called `useRawPropsJsiValue`, which will sue the JSI constructor.
This enables to test this feature at runtime incrementally.
This change might also be tested on a component basis, by setting a flag in the component descriptor to enable JSI prop parsing for the RawPropParser, as outlined in this PR:
- https://github.com/hannojg/react-native/pull/2
## 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
-->
[General] [Added] - Add `useRawPropsJsiValue` feature flag to represent props internally as `jsi::Value`s instead of converting them to `folly::dynamic`
[General] [Added] - Added `RawValue(Runtime*, jsi::Value&)` constructor to make a `RawValue` from a `jsi::Value`.
Pull Request resolved: https://github.com/facebook/react-native/pull/48047
Test Plan: Enable the `useRawPropsJsiValue` feature flag and test the rn-tester app on android and iOS. Make sure you get no new errors / warnings in the native console.
Reviewed By: NickGerleman
Differential Revision: D66877093
Pulled By: javache
fbshipit-source-id: 7342e5f86d2492ad63a9ccf5508f04e7eb252def
Summary:
`JSBigFileString` incorrectly passes the file offset to `mmap`, causing errors when `offset` is non-zero.
## Changelog:
[GENERAL] [FIXED] - `JSBigFileString` fails for non-zero offset arguments
Pull Request resolved: https://github.com/facebook/react-native/pull/48198
Test Plan: - verify the new unit test passes
Reviewed By: cipolleschi
Differential Revision: D67086826
Pulled By: javache
fbshipit-source-id: 0991bb34a710b85ff0263dc553efb85ba62b4cd8
Summary:
While I was [working on fixing the iOS debugger logic](https://github.com/facebook/react-native/pull/48174) based on configuration name regex match, I wanted to know if other logic was also based on configuration names. I think I found and fixed the only other configuration name-based logic in the repo in this PR.
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [CHANGED] - Use configuration type when adding ndebug flag to pods in release
Pull Request resolved: https://github.com/facebook/react-native/pull/48193
Test Plan:
In a fresh react-native project, I added to the Podfile:
```ruby
installer.aggregate_targets.each do |aggregate_target|
aggregate_target.xcconfigs.each do |config_name, config_file|
is_release = aggregate_target.user_build_configurations[config_name] == :release
puts "aggregate_targets #{config_name} is_release: #{is_release}"
end
end
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
target_installation_result.native_target.build_configurations.each do |config|
is_release = config.type == :release
puts "target_installation_results #{config.name} is_release: #{is_release}"
end
end
```
to confirm my logic. It output the following:
```
aggregate_targets Release is_release: true
aggregate_targets Local is_release: false
...
target_installation_results Local is_release: false
target_installation_results Release is_release: true
...
```
I also updated the applicable tests I could find for this logic.
Reviewed By: cortinico
Differential Revision: D67025325
Pulled By: cipolleschi
fbshipit-source-id: 45d68ee86e3255d843275a72916883c8c4bbc13d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48164
[Changelog] [Internal] - Share common ShadowNode functionality in BaseTextInputShadowNode for iOS
The current Android and iOS implementations have quite some overlapping functionality. Not sharing common logic makes it also harder to reuse this [functionality] for out of tree platforms.
This change moves the current iOS implementation into a shared location.
The next change allows to reuse it for Android.
Reviewed By: NickGerleman
Differential Revision: D66901676
fbshipit-source-id: a870155633875377d881fbd9f41fafb305672949
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48201
For any build for which we enable the perfetto build flag, we should probably enable the `__RCTProfileIsProfiling` so we get systrace markers.
Changelog: [Internal]
Reviewed By: bgirard
Differential Revision: D67031171
fbshipit-source-id: 5e7f56f911acacd3156778bd9151202fc809e291
Summary:
Fixes https://github.com/facebook/react-native/issues/39260
Right now, there is a small issue when you try debugging the Networking library methods as it seems like they are empty in Android. This is not an actual functional issue as everything in code works fine, but rather an inconsistency in how the iOS and Android methods are being exported. In iOS it was exported as an object, in Android it was a class.
## Changelog:
[INTERNAL] - Making `RCTNetworking` js exports consistent
Pull Request resolved: https://github.com/facebook/react-native/pull/48166
Test Plan:
I've checked that `XMLHttpRequest` is still working as expected, as this is used mostly there.
And below there are screenshots of how the module methods are logged after the refactor. Which addresses what was reported in the linked issue.
```js
import {Networking} from 'react-native';
import AndroidNetworking from 'react-native/Libraries/Network/RCTNetworking.android.js';
import IOSNetworking from 'react-native/Libraries/Network/RCTNetworking.ios.js';
console.log({Networking, AndroidNetworking, IOSNetworking});
```
Before | After
-- | --
<img width="1196" alt="image" src="https://github.com/user-attachments/assets/b7ab1dcd-9dd1-4ed9-ade5-d90251a77d5e"> | <img width="1196" alt="image" src="https://github.com/user-attachments/assets/5ae17c6a-b068-462a-b228-576dcf08ef12">
Reviewed By: fabriziocucci
Differential Revision: D67022711
Pulled By: javache
fbshipit-source-id: 81f9988295fb3f559a795077f09ee0f14827dc86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47247
Changelog: [internal]
Bye bye `ReactNativeConfig` 👋.
All existing usages of the API have been cleaned up or migrated to `ReactNativeFeatureFlags`, so this is no longer needed.
Reviewed By: GijsWeterings
Differential Revision: D65062306
fbshipit-source-id: 76afcd48ad72023b6dc2a90955ae2f03a1164cca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47246
Changelog: [internal]
Just to use CI to verify there are no more existing usages of the API before cleaning it up.
Reviewed By: GijsWeterings
Differential Revision: D65062302
fbshipit-source-id: e1b71d39ef1fba23cc68e36fe0a0b57cfc2a614e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48199
`animatedShouldUseSingleOp` relies on a queue always being active, or for a call to `flushQueue` later down the line. If these are missing, a call will be queued up but only executed whenever the next animation flush happens.
Changelog: [General][Fixed] Animation.stop() executes when `animatedShouldUseSingleOp` is enabled.
Reviewed By: yungsters
Differential Revision: D67025831
fbshipit-source-id: 66a7f50d833b7bbaf9f16dd04d24b90c7a699fa0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48182
Maintainers from SVG reached out because of an edge case they inencountered when generating the ComponentProvider. In their setup, they had a `.git` folder in the repo and the algorithm was spending a lot of time crawling the git folder.
In general, we should avoid crawling hidden folders.
This change fix that.
## Changelog:
[General][Fixed] - Skip hidden folders when looking for third party components.
Reviewed By: javache
Differential Revision: D66959345
fbshipit-source-id: 992a79f3cff22cd6a459e0272c8140bc329888da