chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

chore: merge up to 0.78-stable branch cut - #2373

Merged
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge
Mar 22, 2025
Merged

chore: merge up to 0.78-stable branch cut#2373
Saad Najmi (Saadnajmi) merged 478 commits into
microsoft:mainfrom
Saadnajmi:0.78-merge

Conversation

@Saadnajmi

@SaadnajmiSaad Najmi (Saadnajmi) commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator

Summary:

Merge up to the commit 0.78-stable branches off from upstream.

Notable changes

Test Plan:

CI should pass

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: react#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
…eact#48254)
Summary:
Fixesreact#46180
This PR fixes the `testID` not being set as a `resource-id` in the `HorizontalScrollView`.
Currently the `resource-id` is being set correctly when we use a vertical scroll view (this is done [here](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L156) for reference) but we still miss setting this when we use a horizontal one as the managers for both components are different.
## Changelog:
[ANDROID][FIXED] - Handling `testID` correctly for horizontal scroll view
Pull Request resolved: react#48254
Test Plan:
Render a simple `ScrollView` component with `horizontal` set as `true` and pass a `testID` property as shown:
```tsx
function Playground() {
return (
<ScrollView testID="customScrollViewTestId" horizontal>
<View
style={{
marginVertical: 400,
backgroundColor: 'white',
padding: 14,
margin: 50,
width: 200,
height: 200,
}}
/>
</ScrollView>
);
}
```
Open Maestro Studio and search for **customScrollViewTestId** in the search bar.
<details>
<summary>Before the fix: The `testID` is not found. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/9f1c6438-e105-468e-8bf4-4e2238824f9f)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="900" alt="image" src="https://github.com/user-attachments/assets/4f1a7858-4549-45b2-bb5f-d0b3485e5d69" />
</details>
---
Apply this fix, and search again in Maestro Studio.
<details>
<summary>After the fix: The `testID` is now recognised and can be found in the search bar. (See screenshot)</summary>
![image](https://github.com/user-attachments/assets/371f6d1f-5a41-461b-b276-7c0e702ee1e2)
</details>
<details>
<summary>See the same in Appium. (See screenshot)</summary>
<img width="891" alt="image" src="https://github.com/user-attachments/assets/ef03310c-c1ab-4ef7-b2c5-60c3b8d84c10" />
</details>
Reviewed By: tdn120, mdvacca
Differential Revision: D67201619
Pulled By: javache
fbshipit-source-id: 016faf724a482e0eca6dedfbf94dd9ea56255757
…rrectly null (react#48226)
Summary:
Pull Request resolved: react#48226
Adding logging to onHostPause to help diagnose cases when the activity is incorrectly null.
Reviewed By: fkgozali
Differential Revision: D67123351
fbshipit-source-id: f694a3a89e4584776050f6bca2f33f2805528d4b
Summary:
Pull Request resolved: react#48210
[Changelog] [Internal] - Share TextLayoutManager.h across all platforms
The goal of this change is to enable to share `TextLayoutManager.h` across all platforms, the same we do for:
https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/react/renderer/imagemanager/ImageManager.h
Reviewed By: philIip
Differential Revision: D67064488
fbshipit-source-id: 15ee02f3c2351ad65590b5f0dee2f3dbbde4df32
Summary:
Pull Request resolved: react#48266
For some clang build configurations the semi-colon triggers `-Wsemicolon-before-method-body`. This fixes that warning in iOS sources.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203041
fbshipit-source-id: f2f2f3799691c3fc59e102a852ca2cf61154e55e
Summary:
Pull Request resolved: react#48265
For some clang warnings configurations, you may hit `-Winconsistent-missing-destructor-override` without this override modifier.
## Changelog
[Internal]
Reviewed By: cipolleschi
Differential Revision: D67203040
fbshipit-source-id: 51f8f9bc4e45ebdb008dc440b779302b1103668a
Summary:
Building RNTester fails locally because my node path contains a space " ".
(I'm using [fnm](https://github.com/Schniz/fnm) which installs into `/Users/{username}/Library/Application Support/fnm`).
I haven't verified this, but I suspect this is broken for other apps as well, as the script is called when bundling for any app.
<details>
<summary>Expand to see output from the failed build</summary>
```
Node found at: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node
+ DEST=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app
+ [[ ! -n '' ]]
+ [[ Release = *Debug* ]]
+ [[ -n '' ]]
+ case "$CONFIGURATION" in
+ DEV=false
+++ dirname ../react-native/scripts/react-native-xcode.sh
++ cd ../react-native/scripts/..
++ pwd
+ REACT_NATIVE_DIR=/Users/kraen.hansen/Repositories/react-native/packages/react-native
+ PROJECT_ROOT=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ cd /Users/kraen.hansen/Repositories/react-native/packages/rn-tester
+ [[ -n /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js ]]
+ :
+ source /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/node-binary.sh
++ '[' -z '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' ']'
++ type '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node'
+ HERMES_ENGINE_PATH=/Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine
+ '[' -z /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine/build_host_hermesc/bin/hermesc ']'
+ [[ true != false ]]
+ [[ -f /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/Pods/hermes-engine ]]
+ '[' -z '' ']'
+ export NODE_ARGS=
+ NODE_ARGS=
+ '[' -z '' ']'
+ CLI_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js
+ '[' -z '' ']'
+ BUNDLE_COMMAND=bundle
+ '[' -z '' ']'
+ COMPOSE_SOURCEMAP_PATH=/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/compose-source-maps.js
+ [[ -z '' ]]
+ CONFIG_ARG=
+ [[ -z '' ]]
+ BUNDLE_NAME=main
+ BUNDLE_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle
+ EXTRA_ARGS=()
+ case "$PLATFORM_NAME" in
+ BUNDLE_PLATFORM=ios
+ '[' '' = YES ']'
+ EMIT_SOURCEMAP=
+ [[ ! -z ../sourcemap.ios.map ]]
+ EMIT_SOURCEMAP=true
+ PACKAGER_SOURCEMAP_FILE=
+ [[ true == true ]]
+ [[ true != false ]]
++ basename ../sourcemap.ios.map
+ PACKAGER_SOURCEMAP_FILE=/tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map
+ EXTRA_ARGS+=("--sourcemap-output" "$PACKAGER_SOURCEMAP_FILE")
+ [[ true != false ]]
+ [[ false == false ]]
+ EXTRA_ARGS+=("--minify" "false")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
+ '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node' /Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js bundle --entry-file /Users/kraen.hansen/Repositories/react-native/packages/rn-tester/js/RNTesterApp.ios.js --platform ios --dev false --reset-cache --bundle-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/main.jsbundle --assets-dest /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/RNTester.app --sourcemap-output /tmp/RNTesterBuild/Build/Products/Release-iphonesimulator/sourcemap.ios.map --minify false --config-cmd '/Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config'
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
node:internal/errors:983
const err = new Error(message);
^
Error: Command failed: /Users/kraen.hansen/Library/Application Support/fnm/node-versions/v22.11.0/installation/bin/node /Users/kraen.hansen/Repositories/react-native/packages/react-native/cli.js config
/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at checkExecSyncError (node:child_process:888:11)
at execSync (node:child_process:960:15)
at Command.handleAction (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:48:9)
at Command.listener [as _actionHandler] (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:542:17)
at /Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1502:14
at Command._chainOrCall (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1386:12)
at Command._parseCommand (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1501:27)
at Command.parse (/Users/kraen.hansen/Repositories/react-native/node_modules/commander/lib/command.js:1064:10)
at Object.<anonymous> (/Users/kraen.hansen/Repositories/react-native/packages/react-native/scripts/bundle.js:71:11)
at Module._compile (node:internal/modules/cjs/loader:1546:14)
at Object.<anonymous> (node:internal/modules/cjs/loader:1689:10)
at Module.load (node:internal/modules/cjs/loader:1318:32)
at Function._load (node:internal/modules/cjs/loader:1128:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
at node:internal/main/run_main_module:36:49 {
status: 127,
signal: null,
output: [
null,
'',
'/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
],
pid: 64660,
stdout: '',
stderr: '/bin/sh: /Users/kraen.hansen/Library/Application: No such file or directory\n'
}
Node.js v22.11.0
Command PhaseScriptExecution failed with a nonzero exit code
warning: Run script build phase '[CP-User] [RN]Check FBReactNativeSpec' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'React-RCTFBReactNativeSpec' from project 'Pods')
warning: Run script build phase 'Build JS Bundle' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
warning: Run script build phase '[RN] Copy Hermes Framework' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNTester' from project 'RNTesterPods')
** BUILD FAILED **
```
</details>
This PR add single quotes around the `$NODE_BINARY` and `$REACT_NATIVE_DIR` to avoid `--config-cmd` escaping similarly to the way they're escaped when invoked just below: https://github.com/facebook/react-native/blob/00c7174c24fd15db7723633e3e67aa59a7e73a6c/packages/react-native/scripts/react-native-xcode.sh#L155
## Changelog:
[IOS] [FIXED] - Properly escape paths in Xcode build script used when bundling an app.
Pull Request resolved: react#48275
Test Plan:
- Change your node path to contain a space (possibly through a symlink and manually updating the `.xcode.env.local` file in `packages/rn-tester`.
- Build the RNTester app for e2e tests: `yarn e2e-build-ios`
- See the failure mentioned above 💥
- Apply this patch and re-run the build command to success ✅
Reviewed By: NickGerleman
Differential Revision: D67256815
Pulled By: robhogan
fbshipit-source-id: e27a8cd079347fdf982c28b5af347be621c8feba
Summary:
Pull Request resolved: react#48283
Migrate from custom JSI integration to use TurboModule base-class.
This doesn't use codegen right now for ease of migration, and to avoid needing to setup a js_library buck definition for react-native-fantom. We should also figure out what the right abstraction/division of responsibilities is going forward for TesterAppDelegate and FantomModule.
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67111850
fbshipit-source-id: e1623d80f1f25ec123315b3620930dd17dd8a8a7
Summary:
Pull Request resolved: react#48285
Changelog: [Internal]
Reviewed By: rubennorte
Differential Revision: D67275514
fbshipit-source-id: 6512cbb090e90f827f643353a0a73c4f9516f651
Summary:
Fixes iOS LayoutConformanceView not work, seems caused by react#48188. NickGerleman can you help to review please?
## Changelog:
[IOS] [FIXED] - Fabric: Fixes LayoutConformanceView not work
Pull Request resolved: react#48253
Test Plan:
Before:
![image](https://github.com/user-attachments/assets/ca1f12c1-825b-4167-849d-b88f8ec54e21)
After:
![image](https://github.com/user-attachments/assets/c81b3192-8552-4147-b3af-3a8920a91d6c)
Reviewed By: NickGerleman, cipolleschi
Differential Revision: D67195461
Pulled By: javache
fbshipit-source-id: 2f45d9a9aa2389ba7cb89e601e7225dbef4f7abf
…t#48271)
Summary:
Fixesreact#39092
Right now, the `testID` prop that is passed to the ActivityIndicator component is not being applied as a `resource-id`. In this PR, we overwrite the `onInitializeAccessibilityNodeInfo` in the `ProgressBarContainerView` to set this `resource-id`.
## Changelog:
[ANDROID][ADDED] - ActivityIndicator: setting `resource-id` from the `testID` prop
Pull Request resolved: react#48271
Test Plan:
Render a simple activity indicator and pass a `testID` as follows:
```tsx
import {ActivityIndicator} from 'react-native';
function Playground() {
return (
<ActivityIndicator
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
}
```
<details>
<summary>Inspect the element using an e2e tool such as Maestro or Appium, the `resource-id` is not present: (see screenshot)</summary>
<img width="736" alt="image" src="https://github.com/user-attachments/assets/3aecce5f-3850-4c62-b1ab-aed4133e12bc" />
</details>
---
Apply the changes and then:
<details>
<summary>Inspect again, the `resource-id` is present now: (see screenshot)</summary>
<img width="731" alt="image" src="https://github.com/user-attachments/assets/5a0e3bfa-924a-4a50-8eef-2f7fff7e1290" />
</details>
Reviewed By: rshest
Differential Revision: D67274852
Pulled By: javache
fbshipit-source-id: 2ac8d2bbebed5d1723eb33e735bbf3b477a42572
…#48276)
Summary:
Fixesreact#48259 . The paper code like :
https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784
## Changelog:
[IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing
Pull Request resolved: react#48276
Test Plan: Repro in react#48259
Reviewed By: cipolleschi
Differential Revision: D67274739
Pulled By: javache
fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
Summary:
Pull Request resolved: react#48284
Changelog: [internal]
We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / react#48235).
This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).
It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.
Reviewed By: javache
Differential Revision: D67275518
fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
…eact#48267)
Summary:
Pull Request resolved: react#48267
`parentShadowView.tag` was renamed to `parentTag` in D66656411. This one callsite is hidden behind an `#ifdef`, so it didn't produce a compile error.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D67203413
fbshipit-source-id: 8c1b1af616165b9a80bd38ab4d7376cb2f27cce5
Summary:
Pull Request resolved: react#48268
No need to store and compare strings here when a simple boolean will do.
Changelog: [Internal]
Reviewed By: NickGerleman, mdvacca
Differential Revision: D67204387
fbshipit-source-id: c78cc758797980c2bce11875e0f6ea1961058f05
…n paths (react#48262)
Summary:
Pull Request resolved: react#48262
Changelog: [internal]
At the moment, we can't start surfaces in Fabric without calling `AppRegistry.runApplication`.
This is completely unnecessary in cases like Fantom, where the creation of the surface is done manually from JS and we render to it immediately after (so we don't need to call into JS again to run AppRegistry).
Reviewed By: javache
Differential Revision: D67199971
fbshipit-source-id: e6402686b6f544a4a7651f6a21a57891ca6be3d1
Summary:
Pull Request resolved: react#48263
Changelog: [internal]
Customize log level in Fantom based on flag in runner.js.
Reviewed By: javache
Differential Revision: D67199970
fbshipit-source-id: 31cdd2eaeee8e7ab4c8985661b35822d78d0457b
Summary:
Pull Request resolved: react#48196
X-link: react/metro#1400
- **[372ec00c03](react/react@372ec00c03 )**: Update ReactDebugInfo types to declare timing info separately ([react#31714](react/react#31714)) //<Sebastian Markbåge>//
- **[3d2ab01a55](react/react@3d2ab01a55 )**: [Flight] Extract special cases for Server Component return value position ([react#31713](react/react#31713)) //<Sebastian Markbåge>//
- **[1c9b138714](react/react@1c9b138714 )**: Don't serialize chunk ids for Hint and Console rows ([react#31671](react/react#31671)) //<Sebastian Markbåge>//
- **[de68d2f4a2](react/react@de68d2f4a2 )**: Register Suspense retry handlers in commit phase ([react#31667](react/react#31667)) //<Josh Story>//
- **[16d2bbbd1f](react/react@16d2bbbd1f )**: Client render dehydrated Suspense boundaries on document load ([react#31620](react/react#31620)) //<Josh Story>//
- **[5b0ef217ef](react/react@5b0ef217ef )**: s/server action/server function ([react#31005](react/react#31005)) //<Ricky>//
- **[e3b7ef32be](react/react@e3b7ef32be )**: [crud] Only export uRC when flag is enabled ([react#31617](react/react#31617)) //<lauren>//
- **[aba370f1e4](react/react@aba370f1e4 )**: Add moveBefore Experiment ([react#31596](react/react#31596)) //<Sebastian Markbåge>//
- **[1345c37941](react/react@1345c37941 )**: Mark all lanes in order on every new render ([react#31615](react/react#31615)) //<Sebastian Markbåge>//
- **[91061073d5](react/react@91061073d5 )**: Mark ping time as update ([react#31611](react/react#31611)) //<Sebastian Markbåge>//
- **[a9f14cb44e](react/react@a9f14cb44e )**: Fix Logging of Immediately Resolved Promises ([react#31610](react/react#31610)) //<Sebastian Markbåge>//
- **[c11c9510fa](react/react@c11c9510fa )**: [crud] Fix deps comparison bug ([react#31599](react/react#31599)) //<lauren>//
- **[64f89510af](react/react@64f89510af )**: [crud] Enable on RTR FB builds ([react#31590](react/react#31590)) //<lauren>//
- **[7558ffe84d](react/react@7558ffe84d )**: [crud] Fix copy paste typo ([react#31588](react/react#31588)) //<lauren>//
- **[7c254b6576](react/react@7c254b6576 )**: Log yielded time in the Component Track ([react#31563](react/react#31563)) //<Sebastian Markbåge>//
- **[6177b18c66](react/react@6177b18c66 )**: Track suspended time when the render doesn't commit because it suspended ([react#31552](react/react#31552)) //<Sebastian Markbåge>//
- **[eaf2d5c670](react/react@eaf2d5c670 )**: fix[eslint-plugin-react-hooks]: Fix error when callback argument is an identifier with an `as` expression ([react#31119](react/react#31119)) //<Mark Skelton>//
- **[047d95e85f](react/react@047d95e85f )**: [crud] Basic implementation ([react#31523](react/react#31523)) //<lauren>//
- **[92c0f5f85f](react/react@92c0f5f85f )**: Track separate SuspendedOnAction flag by rethrowing a separate SuspenseActionException sentinel ([react#31554](react/react#31554)) //<Sebastian Markbåge>//
- **[053b3cb050](react/react@053b3cb050 )**: [crud] Rename Effect type ([react#31557](react/react#31557)) //<lauren>//
- **[7dd6b9e68a](react/react@7dd6b9e68a )**: [crud] Add enableUseResourceEffectHook flag ([react#31556](react/react#31556)) //<lauren>//
- **[d8afd1c82e](react/react@d8afd1c82e )**: [crud] Scaffold initial types ([react#31555](react/react#31555)) //<lauren>//
- **[3720870a97](react/react@3720870a97 )**: Log Render Phases that Never Committed ([react#31548](react/react#31548)) //<Sebastian Markbåge>//
- **[8a41d6ceab](react/react@8a41d6ceab )**: Unify RootDidNotComplete and RootSuspendedWithDelay exit path ([react#31547](react/react#31547)) //<Sebastian Markbåge>//
- **[63cde684f5](react/react@63cde684f5 )**: (chore): copy fix in <style> precedence error ([react#31524](react/react#31524)) //<Zack Tanner>//
- **[b01722d585](react/react@b01722d585 )**: Format event with "warning" yellow and prefix with "Event: " ([react#31536](react/react#31536)) //<Sebastian Markbåge>//
- **[c13986da78](react/react@c13986da78 )**: Fix Overlapping "message" Bug in Performance Track ([react#31528](react/react#31528)) //<Sebastian Markbåge>//
- **[4686872159](react/react@4686872159 )**: Log passive commit phase when it wasn't delayed ([react#31526](react/react#31526)) //<Sebastian Markbåge>//
- **[5d89471ca6](react/react@5d89471ca6 )**: Export __COMPILER_RUNTIME in stable ([react#31540](react/react#31540)) //<lauren>//
- **[3644f0bd21](react/react@3644f0bd21 )**: Use completedRenderEndTime as the start of the commit phase if it's an immediate commit ([react#31527](react/react#31527)) //<Sebastian Markbåge>//
- **[8657869999](react/react@8657869999 )**: Separate Tracks for Components and Phases ([react#31525](react/react#31525)) //<Sebastian Markbåge>//
- **[b15135b9f5](react/react@b15135b9f5 )**: [ez] Update useMemoCache return type ([react#31539](react/react#31539)) //<lauren>//
Changelog:
[General][Changed] - Bump React from 18.3.1 to 19.0.0
bypass-github-export-checks
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D67018480
fbshipit-source-id: 39bca3261ffaa8bb7d74187510724d77cc36b196
…flow` (react#48272)
Summary:
There are a some warnings in the PRs generated by the unsorted imports in the `RCTNetworking.js.flow` file.
This PR addresses that. As an example: https://github.com/facebook/react-native/pull/48271/files
<img width="721" alt="image" src="https://github.com/user-attachments/assets/7e5347a5-c802-4c21-870d-f4983b515a7b" />
## Changelog:
[INTERNAL] [FIXED] - Sorting `RCTNetworking.js.flow` imports that generate a warning in the PRs
Pull Request resolved: react#48272
Test Plan: Verify that this PR doesn't show these warnings anymore
Reviewed By: NickGerleman
Differential Revision: D67274752
Pulled By: javache
fbshipit-source-id: 84ac36e0aaaeaf0156e40de9f6c61bd70fa1db85
Summary:
Pull Request resolved: react#48291
Changelog: [internal]
`react-native-fantom` was added to `.eslintignore` when we upgraded to React 19 because we wanted to reduce the amount of warnings to ease the migration.
This re-enables ESLint for that directory and removes the warnings.
Reviewed By: cipolleschi
Differential Revision: D67283104
fbshipit-source-id: 4ec2363ceaff3cd7bd6e5d70e9588c3dd22d7d85
…cripts (react#48257)
Summary:
When building a react native app from Xcode and ccache has been set to be used, the `ccache-clang.sh` and `ccache-clang++.sh` scripts cannot find `ccache`, because Xcode PATH does not include ccache binary.
What I've done is setting a `CCACHE_BINARY` user-defined Xcode setting containing the result of executing `command -v ccache` during pod install execution and directly calling it in ccache scripts, set by ReactNativePodsUtils when ccache is enabled.
Fixesreact#46126
## Changelog:
[IOS] [FIXED] - fix ccache not found error exporting ccache binary path as Xcode user-defined setting to be used by ccache scripts
Pull Request resolved: react#48257
Test Plan: Correctly builds helloworld and RNTester apps using ccache by enabling it at pod install time: `USE_CCACHE=1 pod install`.
Reviewed By: christophpurrer
Differential Revision: D67280700
Pulled By: cipolleschi
fbshipit-source-id: 5478a191f9bd77606a56ccd340fea225ab62d4bc
Summary:
Pull Request resolved: react#48158
Changelog: [Android][Added] Add mockito-kotlin for Kotlin unit testing
Reviewed By: cortinico
Differential Revision: D66897263
fbshipit-source-id: c608622e2431578f4eaa3fecff4f6c82a56b5090
Summary:
Pull Request resolved: react#48159
Fix the setup for ignored tests and re-enable them.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66897564
fbshipit-source-id: bac777c981976e08140bc0832f5402995ffceb8e
Summary:
Pull Request resolved: react#48160
Shift to mockito-kotlin and fix ReactCookieJarContainerTest so it's not just testing a mock.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D66898956
fbshipit-source-id: 5ccc652b86e5a80b81d257d3ec645d7bc813301b
Summary:
Pull Request resolved: react#48205
Flip mockito usages to mockito-kotlin
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D66985841
fbshipit-source-id: 23c501c96567e6f4f884bc4db8930f1d68b0351c
Summary:
Pull Request resolved: react#48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: react#48269
# Changelog: [Internal]
I've noticed that our definition of Trace Event is different from the one that is defined in Google's doc / V8 / Chrome. This has some flaws:
* It creates fragmentation, like with custom track ids or with mocked process ids.
* Current implementation is strict the relationship between `performance.mark()`, `performance.measure` APIs and Instant, Complete Trace Events. Basically only something recorded with `performance.mark` can be an instant trace event.
This should unblock recording custom trace events inside `PerformanceTracer`, such as when tracing started and others. Same could be said about events related to CPU profiling from Hermes, which will be based on these APIs.
This is the pre-requisite for next diff that will add emitting `TracingStartedInPage` event. With this event, the trace should look similar to the one recorded in the browser, and Timings / Main tracks no longer should be registered manually.
Reviewed By: huntie
Differential Revision: D67207107
fbshipit-source-id: fd7f55dd82167c14a63c2d93aaa649072c5a2a2c
Summary:
Pull Request resolved: react#47750
Migrate ReactOverflowView to kotlin
changelog: [internal] internal
Reviewed By: NickGerleman
Differential Revision: D66217252
fbshipit-source-id: 8cd642dee2077006eab10d718a1887a77fd029a7
Summary:
Pull Request resolved: react#47749
Migrate ReactPointerEventsView to kotlin
changelog: [Android][Breaking] Mikgrating pointerEvents API breaks compatibility for kotlin usages of this api as a val
Reviewed By: cortinico
Differential Revision: D66217250
fbshipit-source-id: ff192c9f92d1df93c082b563937eb3f37176f144
Summary:
Pull Request resolved: react#48293
Update deprecation message
changelog: [internal] internal
Reviewed By: arushikesarwani94
Differential Revision: D67292511
fbshipit-source-id: 4d3315ce05f5c5ae1060659e98832305fee93377
Summary:
Pull Request resolved: react#48568
We only need this dependency for internal builds, as we only rely on fbjni, which is its own open-source project.
This code was forked for open-source and not synced in anyway, which is a potential liability.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D67796633
fbshipit-source-id: 8609783ed0921a53a823658b9fd07a57651e91fe
Summary:
Pull Request resolved: react#48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: react#48607
This feature flag acted as a killswitch but it was effectively never used, so we can clean it up now.
Changelog:
[Internal] [Changed] - Cleanup `enableAlignItemsBaselineOnFabricIOS`
Reviewed By: cipolleschi
Differential Revision: D68018624
fbshipit-source-id: 2340b505021a6632b07a3a872e35b35522b6f361
Summary:
Pull Request resolved: react#48577
This has been enabled by default for about two and a half months. Let's clean up the old path.
Changelog: [Internal]
Reviewed By: javache
Differential Revision: D67985133
fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
…putShadowNode for Android (react#48582)
Summary:
Pull Request resolved: react#48582
[Changelog] [Internal] - Preparation for sharing common ShadowNode functionality in BaseTextInputShadowNode for Android
As a preparation for react#48165 this change aligns the order of methods between:
- BaseTextInputShadowNode.h
- AndroidTextInputShadowNode.h
to make it easier for future changes to look at the delta between both implementations.
The goal is land react#48582 which aligns the RN iOS and RN Android implementation
Reviewed By: NickGerleman
Differential Revision: D68001423
fbshipit-source-id: 5a5efa6542de676bd175744e7313c2b819e67f11
Summary:
Pull Request resolved: react#48548
In this diff I'm introducing the new public API ViewManagerInterface, this will be used in the next diffs of the stack to be implemented by all viewManagerInterfaces that are code-gen when using the new architecture
changelog: [Android][Changed] Introduce new public API ViewManagerInterface
Reviewed By: javache
Differential Revision: D67957886
fbshipit-source-id: 372bf99e4c977c3a4d2252b54371ec9f0dae6e9f
…8549)
Summary:
Pull Request resolved: react#48549
Refactor ViewManager codegen to use new ViewManagerInterface
changelog: [internal] internal
Reviewed By: javache
Differential Revision: D67957884
fbshipit-source-id: 7abcd453580ab2219770fd1aff780ba2977dfc8a
Summary:
Pull Request resolved: react#48581
Previously the CXX only modules were not being inclued in the schema for these apps, and therefore weren't being caught by the compat check.
Reviewed By: cipolleschi
Differential Revision: D68000360
fbshipit-source-id: 5d56bc840bd220f3b8b814e5d90eb49d9a2beb0b
…g with AndroidTextInputShadowNode (react#48584)
Summary:
Pull Request resolved: react#48584
[Changelog] [Internal] - Align logic in BaseTextInputShadowNode to calculate placeholder string with AndroidTextInputShadowNode
As a preparation for react#48165 this aligns the implementation of those 2 methods
Reviewed By: NickGerleman
Differential Revision: D68004218
fbshipit-source-id: 722a33bb2665c59347ef1b0cd8ed7b35a05b2113
Summary:
Pull Request resolved: react#48556
Changelog: [Internal]
the only place in view module that uses folly is `ViewPropsInterpolation.h` and that is only on Android.
This diff makes that dependency explicit and make it android only.
Reviewed By: javache
Differential Revision: D67942951
fbshipit-source-id: 2a1a41f5a4caba553e81d4bb78ac9c84ba90b60b
Summary:
Pull Request resolved: react#48593
Changelog: [General][Changed] - Improve types on BorderBox
Reviewed By: NickGerleman
Differential Revision: D68014754
fbshipit-source-id: ab6af9ffb4a80a4040011c1a27ede95ea2c59171
Summary:
Pull Request resolved: react#48605
Changelog:
[General][Changed] - Improved types in ElementBox and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68018112
fbshipit-source-id: 369b5fb06d1f9d0bd450f487ab792b23b1d094af
Summary:
Pull Request resolved: react#48608
Changelog:
[General][Changed] - Improved types in StyleInspector and refactored a code
Reviewed By: fabriziocucci
Differential Revision: D68018846
fbshipit-source-id: ce737ec28a54c5d80d98f79380327b049c3e394b
Summary:
Pull Request resolved: react#48601
Changelog:
[General][Changed] - Improved types in BoxInspector and refactored a code
Reviewed By: NickGerleman
Differential Revision: D68017470
fbshipit-source-id: f55b958aeee44babb41cea996f944cbc551a7a7b
Summary:
Fix for react#48627
## Changelog:
[IOS] [FIXED] - Resolve "Your project does not explicitly specify the CocoaPods master specs repo" `pod install` warning
Pull Request resolved: react#48628
Test Plan:
1. Run `bundle exec pod install`
2. Observe the warning no longer showing
Reviewed By: rshest
Differential Revision: D68094563
Pulled By: fabriziocucci
fbshipit-source-id: 8f7ef67e4c5f71af65b7958e67bb58e7277a3e0e
Summary:
Follow up from react#48619. While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR: Converting from class to functional components some `AnExApp` examples that were using `UNSAFE_` lifecycles.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for AnExApp examples
Pull Request resolved: react#48620
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: rshest
Differential Revision: D68092958
Pulled By: cipolleschi
fbshipit-source-id: 0f2cea3c679f8db0f13054e2851a73dc23a4c906
Summary:
## Changelog:
[iOS] [Fixed] - Fix app becoming unresponsive when RefreshControl is used inside of <Modal />
Fixes: react#48579
This is a UIKit bug. Switching to `didMoveToSuperview` resolves it.
Reviewed By: cipolleschi
Differential Revision: D68025099
fbshipit-source-id: 5d5e730f002ca93748674655a8393b770dc11611
Co-authored-by: kkafar <kacperkafara@gmail.com>
Summary:
While investigating react#22186, some false positives showed up as some of the examples also have non-strict mode compatible code.
In this PR:
- Converting from class to functional components some TextInput and Image examples that were using `UNSAFE_` lifecycles.
- Unifying the auto-expanding example as it was exactly the same for iOS and Android.
## Changelog:
[INTERNAL] - Fix RNTester strict mode warnings for TextInput and Image examples
Pull Request resolved: react#48619
Test Plan:
- Wrapped the the entry app component in `RNTesterAppShared.js` with `StrictMode` and verified that no warnings are shown anymore for the updated components.
- Checked the examples are still working as they were.
Reviewed By: fabriziocucci
Differential Revision: D68094402
Pulled By: rshest
fbshipit-source-id: e13878cb290735095afaef3d0377fd6dab33c380
@Saadnajmi
Saad Najmi (Saadnajmi) requested a review from a team as a code ownerFebruary 10, 2025 09:31

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization

This string may still contain [<!--](1), which may cause an HTML element injection vulnerability.

Check failure

Code scanning / CodeQL

Incomplete regular expression for hostnames

This regular expression has an unescaped '.' before 'chromestatus.com', so it might match more hosts than expected.

Check warning

Code scanning / CodeQL

DOM text reinterpreted as HTML

[DOM text](1) is reinterpreted as HTML without escaping meta-characters.

Check warning

Code scanning / CodeQL

Improper code sanitization

Code construction depends on an [improperly sanitized value](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
Comment threadtools/api/public-api.js Outdated

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [file name](1).
@Saadnajmi
Saad Najmi (Saadnajmi)force-pushed the 0.78-merge branch 3 times, most recently from 5d60591 to 5121adeCompareMarch 20, 2025 02:33
@Saadnajmi
Saad Najmi (Saadnajmi) merged commit ce45e31 into microsoft:mainMar 22, 2025
@Saadnajmi
Saad Najmi (Saadnajmi) deleted the 0.78-merge branch March 24, 2025 00:17
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

20 participants

@Saadnajmi@JunielKatarn@github-advanced-security@hannojg@mateoguzmana@christophpurrer@rozele@javache@zhongwuzw@rubennorte@cipolleschi@ste7en@mdvacca@mijay@huntie@SamChou19815@elicwhite@okwasniewski@zeyap@r-barnes