Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48533
Replaces the custom `XmlFormat` introduced in https://github.com/facebook/react-native/pull/46711 with the built-in support from Fresco. Fresco utilizes a very similar approach to load binary XML files and offers the XML format as part of its built-in `DefaultImageFormats`
Changelog:
[Android][Changed] - Replaced custom XML decoder with Fresco's built-in decoder
Reviewed By: NickGerleman
Differential Revision: D66553842
fbshipit-source-id: 096e60140f893d461be1cdb48e250749e58bbb4c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48542
Updates Fresco from 3.5.0 to 3.6.0. Picks up a few new features and bug fixes for XML drawables, including a required fix that [automatically supplies the XML drawable factory to Fresco's PipelineDraweeControllerBuilder](https://github.com/facebook/fresco/commit/e6b052610aab461601cfabc00f7240758a415878). Without this change, we cannot switch from RN's custom XmlFormat to Fresco's built-in format
Changelog:
[Android][Changed] - Update Fresco to 3.6.0
Reviewed By: NickGerleman, rshest
Differential Revision: D67950225
fbshipit-source-id: 9afd87565a5f069493c9c5ef87977cbd6d7cf3d4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48525
Fixes https://github.com/facebook/react-native/issues/48249
`TextMeasureCacheKey` hash and equality functions only incorporates the maximum width constraint. I'm guessing this was an attempt at an optimization, but it can lead to incorrect results in pretty trivial cases. E.g. if Yoga knows a definite size of `Text` in one dimension, and measures via `YGMeasureModeExactly`, we can have a minimum size corresponding specific to the style in which the text was laid out.
Changelog:
[General][Fixed] - Fix TextMeasureCacheKey Throwing Out Some LayoutConstraints
Reviewed By: christophpurrer
Differential Revision: D67922414
fbshipit-source-id: 0ee0220059fc4e4645b1684c42a0587fe728bedd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48524
I've confirmed that we are no longer using `eslint-plugin-prettier` in Metro or React Native. This removes it from the package dependencies.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D67920511
fbshipit-source-id: 9c8036ccfb94d974d344d861942c076dc2b70125
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48511
{D60499583} added a new`onUserDrivenAnimationEnded` listener that requires `AnimatedValue` instances to have up-to-date values reported by `onAnimatedValueUpdate` (if native driver is in use).
Previously, the only way to ensure `onAnimatedValueUpdate` events were always fired to update JavaScript values in `AnimatedValue` instance was to attach a listener — even an empty one. This is exactly what D60499583 did: it traverses `props` for `AnimatedNode` instances and attaches listeners to them.
However, this is really inefficient and makes the code extra convoluted. Instead, this diff changes `AnimatedValue` so that it always subscribes to changes in `__attach`, and then it cleans up the extraneous props traversal and "empty listener" logic.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D67872307
fbshipit-source-id: e7d7e486bbfd9ef03e2dd9f201089e2f68b2dbb2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48529
These classes are identical and we already have a dependency on :uimanager in fabric.
Looking at OSS, I found no usages of `fabric.GuardedFrameCallback`.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D67913226
fbshipit-source-id: 97d7a9b45b877b98e9549c71135bd9b21386d78c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48520
Both `ReactScrollViewHelper.parseSnapToAlignment` and `ReactScrollViewHelper.parseOverScrollMode` accept a nullable string. This is a precursor to migrating these files to Kotlin (since they're already marked as nullsafe). The prop itself is a nullable string so this should be reflected in the native types as well
Changelog: [Internal]
Reviewed By: tdn120
Differential Revision: D67911553
fbshipit-source-id: aabe55c2dc65a933b170d76b89f62f25493ab0ee
Summary:
This PR guards code that enables/disables keyboard shortcuts only on iOS (iPadOS included).

## Changelog:
[IOS] [FIXED] - enable/disable keyboard shortcuts only on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/48518
Test Plan: CI Green
Reviewed By: rshest
Differential Revision: D67900442
Pulled By: javache
fbshipit-source-id: 249a7c3124d02d2c30303d218e2b26e987ae1f0f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48514
Currently, `AnimatedNode` implements logic to start listening to updates on the current native node if a listener is added.
However, the `startListeningToAnimatedNodeValue` native module method only supports native tags for instances of `AnimatedValue`, which is a subclass of `AnimatedNode`. In fact…
* On Android, [`startListeningToAnimatedNodeValue`](https://fburl.com/code/bdsl4sro) throws if the node is not an instance of `ValueAnimatedNode`.
* On iOS, [`startListeningToAnimatedNodeValue`](https://fburl.com/code/hlpk1rzk) does nothing if node is not an instance of `RCTValueAnimatedNode`.
As such, this refactors `AnimatedNode` to never manage this subscription for native nodes. Instead, the logic is moved into the `AnimatedValue` subclass, ensuring that we never accidentally try to `startListeningToAnimatedNodeValue` with non-`AnimatedValue` native tags.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D67884973
fbshipit-source-id: 5601efd8c29104a991301eabd97ddb88fd03c4a3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48513
While refactoring `Animated`, I noticed that many subclasses of `AnimatedNode` override `__attach` without invoking the superclass method, even though we do this for `__detach`.
In order to minimize surprise (e.g. if someone were to add logic into `AnimatedNode.prototype.__attach`), this diff updates all method overrides to invoke `super.__attach()`.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D67884975
fbshipit-source-id: f3a5456cf944d4d70ba1cfe7c44897c110e5fc7e
Summary:
Some of these parameters were incorrectly marked as nullable during the Kotlin migration
Changelog: [Internal]
Reviewed By: tdn120
Differential Revision: D67091825
fbshipit-source-id: c660164e41ba7d47f1d1d3dc28a01b79b7c8cb03
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48337
`SurfaceRegistryBinding` refers to a forked `SurfaceRegistry` we had for a while in bridgeless but which was merged back into `AppRegistry`. Align the native name as well to make it explicit that all this class does is call into `AppRegistry`.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D67342499
fbshipit-source-id: 797d8080611cb2576a2052999c2bf46d2eea9f72
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48336
`RN$AppRegistry` and `RN$stopSurface` are always set on the init path, regardless of bridgeless or not, so we can remove the fallback path and cleanup this code.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D67342498
fbshipit-source-id: db47e52fee5075f11258364d82474579d2bb21f4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48335
This API was never adopted or implemented on iOS, and is not compatible with bridgeless.
Changelog: [Internal]
Reviewed By: rshest
Differential Revision: D67342500
fbshipit-source-id: a6740514d0347c0f497e1aa2f850328cc4607d24
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48470
This introduces:
- `validate_rn_cpp_api`: run a shell script that fails if the user changes the C++ API. Importantly it produces an artifact with details to share with the user: `message`.
- `message` has to be extracted from `stdout`, which **get_user_message** does if the `validate_rn_cpp_api` action is not successful (**warning**).
- The then users `comment_to_signalhub` to share this as a warning to the user (until we're confident this entire stack is very stable, at which time we'll block).
The provides 2 classes of warning:
1. vanilla you've change the API,
2. you've change the API and haven't included the correct changelog.
Changelog: [Internal]
Reviewed By: GijsWeterings
Differential Revision: D67776215
fbshipit-source-id: 4ac7451c8ecef62ba968710ec41804ba42153976
Summary:
Time to migrate some of Hermes's instruments. I see that HermesMemoryDumper(`react/hermes/instrumentation/HermesMemoryDumper.h`) implements the interface on C++, ~but not sure if i need to update the `getId` call to just `id` (same with `getInternalStorage`) or if the interop between Kotlin and Java applies to these things as well. cortinico Any thoughts on your side would be appreciated.
HermesSamplingProfiler just became an object, since it was a singleton and a static anyway.
Here is what HermesMemoryDumper.h looks like:
<img width="1840" alt="Screenshot 2024-12-24 at 10 03 00" src="https://github.com/user-attachments/assets/d18e378a-9b23-47a9-83c9-402d29aeaa5f" />~
*Updated*: I ended up making them match the function signature on Cxx, because even if it does have that implicit behavior, doesn't feel right to tap into it like this.
## Changelog:
[INTERNAL] [FIXED] - Migrate HermesMemoryDumper and HermesSamplingProfiler to Kotlin
Pull Request resolved: https://github.com/facebook/react-native/pull/48378
Test Plan:
`/gradlew test`:
<img width="1840" alt="Screenshot 2024-12-24 at 09 54 29" src="https://github.com/user-attachments/assets/1b23fb6f-9da8-42e4-a348-7da868df77c1" />
Reviewed By: cortinico
Differential Revision: D67657481
Pulled By: philIip
fbshipit-source-id: 4fb5e003789d51d464d0cca5800704ea51324b69
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48487
[Changelog] [Internal] - Add getSurfaceProps helper method to SurfaceManager
When reload a reactHost we need to know which surface properties have been applied when starting the surface. This adds a utility function for that.
Reviewed By: rshest
Differential Revision: D67822459
fbshipit-source-id: 6d1f182514ed6e7ae8e31d3e1ca052c93bac2843
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48476
Command param array types were generating invalid schemas due to untyped parser code. The invalid schemas occurred for any alias type, including custom objects and basics like Int32. This was also inconsistent between Flow and TypeScript.
We already had one component utilizing this issue, so this just codifies that support into the schema so it reflects reality. This is only a partial solution. The more full solution would be to fully encode the custom types in the schemas like we do for Native Modules.
# More Information:
Tl;dr, DebuggingOverlay is abusing a FlowFixMe in codegen commands.
## The problem:
The [CodegenSchema](https://www.internalfb.com/code/fbsource/[d3ab2f79b377]/xplat/js/react-native-github/packages/react-native-codegen/src/CodegenSchema.js?lines=220) should be the source of truth for anything that can be in the schema. If something is in the schema that isn't allowed by the types, that's a bug. We have a bug. I'm adding compat-check support for components and it's blowing up on prod schemas because DebuggingOverlay causes an invalid schema.
## The details:
Support for Arrays as arguments in commands was added to the Codegen in D51866557. [Code Pointer](https://fburl.com/code/8yy1rm0p)
The intention appears to be to support arrays of primitives. There is a TODO for supporting complex types.
```
interface NativeCommands {
+addOverlays: (
viewRef: React.ElementRef<NativeType>,
overlayColorsReadOnly: $ReadOnlyArray<string>,
)
}
```
This support was added to TypeScript in D52046165 where it types the allowed Array arguments to be only
```
{
readonly type: 'ArrayTypeAnnotation';
readonly elementType:
| Int32TypeAnnotation
| DoubleTypeAnnotation
| FloatTypeAnnotation
| BooleanTypeAnnotation
| StringTypeAnnotation
};
```
However, because the Parsers are treating the input type as `any`, it isn't safe to pass through an input value into the schema as Flow won't catch mismatches.
The Flow parser just passes it through:
```
{
type: 'ArrayTypeAnnotation',
elementType: {
// TODO: T172453752 support complex type annotation for array element
type: paramValue.typeParameters.params[0].type,
}
```
Whereas the TypeScript parser has the more correct behavior of validating the inputs and returning specific outputs. Unfortunately, the return type is also typed here as $FlowFixMe, losing most of the benefits.
```
function getPrimitiveTypeAnnotation(type: string): $FlowFixMe {
switch (type) {
case 'Int32':
return {
type: 'Int32TypeAnnotation',
};
case 'Double':
return {
type: 'DoubleTypeAnnotation',
};
case 'Float':
return {
type: 'FloatTypeAnnotation',
};
case 'TSBooleanKeyword':
return {
type: 'BooleanTypeAnnotation',
};
case 'Stringish':
case 'TSStringKeyword':
return {
type: 'StringTypeAnnotation',
};
default:
throw new Error(`Unknown primitive type "${type}"`);
}
}
```
[DebuggingOverlay](https://fburl.com/code/zfe3ipq7) is abusing this gap in the Flow parser by sticking an Array of Objects in.
```
export type ElementRectangle = {
x: number,
y: number,
width: number,
height: number,
};
...
+highlightElements: (
viewRef: React.ElementRef<DebuggingOverlayNativeComponentType>,
elements: $ReadOnlyArray<ElementRectangle>,
) => void;
...
```
This isn't allowed in the schema, but it seems to fall through the holes of the flow parser and generators.
The resulting schema from Flow is this. Note the GenericTypeAnnotation which isn't allowed to be in the schema.
```
{
"name": "highlightElements",
"optional": false,
"typeAnnotation": {
"type": "FunctionTypeAnnotation",
"params": [
{
"name": "elements",
"optional": false,
"typeAnnotation": {
"type": "ArrayTypeAnnotation",
"elementType": {
"type": "GenericTypeAnnotation"
}
}
}
],
"returnTypeAnnotation": {
"type": "VoidTypeAnnotation"
}
},
```
The TypeScript parser fails with `Error: Unsupported type annotation: GenericTypeAnnotation`.
The generators don't seem to check beyond the ArrayTypeAnnotation so they fall through to generating generic arrays.
```
// ios
elements:(const NSArray *)elements
// android
ReadableArray locations
```
## So how do I fix this?
I think there are a couple of different options here. The key problem is that the Schema types need to represent reality of what can be in the schema.
1. We revert DebuggingOverlay to not use features that aren't supported (I assume nobody would be happy with this, but the change shouldn't have been made in the first place)
2. **(This is the approach taken in this diff)** We add MixedTypeAnnotation to the allowed types in Command arrays and have it generate that and add official support for that to the TypeScript parser as well. That is probably the quickest and easiest approach. It leaves the same type unsafety we have today on the native side.
3. NativeModules seem to have a lot more complex type safety here. They persist the alias type in the schema so that the CompatCheck can check them on changes. And then in C++ they generate structs and RCTConvert functions although for Java and ObjC it looks like they just use the same untyped native code. The matching approach here would be to add `aliasMap` and the whole data to the schema for commands, use that for the compat check, and still generate the same unsafe native code.
```
export type ObjectAlias = {|
x: number,
y: number,
|};
export interface Spec extends TurboModule {
+getAlias: (a: ObjectAlias) => string;
}
```
stores the ObjectAlias in the schema
```
{
"aliasMap": {
"ObjectAlias": {
"type": "ObjectTypeAnnotation",
"properties": [
{
"name": "x",
"optional": false,
"typeAnnotation": {
"type": "NumberTypeAnnotation"
}
},
{
"name": "y",
"optional": false,
"typeAnnotation": {
"type": "NumberTypeAnnotation"
}
},
]
}
},
"spec": {
"methods": [
{
"name": "getAlias",
"optional": false,
"typeAnnotation": {
"type": "FunctionTypeAnnotation",
"returnTypeAnnotation": {
"type": "StringTypeAnnotation"
},
"params": [
{
"name": "a",
"optional": false,
"typeAnnotation": {
"type": "TypeAliasTypeAnnotation",
"name": "ObjectAlias"
}
}
]
}
}
]
}
}
```
and then generates the appropriate structs on the native side and generates [this](https://www.internalfb.com/code/fbsource/[d3ab2f79b377]/xplat/js/react-native-github/packages/react-native-codegen/src/generators/modules/__tests__/__snapshots__/GenerateModuleHObjCpp-test.js.snap?lines=818)
```
Reviewed By: hoxyq
Differential Revision: D67806838
fbshipit-source-id: 31f20455c816fdb6b1a86f8f9d0f6f7d0a452754
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48475
This will be needed for the compat-check.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D67806831
fbshipit-source-id: b660c9557cafbfa2e713e85a0fd2bdc9edabf537
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48474
The previous definition said that you could put prop types into commands, which definitely isn't allowed.
For example, the schema would have allowed `WithDefault` types.
```
interface NativeCommands {
+methodInt: (viewRef: React.ElementRef<NativeType>, a: WithDefault<string, 'hi'>) => void;
}
```
This change separates out the things that are allowed in commands from what's allowed in props.
Commands should be very similar to what's allowed in native modules, but it isn't exact enough to be able to merge those.
## Changelog:
[General][Breaking] - Codegen: Separate component array types and command array types
Reviewed By: cipolleschi
Differential Revision: D67806818
fbshipit-source-id: 58e504fe2e2e5efa612e836b18af22a167e7ae2f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48473
This is such a simpler approach lol.
I'll need this later for when I want to pass in arrays or objects of these types to the compat check
Changelog: [internal]
Reviewed By: cipolleschi
Differential Revision: D67806812
fbshipit-source-id: 5cc361815fea901098d2931ba78293693ecc0a35
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48477
Over the years of copying and moving and renaming types through CodegenSchema, this type ended up in the Command params, although the Command parser doesn't allow it.
I made this change to a fixture:
{F1974104959}
and got this error
```
FAIL xplat/js/react-native-github/packages/react-native-codegen/src/parsers/flow/components/__tests__/component-parser-test.js
● RN Codegen Flow Parser › can generate fixture COMMANDS_DEFINED_WITH_ALL_TYPES
Unsupported param type for method "scrollTo", param "speed". Found UnionTypeAnnotation
127 | default:
128 | (type: empty);
> 129 | throw new Error(
| ^
130 | `Unsupported param type for method "${name}", param "${paramName}". Found ${type}`,
131 | );
132 | }
```
Also, a default value for enum an argument of a Command doesn't make sense anyways.
Commands should probably have support for enums and string literal unions, but that's out of scope here.
Still need to add to this vec\concat on www: https://www.internalfb.com/code/www/[ebfa58f888a6064e17879934d447f59bcc2b6951]/flib/intern/sandcastle/react_native/ota_steps/SandcastleOTACompatibilityCheckReportingStep.php?lines=62
Changelog: [internal]
Reviewed By: cipolleschi
Differential Revision: D67806808
fbshipit-source-id: f0f31cca30abbf61f569933ea7c49cf6bfd18a3f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48485
[Changelog] [Internal] - Make SurfaceManager const correct
This marks methods which don't modify member props as `const` and others as non `const`.
The current API signature is misleading as `const` methods do alter `mutable` members
Reviewed By: rshest
Differential Revision: D67820439
fbshipit-source-id: 6a991bd7ccbd464c2390e33e0c29b136892d65e0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48486
[Changelog] [Internal] - Add RuntimeSchedulerKey constant for RuntimeScheduler lookup
Similar to https://github.com/facebook/react-native/pull/48127 this adds a contant to avoid typos when inserting or retrieving the RuntimeScheduler
Reviewed By: rshest
Differential Revision: D67822346
fbshipit-source-id: af982c6d4b875ffde06aae8e953c4892754a074b
Summary:
**iOS** does offer a native property for **UITextField** called `inputAssistantItem`. According to the [documentation](https://developer.apple.com/documentation/uikit/uitextinputassistantitem), we can hide the **"shortcuts"** by setting the `leadingBarButtonGroups` and `trailingBarButtonGroups` properties to empty arrays.
I propose adding a new property for **TextInput** in **React Native**, which would set these native properties to empty arrays. This new property could be called `disableInputAssistant` or `disableKeyboardShortcuts` and would be a `boolean`.
Developers can manage this behavior (the redo & undo buttons and suggestions pop-up hiding) after applying these native props.
https://github.com/react-native-community/discussions-and-proposals/discussions/830
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[IOS] [ADDED] - [TextInput] Integrate a new property - `disableKeyboardShortcuts`. It can disable the keyboard shortcuts on iPads.
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [ADDED] - [TextInput] Integrate a new property - `disableKeyboardShortcuts`. It can disable the keyboard shortcuts on iPads.
Pull Request resolved: https://github.com/facebook/react-native/pull/47671
Test Plan:
Manual
1. Open TextInput examples.
2. Scroll down and reach the "Keyboard shortcuts" section.
3. Test each case.
Note: **TextInput** behaves the same as now when the new prop is not passed or is `false`.
https://github.com/user-attachments/assets/5e814516-9e6c-4495-9d46-8175425c4456
Reviewed By: javache
Differential Revision: D67451609
Pulled By: cipolleschi
fbshipit-source-id: 59ba3a5cc1644ed176420f82dc98232d88341c6e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48450
Changelog: [internal]
This implements a basic benchmark to compare `ReactFabricHostComponent` and `ReactNativeElement` (legacy and DOM implementations for native component instances).
Reviewed By: rshest
Differential Revision: D66698546
fbshipit-source-id: dd4bde833e5c9eb32c79a52d06f3c360fb012e23
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48451
Changelog: [internal]
Modifies the execution of benchmarks in CI to run benchmarks in test mode when they don't define a `verify` method.
If a benchmark uses `verify`, the test is meant to make sure that the benchmark doesn't regress in CI. If it doesn't, then running the benchmark on CI doesn't provide much value. In that case, we run a single iteration of each test case just to make sure things don't break over time.
Reviewed By: rshest
Differential Revision: D67637754
fbshipit-source-id: 33b78a9c809386cf2e040314b0427de6a53da3e3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48452
Changelog: [internal]
Implements a basic API to run benchmarks with Fantom (using `tinybench` under the hood):
```
import {benchmark} from 'react-native/fantom';
benchmark
.suite('Suite name', {
// options
})
.add(
'Test name',
() => {
// code to benchmark
},
{
beforeAll: () => {},
beforeEach: () => {},
afterEach: () => {},
afterAll: () => {},
},
)
.verify(results => {
// check results and throw an error if the expectations fail
});
```
Features:
* Print benchmark results in the console as a table.
* It opts into optimized builds automatically
* Verifies that optimized build is used (unless manually opting out of the check via `disableOptimizedBuildCheck`).
* Supports verification of results (making expectations and making the test fail if the benchmark doesn't meet some expectations).
Reviewed By: rshest
Differential Revision: D66926183
fbshipit-source-id: 61cfa7689ea7684eb870fbbc815b8d236a1871e6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48453
Changelog: [internal]
Adds tinybench 3.1.0 (which has support for sync execution) and defined Flow types for the package.
Reviewed By: dmytrorykun
Differential Revision: D66698545
fbshipit-source-id: faf44add74e5711ac0d50794ce3360eedc45f0a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48454
Changelog: [internal]
This implements a native module for Fantom to provide information about the CPU time used by the current process. This will be used by Fantom as the clock to run benchmarks more accurately.
It provides 2 implementations:
1. One based on `clock_gettime` with `CLOCK_THREAD_CPUTIME_ID` that's available on Linux. This provides the CPU time for the current process with decent precision (tens of nanoseconds).
2. A fallback implementation that uses a monotonic clock (not actually CPU time).
We can add a MacOS equivalent in a following diff.
Reviewed By: rshest
Differential Revision: D67596312
fbshipit-source-id: dd712c0171aa998ddbb6fed9187b3c467cd5417d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48504
Following D67857739, fixes accidental change where the removed `ReactNativeFeatureFlags` flag read was not replaced with `true`. This temporarily disabled Fusebox on `main`, where not configured via other build flags.
{F1974195736}
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D67857739
fbshipit-source-id: 2a6fb2e6733035245e7ad959c7d3c650a9fde994
Summary:
Currently the `AppStateModule` doesn't have any unit tests in the Android implementation. This should make it safer for future changes or refactors.
## Changelog:
[INTERNAL] - Add `AppStateModule` Android unit tests
Pull Request resolved: https://github.com/facebook/react-native/pull/48492
Test Plan:
```bash
yarn test-android
```
Reviewed By: cipolleschi
Differential Revision: D67857498
Pulled By: cortinico
fbshipit-source-id: f90ced1cf02ac12a3438495b425ce7931decf19a
Summary:
As a prerequisite of enabling running unit tests on CI again, this PR suggests changes needed to the Ruby unit tests.
I've added comments on the code below, justifying changes where I deem a justification might be needed.
For use internally, I suggest accessing the folly_config and boost_config directly via the `Helpers` class instead of the `get_folly_config` and `get_boost_config` because these global functions are defined in `react_native_pods` which would be result in circular requires. An alternative would be to move these global functions to a separate file.
## Changelog:
[INTERNAL] [FIXED] - Fix Ruby unit tests.
Pull Request resolved: https://github.com/facebook/react-native/pull/48498
Test Plan:
- `cd packages/react-native`
- `./scripts/run_ruby_tests.sh`
Reviewed By: rshest
Differential Revision: D67852809
Pulled By: cipolleschi
fbshipit-source-id: 54d8bd708a9e3fd9aef3569ac89ec6ddcd244437