Commit Graph
32204 Commits
Author SHA1 Message Date
Nicola Corti ad399ce80d Move React Native publishing URLs to Central Portal (#51693)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51693

This moves React Native to use the Central Portal URLs rather than the legacy OSSRH ones.
See https://github.com/gradle-nexus/publish-plugin for more context.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D75673984

fbshipit-source-id: 1de6746809eed72f232eac0c3fb4d809c2046620
2025-06-16 10:45:59 +01:00
Riccardo Cipolleschi d27ab5fc0d [LOCAL]Bump Podfile.lock 2025-02-06 18:50:31 +00:00
React Native Bot f5ecf66695 Release 0.75.5
#publish-packages-to-npm&0.75-stable
v0.75.5
2025-02-06 16:25:21 +00:00
Riccardo Cipolleschi fcf621aba3 [LOCAL] Bump hermes version 2025-02-06 11:52:10 +00:00
Riccardo Cipolleschi 43bbd476c1 Revert "Modal bugfix for statusBarTranslucent prop and Android 15 (#46359)"
This reverts commit 4475e01570.
2025-02-06 11:22:32 +00:00
25e76a2717 [0.75] Bump Kotlin to 1.9.25 to mitigate #49115 (#49139)
Co-authored-by: Nicola Corti <ncor@meta.com>
2025-02-06 10:53:40 +00:00
Riccardo Cipolleschi b6ed0d351e Fix images not displayed when extension is implicit (#48888)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48888

We have a report from OSS where Images are not displayed properly in case they are saved on disk with no extension.

We previously had a fix attempt iwith [this pr](https://github.com/facebook/react-native/pull/46971), but this was breaking some internal apps.

This second attempt should work for both cases.

## Changelog:
[iOS][Fixed] - Load images even when the extension is implicit

Reviewed By: cortinico

Differential Revision: D68555813

fbshipit-source-id: bc25970aafe3e6e5284163b663d36e00b3df3d82
2025-02-06 10:51:59 +00:00
Qichen ZhuandRiccardo Cipolleschi 1656394bae Set TextInput selection correctly when attached to window in Android (#46948)
Summary:
On Android, when `ReactEditText` is attached to window, `setTextIsSelectable` moves the caret to the beginning, so we need to restore the selection.

This is similar to what we did in https://github.com/facebook/react-native/pull/17851.

Fixes https://github.com/facebook/react-native/issues/46943

## Changelog:

[ANDROID] [FIXED] - Fix TextInput caret moving to the beginning when attached to window

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

Test Plan:
Code to reproduce in RNTester:

```TSX
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
import {TextInput} from 'react-native';
import {useEffect, useRef} from 'react';

function Playground() {
  const input = useRef(null);
  useEffect(() => { setTimeout(() => input.current?.focus(), 1000); }, []);
  return <TextInput ref={input} value='1.00' selection={{start: 4, end: 4}} />;
}

export default ({
  title: 'Playground',
  name: 'playground',
  render: (): React.Node => <Playground />,
}: RNTesterModuleExample);
```

Before | After
-- | --
![Screenshot_1728553990](https://github.com/user-attachments/assets/382cf3ec-7437-4b0d-8c15-c8923d677afd) | ![Screenshot_1728553884](https://github.com/user-attachments/assets/9883e966-e9b8-4f8a-bedb-6ee43880d482)

Reviewed By: cortinico

Differential Revision: D64175774

Pulled By: rshest

fbshipit-source-id: ef9fdbecca582c8075bcdfd2d9b810b04d87e3d9
2025-02-06 10:47:26 +00:00
Alan LeeandRiccardo Cipolleschi 4475e01570 Modal bugfix for statusBarTranslucent prop and Android 15 (#46359)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46359

Remove unneeded code around size calculation and old arch support
- updateState was getting called unnecessarily in multiple places --> only call from onSizeChanged()
    - this is a reliable source for getting the content size area of the dialog used for Modal
     - remove code checking duplicated update
- Old architecture cleanup
    - Remove Java implementation of ShadowNode
      - we already have logic to set the node size via UIManagerModule::updateNodeSize(). This  code is now group together in updateState() for both new and old architecture

This fixes issues with resulting from wrong size calculation:
- having gaps at bottom when we set `statusBarTranslucent` to `true`
- Modal cut off at bottom on Android 15 (drawn under bottom nav bar)

Changelog:
[Android][Fixed] - Modal statusBarTranslucent bug, Modal at bottom being cut off in Android 15 (without forced edge-to-edge)
[Android][Deprecation] - Deprecating ModalHostShadowNode and ModalHostHelper classes

Reviewed By: mdvacca

Differential Revision: D62286026

fbshipit-source-id: 03b64a7783c12bebd1457c86a9a2657adc882c79
2025-02-06 10:47:13 +00:00
Riccardo Cipolleschi 794bf34e60 Fix ruby (#48721)
Summary:
Following the suggestions [here](https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror), it seems that concurrent-ruby has been released tonight and it is bugged. Let's pin it to the right version.

## Changelog:
[iOS][Changed] - Pin 'concurrent-ruby' to a working version

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

Test Plan: GHA

Reviewed By: robhogan

Differential Revision: D68262719

Pulled By: cipolleschi

fbshipit-source-id: fc6410e28cc96f9d3769d3082a77cac0a3efe6db
2025-02-06 10:41:37 +00:00
Riccardo Cipolleschi 2922af2e7e Pin Xcodeproj to < 1.26.0 (#47237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47237

The Xcodeproj gem has been released yesterday to version 1.26.0 and it broke the CI pipeline of react native.

This should fix the issue

## Changelog
[Internal] - Pin Xcodeproj gem to 1.26.0

Reviewed By: blakef

Differential Revision: D65057797

fbshipit-source-id: f4035a1d3c75dd4140eb1646ab2aa0ccb08fb16b
2025-02-06 10:41:31 +00:00
Neil DharandRiccardo Cipolleschi 80f67ca03c Implement more missing methods on WithRuntimeDecorator (#45049)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45049

WithRuntimeDecorator is missing many methods that were added after it.
Add implementations for them.

The underlying issue here is that because this inherits from
RuntimeDecorator, which implements all methods, there is no compilation
error for this runtime when we add new methods.

Changelog:
[GENERAL] [FIXED] - Add missing methods to the WithRuntimeDecorator class.

Reviewed By: avp

Differential Revision: D58752127

fbshipit-source-id: d80b4ed1c38698ed3850d0cd961bf7ddde2449a0
2025-02-06 10:41:23 +00:00
Riccardo Cipolleschi fdb2631b5e Exclude dSYM from the archive (#46472)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46472

Currently, we are building the Debug symbols (dSYM) for hermes dSYM but we are not shipping them with the xcframework.
This is correct, because Debug symbols can increase the size of Hermes thus enalrging the iOS IPA and increasing the download time when installing pods.

We distribute the dSYM separatedly, in case users needs to symbolicate Hermes stack traces.

However the path to the dSYM still appears in the Info.plist of the universal XCFramework and this can cause issues when submitting an app to apple.

This change should remove those lines from the universal framework.

It fixes https://github.com/facebook/react-native/issues/35863

[Internal] - Remove dSYM path from Info.plist

Reviewed By: cortinico

Differential Revision: D62603425

fbshipit-source-id: 038ec3d6b056a3d6f5585c8125d0430f56f11bb9
2025-02-06 10:41:09 +00:00
zhongwuzwandRiccardo Cipolleschi ea0bc54115 Fabric: Fixes animations strict weak ordering sorted check failed (#46582)
Summary:
Fixes https://github.com/facebook/react-native/issues/46568 . cc cipolleschi

## Changelog:

[IOS] [FIXED] - Fabric: Fixes animations strict weak ordering sorted check failed

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

Test Plan:
See issue in  https://github.com/facebook/react-native/issues/46568

## Repro steps
- Install Xcode 16.0
- navigate to react-native-github
- yarn install
- cd packages/rn-tester
- bundle install
- RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
open RNTesterPods.xcworkspace to open Xcode

{F1885373361}

Testing with Reproducer from OSS
|  Paper |  Fabric (With Fix) |
|--------|-----------------|
| {F1885395747} | {F1885395870} |

Android - LayoutAnimation (Looks like it has been broken and not working way before this changes.)
 https://pxl.cl/5DGVv

Reviewed By: cipolleschi

Differential Revision: D63399017

Pulled By: realsoelynn

fbshipit-source-id: aaf4ac2884ccca2da7e90a52a8ef10df6ae4fc8a
2025-02-06 10:35:12 +00:00
Riccardo Cipolleschi dbffbf72d7 Fix the generation of .xcode.env.local (#46661)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46661

The previous approach was brittle and it was not working in all the scenarios.

This is the same approach used [by Expo](https://github.com/expo/expo/blob/12f24ea7fdbc8bab864d7852ae8e7275e44db4df/packages/expo-modules-autolinking/scripts/ios/xcode_env_generator.rb#L37C44-L37C75) (thanks guys! :D) and it looks like it is more stable.

This should definitely fix [#43285](https://github.com/facebook/react-native/issues/43285).

## Changelog
[Internal] - Fix the generation of .xcode.env.local

Reviewed By: cortinico

Differential Revision: D63460707

fbshipit-source-id: c6732adce3df5f8365b17ed9c500c38f773ecee5
2025-02-06 10:35:06 +00:00
Hugo FOYARTandRiccardo Cipolleschi 78ef1e2bc2 fix: FormData filename in content-disposition (#46543)
Summary:
This Pull Request fixes a regression introduced in https://github.com/facebook/react-native/commit/7c7e9e6571c1f702213e9ffbb40921cd5a1a786b, which adds a `filename*` attribute to the `content-disposition` of a FormData part. However, as the [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#directives) states, there is no `filename*` attribute for the `content-disposition` header in case of a form data.

The `filename*` attribute would break the parsing of form data in the request, such as in frameworks like `Next.js` which uses the web implementation of [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request).

Fixes https://github.com/facebook/react-native/issues/44737

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

[General] [Fixed] - Remove non compliant `filename*` attribute in a FormData `content-disposition` header

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

Test Plan:
- Clone the `react-native` repo
- Create a simple JS file that will act as a node server and execute it

```javascript
const http = require('http');

const server = http.createServer(async function (r, res) {
    const req = new Request(new URL(r.url, 'http://localhost:3000'), {
      headers: r.headers,
      method: r.method,
      body: r,
      duplex: 'half',
    });

    const fileData = await req.formData();

    console.log(fileData);
    res.writeHead(200);
    res.end();
});
server.listen(3000);
```

- Go to `packages/rn-tester`
- Add a `useEffect` in `js/RNTesterAppShared.js`

```javascript
React.useEffect(() => {
    const formData = new FormData();
    formData.append('file', {
      uri: 'https://www.gravatar.com/avatar',
      name: '测试photo/1.jpg',
      type: 'image/jpeg',
    });

    fetch('http://localhost:3000', {
      method: 'POST',
      body: formData,
    }).then(res => console.log(res.ok));
  });
```

- Run the app on iOS or Android
- The node server should output the file added to the FormData with an encoded name

Reviewed By: robhogan

Differential Revision: D66643317

Pulled By: yungsters

fbshipit-source-id: 0d531528005025bff303505363671e854c0a2b63
2025-02-06 10:34:59 +00:00
Blake FriedmanandGitHub a2d8cbf9eb [LOCAL] Do not install CMake on Windows machine (#48139)
This replicates a fix in 00d5caee99. 0.75 hadn't factored this out into
a separate action.
2024-12-06 10:56:08 +00:00
Gabriel Donadel f5f700fb7d Update Podfile.lock
Changelog: [Internal]
2024-10-02 15:01:11 -03:00
React Native Bot 1611a5e8a1 Release 0.75.4
#publish-packages-to-npm&latest
v0.75.4
2024-10-02 13:44:06 +00:00
Rodolfo Gomez SirimarcoandBlake Friedman 56a282c44d Fix Headless Crash Tried to finish non-existent task with id (#46497)
Summary:
Sometimes a headless task tries to finish, but it doesn’t exist, which causes an exception.
No one knows how to reliably reproduce it, as it could be a race condition. However, if you attempt to remove a task that has already been removed, it shouldn’t cause an issue since you're trying to remove something that’s already gone (which is exactly what you want).

Fixes:
 - https://github.com/facebook/react-native/issues/46496
 - https://github.com/facebook/react-native/issues/33883
 - https://github.com/facebook/react-native/issues/27597
 - https://github.com/transistorsoft/react-native-background-fetch/issues/202
 - https://github.com/transistorsoft/react-native-background-fetch/issues/369
 - https://github.com/transistorsoft/react-native-background-geolocation/issues/2096
 - https://github.com/jpush/jpush-react-native/issues/78

## Stacktrace:
```
Fatal Exception: java.lang.AssertionError: Tried to finish non-existent task with id 28.
  at com.facebook.infer.annotation.Assertions.assertCondition(Assertions.java:88)
  at com.facebook.react.jstasks.HeadlessJsTaskContext.finishTask(HeadlessJsTaskContext.java:179)
  at com.facebook.react.jstasks.HeadlessJsTaskContext$3.run(HeadlessJsTaskContext.java:217)
  at android.os.Handler.handleCallback(Handler.java:958)
  at android.os.Handler.dispatchMessage(Handler.java:99)
  at android.os.Looper.loopOnce(Looper.java:257)
  at android.os.Looper.loop(Looper.java:368)
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:233)
  at java.lang.Thread.run(Thread.java:1012)
```

## Screenshot

https://github.com/user-attachments/assets/101f0f53-95c9-40ec-a59d-22d6d474b457

## Changelog:

[ANDROID] [FIXED] - Fix Headless Crash `Tried to finish non-existent task with id`

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

Test Plan:
I created an example where I attempt to remove a task that doesn’t exist.

Example: https://github.com/RodolfoGS/react-native-fix-non-existent-task

### How to reproduce using the example above:
1. `git clone git@github.com:RodolfoGS/react-native-fix-non-existent-task.git`
2. `cd react-native-fix-non-existent-task`
3. `npm install`
4. `npm run android`
5. Notice the crash

### Steps to create the example from scratch and reproduce the crash:
1. `npx react-native-community/cli@latest init AwesomeProject`
2. `cd AwesomeProject`
3. Add call to finishTask to reproduce the crash (https://github.com/RodolfoGS/react-native-fix-non-existent-task/commit/6fe3c1388a58b9ffdcca5f9c6f00a4f2fea725ea)
4. `npm run android`
5. Notice the crash

Reviewed By: javache

Differential Revision: D62738059

Pulled By: rshest

fbshipit-source-id: 3232dc76ba8a069279c2b741d62372537a3f9140
2024-09-30 15:02:59 +01:00
Alan LeeandBlake Friedman 366f1d0df3 fix TextInput 'contextMenuHidden' prop (#45014)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45014

`TextInput`'s `contextMenuHidden` prop isn't working working as expected.
It should hide the context menu (copy/paste/...) that pops up from input text.

Reference: [Android doc](https://developer.android.com/reference/android/widget/TextView#setCustomSelectionActionModeCallback(android.view.ActionMode.Callback))
> Returning false from `ActionMode.Callback.onCreateActionMode(ActionMode, android.view.Menu)` will prevent the action mode from being started.

**Changelog:** [Android][Fixed] - TextInput's `contextMenuHidden` prop bug fix

Reviewed By: javache

Differential Revision: D58684366

fbshipit-source-id: 328c267ed0e896a78e114578e3a00adf41f2e095
2024-09-30 14:57:06 +01:00
Nicola CortiandBlake Friedman 1e611fd8d9 RNGP: Read enableWarningsAsErrors property correctly (#46657)
Summary:
I've noticed that some users are reporting build failures due to warnings inside RNGP.
We do have `allWarningsAsErrors` set to true for everyone (also for users).
That's too aggressive, and can cause build failures which are not necessary. Let's keep it enabled only on our CI (when the `enableWarningsAsErrors` property is set).

## Changelog:

[INTERNAL] - RNGP: Read `enableWarningsAsErrors` property correctly

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

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D63459601

Pulled By: cortinico

fbshipit-source-id: 0307e8d6771518038a5abe27ca5a993cb0a9f8c0
2024-09-30 14:55:58 +01:00
HaileyandBlake Friedman 97913a8f60 convert NSNull to nil before checking type in readAsDataURL (#46635)
Summary:
This issue original arose out of https://github.com/bluesky-social/social-app/issues/5100. Copying the description (with my general understanding of the problem) from the patch PR to here as well.

There's a crash that comes up in the following, pretty specific scenario:

- Have a response that has an empty body
- Do not include a `content-type` header in the response
- Set the `x-content-type-options` header to `nosniff`

RN handles the response for a request in this block of code: https://github.com/facebook/react-native/blob/303e0ed7641409acf2d852c077f6be426afd7a0c/packages/react-native/Libraries/Blob/RCTBlobManager.mm#L314-L326

Here, we see that values of `nil` - which `[response MIMEType]` will return when no `content-type` is provided in the response and the actual type cannot be determined (https://developer.apple.com/documentation/foundation/nsurlresponse/1411613-mimetype) - gets converted to `NSNull` by `RCTNullIfNil`.

When we get back over to `readAsDataURL`, we see that we grab the type from the dictionary and check if its `nil` before calling `length` on the string. https://github.com/facebook/react-native/blob/303e0ed7641409acf2d852c077f6be426afd7a0c/packages/react-native/Libraries/Blob/RCTFileReaderModule.mm#L74-L77

However, this check is dubious, because the value will never actually be `nil`. It will always either be `NSString` or `NSNull` because of the `RCTNullIfNil` call made above and `[RCTConvert NSString]` seems to just return the input if it is `NSNull`.

## Changelog:

[IOS] [FIXED] - Convert `NSNull` to `nil` before checking `type` in `readAsDataURL`

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

Test Plan:
This is a little awkward to test, but essentially this comes up in the following scenario that is described (and "tested" as being fixed by tweaking) in https://github.com/bluesky-social/social-app/issues/5100. I have personally tested by using Cloudflare rules to add/remove that particular header from an empty body response. You could also test this with a little local web server if you want.

### Before

https://github.com/user-attachments/assets/deb86c68-2251-4fef-9705-a1c93584e83e

### After

https://github.com/user-attachments/assets/9ffab11b-b2c8-4a83-afd6-0a55fed3ae9b

Reviewed By: dmytrorykun

Differential Revision: D63381947

Pulled By: cipolleschi

fbshipit-source-id: b2b4944d998133611592eed8d112faa6195587bd
2024-09-30 14:55:51 +01:00
Vin XiandBlake Friedman afd74ad89d fix(react-native-xcode): Add back BUNDLE_COMMAND (#46495)
Summary:
In this PR https://github.com/facebook/react-native/issues/45560  the BUNDLE_COMMAND initialization was removed while it is still being used. Without it, building from Xcode throws unknown options error for Physical iOS devices.

I have just brought back the initialization from the PR before that, so the bundle phase is successful.

## Changelog:
[IOS][Fixed] - Add back the BUNDLE_COMMAND

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

Test Plan: I have bundled release builds in Xcode. Everything seems to be fine.

Reviewed By: cortinico

Differential Revision: D62846877

Pulled By: cipolleschi

fbshipit-source-id: 3f07e8c0bc5acf98177582f1fee9a55ae77b31a1
2024-09-30 14:55:46 +01:00
Nicola CortiandBlake Friedman 0265ea0577 RNGP - Sanitize the output of the config command (#46482)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46482

Fixes https://github.com/facebook/react-native/issues/46443
Fixes https://github.com/facebook/react-native/issues/46134

I'm sanitizing the output of the `config` command + I've added some more logging in case of failure.

Changelog:
[Android] [Fixed] - RNGP - Sanitize the output of the config command

Reviewed By: cipolleschi

Differential Revision: D62641979

fbshipit-source-id: c13d27a42beeb7a973c1802e7204631d49d3d09b
2024-09-30 14:55:40 +01:00
Krystof WoldrichandBlake Friedman a4ec49cbe6 fix(react-native-xcode): Use CONFIG_CMD if set (#46112)
Summary:
In the recent 0.75 release I've noticed new `CONFIG_CMD` option in `react-native-xcode.sh`. But this option was not used. Insted when set `CONFIG_APP` was used.

This seems like a bug. As the usage before this PR would be as follow:

```bash
export CONFIG_CMD=true
export CONFIG_APP="/path/to/node /path/to/node_modules/react-native/cli.js config"
```

After this PR

```
export CONFIG_CMD="/path/to/node /path/to/node_modules/react-native/cli.js config"
```

This PR also removed unused explicite `--config-cmd "$CONFIG"` flag, as this is always overwriten by the code above, by default to `--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config`.

## 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] - Use CONFIG_CMD if set

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

Test Plan: I've set `CONFIG_CMD` and run Xcode Release build to check that the set command is executed.

Reviewed By: christophpurrer

Differential Revision: D61545010

Pulled By: blakef

fbshipit-source-id: ebbf8ebc08404bc6816277518a3b86c6f7e41e6e
2024-09-30 14:55:36 +01:00
Zhi ZhouandBlake Friedman 8ec672204d fix: iOS crash occurring when navigating to a new app screen with a displaying modal (#45313)
Summary:
Our app is using the react-native v0.74.2 with the `react-navigation` lib for screen navigation, we're facing an issue in the built iOS app that when we try to navigate to a new app screen with the `react-navigation`'s `reset` or `replace` method and meanwhile there's a react native modal displaying, then the iOS app always crashes.

I saw there is already a relevant [PR](https://github.com/facebook/react-native/pull/38491) and discussion targeting this issue, but I still think it would be better if this kind of crash can be suppressed in the framework level, currently I guess it's common in the iOS apps based on react native.

## Changelog:

[IOS] [FIXED] - app crash happening when navigate to a new app screen with a displaying modal

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

Test Plan: More issue details and the reproduction steps can be found in this [PR](https://github.com/facebook/react-native/pull/38491) :)

Reviewed By: christophpurrer

Differential Revision: D61537167

Pulled By: cipolleschi

fbshipit-source-id: 3c0474d794b4216ebc073dd6558d2b6ae27492d2
2024-09-30 14:55:31 +01:00
Riccardo Cipolleschi 893a4b30b1 [LOCAL] Bump Podfile.lock 2024-09-11 22:15:03 +01:00
React Native Bot 4968798538 Release 0.75.3
#publish-packages-to-npm&latest
v0.75.3
2024-09-11 16:12:13 +00:00
Riccardo Cipolleschi 16575babf8 [LOCAL] Revert commander to 9.4.1 to fix build issues 2024-09-11 12:20:51 +01:00
Riccardo Cipolleschi cf7b9b9486 [LOCAL] remove resolution and add commander as devDependency for the monorepo 2024-09-11 11:54:35 +01:00
Blake FriedmanandRiccardo Cipolleschi 8734cff95e [LOCAL] Add resolution in HelloWorld package to fix the build in CI 2024-09-11 11:17:53 +01:00
Riccardo Cipolleschi 33d12c1737 [LOCAL] Unify upload artifact action to 4.3.1 2024-09-11 10:47:38 +01:00
Riccardo Cipolleschi 6a08c38263 [LOCAL] Bump CLI to 14.1.0 2024-09-11 10:20:44 +01:00
Riccardo CipolleschiandGitHub 8c732ddf1b [RN][CI] Zip slices to preserve symlinks (#46301) 2024-09-11 10:15:58 +01:00
Riccardo CipolleschiandGitHub 4fb43c343f [LOCAL][CI] Fetch Github tags in the publish-release job (#46127) 2024-09-11 10:15:39 +01:00
Oskar KwaśniewskiandGitHub 61fdd51c50 (cherry-pick) fix: Hermes build for visionOS simulator (Release) (#45911) (#46169)
Summary:
Building for the visionOS simulator in the Release scheme requires an x86_64 slice to be included.

![CleanShot 2024-08-06 at 15 18 29@2x](https://github.com/user-attachments/assets/6fd962eb-ab71-4937-affe-964d8fa39f53)

## Changelog:

[IOS] [FIXED] - Include x86_64 slice when building for visionOS simulator

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

Test Plan: CI Green

Reviewed By: GijsWeterings

Differential Revision: D60828872

Pulled By: cipolleschi

fbshipit-source-id: 74444ac0b6661baf427837d242ba0ca295da0d16
2024-09-11 10:15:21 +01:00
Nicola CortiandGitHub 1067798a7e [0.75] RGNP - Remove unnecessary dependency on gradle-tooling-api-builders - serviceOf failure (#46367) 2024-09-11 10:15:06 +01:00
Blake FriedmanandRiccardo Cipolleschi 39222b41cb autolinked package scripts use absolute path (#46186)
Summary:
A previous attempt at fixing this issue used a relative path (https://github.com/facebook/react-native/issues/45208), this doesn't work if the user runs bundle install outside of the `ios/`
folder, using the `--project-directory=ios` argument.

## Changelog:
[iOS][Fixed] support bundle install from outside the ios folder using --project-directory

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

Test Plan:
Ran the command in a project with `react-native-firebase/app` using the
`--project-directory`, confirmed that it's fixed when using the absolute
path.

closes: reactwg/react-native-releases#341

Reviewed By: cipolleschi

Differential Revision: D61719821

Pulled By: blakef

fbshipit-source-id: d83429dd29c9e8cc066ab9843ad95fdfc0af8dea
2024-09-11 10:14:24 +01:00
Hampus SjöbergandRiccardo Cipolleschi 2a567cb546 fix: RNGP autolink not properly filter out pure C++ TurboModules (#46381)
Summary:
Hey.

The react-native gradle plugin didn't properly filter out [Pure](https://github.com/react-native-community/cli/pull/2387) C++ TurboModules for autolinking, which caused build failures as a non-existing gradle dependency would be emitted.

This makes Pure C++ TurboModules work again for Android.

## 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] Fix autolinking issues for Pure C++ TurboModules

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

Test Plan:
https://github.com/hsjoberg/rn75autolinkregression

Try running this repro project to observe the error:

```
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/coco/Projects/Blixt/rn75autolinkregression/example/android/app/build.gradle' line: 54

* What went wrong:
A problem occurred evaluating project ':app'.
> Project with path ':react-native-cxx-turbomodule' could not be found in project ':app'.
```

Simply add the 1-line code from this PR to make the build succeed.

Cheers.

Reviewed By: cipolleschi

Differential Revision: D62377757

Pulled By: cortinico

fbshipit-source-id: 9e3fa3777b4e6e4d3f2eb0f996ac0ac7676eedbe
2024-09-11 10:13:46 +01:00
Tomasz ŻelawskiandRiccardo Cipolleschi bfb7e16aa3 fix(TypeScript): Allow readonly arrays in transform (#46310)
Summary:
Currently readonly arrays aren't allowed in components' style, but readonly objects are accepted. This becomes evident in such case:

```ts
import { View } from 'react-native';

interface AppProps {
  transform: readonly ({ translateX: number } | { translateY: number })[];
  shadowOffset: Readonly<{ width: number; height: number }>;
}

export default function App({ transform, shadowOffset }: AppProps) {
  return (
    <>
      {/* TypeScript error with transform */}
      <View style={{ transform }} />
      {/* No errors with shadowOffset */}
      <View style={{ shadowOffset }} />
    </>
  );
}
```

## Changelog:

[GENERAL] [FIXED] - Allow readonly array type for transform property

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

Test Plan:
`yarn test-typescript`

I added relevant tests cases.

Reviewed By: robhogan

Differential Revision: D62140462

Pulled By: NickGerleman

fbshipit-source-id: 87374b0901ebc40cab48d442b61fe7a65711bc89
2024-09-11 10:13:35 +01:00
Blake FriedmanandRiccardo Cipolleschi d4bb5820bd Add missing commander dependency (#46242)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46242

This is transitively included, but should be explicitly included.

Changelog:
[Internal] commander is a dependency when bundling from Xcode

Reviewed By: cipolleschi

Differential Revision: D61916607

fbshipit-source-id: 1466d38d959970e5bd56576f8a7a22697d2eec4e
2024-09-11 10:13:26 +01:00
Andrew KnappandRiccardo Cipolleschi af5002b2e1 Fix GH-41226 by suppressing path adjustment when not actually drawing a border (#46239)
Summary:
When not drawing a border, the mGapBetweenPaths adjustment can create noticable pixelation when drawing curves through a low number of pixels.  This is noticable mostly on buttons and such on low-dpi devices.  This fix only applies the fix if clipping for the border radius is done.

When drawing small radius rounded backgrounds (e.g. to draw a circle or button) we see visible pixelation (see [GH-41226](https://github.com/facebook/react-native/issues/41226)) This is particularly noticable on low DPI devices.

## Changelog:

[ANDROID] [FIXED] - Don't use mGapBetweenPaths if not drawing a border

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

Test Plan:
Built an android app that directly uses CSSBackgroundDrawable to draw a background and verified repro of this issue.
![pre-fix](https://github.com/user-attachments/assets/e56a41b1-60f6-4953-9e91-b95a3380f2d7)
Then modified the code according to this PR and verified that anti-aliasing is appropriately applied
![fix](https://github.com/user-attachments/assets/b6b1aecf-a713-4e0a-9759-82c2dd862991)

Reviewed By: NickGerleman

Differential Revision: D61925281

Pulled By: jorge-cab

fbshipit-source-id: 93014629d031bd0d716cd3bb11e2c294dedad639
2024-09-11 10:13:16 +01:00
Blake FriedmanandRiccardo Cipolleschi 6eb2836f61 rebuild autolinking cache if empty or invalid (#46241)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46241

Our test for rebuilding the `autolinking.json` file currently rebuilds everytime if the cached json file ISN'T empty.  This means users who have an empty entry get stuck there.

I've also added more validation that the contents of the cached config have at a minimum the `.project.android.packageName` entry in it, otherwise it rebuilds.

Changelog: [Internal]

Closes 46134

Reviewed By: cortinico

Differential Revision: D61911114

fbshipit-source-id: 188c7f975ce05802c8ea06eaa48345c2bc96f2b2
2024-09-11 10:13:00 +01:00
Dmitry RykunandRiccardo Cipolleschi 38d7549788 Start looking for codegen-enabled dependencies from the project root (#46229)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46229

When running codegen from `pod install`, something affects `require.resolve`, and it starts looking for codegen-enabled dependencies from the workspace root, not the current RN project root.
This is bad if we have different versions of same dependency across multiple workspaces. One of them will be hoisted to the workspace root, and will be used for all the workspaces.

This issue is described in details here https://github.com/facebook/react-native/issues/46196

This diff is supposed to fix this by adding the project root path to the `require.resolve` call.

Changelog: [iOS][Fixed] - Codegen will start looking for codegen-enabled dependencies from the project root.

Reviewed By: cipolleschi

Differential Revision: D61850219

fbshipit-source-id: d60a0e72e9c60e862c0d64e227ea3652d1be5a90
2024-09-11 10:10:57 +01:00
shubhamguptadream11andRiccardo Cipolleschi 3c811d8465 fix(android): make getUri and isResource available for override (#46152)
Summary:
Fixes following issues:
- https://github.com/facebook/react-native/issues/46150
- https://github.com/facebook/react-native/issues/46155

## 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] - Make getUri and isResource open

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

Reviewed By: NickGerleman, rshest, blakef

Differential Revision: D61845164

Pulled By: cortinico

fbshipit-source-id: 88ccdad92423b5add9b2fad4c98f296b6cbfb27d
2024-09-11 10:10:46 +01:00
Alex HuntandRiccardo Cipolleschi 58008464c1 Replace usage of Java OptionalInt (#45862)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45862

Fixes compatibility with Android API < 24, and removes our `JOptionalInt` wrapper implementation for now.

Changelog: [Internal]

Reviewed By: robhogan, motiz88

Differential Revision: D60581676

fbshipit-source-id: 7e79fc59a4199a967e62ac3aeafc5d5681c60077
2024-09-11 10:10:37 +01:00
szymonrybczakandRiccardo Cipolleschi 31a99388de fix(cli): replace querystring with URLSearchParam (#45125)
Summary:
[`querystring`](https://www.npmjs.com/package/querystring) package is deprecated. In this Pull Request I've replaced usage of `querystring` with `URLSearchParam` what is recommended by Node.js.

It's also causing a warning when installing dependencies inside a React Native app:
```
warning react-native > react-native/community-cli-plugin > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
```

## Changelog:

[INTERNAL] [FIXED] - Replace `querystring` package with `URLSearchParam`

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

Test Plan:
Params should be parsed in the same way and warning shouldn't be presented.

js1 jest xplat/js/tools/metro/packages/metro/src/cli/__tests__/parseKeyValueParamArray-test.js

Reviewed By: cipolleschi

Differential Revision: D58948498

Pulled By: GijsWeterings

fbshipit-source-id: 79b1f7b3feae230d2d3641205c513b98b3fda511
2024-09-11 10:10:25 +01:00
Riccardo Cipolleschi 44158de822 Revert "[RN][CI] Zip slices folders to preserve symlinks"
This reverts commit aa7296c008.
2024-09-02 14:55:12 +01:00
Riccardo Cipolleschi aa7296c008 [RN][CI] Zip slices folders to preserve symlinks 2024-09-02 14:54:15 +01:00