Commit Graph

29310 Commits

Author SHA1 Message Date
Tommy Nguyen 67e2bb455f fix: fix codegen not finding all third-party libraries (#42943)
* fix: fix codegen failing in pnpm setups

* fix third-party libs not being detected
2024-02-19 02:59:51 -08:00
Luna Wei af224d7f6c Local: Update rn-tester podfile 2024-02-19 02:58:35 -08:00
Tommy Nguyen 27968eaf9f fix(dev-middleware): fix react-native config failing in pnpm setups (#42907)
Summary:
In a pnpm setup, `react-native config` fails to read `react-native/react-native.config.js` because `ws` was not installed:

```
% node --print 'require("react-native/react-native.config.js")'
node:internal/modules/cjs/loader:1137
  throw err;
  ^

Error: Cannot find module 'ws'
```

## Changelog:

[GENERAL] [FIXED] - fix `react-native config` failing in pnpm setups

Pull Request resolved: https://github.com/facebook/react-native/pull/42907

Test Plan: n/a

Reviewed By: cipolleschi

Differential Revision: D53516703

Pulled By: robhogan

fbshipit-source-id: 3aded393187df4ca9a7abb64a2c8e0f2c9a5fcd9
2024-02-19 02:48:21 -08:00
Dr. Sergey Pogodin 3d9d5b3cf3 Patches with-environment.sh script (#42184)
Summary:
Closes https://github.com/facebook/react-native/issues/42164

## Changelog:

[IOS] [FIXED] - Fixes `with-environment.sh` script for the case when Node can't be found prior to loading `.xcode.env`

Pull Request resolved: https://github.com/facebook/react-native/pull/42184

Test Plan: This is a trivial update, no need for much testing.

Reviewed By: cortinico

Differential Revision: D52602653

Pulled By: cipolleschi

fbshipit-source-id: 0881456bf165d895252ae38cb7c7aee945cfaf52
2024-02-19 02:47:30 -08:00
Distiller 36a4a24501 [0.73.4] Bump version numbers v0.73.4 2024-02-06 00:38:34 +00:00
Luna Wei de8b34ae2b bumped packages versions
#publish-packages-to-npm
2024-02-05 13:18:42 -08:00
Luna Wei 80aac8b43f bumped packages versions
#publish-packages-to-npm
2024-02-05 13:16:30 -08:00
Luna Wei 6e186742e3 bumped packages versions
#publish-packages-to-npm
2024-02-05 12:48:31 -08:00
Luna Wei 6b69b34db2 bumped packages versions
#publish-packages-to-npm
2024-02-05 10:18:20 -08:00
Tommy Nguyen 562447be47 [LOCAL][0.73] fix: cannot find module react-native-*/Libraries/Core/InitializeCore (#42877) 2024-02-05 10:08:59 -08:00
hurali97 055b35d75c bumped packages versions
#publish-packages-to-npm
2024-02-05 12:39:24 +05:00
Luna Wei 22d53edd49 Local: Update rn-tester podfile 2024-02-04 13:18:34 -08:00
Lulu Wu 68bc219266 Ignore the one-time NullPointerException and print error log
Summary:
Why ignore for now?
- It only happen once during initialization and doesn't cause any breakages for RNTester
- The race condition happens in Android System code which is hard to tackle:
```Exception in native call
java.lang.NullPointerException: java.lang.NullPointerException
	at com.facebook.jni.NativeRunnable.run(Native Method)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:30)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:235)
	at java.lang.Thread.run(Thread.java:1012)
```
From stack trace message.callback is checked in
```at android.os.Handler.dispatchMessage(Handler.java:99)```
but becomes null in
```at android.os.Handler.handleCallback(Handler.java:958)```

[Android source code](https://l.facebook.com/l.php?u=https%3A%2F%2Fandroid.googlesource.com%2Fplatform%2Fframeworks%2Fbase%2F%2B%2Fmaster%2Fcore%2Fjava%2Fandroid%2Fos%2FHandler.java&h=AT1aQS0Vmknao8kLbYE_hhLj1G3idUf69jFQE3ZLAqjrbcMX4OdQUV1dzZpAkAvLaZ9HAOanpsKCC8z59Ce9XJa6cOhQL2L95gM9iMrSr7FbrpTKPLKbWjDmTz89WUL2pQprnBVKyA8) of Handler.

Reviewed By: cortinico

Differential Revision: D51550240

fbshipit-source-id: 6288e196da1da88a37f5c69bfce82e3e09c6f106
2024-02-04 12:54:38 -08:00
Dmitry Rykun 45ba0425e7 Event name normalization (#42586)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42586

Every event name must be normalized.

The normalization strategy is:
1. If it starts with `top` -> do nothing.
2. If it starts with `on` -> replace `on` with `top`.
3. Else -> capitalize the first character and prepend `top`.

We have it for the old renderer on iOS [here](https://github.com/facebook/react-native/blob/a7586947d719a9cd2344ad346d271e7ca900de87/packages/react-native/React/Base/RCTEventDispatcher.m#L12-L21). This one is also used by the interop layer.
Static ViewConfigs being a part of the new renderer [replicate](https://github.com/facebook/react-native/blob/a7586947d719a9cd2344ad346d271e7ca900de87/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L164-L172) this behavior to match the old rendered.

The Android that we have is incomplete, it is missing the [*2. If it starts with `on` -> replace `on` with `top`*]. This means that some events names that worked with the old renderer would not be compatible with the new renderer + Static ViewConfigs. Specifically every event names that start with `on`.

This diff implements event name normalization on Android.

Changelog: [Internal] - Update event normalization algorithm to match SVCs.

Reviewed By: cortinico

Differential Revision: D50604571

fbshipit-source-id: cef34d8baa2cf31f641be423a16bca7ea9fa20c4
2024-02-04 12:54:24 -08:00
Luna Wei 0d2c50568f Add print-packages as a command (#41959)
Summary:
Working on releases, I'm often looking for the name of our monorepo packages (as sometimes the name doesn't align with the directory) and also getting a list of the versions of everything, as well as if its private/public -- which I've interpreted to mean that we publish it or we don't. I thought this might be convenient to add.

[Internal] - Add `print-packages` as a command to print our monorepo packages (including react-native)

Pull Request resolved: https://github.com/facebook/react-native/pull/41959

Test Plan:
```
❯ yarn print-packages
yarn run v1.22.19
$ node ./scripts/monorepo/print
┌─────────┬─────────┬─────────────────────────────────────────┬────────────────┐
│ (index) │ Public? │                  Name                   │ Version (main) │
├─────────┼─────────┼─────────────────────────────────────────┼────────────────┤
│    0    │  ''   │     'react-native/assets-registry'     │    '0.74.0'    │
│    1    │  ''   │  'react-native/babel-plugin-codegen'   │    '0.74.0'    │
│    2    │  ''   │  'react-native/community-cli-plugin'   │    '0.74.0'    │
│    3    │  ''   │    'react-native/debugger-frontend'    │    '0.74.0'    │
│    4    │  ''   │     'react-native/dev-middleware'      │    '0.74.0'    │
│    5    │  ''   │      'react-native/eslint-config'      │    '0.74.0'    │
│    6    │  ''   │      'react-native/eslint-plugin'      │    '0.74.0'    │
│    7    │  ''   │   'react-native/eslint-plugin-specs'   │    '0.74.0'    │
│    8    │  ''   │ 'react-native/hermes-inspector-msggen' │    '0.72.0'    │
│    9    │  ''   │      'react-native/metro-config'       │    '0.74.0'    │
│   10    │  ''   │    'react-native/normalize-colors'     │    '0.74.1'    │
│   11    │  ''   │      'react-native/js-polyfills'       │    '0.74.0'    │
│   12    │  ''   │             'react-native'              │   '1000.0.0'   │
│   13    │  ''   │      'react-native/babel-preset'       │    '0.74.0'    │
│   14    │  ''   │ 'react-native/metro-babel-transformer' │    '0.74.0'    │
│   15    │  ''   │          'react-native/bots'           │    '0.0.0'     │
│   16    │  ''   │         'react-native/codegen'         │    '0.74.0'    │
│   17    │  ''   │ 'react-native/codegen-typescript-test' │    '0.0.1'     │
│   18    │  ''   │      'react-native/gradle-plugin'      │    '0.74.0'    │
│   19    │  ''   │         'react-native/tester'          │    '0.0.1'     │
│   20    │  ''   │       'react-native/tester-e2e'        │    '0.0.1'     │
│   21    │  ''   │    'react-native/typescript-config'    │    '0.74.0'    │
│   22    │  ''   │    'react-native/virtualized-lists'    │    '0.74.0'    │
└─────────┴─────────┴─────────────────────────────────────────┴────────────────┘
  Done in 0.55s.
```

Also added filter flag for private/public
```
❯ yarn print-packages --type private
yarn run v1.22.19
$ node ./scripts/monorepo/print --type private
┌─────────┬─────────┬─────────────────────────────────────────┬────────────────┐
│ (index) │ Public? │                  Name                   │ Version (main) │
├─────────┼─────────┼─────────────────────────────────────────┼────────────────┤
│    0    │  ''   │ 'react-native/hermes-inspector-msggen' │    '0.72.0'    │
│    1    │  ''   │          'react-native/bots'           │    '0.0.0'     │
│    2    │  ''   │ 'react-native/codegen-typescript-test' │    '0.0.1'     │
│    3    │  ''   │         'react-native/tester'          │    '0.0.1'     │
│    4    │  ''   │       'react-native/tester-e2e'        │    '0.0.1'     │
└─────────┴─────────┴─────────────────────────────────────────┴────────────────┘
  Done in 0.16s.
```

Also added a npm query where you can see the latest published version of a minor
```
❯ yarn print-packages --type public --minor 72
yarn run v1.22.19
$ node ./scripts/monorepo/print --type public --minor 72
┌─────────┬─────────┬─────────────────────────────────────────┬────────────────┬──────────────────────────────────────┐
│ (index) │ Public? │                  Name                   │ Version (main) │             Version (72)             │
├─────────┼─────────┼─────────────────────────────────────────┼────────────────┼──────────────────────────────────────┤
│    0    │  ''   │     'react-native/assets-registry'     │    '0.74.0'    │               '0.72.0'               │
│    1    │  ''   │  'react-native/babel-plugin-codegen'   │    '0.74.0'    │               '0.72.3'               │
│    2    │  ''   │  'react-native/community-cli-plugin'   │    '0.74.0'    │ 'No match found for version ^0.72.0' │
│    3    │  ''   │    'react-native/debugger-frontend'    │    '0.74.0'    │ 'No match found for version ^0.72.0' │
│    4    │  ''   │     'react-native/dev-middleware'      │    '0.74.0'    │ 'No match found for version ^0.72.0' │
│    5    │  ''   │      'react-native/eslint-config'      │    '0.74.0'    │               '0.72.2'               │
│    6    │  ''   │      'react-native/eslint-plugin'      │    '0.74.0'    │               '0.72.0'               │
│    7    │  ''   │   'react-native/eslint-plugin-specs'   │    '0.74.0'    │               '0.72.4'               │
│    8    │  ''   │      'react-native/metro-config'       │    '0.74.0'    │              '0.72.11'               │
│    9    │  ''   │    'react-native/normalize-colors'     │    '0.74.1'    │               '0.72.0'               │
│   10    │  ''   │      'react-native/js-polyfills'       │    '0.74.0'    │               '0.72.1'               │
│   11    │  ''   │             'react-native'              │   '1000.0.0'   │               '0.72.8'               │
│   12    │  ''   │      'react-native/babel-preset'       │    '0.74.0'    │ 'No match found for version ^0.72.0' │
│   13    │  ''   │ 'react-native/metro-babel-transformer' │    '0.74.0'    │ 'No match found for version ^0.72.0' │
│   14    │  ''   │         'react-native/codegen'         │    '0.74.0'    │               '0.72.8'               │
│   15    │  ''   │      'react-native/gradle-plugin'      │    '0.74.0'    │              '0.72.11'               │
│   16    │  ''   │    'react-native/typescript-config'    │    '0.74.0'    │ 'No match found for version ^0.72.0' │
│   17    │  ''   │    'react-native/virtualized-lists'    │    '0.74.0'    │               '0.72.8'               │
└─────────┴─────────┴─────────────────────────────────────────┴────────────────┴──────────────────────────────────────┘
```

Reviewed By: cortinico

Differential Revision: D52347140

Pulled By: lunaleaps

fbshipit-source-id: 75811730e1afd5aae2d9fba4e437cd0d3d424a90
2024-02-04 12:54:18 -08:00
Riccardo Cipolleschi f56bf1fa0a [RN][iOS] Fix warning when loading RCTUIManager and A11yManager (#42734) 2024-02-04 12:09:25 -08:00
Distiller 53061d7b85 [0.73.3] Bump version numbers v0.73.3 2024-01-29 18:03:22 +00:00
Blake Friedman c5c0563f20 bumped packages version
#publish-packages-to-npm
2024-01-29 17:29:28 +00:00
Blake Friedman 71c8ab3496 bumped packages versions 2024-01-29 17:14:06 +00:00
Blake Friedman 2daedcd599 Avoid using Cocoapods 1.15 until it fixes an issue affection RN. (#42702)
Summary:
Cocoapods 1.15 (https://github.com/facebook/react-native/issues/42698) current breaks the build, limit to version >= 1.13 & < 1.15

This is currently broken and affecting users, we'll remove this limit once Cocopods fixes the regression.  It's currently blocking 0.73.3.

[iOS][Fixed] don't allow cocoapods 1.15.

<!-- 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

Pull Request resolved: https://github.com/facebook/react-native/pull/42702

Test Plan:
```
bundle exec pod install
```

Reviewed By: cipolleschi

Differential Revision: D53180111

Pulled By: blakef

fbshipit-source-id: 4c5dd11db6d208e8d71249443a8f85e601913abd
2024-01-29 13:21:01 +00:00
zhongwuzw 753aee1c2c RNTester enable concurrent root when using Fabric (#41166)
Summary:
RNTester's `AppDelegate` override `prepareInitialProps` method of super class `RCTAppDelegate` https://github.com/facebook/react-native/blob/70acd3f7d9edae9e40cc4603bede9778da281a85/packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm#L152, so we missed `concurrentRoot` initial prop.

![image](https://github.com/facebook/react-native/assets/5061845/12af5815-afe6-46f0-8107-54ca443b4962)

cc javache cipolleschi

[IOS] [FIXED] - RNTester enable concurrent root when using Fabric

Pull Request resolved: https://github.com/facebook/react-native/pull/41166

Test Plan: Warning disappear.

Reviewed By: cipolleschi

Differential Revision: D50596693

Pulled By: javache

fbshipit-source-id: d73a17cd137b3088405f86b739cb0ed7b5a9839e
2024-01-26 17:24:47 +00:00
Blake Friedman 1a9994ba8f [LOCAL] similar to #42306, ignore test 2024-01-25 16:56:08 +00:00
Blake Friedman a4d66b8ed4 bumped packages versions
#publish-packages-to-npm
2024-01-25 15:50:23 +00:00
Riccardo Cipolleschi 98943e3155 Disable expensive checks in OSS (#42306)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42306

Internally, we have some computationally expensive checks in Debug mode when running Fabric.
However, these are not very useful in OSS and they were the cause of some issues which generated noise.
With this change, we are enabling those checks only in the Meta specific builds and making sure that the OSS won't incur in that cost.

## Changelog
[Internal] - Disable expensive Fabric checks when running Fabric in OSS

Reviewed By: cortinico, sammy-SC

Differential Revision: D52543696

fbshipit-source-id: 697f14fd21e884f293ea7cee8ee16fff73764996
2024-01-25 15:47:56 +00:00
Blake Friedman 58a59f6e76 [LOCAL] Remove ccache line from react_native_pods
Cleanup from a merge conflict which brought this in.
2024-01-25 15:44:29 +00:00
Blake Friedman f4e21b0b27 bumped packages versions
#publish-packages-to-npm
2024-01-25 15:21:19 +00:00
Blake Friedman b6e7561067 Revert "Update Hermes tag to hermes-2024-01-25-RNv0.73.3-57e3665290d5e97eaea63d27cb370ce7862a10a6"
This reverts commit 62e1c5c195.
2024-01-25 15:19:26 +00:00
Blake Friedman e476db23f4 Merge pull request #42382 from facebook/cipolleschi/fix_new_arch_release 2024-01-25 14:48:49 +00:00
Blake Friedman 23f1dd6e3d Merge pull request #42227 from facebook/cipolleschi/fix-linking-issue-xcode15_1 2024-01-25 14:48:09 +00:00
Gabriel Donadel 7d5d355143 Remove ATS config patch from react_native_post_install (#42637)
Summary:
This PR removes the `apply_ats_config` function of ReactNativePodsUtils that was used inside `react_native_post_install` because it was preventing users from configuring `NSAllowsArbitraryLoads` to true in their projects, especially when building in CI as the plist file would be reset after running pod install.

[IOS] [CHANGED] - Remove ATS config patch from react_native_post_install

Pull Request resolved: https://github.com/facebook/react-native/pull/42637

Test Plan: Edit `Info.plist`, run `pod install` and check if changes have not been overwritten

Reviewed By: cortinico

Differential Revision: D53048299

Pulled By: cipolleschi

fbshipit-source-id: 8dc335fae2e05a62daf931a50fa3f7a314e76a2e
2024-01-25 14:39:12 +00:00
Riccardo Cipolleschi 6f92fb93c2 Register RCTDeviceInfo to invalidating and cleanup observer (#42396)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42396

Cmmunity reported [#42120](https://github.com/facebook/react-native/issues/42120) where React Native was crashing if RCTDeviceInfo native module was receiving a notification while the bridge is invalidating.

Upon investigation, I realized that:
1. The RCTDeviceInfo module is never invalidated
2. Observers are still observing even when the Bridge is in an invalidated state and it is not back up.

This change makes sure that we invalidate the `RCTDeviceInfo.mm` module and that we unregister the observers.

## Changelog:
[iOS][Fixed] - Make `RCTDeviceInfo` listen to invalidate events and unregister observers while invalidating the bridge

Reviewed By: RSNara

Differential Revision: D52912604

fbshipit-source-id: 1727bcdef5393b1bd5a272e2143bc65456c2a389
2024-01-25 14:27:46 +00:00
LIM Albert 4f2be88856 Call super.onRequestPermissionsResult in ReactActivity (#42478)
Summary:
This change allows activities to handle onRequestPermissionsResult callbacks (eg: registerForActivityResult)

Fixes #42403

[Android][Changed] - Call super.onRequestPermissionsResult in ReactActivity's onRequestPermissionsResult()

Pull Request resolved: https://github.com/facebook/react-native/pull/42478

Test Plan:
**Without super.onRequestPermissionsResult() call**

![before](https://github.com/facebook/react-native/assets/8672580/553ff597-c077-4831-a4d3-51846a253536)

**With super.onRequestPermissionsResult() call**

![after](https://github.com/facebook/react-native/assets/8672580/c7d588d2-5846-4083-a02f-59b5f915442c)

Reviewed By: cipolleschi

Differential Revision: D52952198

Pulled By: cortinico

fbshipit-source-id: 53b5dac65f6b5409d87b5fe7f8be659d7b48f70d
2024-01-25 14:27:37 +00:00
Dmitry Rykun da9ab6a33b SVC Codegen: Handle TSAsExpression when looking for the codegen declaration (#40860)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/40860

This diff adds support for the `AS` expression in TS sources. The following codegen declaration should work now:
```
export default codegenNativeComponent<NativeProps>(
  'MyComponentView',
) as HostComponent<NativeProps>;
```
Changelog: [General][Added] - Handle TSAsExpression when looking for the codegen declaration

Reviewed By: shwanton

Differential Revision: D50225241

fbshipit-source-id: 247a3d341d742b548e82318d0fa21dff9884d2bd
2024-01-25 14:20:32 +00:00
Tommy Nguyen 5d8529688c fix: declare missing dependency chalk (#42235)
Summary:
Dependency on `chalk` was introduced in https://github.com/facebook/react-native/pull/37510, but was never declared. In pnpm setups, the CLI fails to run because of this.

This needs to be picked to 0.73.

[GENERAL] [FIXED] - Declare missing dependency `chalk`

Pull Request resolved: https://github.com/facebook/react-native/pull/42235

Test Plan: n/a

Reviewed By: huntie

Differential Revision: D52660337

Pulled By: cortinico

fbshipit-source-id: 1cd45fcff72045c127773566a27103f1b38262b3
2024-01-25 14:20:14 +00:00
Paul Schreiber 95c590a2cc Properly handle Xcode targets with spaces in their names (#42220)
Summary:
Properly handle targets with spaces in their names

Use quotes around the argument to basename path. Ensures this succeeds when the Xcode target name has spaces.

example:
```sh
#!/bin/sh
SOURCEMAP_FILE="ArchiveIntermediates/Jane Doe/IntermediateBuildFilesPath/Jane Doe.build/Release-iphoneos/JaneDoe.build/DerivedSources/main.jsbundle.map"
BN_SOURCEMAP_FILE="$(basename $SOURCEMAP_FILE)"
echo $BN_SOURCEMAP_FILE
```

output:
```
Jane Jane main.jsbundle.map
```

```sh
#!/bin/sh
SOURCEMAP_FILE="ArchiveIntermediates/Jane Doe/IntermediateBuildFilesPath/Jane Doe.build/Release-iphoneos/JaneDoe.build/DerivedSources/main.jsbundle.map"
BN_SOURCEMAP_FILE="$(basename "$SOURCEMAP_FILE")"
echo $BN_SOURCEMAP_FILE
```

output:
```
main.jsbundle.map
```

## Changelog:
[iOS] [Fixed] - Fix support for SOURCEMAP_FILE path containing spaces

## Related
https://github.com/facebook/react-native/pull/40937

Pull Request resolved: https://github.com/facebook/react-native/pull/42220

Reviewed By: christophpurrer

Differential Revision: D52650491

Pulled By: arushikesarwani94

fbshipit-source-id: e42b8a0d018b37fb558abd53d765fbdd676c51a2
2024-01-25 14:19:27 +00:00
William Fernandes 401aa817fc Fix release build error due to a casing issue in hermes tarball path after download prebuilt tarball (#42160)
Summary:
In my mac, I use a case-sensitive volume and when I build a react-native 0.73 project it failed with an error that can't find the hermes release tarball to extract:
```
Node found at: /usr/local/bin/node
Preparing the final location
Extracting the tarball
tar: Error opening archive: Failed to open '/Volumes/Workspace/meet-art-link/ios/Pods/hermes-engine-artifacts/hermes-ios-0.73.1-Release.tar.gz'
```
Note the `...-Release.tar.gz` in the error. In the disk it's `...-release.tar.gz`.

The build fails in after download the release tarball in release mode because the hermes tarball name in the `replace_hermes_version.js` build script is capitalized, while the file is lowercase on disk.

The fix is to ensure the hermes tarball name's "build type" is lowercase just like the function that creates the tarballs in react-native release located in `hermes_utils.js` in `getHermesPrebuiltArtifactsTarballName()`.

Perhaps it's better to retrieve the tarball name from the same method it's generated? E.g.:
```js
const { getHermesPrebuiltArtifactsTarballName } = require('react-native/scripts/hermes/hermes-utils');

const tarballName = getHermesPrebuiltArtifactsTarballName(`${version}-${configuration}`);
const tarballURLPath = `${podsRoot}/hermes-engine-artifacts/${tarballName}`;
```
If yes, let me know to update the 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
-->
[iOS][Fixed] - Fix release build error due to a casing issue in hermes tarball path after download prebuilt tarball

Pull Request resolved: https://github.com/facebook/react-native/pull/42160

Test Plan: Use a case sensitive volume or system and build react-native 0.73 in release mode, it will fail. Apply the patch in this PR and it will work fine.

Reviewed By: cortinico

Differential Revision: D52603439

Pulled By: cipolleschi

fbshipit-source-id: 41ed8d8202874f338e4aa3af88d9d28ec1b8b3d5
2024-01-25 14:19:21 +00:00
Samuel Susla d607040200 Fix TouchableBounce, TouchableHighlight and TouchableNativeFeedback in React 18 (#42133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42133

## Changelog:
[General][Fixed] - TouchableBounce, TouchableHighlight and TouchableNativeFeedback dropping touches with React 18.

TouchableBounce, TouchableHighlight and TouchableNativeFeedback do not trigger onPress when used with React 18. This is because it resets its pressability configuration in `componentWillUnmount`. This is fine, we want to stop deliver events and restart all timers when component is unmounted.
```
componentWillUnmount(): void {
    this.state.pressability.reset();
  }
```

But TouchableBounce, TouchableHighlight and TouchableNativeFeedback were not restarting the pressability configuration when component was mounted again. It was restarting the configuration in `componentDidUpdate`, which is not called when component is unmounted and mounted again.

Reviewed By: fkgozali

Differential Revision: D52514643

fbshipit-source-id: 0d6ae4bb7c2a797cc443181459c5614da0ecfc7a
2024-01-25 14:19:12 +00:00
Samuel Susla 220d8a51cc fix TouchableWithoutFeedback and TouchableOpacity dropping onPress in React 18 (#42121)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42121

## Changelog:
[General][Fixed] - TouchableWithoutFeedback and TouchableOpacity dropping touches with React 18.

TouchableWithoutFeedback and TouchableOpacity do not trigger onPress when used with React 18. This is because it resets its pressability configuration in `componentWillUnmount`. This is fine, we want to stop deliver events and restart all timers when component is unmounted.
```
componentWillUnmount(): void {
    this.state.pressability.reset();
  }
```

But TouchableWithoutFeedback and TouchableOpacity were not restarting the pressability configuration when component was mounted again. It was restarting the configuration in `componentDidUpdate`, which is not called when component is unmounted and mounted again.

Reviewed By: fkgozali

Differential Revision: D52388699

fbshipit-source-id: ef13194c6581c5d31d0f1cb465bfd0cf98d672ea
2024-01-25 14:19:03 +00:00
Blake Friedman 62e1c5c195 Update Hermes tag to hermes-2024-01-25-RNv0.73.3-57e3665290d5e97eaea63d27cb370ce7862a10a6 2024-01-25 13:37:19 +00:00
Riccardo Cipolleschi f39f34ed82 [RN][iOS] Fix race condition between A11yManager and UIManager 2024-01-19 15:51:27 +00:00
szymonrybczak bcb229e8f8 Bump CLI to 12.3.2 2024-01-19 13:43:08 +00:00
Riccardo Cipolleschi a2771ce58a [RN][iOS] Fix flags 2024-01-10 13:12:37 +00:00
Distiller d2ac5d6a55 [0.73.2] Bump version numbers v0.73.2 2024-01-08 14:55:48 +00:00
Alex Hunt 7895cdb0eb Bump package versions
#publish-packages-to-npm
2024-01-08 11:08:47 +00:00
Riccardo Cipolleschi 7e721f09ad [LOCAL][RN][Geneal] Fix boost download url (#42176) 2024-01-08 12:04:38 +01:00
Alex Hunt 89cf504095 Bump Metro to ^0.80.3 (#42139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42139

Bump to the latest Metro release.

Metro release notes: https://github.com/facebook/metro/releases/tag/v0.80.3

Changelog:
[General][Changed] - Bump Metro to ^v0.80.3

Reviewed By: GijsWeterings

Differential Revision: D52520542

fbshipit-source-id: 3c089e3f033a4d0597e9adb50d3377f1ad822743

# Conflicts:
#	packages/metro-config/package.json
2024-01-05 13:13:10 +00:00
Nick Gerleman 00d8389890 Fix horizontal scrollview scrollTo coordinate space in RTL on oldarch (#42094)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/42094

Fabric fixed this a while back with https://github.com/facebook/react-native/commit/9ca460f06405db85d0df60cbe53c304c9127c3bf

Looks like this is still broken on Paper, and now VirtualizedList relies on it. https://github.com/facebook/react-native/pull/38737#discussion_r1437874601

Changelog:
[ios][fixed] - Fix horizontal scrollview scrollTo coordinate space in RTL on oldarch

Reviewed By: lenaic

Differential Revision: D52451602

fbshipit-source-id: f41d8248c7f6ab23965800b09ca1082fd1a15151
2024-01-03 14:38:03 +00:00
David Vacca ddf0079ec5 Fix rendering of RN Tester New Architecture examples in Android
Summary:
When bridgeless is enabled, RN Tester New Architecture examples crashed with a StackOverflow Exception
The root cause of this issue is that MyLegacyViewManager is sending an event to JS during the execution of MyLegacyViewManager.createViewInstance() method.

This is a problem because the delivery of events depend on the "id" of the view, but the "id" of the view is set after MyLegacyViewManager.createViewInstance() finishes executing.

The documentations "implicitly" mentions to not set props during the execution of the ViewManager.createViewInstance() method:

https://reactnative.dev/docs/native-components-android#2-implement-method-createviewinstance

To fix this issue I'm removing the execution of the method that triggers the event.

bypass-github-export-checks

changelog: [Android][Fix] Fix rendering of 'RN Tester New Architecture examples' when bridgeless is enabled

Reviewed By: fkgozali

Differential Revision: D51047007

fbshipit-source-id: 17be493f79114fa402029063e79fabc1d90efc17
2024-01-02 17:56:10 +00:00
Oscar Franco 5b382a8fa7 Unhandled promise rejection - attach non-standard Error object stack info if possible (#42079)
Summary:
This is a continuation of my [last PR](https://github.com/facebook/react-native/pull/40914) which improved the symbolication of unhandled promise rejections.

While I was developing another library I noticed I still got an error stack of the log adding and not of the error itself. The library I'm trying to debug does not throw a standard error object but rather a custom one, but it still contains the stack field. By passing this stack field to the logbox call I was able to get a better symbolicated stack trace. The exact line of the failure is not displayed but at least the correct file is.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Unhandled promise rejection - attach non-standard Error object stack info if possible

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests

Pull Request resolved: https://github.com/facebook/react-native/pull/42079

Test Plan:
Test any unhandled promise rejection with a non-standard error (line 23, toString must not return `[object Error]`) and see if the correct (or at least a better) stack trace is shown.

Here is the one I got before and after this change:

<img src="https://github.com/facebook/react-native/assets/1634213/3d07faad-9535-42c9-8032-b4d8fe407e88" width="200" />

<img src="https://github.com/facebook/react-native/assets/1634213/2c39bd82-c7a1-4f58-8ac4-5c479bb96b6e" width="200" />

Reviewed By: huntie

Differential Revision: D52431711

Pulled By: cipolleschi

fbshipit-source-id: be2172d3b1e2fc3f72812faac372c83bc6dface2
2024-01-02 10:26:30 +00:00
Gabriel Donadel 2c8aa68600 Update ios pod post_install logic for detecting if hermes is enabled (#41286)
Summary:
Follow up of https://github.com/facebook/react-native/pull/41284#issuecomment-1789516046

We should not rely on  checking if the `React-hermes` pod is present to determine if hermes is enabled

## Changelog:

[IOS] [CHANGED] - Update ios pod post_install logic for detecting if hermes is enabled

Pull Request resolved: https://github.com/facebook/react-native/pull/41286

Test Plan: Run `use_react_native!(hermes => false)` should not add `USE_HERMES = true;` to `project.pbxproj`

Reviewed By: blakef

Differential Revision: D50899654

Pulled By: cipolleschi

fbshipit-source-id: a5ab5b0117c61014e77b780c50bf349da92c6342
2024-01-02 10:25:39 +00:00