Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: facebook/react-native
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.77.1
Choose a base ref
...
head repository: facebook/react-native
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.77.2
Choose a head ref
  • 11 commits
  • 53 files changed
  • 9 contributors

Commits on Feb 19, 2025

  1. Update Podfile.lock

    Changelog: [Internal]
    robhogan committed Feb 19, 2025
    Copy the full SHA
    61314c7 View commit details

Commits on Mar 10, 2025

  1. Fix Android Image defaultSource runtime error (#49097) (#49890)

    Summary:
    Fixes #49075
    
    The Image `defaultSource` prop is causing a runtime error from 0.77 just by using it in the Image component (see error in the linked issue). This might be a regression from some changes in the prop processing logic from either #47710, #47713 or #47754.
    
    ## Changelog:
    
    [ANDROID] [FIXED] - Fix Image defaultSource runtime error
    
    Pull Request resolved: #49097
    
    Test Plan:
    - Verify it doesn't throw any error on runtime anymore for Android.
    - iOS behaviour should not be impacted as changes are Android specific
    
    In the RNTester, you can use the following component:
    
    ```tsx
    import * as React from 'react';
    import {Image, View} from 'react-native';
    
    function Playground() {
      return (
        <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
          <Image
            defaultSource={require('../../assets/bandaged.png')}
            source={{
              uri: 'https://i.natgeofe.com/n/548467d8-c5f1-4551-9f58-6817a8d2c45e/NationalGeographic_2572187_4x3.jpg',
            }}
            style={{width: 200, height: 200}}
          />
        </View>
      );
    }
    ```
    
    Also, this `defaultSource` prop is ignored in debug builds for Android ([as per the docs](https://reactnative.dev/docs/image#defaultsource)) – but I've verified we get the defaultSource as a string, which is what we expect on the native side:
    
    <details>
    <summary>Screenshot of the Android logs</summary>
    
    ![image](https://github.com/user-attachments/assets/e62ae2c3-6a93-4e44-a2d7-c913f5db2173)
    
    </details>
    
    Reviewed By: javache
    
    Differential Revision: D69052723
    
    Pulled By: cortinico
    
    fbshipit-source-id: 2860dd4c18cefcfcbc4e39f94dfa6305f45773a3
    
    # Conflicts:
    #	packages/react-native/Libraries/Image/ImageViewNativeComponent.js
    
    Co-authored-by: Mateo Guzmán <info@mateoguzman.net>
    fbp93 and mateoguzmana authored Mar 10, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7c50b5e View commit details

Commits on Mar 11, 2025

  1. increase ping-pong timeout before killing WS connection to DevTools (#…

    …49358)
    
    Summary:
    Pull Request resolved: #49358
    
    When the network is under strain, the code responsible for detecting if the inspector proxy's connection to the client has been lost may incorrectly assume the connection is dead. This false positive occurs because the system assumes that if a pong is not received within 5 seconds of a ping, the other side has disconnected. However, I was able to consistently reproduce scenarios where a delay of more than 5 seconds (even more than 20 seconds) was followed by a return to normal ping-pong communication without any issues.
    
    Since I can't think of any issues with increasing this number, I'm increasing it to 60s.
    
    Changelog:
    [General][Fixed] - Disconnections of DevTools when the network is under significant strain.
    
    Reviewed By: robhogan, huntie
    
    Differential Revision: D69523906
    
    fbshipit-source-id: 50db1e7bbe690b42421bc226aa30fd6571ba2257
    vzaidman authored and cortinico committed Mar 11, 2025

    Unverified

    The email in this signature doesn’t match the committer email.
    Copy the full SHA
    4c95fcd View commit details
  2. Fixes TextInput crashes when any text is entered while running as iOS…

    … app on apple silicon mac (#49320)
    
    Summary:
    Fixes #48544. We can make `RCTWeakEventEmitterWrapper` to subclass `NSDictionary` that Textinput supports encode it.
    
    System allowed classes are:
    ```
    Allowed classes are:
     {(
        "'NSMorphology' (0x20088b6d8) [/System/Library/Frameworks/Foundation.framework]",
        "'NSString' (0x2003f4738) [/System/Library/Frameworks/Foundation.framework]",
        "'NSInflectionRule' (0x20088d348) [/System/Library/Frameworks/Foundation.framework]",
        "'UIColor' (0x2006c0520) [/System/iOSSupport/System/Library/PrivateFrameworks/UIKitCore.framework]",
        "'NSTextAttachment' (0x20042af98) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSShadow' (0x20042ae30) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSTextEncapsulation' (0x200897e50) [/System/Library/Frameworks/CoreText.framework]",
        "'NSTextAlternatives' (0x20042af70) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSFont' (0x20042a9f8) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSAttributedString' (0x2003f3838) [/System/Library/Frameworks/Foundation.framework]",
        "'NSData' (0x2003ed528) [/System/Library/Frameworks/CoreFoundation.framework]",
        "'NSURL' (0x2003ed938) [/System/Library/Frameworks/CoreFoundation.framework]",
        "'NSAdaptiveImageGlyph' (0x2008ae538) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSNumber' (0x2003f4238) [/System/Library/Frameworks/Foundation.framework]",
        "'NSParagraphStyle' (0x20042ad40) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSDictionary' (0x2003ed5a0) [/System/Library/Frameworks/CoreFoundation.framework]",
        "'UIFont' (0x20042c668) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSColor' (0x200412350) [/System/Library/Frameworks/AppKit.framework]",
        "'NSGlyphInfo' (0x20042aa98) [/System/Library/PrivateFrameworks/UIFoundation.framework]",
        "'NSArray' (0x2003ed460) [/System/Library/Frameworks/CoreFoundation.framework]",
        "'NSPresentationIntent' (0x20088da28) [/System/Library/Frameworks/Foundation.framework]"
    )}
    ```
    
    ## Changelog:
    
    [IOS] [FIXED] -  Fixes TextInput crashes when any text is entered while running as iOS app on apple silicon mac
    
    Pull Request resolved: #49320
    
    Test Plan:
    Run RNTester on apple silicon mac, and entered some text in textinput, no crash occured. Also, verified that the caret was not jumping around, thus preserving the original fix.
    
    https://github.com/user-attachments/assets/6304f6e7-c663-4351-ace8-ab1842ee545f
    
    Reviewed By: javache
    
    Differential Revision: D69981500
    
    Pulled By: cipolleschi
    
    fbshipit-source-id: 2af9b280e42f621446efda9b101af50525e8fef7
    zhongwuzw authored and react-native-bot committed Mar 11, 2025
    Copy the full SHA
    adc5c3a View commit details

Commits on Mar 17, 2025

  1. Avoid NPE when touch event is triggered before SurfaceManager is init…

    …iated (#48007)
    
    Summary:
    A NPE can occur when a user touches the screen before the `SurfaceMountingManager` is initialized. Below is an example of the error log from our production service. This issue can also be reproduced using RNTester. To prevent invalid touch events during init time of rn app from causing an NPE, add a null check for SurfaceMountingManager before calling mark/sweepActiveTouchForTag.
    
    ```
    Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.facebook.react.fabric.mounting.SurfaceMountingManager.markActiveTouchForTag(int)' on a null object reference
           at com.facebook.react.fabric.FabricUIManager.markActiveTouchForTag(FabricUIManager.java)
           at com.facebook.react.uimanager.JSTouchDispatcher.markActiveTouchForTag(JSTouchDispatcher.java)
           at com.facebook.react.uimanager.JSTouchDispatcher.handleTouchEvent(JSTouchDispatcher.java)
           at com.facebook.react.runtime.ReactSurfaceView.dispatchJSTouchEvent(ReactSurfaceView.java)
           at com.facebook.react.ReactRootView.onInterceptTouchEvent(ReactRootView.java)
           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2870)
           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2963)
           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2963)
           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2963)
           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2963)
           at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3352)
           at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2963)
           at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:794)
           at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1967)
           at android.app.Activity.dispatchTouchEvent(Activity.java:4571)
           at com.rainist.banksalad2.feature.common.BaseActivity.dispatchTouchEvent(BaseActivity.java)
           at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70)
           at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:752)
           at android.view.View.dispatchPointerEvent(View.java:16498)
           at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:8676)
           at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:8423)
           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7752)
           at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
           at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
           at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7978)
           at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
           at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:8035)
           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
           at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7809)
           at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7775)
           at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7783)
           at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7756)
           at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:11343)
           at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:11212)
           at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:11168)
           at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:11477)
           at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:337)
           at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
           at android.os.MessageQueue.next(MessageQueue.java:335)
           at android.os.Looper.loopOnce(Looper.java:187)
           at android.os.Looper.loop(Looper.java:319)
           at android.app.ActivityThread.main(ActivityThread.java:9063)
           at java.lang.reflect.Method.invoke(Method.java)
           at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
    ```
    https://github.com/user-attachments/assets/e9c6ff84-c94d-4392-9042-8e635197202e
    
    ## Changelog:
    
    [Android] [Fixed] - Avoid NPE when touch event is triggered before SurfaceManager is initiated
    
    Pull Request resolved: #48007
    
    Test Plan:
    I checked the crashed being fixed on RNTester.
    
    https://github.com/user-attachments/assets/71f7e359-707a-494c-ae34-fef8d432e612
    
    Reviewed By: cortinico
    
    Differential Revision: D66594576
    
    Pulled By: javache
    
    fbshipit-source-id: b1559d94866bdb021e0374f1953684849603033c
    CHOIMINSEOK authored and react-native-bot committed Mar 17, 2025
    Copy the full SHA
    f7720b3 View commit details

Commits on Mar 18, 2025

  1. community-cli-plugin: resolve cli-server-api via peer dependency on c…

    …li (#50096)
    robhogan authored Mar 18, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    1f002f9 View commit details
  2. Add extra parameter to define whether codegen is invoked by lib or app (

    #48995)
    
    Summary:
    Pull Request resolved: #48995
    
    This change adds an extra parameter to the codegen script that allow our users to trigger codegen for Apps or for Libraries.
    
    When running codegen for Apps, we have to generate some extra files that are not needed by the Libraries. This is causing issues to our library maintainers and this change will provide more flexibility in the DevX of libraries.
    
    The default value is App, so if the new parameter is not passed, nothing will change in the current behavior.
    [iOS][Added] - Add the `source` parameter to generate-codegen-artifacts to avoid generating files not needed by libraries.
    
    Reviewed By: cortinico
    
    Differential Revision: D68765478
    
    fbshipit-source-id: 8030b4472ad4f5058e58b1c91089de5122a4f60a
    cipolleschi authored and robhogan committed Mar 18, 2025

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    4e5da2e View commit details

Commits on Mar 19, 2025

  1. Handle null params in the Interop TM layer (#49873)

    Summary:
    Pull Request resolved: #49873
    
    In the old architecture, when we were passing a `null` value as a parameter in a function that accepted nullable parameter, the null value was mapped to `nil` on iOS.
    
    After my changes in [d423679](d423679), in the New Architecture, through the interop layer, legacy modules were receiving an `NSNull` object instead of nil.
    
    This was breaking those modules which started crashing or observing undesired behavior.
    
    This change fixes the issue by making sure that, in those cases, a `nil` value is passed.
    
    Note that nested objects in the old architecture were correctly receiving NSNull, so nested objects were behaving correctly already.
    
    ## Changelog:
    [iOS][Fixed] - Properly pass `nil` for nullable parameters instead of `NSNull` for legacy modules
    
    Reviewed By: javache
    
    Differential Revision: D70723460
    
    fbshipit-source-id: 384f48b6dbb3f54c369b31b6d2ee06069fa3591c
    cipolleschi authored and robhogan committed Mar 19, 2025

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    a133967 View commit details
  2. Bump minimum Metro to 0.81.3, remove import/require from always-asser…

    …ted resolver conditions (#50127)
    robhogan authored Mar 19, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b335436 View commit details

Commits on Mar 24, 2025

  1. Convert to JSException only NSException from sync methods (#50193)

    Summary:
    Pull Request resolved: #50193
    
    This fix makes sure that we convert to JSException only NSException thrwn by sync methods.
    Currently, nothing in the stack will be capable of understanding that js error if it is triggered by an exception raised by an asyc method.
    
    See reactwg/react-native-new-architecture#276 for further details
    
    We need to cherry pick this in 0.78 and 0.79
    
    ## Changelog:
    [iOS][Fixed] - Make sure the TM infra does not crash on NSException when triggered by async method
    
    Reviewed By: fabriziocucci
    
    Differential Revision: D71619229
    
    fbshipit-source-id: b87aef5dd2720a2641c8da0904da651866370dc6
    cipolleschi authored and react-native-bot committed Mar 24, 2025

    Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    1e9f118 View commit details

Commits on Mar 25, 2025

  1. Release 0.77.2

    #publish-packages-to-npm&0.77-stable
    react-native-bot committed Mar 25, 2025
    Copy the full SHA
    7ea8af8 View commit details
Showing with 609 additions and 637 deletions.
  1. +5 −5 package.json
  2. +1 −1 packages/assets/package.json
  3. +2 −2 packages/babel-plugin-codegen/package.json
  4. +9 −9 packages/community-cli-plugin/package.json
  5. +20 −4 packages/community-cli-plugin/src/commands/start/middleware.js
  6. +1 −1 packages/core-cli-utils/package.json
  7. +1 −1 packages/debugger-frontend/package.json
  8. +2 −2 packages/dev-middleware/package.json
  9. +1 −1 packages/dev-middleware/src/inspector-proxy/InspectorProxy.js
  10. +2 −2 packages/eslint-config-react-native/package.json
  11. +1 −1 packages/eslint-plugin-react-native/package.json
  12. +2 −2 packages/eslint-plugin-specs/package.json
  13. +1 −1 packages/gradle-plugin/package.json
  14. +6 −6 packages/helloworld/package.json
  15. +1 −1 packages/hermes-inspector-msggen/package.json
  16. +5 −5 packages/metro-config/package.json
  17. +1 −1 packages/metro-config/src/index.flow.js
  18. +1 −1 packages/normalize-color/package.json
  19. +1 −1 packages/polyfills/package.json
  20. +2 −2 packages/react-native-babel-preset/package.json
  21. +2 −2 packages/react-native-babel-transformer/package.json
  22. +1 −1 packages/react-native-bots/package.json
  23. +2 −2 packages/react-native-codegen-typescript-test/package.json
  24. +1 −1 packages/react-native-codegen/package.json
  25. +1 −1 packages/react-native-info/package.json
  26. +2 −2 packages/react-native-popup-menu-android/package.json
  27. +3 −3 packages/react-native-test-library/package.json
  28. +1 −1 packages/react-native-test-renderer/package.json
  29. +1 −1 packages/react-native/Libraries/Core/ReactNativeVersion.js
  30. +2 −0 packages/react-native/Libraries/Image/Image.android.js
  31. +3 −4 packages/react-native/Libraries/Image/ImageViewNativeComponent.js
  32. +1 −1 packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap
  33. +1 −1 packages/react-native/React/Base/RCTVersion.m
  34. +1 −7 packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
  35. +1 −1 packages/react-native/ReactAndroid/gradle.properties
  36. +8 −2 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java
  37. +1 −1 ...t-native/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java
  38. +1 −1 packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt
  39. +1 −1 packages/react-native/ReactCommon/cxxreact/ReactNativeVersion.h
  40. +9 −0 ...eact-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm
  41. +24 −13 packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm
  42. +24 −3 ...renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.h
  43. +1 −43 ...enderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm
  44. +4 −5 .../renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm
  45. +10 −10 packages/react-native/package.json
  46. +11 −21 packages/react-native/react-native.config.js
  47. +8 −4 packages/react-native/scripts/codegen/generate-artifacts-executor.js
  48. +6 −1 packages/react-native/scripts/generate-codegen-artifacts.js
  49. +287 −287 packages/rn-tester/Podfile.lock
  50. +3 −3 packages/rn-tester/package.json
  51. +1 −1 packages/typescript-config/package.json
  52. +1 −1 packages/virtualized-lists/package.json
  53. +121 −163 yarn.lock
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -48,8 +48,8 @@
"@babel/preset-flow": "^7.24.7",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@react-native/metro-babel-transformer": "0.77.1",
"@react-native/metro-config": "0.77.1",
"@react-native/metro-babel-transformer": "0.77.2",
"@react-native/metro-config": "0.77.2",
"@tsconfig/node18": "1.0.1",
"@types/react": "^18.2.6",
"@typescript-eslint/parser": "^7.1.1",
@@ -85,9 +85,9 @@
"jest": "^29.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.14.0",
"metro-babel-register": "^0.81.0",
"metro-memory-fs": "^0.81.0",
"metro-transform-plugins": "^0.81.0",
"metro-babel-register": "^0.81.3",
"metro-memory-fs": "^0.81.3",
"metro-transform-plugins": "^0.81.3",
"micromatch": "^4.0.4",
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.1",
2 changes: 1 addition & 1 deletion packages/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.77.1",
"version": "0.77.2",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/babel-plugin-codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.77.1",
"version": "0.77.2",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.77.1"
"@react-native/codegen": "0.77.2"
},
"devDependencies": {
"@babel/core": "^7.25.2"
18 changes: 9 additions & 9 deletions packages/community-cli-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.77.1",
"version": "0.77.2",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,25 +22,25 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.77.1",
"@react-native/metro-babel-transformer": "0.77.1",
"@react-native/dev-middleware": "0.77.2",
"@react-native/metro-babel-transformer": "0.77.2",
"chalk": "^4.0.0",
"debug": "^2.2.0",
"invariant": "^2.2.4",
"metro": "^0.81.0",
"metro-config": "^0.81.0",
"metro-core": "^0.81.0",
"metro": "^0.81.3",
"metro-config": "^0.81.3",
"metro-core": "^0.81.3",
"readline": "^1.3.0",
"semver": "^7.1.3"
},
"devDependencies": {
"metro-resolver": "^0.81.0"
"metro-resolver": "^0.81.3"
},
"peerDependencies": {
"@react-native-community/cli-server-api": "*"
"@react-native-community/cli": "*"
},
"peerDependenciesMeta": {
"@react-native-community/cli-server-api": {
"@react-native-community/cli": {
"optional": true
}
},
24 changes: 20 additions & 4 deletions packages/community-cli-plugin/src/commands/start/middleware.js
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
* @oncall react_native
*/

import typeof * as CLIServerAPI from '@react-native-community/cli-server-api';
import type {NextHandleFunction, Server} from 'connect';
import type {TerminalReportableEvent} from 'metro/src/lib/TerminalReporter';

@@ -65,11 +66,26 @@ const communityMiddlewareFallback = {
// Attempt to use the community middleware if it exists, but fallback to
// the stubs if it doesn't.
try {
const community = require('@react-native-community/cli-server-api');
communityMiddlewareFallback.indexPageMiddleware =
community.indexPageMiddleware;
// `@react-native-community/cli` is an optional peer dependency of this
// package, and should be a dev dependency of the host project (via the
// community template's package.json).
const communityCliPath = require.resolve('@react-native-community/cli');

// `@react-native-community/cli-server-api` is a dependency of
// `@react-native-community/cli`, but is not re-exported by it, so we need
// to resolve the former through the latter.
const communityCliServerApiPath = require.resolve(
'@react-native-community/cli-server-api',
{paths: [communityCliPath]},
);
// $FlowIgnore[unsupported-syntax] dynamic import
const communityCliServerApi: CLIServerAPI = require(
communityCliServerApiPath,
);
communityMiddlewareFallback.createDevServerMiddleware =
community.createDevServerMiddleware;
communityCliServerApi.createDevServerMiddleware;
communityMiddlewareFallback.indexPageMiddleware =
communityCliServerApi.indexPageMiddleware;
} catch {
debug(`⚠️ Unable to find @react-native-community/cli-server-api
Starting the server without the community middleware.`);
2 changes: 1 addition & 1 deletion packages/core-cli-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.77.1",
"version": "0.77.2",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
2 changes: 1 addition & 1 deletion packages/debugger-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.77.1",
"version": "0.77.2",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
4 changes: 2 additions & 2 deletions packages/dev-middleware/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.77.1",
"version": "0.77.2",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,7 +23,7 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.77.1",
"@react-native/debugger-frontend": "0.77.2",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ const WS_DEBUGGER_URL = '/inspector/debug';
const PAGES_LIST_JSON_URL = '/json';
const PAGES_LIST_JSON_URL_2 = '/json/list';
const PAGES_LIST_JSON_VERSION_URL = '/json/version';
const MAX_PONG_LATENCY_MS = 5000;
const MAX_PONG_LATENCY_MS = 60000;
const DEBUGGER_HEARTBEAT_INTERVAL_MS = 10000;

const INTERNAL_ERROR_CODE = 1011;
4 changes: 2 additions & 2 deletions packages/eslint-config-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.77.1",
"version": "0.77.2",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@react-native/eslint-plugin": "0.77.1",
"@react-native/eslint-plugin": "0.77.2",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.77.1",
"version": "0.77.2",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/eslint-plugin-specs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.77.1",
"version": "0.77.2",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@react-native/codegen": "0.77.1",
"@react-native/codegen": "0.77.2",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
2 changes: 1 addition & 1 deletion packages/gradle-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.77.1",
"version": "0.77.2",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
12 changes: 6 additions & 6 deletions packages/helloworld/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "helloworld",
"version": "0.77.1",
"version": "0.77.2",
"private": true,
"scripts": {
"bootstrap": "node ./cli.js bootstrap",
@@ -13,16 +13,16 @@
},
"dependencies": {
"react": "18.3.1",
"react-native": "0.77.1"
"react-native": "0.77.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "0.77.1",
"@react-native/core-cli-utils": "0.77.1",
"@react-native/eslint-config": "0.77.1",
"@react-native/metro-config": "0.77.1",
"@react-native/babel-preset": "0.77.2",
"@react-native/core-cli-utils": "0.77.2",
"@react-native/eslint-config": "0.77.2",
"@react-native/metro-config": "0.77.2",
"chalk": "^4.1.2",
"commander": "^12.0.0",
"eslint": "^8.19.0",
2 changes: 1 addition & 1 deletion packages/hermes-inspector-msggen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/hermes-inspector-msggen",
"version": "0.77.1",
"version": "0.77.2",
"private": true,
"description": "Hermes Inspector Message Generator for React Native",
"license": "MIT",
10 changes: 5 additions & 5 deletions packages/metro-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.77.1",
"version": "0.77.2",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,9 +26,9 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.77.1",
"@react-native/metro-babel-transformer": "0.77.1",
"metro-config": "^0.81.0",
"metro-runtime": "^0.81.0"
"@react-native/js-polyfills": "0.77.2",
"@react-native/metro-babel-transformer": "0.77.2",
"metro-config": "^0.81.3",
"metro-runtime": "^0.81.3"
}
}
2 changes: 1 addition & 1 deletion packages/metro-config/src/index.flow.js
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ export function getDefaultConfig(projectRoot: string): ConfigT {
resolver: {
resolverMainFields: ['react-native', 'browser', 'main'],
platforms: ['android', 'ios'],
unstable_conditionNames: ['require', 'import', 'react-native'],
unstable_conditionNames: ['react-native'],
},
serializer: {
// Note: This option is overridden in cli-plugin-metro (getOverrideConfig)
2 changes: 1 addition & 1 deletion packages/normalize-color/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.77.1",
"version": "0.77.2",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
2 changes: 1 addition & 1 deletion packages/polyfills/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.77.1",
"version": "0.77.2",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/react-native-babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.77.1",
"version": "0.77.2",
"description": "Babel preset for React Native applications",
"main": "src/index.js",
"repository": {
@@ -55,7 +55,7 @@
"@babel/plugin-transform-typescript": "^7.25.2",
"@babel/plugin-transform-unicode-regex": "^7.24.7",
"@babel/template": "^7.25.0",
"@react-native/babel-plugin-codegen": "0.77.1",
"@react-native/babel-plugin-codegen": "0.77.2",
"babel-plugin-syntax-hermes-parser": "0.25.1",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
4 changes: 2 additions & 2 deletions packages/react-native-babel-transformer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.77.1",
"version": "0.77.2",
"description": "Babel transformer for React Native applications.",
"main": "src/index.js",
"repository": {
@@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.77.1",
"@react-native/babel-preset": "0.77.2",
"hermes-parser": "0.25.1",
"nullthrows": "^1.1.1"
},
2 changes: 1 addition & 1 deletion packages/react-native-bots/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@react-native/bots",
"description": "React Native Bots",
"version": "0.77.1",
"version": "0.77.2",
"private": true,
"license": "MIT",
"repository": {
4 changes: 2 additions & 2 deletions packages/react-native-codegen-typescript-test/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.77.1",
"version": "0.77.2",
"private": true,
"description": "TypeScript related unit test for @react-native/codegen",
"license": "MIT",
@@ -19,7 +19,7 @@
"prepare": "yarn run build"
},
"dependencies": {
"@react-native/codegen": "0.77.1"
"@react-native/codegen": "0.77.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
2 changes: 1 addition & 1 deletion packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.77.1",
"version": "0.77.2",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
2 changes: 1 addition & 1 deletion packages/react-native-info/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-info",
"version": "0.77.1",
"version": "0.77.2",
"main": "build/index.js",
"license": "MIT",
"private": true,
4 changes: 2 additions & 2 deletions packages/react-native-popup-menu-android/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.77.1",
"version": "0.77.2",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -17,7 +17,7 @@
],
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.77.1"
"@react-native/codegen": "0.77.2"
},
"peerDependencies": {
"@types/react": "^18.2.6",
Loading