Open
Conversation
…g event on if this changes (facebook#54447) Summary: Pull Request resolved: facebook#54447 Changelog: [Internal] Expose `unstable_hasConnectedDevices` and `unstable_addHasConnectedDevicesListener` from both `InspectorProxy` and `DevMiddleware` that tells the user if any devices are connected to `devMiddleware` and allows to listen to whenever this state changes. Reviewed By: motiz88 Differential Revision: D86319965 fbshipit-source-id: 18a30138b16a41821dc17a63e9d9cada04888f34
…ODE (facebook#54654) Summary: Pull Request resolved: facebook#54654 make the default debugger-shell spawn command unset ELECTRON_RUN_AS_NODE Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D86673603 fbshipit-source-id: 0233468ac516031c0fd5c7ee568962345dc31829
…ook#54528) Summary: Pull Request resolved: facebook#54528 Changelog: [Internal] Currently, `DefaultBrowserLauncher.js` holds arguments configuring how the debugger shell is launched. Instead, move some of them downstream, and make `DefaultBrowserLauncher.js` use the defaults. Reviewed By: motiz88 Differential Revision: D86772692 fbshipit-source-id: 826bb6236dc3cba3c4b0d455aebf3f81c4e8ed6f
Summary: Pull Request resolved: facebook#54778 Changelog: [Internal] The correct value is `validateStream` and not `validStream` https://nodejs.org/api/util.html#utilstyletextformat-text-options Reviewed By: huntie Differential Revision: D88368928 fbshipit-source-id: 0f9a9bf0aaa13b325dd22aed8c07d8dab38e5f17
…54818 (facebook#54822) Summary: Pull Request resolved: facebook#54822 Updates hash generation in `versionExportedApis.js` to track changes to `declare const` type declarations like `AccessibilityInfo_default`. Previously, changes to APIs (e.g., `AccessibilityInfo`) would not always update their hashes in `ReactNativeApi.d.ts`, causing the breaking change detection to miss actual API changes. Three issues prevented proper hash tracking: 1. **`VariableDeclaration` types weren't tracked** - `declare const X: {...}` was not in the list of tracked declaration types 2. **Duplicate declarations caused overwrites** - `declare type X = typeof X` would overwrite `declare const X: typeof X_default` in the declarations map, losing the dependency on `X_default` 3. **`typeof X` queries weren't extracting dependencies** - references via `typeof` weren't being added to the dependency graph ## Fix - Add `t.isVariableDeclaration(node)` to tracked types with proper name extraction - Prevent overwriting existing declarations (first declaration wins) - Handle `TSTypeQuery` nodes to extract `typeof X` dependencies ### Note on Hash Changes This PR causes many hashes to change, even for types that haven't been modified. This is expected because the hash computation now includes `declare const` dependencies that were previously ignored. **Before:** `AccessibilityInfo` hash only included `declare type AccessibilityInfo = typeof AccessibilityInfo` (self-reference) **After:** Hash now includes `declare const AccessibilityInfo: typeof AccessibilityInfo_default` + the full `AccessibilityInfo_default` type ## Changelog: [GENERAL] [FIXED] - hash generation includes `declare const` types in API snapshot Reviewed By: huntie Differential Revision: D88653322 fbshipit-source-id: abdf9c5e11bf8ff9e6e2f17a743a2d5aa213ae1c
…acebook#54819) Summary: Updates the `diff-js-api-breaking-changes` action to compare the PR's changes against the merge base (where the branch diverged from main) instead of the current tip of main. ### Problem The previous implementation compared the current state of `main` to the PR head. This could produce false positive results when main had new commits to reactNativeApi.d.ts reporting breaking changes from main as if they were introduced by the PR. ### Solution - Calculate the merge base between the PR head and `origin/main` - Compare the API snapshot at the merge base to the snapshot at the PR head ## Changelog: [GENERAL] [FIXED] - Updates the `diff-js-api-breaking-changes` action to compare the PR's changes against the merge base (where the branch diverged from main) instead of the current tip of main. Pull Request resolved: facebook#54819 Test Plan: (outputs shown for facebook#54815) Tested locally on branch that previously got false positive: Mirror old approach: ``` mkdir -p /tmp/api-diff-old git show origin/main:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff-old/before.d.ts git show HEAD:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff-old/after.d.ts node ./scripts/js-api/diff-api-snapshot /tmp/api-diff-old/before.d.ts /tmp/api-diff-old/after.d.ts ``` output: ``` { "result": "BREAKING", "changedApis": [ "ActivityIndicatorProps", "Animated", "DrawerLayoutAndroidProps", "FlatList", "FlatListProps", "ImageBackground", "ImageBackgroundProps", "ImageProps", "ImagePropsBase", "KeyDownEvent", "KeyEvent", "KeyUpEvent", "KeyboardAvoidingView", "KeyboardAvoidingViewProps", "ModalProps", "PressableProps", "ProgressBarAndroidProps", "RefreshControl", "RefreshControlProps", "ScrollViewProps", "SectionList", "SectionListProps", "SwitchProps", "TextInputProps", "ViewProps", "VirtualizedListProps", "VirtualizedSectionListProps" ] } ``` Mirror new approach: ``` git fetch origin main MERGE_BASE=$(git merge-base HEAD origin/main) echo "Merge base: $MERGE_BASE" mkdir -p /tmp/api-diff git show $MERGE_BASE:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff/before.d.ts git show HEAD:packages/react-native/ReactNativeApi.d.ts > /tmp/api-diff/after.d.ts node ./scripts/js-api/diff-api-snapshot /tmp/api-diff/before.d.ts /tmp/api-diff/after.d.ts ``` output: ``` { "result": "NON_BREAKING", "changedApis": [] } ``` Reviewed By: huntie Differential Revision: D88654826 Pulled By: emily8rown fbshipit-source-id: 5dc2e295d7d527899b5cb6a643c4878aeebf7f0b
Summary: Pull Request resolved: facebook#54728 Adds support for `shadowColor`, `shadowOffset`, `shadowOpacity`, and `shadowRadius` props to the animation backend. ## Changelog: [General][Added] - Added support for `shadowColor`, `shadowOffset`, `shadowOpacity`, and `shadowRadius` props to the animation backend. Reviewed By: zeyap Differential Revision: D88007307 fbshipit-source-id: ac12043d5d42ef17b3330abb687722b2aedf30b2
…acebook#54821) Summary: Pull Request resolved: facebook#54821 This diff addresses build issues that arise when the `RCT_REMOVE_LEGACY_ARCH` flag is enabled internally. The changes ensure that the build process is compatible with the updated architecture. ## Changelog: [Internal] - Make sure that we can build using BUCK when the RCT_NEW_ARCH_ENABLED flag is turned on. Reviewed By: GijsWeterings Differential Revision: D88651074 fbshipit-source-id: 41d9d033c1160b5b8b4a7ad3db240e9cf7b50e38
Summary: Invoking `Runtime.getRuntime().exec()` is not compatible with Gradle Configuration Cache and providers should be used instead. This error hasn't surfaced yet due to fact that this branch of code is rarely hit as the users usually provide correct path to the CLI in their `app/build.gradle` file. I stumbled upon it accidentally when bumping RN in monorepo and the CLI path was no longer valid. Re-opened due to failing tests in the previous PR facebook#54801 ## Changelog: [ANDROID] [FIXED] - RNGP using node invocation non-compatible with Gradle Compilation Cache Pull Request resolved: facebook#54829 Test Plan: I tested it in a rnc-cli app, where I provided an invalid path for `cliFile` - the error was fixed after applying this patch. `./gradlew -p packages/gradle-plugin/ test` now works properly. Reviewed By: mdvacca Differential Revision: D88757054 Pulled By: cortinico fbshipit-source-id: 07b86f8cf4d242dee30b97b7768602ff9b60ed54
Summary: This fixes hit tests in view using legacy module interop since the interop adds another view surrounding the actual view it needs to delegate the hit test to the actual component it wraps ## Changelog: [IOS] [FIXED] - Fix legacy module interop not handling hitTest correctly Pull Request resolved: facebook#54802 Reviewed By: cortinico Differential Revision: D88630976 Pulled By: cipolleschi fbshipit-source-id: 85ce2b4e4244b05c19942208fdfb6a65d91e2f38
Summary: This PR fixes problems with unit & integration tests in the iOS RNTester project, related to: compilation errors, JS problems, missing mocks & outdated baselines. ## Changelog: [Internal] - Re-enabled iOS unit & integration tests, Ruby tests on CI, stripped obsolete build part before running tests, renamed uploaded xcresult artifacts Pull Request resolved: facebook#53848 Test Plan: 1. iOS tests pass: - When run from dedicated xcschemes: <img width="596" height="388" alt="image" src="https://github.com/user-attachments/assets/9f3a038b-f12e-4b12-ab95-93d55eb60d63" /> <img width="611" height="381" alt="image" src="https://github.com/user-attachments/assets/27ff3a6f-57da-4842-a96c-db569e417dc3" /> - When run from the RNTester scheme (command + U): <img width="754" height="384" alt="image" src="https://github.com/user-attachments/assets/0b4a6e70-56da-40c1-b019-b1e87d8df591" /> 2. Ruby scripting tests pass: <img width="655" height="349" alt="image" src="https://github.com/user-attachments/assets/a6a41d16-2744-44c9-bf87-e4a06f228cfb" /> 3. CI - green 4. xcresult artifacts are uploaded <img width="1370" height="478" alt="image" src="https://github.com/user-attachments/assets/1bd0638d-f215-48f7-b798-fadb8799c5f7" /> Reviewed By: huntie Differential Revision: D88733170 Pulled By: cipolleschi fbshipit-source-id: e14c69bede1db34461926726bc796804b365a7a9
Summary: Pull Request resolved: facebook#54844 Changelog: [Internal] Reviewed By: cortinico Differential Revision: D88859901 fbshipit-source-id: de6f34ba5a4cc2755848e3c5c020b666e1444377
Summary: onBackPressed returns a boolean: whether the back press was handled. When react is invalid, this method should return false. This diff accomplishes that. Changelog: [Android][Fixed] - Make ReactDelegate.onBackPressed() return correct status Reviewed By: mdvacca Differential Revision: D88787192 fbshipit-source-id: 52d6b046df749e1c6d5eefc300bad0cdfa240735
…facebook#54791) Summary: Pull Request resolved: facebook#54791 This change adds a listener mechanism to the `OverrideColorScheme` interface to enable dynamic updates when the user's dark mode preference changes via `OverrideColorScheme`. Previously, `AppearanceModule` would only reflect the initial color scheme state when instantiated. If a user toggled dark mode through an `OverrideColorScheme` implementation, React Native JavaScript would not be notified of the change, causing UI inconsistencies. This implementation adds: 1. An optional `addSchemeChangeListener()` method to the `OverrideColorScheme` interface with a default no-op implementation for backward compatibility. Also adding matching `removeSchemeChangeListener()`. 2. Automatic listener registration in `AppearanceModule`'s init block that triggers `onConfigurationChanged()` when the color scheme changes Changelog: [Android][Added] - Add `{add|remove}SchemeChangeListener()` function to `OverrideColorScheme` interface to support dynamic appearance updates via override Reviewed By: javache Differential Revision: D88427482 fbshipit-source-id: 02b71335bb5bebd1f44bf9723c3120f9a1fc182c
Summary: Chronos Job Instance ID: 1125908171283078 Sandcastle Job Instance ID: 22518000514137823 Processed xml files: android_res/com/facebook/messaging/browser/util/res/values/strings.xml android_res/com/facebook/messaging/quickpromotion/chatentity/composer/res/values/strings.xml android_res/com/facebook/xapp/messaging/composer/mention/component/res/values/strings.xml android_res/com/facebook/messaging/media/commonutil/res/values/strings.xml android_res/com/facebook/messaging/montage/composer/model/res/values/strings.xml android_res/com/facebook/messaging/threadview/titlebar/m4/res/values/strings.xml android_res/com/facebook/messaging/deletemessage/res/values/strings.xml android_res/com/facebook/messaging/groups/create/res/values/strings.xml android_res/com/facebook/messaging/groups/description/res/values/strings.xml android_res/com/facebook/messaging/search/res/values/strings.xml android_res/com/facebook/messaging/hometabs/res/values/strings.xml android_res/com/facebook/resources/impl/res/values/strings.xml android_res/com/facebook/xapp/messaging/common/date/res/values/strings.xml android_res/com/facebook/messaging/threads/threadconnectivity/res/values/strings.xml android_res/com/facebook/messaginginblue/common/ui/components/msysbootstrap/res/values/strings.xml android_res/com/facebook/messaginginblue/common/ui/components/instantfeedback/res/values/strings.xml android_res/com/facebook/xapp/messaging/message/multiselect/bottomsheet/res/values/strings.xml android_res/com/facebook/messaging/mutators/res/values/strings.xml android_res/com/facebook/messaging/snippet/res/values/strings.xml android_res/com/facebook/messaging/notify/res/values/strings.xml android_res/com/facebook/messaging/media/viewer/res/values/strings.xml android_res/com/facebook/messaging/media/resharehub/res/values/strings.xml android_res/com/facebook/messaging/linkhandling/res/values/strings.xml android_res/com/facebook/presence/note/ui/shared/res/values/strings.xml android_res/com/facebook/notifications/turnon/res/values/strings.xml android_res/com/facebook/newsfeed/res/values/strings.xml android_res/com/facebook/fig/facepile/res/values/strings.xml android_res/com/facebook/adinterfaces/common/res/values/strings.xml android_res/com/facebook/photos/editgallerylauncher/res/values/strings.xml android_res/com/facebook/photos/crop/res/values/strings.xml android_res/com/facebook/photos/creativeediting/res/values/strings.xml android_res/com/facebook/inspiration/groups/res/values/strings.xml android_res/com/facebook/inspiration/communities/res/values/strings.xml android_res/com/facebook/inspiration/fundraiser/res/values/strings.xml android_res/com/facebook/newsfeed/sponsored/res/values/strings.xml android_res/com/facebook/maps/reporter/res/values/strings.xml android_res/com/facebook/maps/navigation/res/values/strings.xml android_res/com/facebook/translation/res/values/strings.xml android_res/com/facebook/notifications/res/values/strings.xml android_res/com/facebook/fds/responsivepost/res/values/strings.xml android_res/com/facebook/inspiration/channels/res/values/strings.xml android_res/com/facebook/goodwill/res/values/strings.xml android_res/com/facebook/fds/internalselectioncounter/res/values/strings.xml android_res/com/facebook/photos/simplepicker/res/values/strings.xml android_res/com/facebook/katana/activity/res/values/strings.xml android_res/com/facebook/tabbar/ui/res/values/strings.xml android_res/com/facebook/navigation/gesture/res/values/strings.xml android_res/com/facebook/messaginginblue/aibot/voice/callbanner/res/values/strings.xml android_res/com/facebook/katana/ui/bookmark/res/values/strings.xml android_res/com/facebook/feed/util/composer/res/values/strings.xml android_res/com/facebook/feedback/comments/composer/res/values/strings.xml android_res/com/facebook/inspiration/composer/media/res/values/strings.xml android_res/com/meta/metaai/shared/res/values/strings.xml android_res/com/meta/metaai/components/shared/res/values/strings.xml android_res/com/meta/metaai/writewithai/creation/impl/activity/res/values/strings.xml android_res/com/meta/metaai/responsecard/core/impl/res/values/strings.xml android_res/com/meta/metaai/music/res/values/strings.xml android_res/com/meta/metaai/imagine/creation/res/values/strings.xml android_res/com/meta/metaai/components/voice/res/values/strings.xml libraries/foa/ui/cds/widgets-litho/textinput/res/values/strings.xml android_res/com/meta/metaai/imagine/shared/res/values/strings.xml android_res/com/meta/metaai/imagine/canvas/strings/res/values/strings.xml android_res/com/meta/metaai/imagine/edit/strings/res/values/strings.xml android_res/com/facebook/oxygen/preloads/integration/install/common/res/values/strings.xml android_res/com/facebook/threads/res/values/strings.xml android_res/com/facebook/ui/navbar/config/activenowbutton/res/values/strings.xml android_res/com/facebook/fds/subnavigationbar/res/values/strings.xml android_res/com/facebook/composer/res/values/strings.xml android_res/com/facebook/video/creativeediting/shared/res/values/strings.xml android_res/com/facebook/composer/inlinesprouts/res/values/strings.xml android_res/com/facebook/checkin/stories/res/values/strings.xml android_res/com/facebook/fig/starrating/res/values/strings.xml ../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/views/uimanager/values/strings.xml ../xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/res/systeminfo/values/strings.xml android_res/com/facebook/navigation/communitypanel/res/values/strings.xml libraries/foa/ui/cds/widgets-litho/brandasset/res/values/strings.xml android_res/com/facebook/mig/input/res/values/strings.xml android_res/com/facebook/mig/accessibility/res/values/strings.xml android_res/com/facebook/mig/dialog/bottomsheet/res/values/strings.xml android_res/com/facebook/bloks/hosting/res/values/strings.xml android_res/com/facebook/messaging/communitymessaging/tab/plugins/tabcontent/res/values/strings.xml android_res/com/facebook/messaging/aitab/res/values/strings.xml android_res/com/facebook/messaging/aibot/aistudiotab/res/values/strings.xml android_res/com/facebook/events/create/loading/res/values/strings.xml libraries/foa/ui/cds/widgets-litho/navbar/res/values/strings.xml android_res/com/meta/foa/products/login/src/main/res/values/strings.xml libraries/foa/ui/cds/widgets-litho/searchfield/res/values/strings.xml android_res/com/meta/foa/products/accountswitcher/src/main/shared/res/values/strings.xml android_res/com/facebook/feed/platformads/res/values/strings.xml android_res/com/facebook/notifications/ringtone/res/values/strings.xml android_res/com/facebook/notifications/channels/res/values/strings.xml android_res/com/facebook/directinstall/res/values/strings.xml android_res/com/facebook/crossposting/res/values/strings.xml android_res/com/facebook/video/followvideos/res/values/strings.xml android_res/com/facebook/video/chaining/res/values/strings.xml android_res/com/facebook/feedplugins/base/res/values/strings.xml android_res/com/facebook/video/videohome/res/values/strings.xml android_res/com/facebook/feed/rows/res/values/strings.xml android_res/com/facebook/spherical/photo/renderer/res/values/strings.xml android_res/com/facebook/richdocumentnux/res/values/strings.xml allow-large-files ignore-conflict-markers opt-out-review drop-conflicts Differential Revision: D88943135 fbshipit-source-id: bf32c06b2fb62eeac523357534e04898fc43907f
Summary: - `experimental_backgroundSize` - `experimental_backgroundPosition` - `experimental_backgroundRepeat` types are missing in the manually written .d.ts file but are available in `react-native-strict-api` ## Changelog: [GENERAL] [FIXED] - Added missing `experimental_backgroundSize`, `experimental_backgroundPosition`, `experimental_backgroundRepeat` to manually written types. Pull Request resolved: facebook#54797 Test Plan: CI Reviewed By: cortinico Differential Revision: D88483858 Pulled By: javache fbshipit-source-id: 4fa42aab42a7be529c292d1b807ee46417756bca
…54809) Summary: If a subclass of RCTEventEmitter outlives the bridge and the bridge is invalidated, the invalidate method is called on RCTEventEmitter which calls stopObserving but does not change the listenerCount. Once the bridge is recreated and a listener added to the RCTEventEmitter if the listenerCount is > 1 startListening is never called: https://github.com/facebook/react-native/blob/a9a02689533f9cf30fc20cfc7be1ade4f4a624da/packages/react-native/React/Modules/RCTEventEmitter.m#L109 This just resets the listenerCount to prevent this. Probably not a good idea to have modules that outlive bridge in first place but this seems like unwanted behavior in any case :). ## Changelog: [iOS] [Fixed] - fix listenerCount not resetting for RCTEventEmitter Pull Request resolved: facebook#54809 Test Plan: I tested this code via a patch in the artsy/eigen app repo: artsy/eigen#13068 The app was using a native module that posts events over the bridge to handle push notifications. Behavior before: 1. Start app listeners added to ARNotificationManager module, startListener called listenerCount = 2 2. Force a dev reload invalidating the bridge 3. Invalidate called on bridge and the native module causing stopObserving to be called but listenerCount remains 2 4. Bridge refreshes listeners added again but startObserving never called Behavior after: 1. Start app listeners added to ARNotificationManager module, startListener called listenerCount = 2 2. Force a dev reload invalidating the bridge 3. Invalidate called on bridge and the native module causing stopObserving to be called but listenerCount reset to 0 4. Bridge refreshes listeners added again listeners added again, startObserving called after first Reviewed By: cipolleschi Differential Revision: D88647586 Pulled By: javache fbshipit-source-id: 8a8b8b8cf4c7e683f02a08e40fc9d95c8ba4e4ac
Summary: Changelog: [General][Fixed] - Added handling of missing props to `AnimatedPropsRegistry` Reviewed By: bartlomiejbloniarz Differential Revision: D88945661 fbshipit-source-id: 8e1f757a3cf0fdd8bb159a8ec3e1292793d4162f
Summary: Pull Request resolved: facebook#54849 ## Summary This commit fixes a crash (JNI abort) that occurs when a Java TurboModule's creation throws an exception. The fix applies to two methods: getTurboJavaModule and getLegacyJavaModule. ## Problem When calling Java methods via fbjni with std::string arguments, fbjni creates temporary local_ref<JString> objects for the converted arguments. https://www.internalfb.com/code/fbsource/[74f313eee086]/fbandroid/libraries/fbjni/cxx/fbjni/detail/Meta-inl.h?lines=78-89 If the Java method throws an exception: 1. The JNI call returns with a pending exception flag set 2. C++ destroys the temporary jstring arguments (at end of full-expression) 3. The destructor calls GetObjectRefType() while there's a pending exception 4. This violates JNI rules and causes ART's CheckJNI to abort the process ## The Fix Pre-convert string arguments to jstring before the method call, controlling the lifetime of the local_ref<JString> so it extends past the exception check. Before: ``` static auto getTurboJavaModule = javaPart->getClass() ->getMethod<jni::alias_ref<JTurboModule>(const std::string&)>( "getTurboJavaModule"); auto moduleInstance = getTurboJavaModule(javaPart.get(), name); ``` After: ``` static auto getTurboJavaModule = javaPart->getClass()->getMethod<jni::alias_ref<JTurboModule>(jstring)>( "getTurboJavaModule"); auto jname = jni::make_jstring(name); auto moduleInstance = getTurboJavaModule(javaPart.get(), jname.get()); ``` The same change was applied to getLegacyJavaModule. ## Long-term solution This should be a system fix applied to fbjni. That is done in the subsequent diff. Changelog: [Android][Fixed] - Fix jni aborts when turbomodule constructors throw Reviewed By: javache Differential Revision: D88910516 fbshipit-source-id: a701f6033ceeb3a7b65efd5211cc0599744c1e54
…k#54852) Summary: Pull Request resolved: facebook#54852 While working on internal apps, I've noticed that there are scenarios where more than one `PackagerConnectionSettings` is instantiated. What that happens, we're not able to reliability change the host anymore, because the state is scattered through the various `PackagerConnectionSettings`. Instead the state should be retained as a singleton. Changelog: [Internal] [Changed] - Move state of PackagerConnectionSettings to companion object Reviewed By: vzaidman Differential Revision: D88945232 fbshipit-source-id: b416e39e30b3b2b41cb0fcac60a700cc716d3c62
…cebook#54853) Summary: Pull Request resolved: facebook#54853 Changelog: [Internal] Reviewed By: robhogan Differential Revision: D88951056 fbshipit-source-id: 07138ace1a02e3d5ea8ed36736e4288002773378
Summary: Pull Request resolved: facebook#54724 Add support to codegen to generate native optional props for component properties that are defined as optional and have no default value. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D87843978 fbshipit-source-id: 9ad7436e2d518364b80b0e00ab7ec47eff476acd
Summary: Pull Request resolved: facebook#54725 See title Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D87843980 fbshipit-source-id: a7e9c6034da57fe5a51904bd6b9e62276bf315b3
Summary: Pull Request resolved: facebook#54726 Add support for generating native optional object properties for custom types. This also updates the serialization of the custom type instances to only include properties that are defined on the object. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D87843979 fbshipit-source-id: c99179d7b48df62e836ab66dfad99f0723516af7
Summary: Pull Request resolved: facebook#54727 See title Changelog: [Internal] Reviewed By: cortinico Differential Revision: D87843977 fbshipit-source-id: fdc8a1ecd60b46ab399150f3b38d7ef2ec83a7bf
Summary: Pull Request resolved: facebook#54862 [changelog](https://github.com/facebook/flow/blob/main/Changelog.md) Changelog: [Internal] Reviewed By: gkz Differential Revision: D88995707 fbshipit-source-id: 26f0cda3a159fc7a3191a74e4a34c48b2a496ee5
…4857) Summary: ### Motivation Updates the shared JavaScript build setup to use the modern `publishConfig` convention. This: - Simplifies the build script. - Makes the production values for `"exports"` more understandable in place (especially by separating from exports conditions). - Prevents us from creating a dirty file state when running `yarn build`. ### Changes - Add `publishConfig` to each `package.json` listing production `"exports"` targets. - Add `scripts/build/prepack.js` script to action `publishConfig` (now on `npm pack`, `npm publish` exclusively). - Remove `"exports"` rewriting (and un-rewriting safeguards) from build script. **Note on `"prepack"`** Slightly unfortunately, `publishConfig` doesn't work consistently between package managers currently, including npm — so this does not work implicitly (but may in future). We're instead following `publishConfig` as a convention, and explicitly implementing a full copy (theoretically forking us towards pnpm and Yarn v4's approach). However, I believe this is: - Worthwhile, for the motivations above — and in particular being able to understand the final shape of `"exports"` (independent from the dimension of conditional exports, which may come into play later). - Completely inspectable/maintainable as an explicit implementation (`scripts/build/prepack.js`). Changelog: [Internal] Pull Request resolved: facebook#54857 Test Plan: ### CI ✅ GitHub Actions ### End-to-end release test script (Note: Rebased on `0.83-stable` when tested) ``` yarn test-release-local -t "RNTestProject" -p "iOS" -c $GITHUB_TOKEN ``` {F1984106139} ✅ Test script runs `npm publish` on packages to a local proxy. {F1984106146} ✅ Installed packages have `publishConfig` `"exports"` values applied NOTE: ⬆️ This is **exactly** the same output as before. {F1984106148} ✅ `/tmp/RNTestProject` runs using built + proxy-published + proxy-installed packages Reviewed By: cipolleschi Differential Revision: D88963450 Pulled By: huntie fbshipit-source-id: f328252cf93a1f1039b79d7f369d1e6e7e5b4b52
Summary: Pull Request resolved: facebook#54868 Now that Network Inspection is shipped in 0.83, remove both of these tabs (which offered primitive Network functionality) from the in-app Element Inspector (where these previously remained for the Legacy Arch only). Changelog: [General][Removed] - Legacy Arch: Remove Perf and Network tabs from in-app Element Inspector. See [RFC0777](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0777-remove-legacy-element-inspector-features.md) Reviewed By: javache Differential Revision: D89048795 fbshipit-source-id: 2bf6db880b0cdd606b51f0502ab5725f28ee0d72
…ok#54865) Summary: Pull Request resolved: facebook#54865 Removes introduced in D88654826, replaced with a `git fetch` with `--depth`. This should fix CI runs on `main` (where we believe the extra checkout is clobbering the `yarn-install` step), and improve execution time. Also shorten action name. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D89044330 fbshipit-source-id: 690eb5c7db9490e5f160e933d64eae6ac21464c8
Summary: Pull Request resolved: facebook#54869 These APIs are unused within React Native since facebook#54868, and we now implement the `Network` CDP domain in core (React Native DevTools and other CDP clients). These APIs are private under the Strict TypeScript API, however have some open source usages in Reactotron and Rozenite, which is why we aren't removing these immediately. We intend to remove these APIs in future, but with no immediate planned timeline. Changelog: [General][Deprecated] - Deprecate `XHRInterceptor` and `WebSocketInterceptor` APIs. Developer tools should use the CDP `Network` domain instead. Reviewed By: vzaidman, javache Differential Revision: D89051528 fbshipit-source-id: d0c0f87f2663d92fa08be20cc674ab4345a104d6
Summary: Pull Request resolved: facebook#55193 React no longer emits the "Warning: " prefix from error messages, so we no longer need special handling for error messages with this prefix. If third party call sites are depending on `console.error('Warning: …')` being treated as a warning, they should be migrated to use `console.warn('…')`. Changelog: [General][Changed] - Logs created by `console.error` that begin with "Warning: " will no longer be treated as warnings. These call sites should migrate to using `console.warn` instead. Reviewed By: javache, robhogan Differential Revision: D90795590 fbshipit-source-id: 1b51ab63fd02cead4da33c64040c88aac50abbfb
Summary: Pull Request resolved: facebook#55178 We are transforming the following utility types to be more consistent with typescript and better AI integration: * `$NonMaybeType` -> `NonNullable` * `$ReadOnly` -> `Readonly` * `$ReadOnlyArray` -> `ReadonlyArray` * `$ReadOnlyMap` -> `ReadonlyMap` * `$ReadOnlySet` -> `ReadonlySet` * `$Keys` -> `keyof` * `$Values` -> `Values` * `mixed` -> `unknown` See details in https://fb.workplace.com/groups/flowlang/permalink/1837907750148213/. drop-conflicts Command: `js1 flow-runner codemod flow/transformUtilityType --format-files=false --legacy-type='ALL'` Reviewed By: SamChou19815 Differential Revision: D90728908 fbshipit-source-id: a8a1a06eb274cc32b12e893679aa92034eb962c4
…acebook#55126) Summary: Issue: facebook#55104 ## Changelog: [GENERAL] [CHANGED] - `cancelAnimationFrame`, `clearImmediate`, `clearTimeout` and `clearInterval` do nothing If there is no callback associated the given handle Pull Request resolved: facebook#55126 Test Plan: The next code should not throw any errors (runtime and TS) ```tsx const id1 = requestAnimationFrame(()=> {}); cancelAnimationFrame(id1); cancelAnimationFrame(id1); // clear twice the same id cancelAnimationFrame(-1); cancelAnimationFrame(null); cancelAnimationFrame(undefined); const id2 = setImmediate(()=> {}); clearImmediate(id2); clearImmediate(id2); // clear twice the same id clearImmediate(-1); clearImmediate(null); clearImmediate(undefined); const id3 = setTimeout(()=> {}, 1000); clearTimeout(id3); clearTimeout(id3); // clear twice the same id clearTimeout(-1); clearTimeout(null); clearTimeout(undefined); const id4 = setInterval(()=> {}, 1000); clearInterval(id4); clearInterval(id4); // clear twice the same id clearInterval(-1); clearInterval(null); clearInterval(undefined); ``` Reviewed By: cortinico Differential Revision: D90615301 Pulled By: philIip fbshipit-source-id: e5102a137bac6492d0f89bb02ef11eeca9977a9b
Summary: Pull Request resolved: facebook#55033 This has been fully rolled out now, the feature flag can be removed. Changelog: [Internal] Reviewed By: cortinico Differential Revision: D90106435 fbshipit-source-id: 0ddb5b93cc33f6fa3099ca14a3961f2b8a6344e6
Summary: Pull Request resolved: facebook#55157 Changelog: [Internal] At the moment, Fantom doesn't propagate the Hermes V1 opt-in to the React Native build, which causes the code that should be gated by compile-time flags to be compiled. Since Hermes V1 differs in some cases, the headers there are missing. This diff adds the opt-in propagation, so the code can be correctly compiled out. Reviewed By: cortinico Differential Revision: D90674696 fbshipit-source-id: d2adb131af4588e745c023703a893d0ecaaaee01
…55202) Summary: Pull Request resolved: facebook#55202 Changelog: [Internal] After changing Hermes V1 to be the default engine, Fantom tests started failing. This was due to a combination of changes, one of them being the change of default value for `HERMES_ENABLE_DEBUGGER`. In case of legacy Hermes it was enabled by default, while for Hermes V1 it's disabled by default. Fantom didn't explicitly set this flag, but the debug build of RN (which Fantom performs) requires it to be enabled. This diff explicitly sets this flag to true for Fantom builds. Reviewed By: cipolleschi, cortinico Differential Revision: D90849881 fbshipit-source-id: 17f8393872eacef26f927f50aaf364644d9b94d7
facebook#55194) Summary: Pull Request resolved: facebook#55194 Reverts facebook#55097 Original Phabricator Diff: D90209679 Reverting this behavior and feature flag as the experiment that used it is no longer needed Changelog: [Internal] Reviewed By: cortinico Differential Revision: D90791564 fbshipit-source-id: 362399c435a0c5addba5734e333bc2c1747f7293
) Summary: Pull Request resolved: facebook#55185 Changelog: [Internal] This change ensures that views with `pointerEvents` set to `'box-only'` are not collapsed, preserving the parent-children relationship in the view hierarchy. This is necessary because when `important_for_interaction` is applied on a view with `pointerEvents='box-only'`, the view must remain in the hierarchy to correctly signal to the gaze system that its children are not important for interaction. Without this fix, the view could be collapsed during flattening, breaking the propagation of the `important_for_interaction` property to descendant views. Reviewed By: javache Differential Revision: D90772188 fbshipit-source-id: 6a6a408845ebd1f86e420f5309160e7a6b3a9715
) Summary: Pull Request resolved: facebook#55189 If nested scrolling is not enabled by default for ScrollView that define a `RefreshControl`, the wrapping Android view `ReactSwipeRefreshLayout` will swallow and discard non-touch scroll actions, like joystick movements. This change updates the default to be true, a more-sane default, which aligns with the existing touch actions that are always allowed. This does not impact touch-based behavior at all. Changelog: [Android][Changed] Updated the `nestedScrollEnabled` prop to default to true if the ScrollView defines a `refreshControl` Reviewed By: javache Differential Revision: D90778643 fbshipit-source-id: 37693e80fc7c8b3461dc3d5cad51690e0ff77a77
facebook#55209) Summary: Pull Request resolved: facebook#55209 ## Changelog: [Android] [Changed] - Log error when unsupported type is passed to interpolation outputRange Add error logging when unsupported value types (like PlatformColor) are passed to interpolation outputRange. This prevents a ClassCastException crash by detecting non-Number types and logging an error instead. Reviewed By: javache Differential Revision: D90863942 fbshipit-source-id: d6a3b2dbde859ae86a1bc4a5dfcc33a9ee369dd1
Summary: Pull Request resolved: facebook#55192 Making `ReactSwipeRefreshLayout` open so one can subclass with a custom implementation Changelog: [Internal] Reviewed By: joevilches Differential Revision: D90789479 fbshipit-source-id: 6b8d7212140170a73e71a1eb529d8d3fffc098e3
Summary: Pull Request resolved: facebook#55196 SurfaceTouch and SurfacePointer handlers use a lot of unsupported UIKit APIs. Instead of granuarly wrapping the UIKit usage, this minimally removes the handlers from AppleTV all-together, as they no-op anyways (there is no click-through support on simulator.) Changelog: [Internal] Reviewed By: Abbondanzo Differential Revision: D90704270 fbshipit-source-id: 83d0c2f6f0efec3f9a46d5bcfc4a83f6765574cd
Summary: Pull Request resolved: facebook#55197 Platform guarding some unavailable UIKit APIs. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D90711498 fbshipit-source-id: af29087e91d3983a2a95db3633ad0f1ca9b3c16d
Summary: Pull Request resolved: facebook#55198 UISwitch, UIRefreshControl, UIKeyboardNotifications ,and UIPasteBoard are unavailable on AppleTV https://developer.apple.com/documentation/uikit/uiswitch?language=objc https://developer.apple.com/documentation/uikit/uirefreshcontrol?language=objc https://developer.apple.com/documentation/uikit/uiresponder/keyboardwillshownotification?language=objc https://developer.apple.com/documentation/uikit/uipasteboard?language=objc Changelog: [Internal] Reviewed By: javache Differential Revision: D90712066 fbshipit-source-id: 045836f14e650c655ae669bf5e3bb7fcf693efd3
Summary: Pull Request resolved: facebook#55199 A few places `available` is missing tvOS, adding to fix the build. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D90712192 fbshipit-source-id: ca4c15c1aa47176290a7b33f4480ecd9b9935b67
Summary: Pull Request resolved: facebook#55214 Some various `removeDeliveredNotifications` APIs aren't supported on AppleTV, no-oping. https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/removedeliverednotifications(withidentifiers:)?language=objc Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D90825526 fbshipit-source-id: f494ce4c3eadf812b84434f835a50a1383adbfd8
Summary: Pull Request resolved: facebook#55213 Compiling out some various unsupported UIKit APIs. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D90825451 fbshipit-source-id: ee88cc3937c5e17540a2951b39a354f297dd3c41
…__test_fixtures__/ Summary: codemoded Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D90895199 fbshipit-source-id: b3c06e081b5c94ceed1a0de66c334d0ba4132119
…s/__test_fixtures__ Summary: codemoded. Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D90895159 fbshipit-source-id: 6753b0552f5543870ffd8bfae8ee1332e506f55f
…olling when a child receives focus (facebook#55143) Summary: This PR adds a new Android-specific boolean property `scrollsChildToFocus` to the ScrollView component. When a focusable element inside a ScrollView receives focus (e.g., a TextInput is tapped), Android's default behavior is to automatically scroll the ScrollView to bring that element into view. While this is often desirable, there are cases where developers need more control over scroll behavior - for example, when implementing custom scroll-to-focus animations, when using virtualized lists that manage their own scroll positions, or when focus changes should not disturb the current scroll position. Setting `scrollsChildToFocus={false}` disables this automatic scrolling behavior, giving developers full control over scroll positioning when focus changes. **Related issues:** - facebook#33419 - LegendApp/legend-list#377 ## Changelog: [ANDROID] [ADDED] - Add `scrollsChildToFocus` prop to ScrollView to control automatic scrolling when a child receives focus Pull Request resolved: facebook#55143 Test Plan: 1. Run the RN Tester app on Android 2. Navigate to ScrollView examples 3. Find the new "scrollsChildToFocus" example in the Android-specific section 4. With `scrollsChildToFocus: true` (default): - Tap on a TextInput that is partially visible - Observe that the ScrollView automatically scrolls to bring the TextInput into view 5. Toggle `scrollsChildToFocus` to `false`: - Tap on a TextInput that is partially visible - Observe that the ScrollView does NOT automatically scroll - the focus changes but scroll position remains unchanged This property affects both vertical (`<ScrollView />`) and horizontal (`<ScrollView horizontal={true} />`) scroll views. Reviewed By: javache Differential Revision: D90831796 Pulled By: philIip fbshipit-source-id: 31193b45127bbac4b984452e2b56211a46616c8b
Summary: Pull Request resolved: facebook#55217 tsia Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D90914123 fbshipit-source-id: dc28b22524d3c6e6487d28cad30cc53a92ea8b83
Summary: Pull Request resolved: facebook#55218 [changelog](https://github.com/facebook/flow/blob/main/Changelog.md) Changelog: [Internal] Reviewed By: SamChou19815 Differential Revision: D90924627 fbshipit-source-id: a5eee1f919162c648c43b0408d82845e45b6d336
…acebook#55183) Summary: During an upgrade of ReactNative and switching to new arch, we noticed that Android is ignoring *some* fontVariants. Specifically `stylistic-{num}`. Digging further I noticed that there are `stylistic-{num}` mappings added to `fromRawValue` (in `packages/react-native/ReactCommon/react/renderer/attributedstring/conversions.h`), but are not included for `toMapBuffer` ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Fixed] - fontVariants `stylistic-{num}` not being propagated correctly Pull Request resolved: facebook#55183 Test Plan: - Added a new free font (FiraCode) that has stylistic features. - Added Text examples for Android showing with and without stylistic features Before and after in order: <img width="1080" height="2400" alt="Before" src="https://github.com/user-attachments/assets/3d21a992-f36a-4ffe-a1b2-8da40b3ee399" /> <img width="1080" height="2400" alt="After" src="https://github.com/user-attachments/assets/f4ee208a-3f98-42d9-b8c2-5b122d2db383" /> Reviewed By: cortinico Differential Revision: D90830140 Pulled By: philIip fbshipit-source-id: 42dbb98641274c0d4c01c501662b2ae59e21927d
Summary: Pull Request resolved: facebook#55186 This is an AI-assisted change to align the Flow definitions for the `child_process` module with the Node.js docs as at v24. **New v18+ Features:** 1. **AbortSignal Support** (v18.0.0) - Process cancellation - Added `signal?: AbortSignal` option to all async functions (exec, execFile, fork, spawn) - Enables cancellation of child processes using `AbortController` - Example: `const controller = new AbortController(); spawn('cmd', [], {signal: controller.signal}); controller.abort();` - https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback 2. **Enhanced Process Properties** (v20.x) - `spawnargs: Array<string>` - Full command-line arguments used to launch the process - `spawnfile: string` - Executable file name of the child process - `signalCode: string | null` - Signal that terminated the child process - https://nodejs.org/api/child_process.html#subprocessspawnargs **ChildProcess Class Updates:** 3. **Improved Property Types** - `stdio` is now a properly typed tuple array with readonly modifier - `channel` changed from `Object` to `mixed` for better type safety 4. **Enhanced Method Signatures** - `kill(signal?: string | number): boolean` - Now returns boolean and accepts numeric signals - `send()` overloads properly typed with `child_process$Serializable` messages - `send()` accepts `keepOpen` option: `Readonly<{keepOpen?: boolean}>` - https://nodejs.org/api/child_process.html#subprocesskillsignal **Option Type Improvements:** 6. **Modern Readonly Syntax** - All input options use `Readonly<{...}>` - `execOpts`, `execFileOpts`, `forkOpts`, `spawnOpts`, `spawnSyncOpts`, etc. - Allows passing readonly types safely 7. **Enhanced Environment Variables** - Changed `env?: Object` to `env?: {[key: string]: string | void}` - More precise typing for environment variable dictionaries 8. **New Fork Options** (IPC enhancements) - `serialization?: 'json' | 'advanced'` - IPC serialization format - `killSignal` and `timeout` options added to fork - https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options 9. **Enhanced Spawn Options** - Added `killSignal`, `timeout`, `serialization` to `spawnOpts` - Better consistency across all spawn functions **Return Type Fixes:** 10. **spawnRet/spawnSyncRet** - Made fields properly nullable: - `status: number | null` - null if process never exited - `signal: string | null` - null if not terminated by signal - `error: Error | void` - void if no error occurred - Removed spread operator for exact types **Helper Types:** 11. **`child_process$Serializable`** - Union type for IPC messages: - `string | number | boolean | bigint | {...} | Array<mixed>` - Used in send() method signatures 12. **`child_process$SendHandle`** - Type for handle passing: - `net$Server | net$Socket` - Used for passing server/socket handles to child processes **References:** - Node.js child_process module docs: https://nodejs.org/api/child_process.html - AbortSignal integration: https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback Changelog: [Internal] --- > Generated by [Confucius Code Assist (CCA)](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/) [Confucius Session](https://www.internalfb.com/confucius?host=devvm45708.cln0.facebook.com&port=8086&tab=Chat&session_id=1a3aa26e-e5a9-11f0-8d47-71a4a90f0494&entry_name=Code+Assist), [Trace](https://www.internalfb.com/confucius?session_id=1a3aa26e-e5a9-11f0-8d47-71a4a90f0494&tab=Trace) Reviewed By: vzaidman Differential Revision: D89944331 fbshipit-source-id: 744ae04051c2214d97269c48c115060f5f30fb1f
…55204) Summary: This is a fix for a regression in facebook#54948 found by Kudo. Passing an absolute path for `react_native_path` was non-functional before and the change was meant to fix this. This however used `Pathname.pwd.join(path)` since I assumed that'd be the intention for a relative path. However, my assumption was that `pod install` would only ever be run in the installation root and hence be equivalent to `Pod::Config.instance.installation_root` most of the time. This broke: `pod install --project-directory ios` (and the likes), since I wasn't aware of the `--project-directory` argument before. To fix this, we should construct the absolute path and join from `Pod::Config.instance.installation_root` as well. **Note to self:** Needs a pick into `0.84.0` due to being a regression (will file a pick request after this is merged) ## Changelog: [IOS] [FIXED] Regression from facebook#54948 preventing `pod install --project-directory` from working properly Pull Request resolved: facebook#55204 Test Plan: - Run `pod install` in `rn-tester` to validate Reviewed By: vzaidman Differential Revision: D90870064 Pulled By: cipolleschi fbshipit-source-id: 4a7bc0320afda29373791f206b31e57ae48b0b8c
PR ValidationWarning JavaScript API change detected This PR commits an update to
This change was flagged as: Caution Invalid Base Branch The base branch for this PR is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Changelog:
Changelog:
[IOS] [Fixed] - Message
Test Plan: