Compare commits

...
28 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
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
Ritesh Kumar ShuklaandNicola Corti 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 Zhu 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 Lee 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 Dhar 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
zhongwuzw 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 FOYART 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 Friedman 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
2024-10-02 13:44:06 +00:00
Rodolfo Gomez Sirimarco 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 Lee 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 Corti 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
Hailey 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 Xi 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 Corti 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 Woldrich 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 Zhou 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
71 changed files with 609 additions and 432 deletions
-3
View File
@@ -1028,9 +1028,6 @@ jobs:
name: Build HermesC for Windows
command: |
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
choco install --no-progress cmake -y
if (-not $?) { throw "Failed to install CMake" }
cd $Env:HERMES_WS_DIR\icu
# If Invoke-WebRequest shows a progress bar, it will fail with
# Win32 internal error "Access is denied" 0x5 occurred [...]
-3
View File
@@ -469,9 +469,6 @@ jobs:
- name: Build HermesC for Windows
run: |
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
choco install --no-progress cmake --version 3.14.7
if (-not $?) { throw "Failed to install CMake" }
cd $Env:HERMES_WS_DIR\icu
# If Invoke-WebRequest shows a progress bar, it will fail with
# Win32 internal error "Access is denied" 0x5 occurred [...]
+2 -5
View File
@@ -199,7 +199,7 @@ jobs:
- name: Restore Cached Artifacts
uses: actions/cache/restore@v4.0.0
with:
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
@@ -370,7 +370,7 @@ jobs:
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
key: v3-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
@@ -466,9 +466,6 @@ jobs:
- name: Build HermesC for Windows
run: |
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
choco install --no-progress cmake --version 3.14.7
if (-not $?) { throw "Failed to install CMake" }
cd $Env:HERMES_WS_DIR\icu
# If Invoke-WebRequest shows a progress bar, it will fail with
# Win32 internal error "Access is denied" 0x5 occurred [...]
+2 -5
View File
@@ -210,7 +210,7 @@ jobs:
- name: Restore Cached Artifacts
uses: actions/cache/restore@v4.0.0
with:
key: v4-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
key: v4-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
@@ -382,7 +382,7 @@ jobs:
uses: actions/cache/save@v4.0.0
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} # To avoid that the cache explode.
with:
key: v4-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
key: v4-hermes-artifacts-${{ matrix.flavor }}-${{ needs.prepare_hermes_workspace.outputs.hermes-version }}-${{ needs.prepare_hermes_workspace.outputs.react-native-version }}-${{ hashFiles('./packages/react-native/sdks/hermes/utils/build-apple-frameworks.sh') }}
path: |
/tmp/hermes/osx-bin/${{ matrix.flavor }}
/tmp/hermes/dSYM/${{ matrix.flavor }}
@@ -543,9 +543,6 @@ jobs:
- name: Build HermesC for Windows
run: |
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
choco install --no-progress cmake --version 3.14.7
if (-not $?) { throw "Failed to install CMake" }
cd $Env:HERMES_WS_DIR\icu
# If Invoke-WebRequest shows a progress bar, it will fail with
# Win32 internal error "Access is denied" 0x5 occurred [...]
+2
View File
@@ -5,3 +5,5 @@ ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.13'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
+2
View File
@@ -54,6 +54,8 @@ nexusPublishing {
sonatype {
username.set(sonatypeUsername)
password.set(sonatypePassword)
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}
+2 -2
View File
@@ -48,8 +48,8 @@
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@pkgjs/parseargs": "^0.11.0",
"@react-native/metro-babel-transformer": "0.75.3",
"@react-native/metro-config": "0.75.3",
"@react-native/metro-babel-transformer": "0.75.5",
"@react-native/metro-config": "0.75.5",
"@tsconfig/node18": "1.0.1",
"@types/react": "^18.2.6",
"@typescript-eslint/parser": "^7.1.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.75.3",
"version": "0.75.5",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.75.3",
"version": "0.75.5",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -25,7 +25,7 @@
"index.js"
],
"dependencies": {
"@react-native/codegen": "0.75.3"
"@react-native/codegen": "0.75.5"
},
"devDependencies": {
"@babel/core": "^7.20.0"
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.75.3",
"version": "0.75.5",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -24,8 +24,8 @@
"dependencies": {
"@react-native-community/cli-server-api": "14.1.0",
"@react-native-community/cli-tools": "14.1.0",
"@react-native/dev-middleware": "0.75.3",
"@react-native/metro-babel-transformer": "0.75.3",
"@react-native/dev-middleware": "0.75.5",
"@react-native/metro-babel-transformer": "0.75.5",
"chalk": "^4.0.0",
"execa": "^5.1.1",
"metro": "^0.80.3",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.75.3",
"version": "0.75.5",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.75.3",
"version": "0.75.5",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.75.3",
"version": "0.75.5",
"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.75.3",
"@react-native/debugger-frontend": "0.75.5",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.75.3",
"version": "0.75.5",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.20.0",
"@react-native/eslint-plugin": "0.75.3",
"@react-native/eslint-plugin": "0.75.5",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.75.3",
"version": "0.75.5",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.75.3",
"version": "0.75.5",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -31,7 +31,7 @@
"@babel/eslint-parser": "^7.20.0",
"@babel/plugin-transform-flow-strip-types": "^7.20.0",
"@babel/preset-flow": "^7.20.0",
"@react-native/codegen": "0.75.3",
"@react-native/codegen": "0.75.5",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
+2
View File
@@ -4,3 +4,5 @@ ruby ">= 2.6.10"
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
+1 -1
View File
@@ -12,7 +12,7 @@ buildscript {
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.24"
kotlinVersion = "1.9.25"
}
repositories {
google()
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "helloworld",
"version": "0.75.3",
"version": "0.75.5",
"private": true,
"scripts": {
"bootstrap": "node ./cli.js bootstrap",
@@ -13,16 +13,16 @@
},
"dependencies": {
"react": "18.3.1",
"react-native": "0.75.3"
"react-native": "0.75.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.75.3",
"@react-native/core-cli-utils": "0.75.3",
"@react-native/eslint-config": "0.75.3",
"@react-native/metro-config": "0.75.3",
"@react-native/babel-preset": "0.75.5",
"@react-native/core-cli-utils": "0.75.5",
"@react-native/eslint-config": "0.75.5",
"@react-native/metro-config": "0.75.5",
"babel-jest": "^29.6.3",
"chalk": "^4.1.2",
"commander": "^9.4.1",
@@ -1,6 +1,6 @@
{
"name": "@react-native/hermes-inspector-msggen",
"version": "0.75.3",
"version": "0.75.5",
"private": true,
"description": "Hermes Inspector Message Generator for React Native",
"license": "MIT",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.75.3",
"version": "0.75.5",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,8 +26,8 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.75.3",
"@react-native/metro-babel-transformer": "0.75.3",
"@react-native/js-polyfills": "0.75.5",
"@react-native/metro-babel-transformer": "0.75.5",
"metro-config": "^0.80.3",
"metro-runtime": "^0.80.3"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.75.3",
"version": "0.75.5",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.75.3",
"version": "0.75.5",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.75.3",
"version": "0.75.5",
"description": "Babel preset for React Native applications",
"main": "src/index.js",
"repository": {
@@ -56,7 +56,7 @@
"@babel/plugin-transform-typescript": "^7.5.0",
"@babel/plugin-transform-unicode-regex": "^7.0.0",
"@babel/template": "^7.0.0",
"@react-native/babel-plugin-codegen": "0.75.3",
"@react-native/babel-plugin-codegen": "0.75.5",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
},
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.75.3",
"version": "0.75.5",
"description": "Babel transformer for React Native applications.",
"main": "src/index.js",
"repository": {
@@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.20.0",
"@react-native/babel-preset": "0.75.3",
"@react-native/babel-preset": "0.75.5",
"hermes-parser": "0.22.0",
"nullthrows": "^1.1.1"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/bots",
"description": "React Native Bots",
"version": "0.75.3",
"version": "0.75.5",
"private": true,
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.75.3",
"version": "0.75.5",
"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.75.3"
"@react-native/codegen": "0.75.5"
},
"devDependencies": {
"@babel/core": "^7.20.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.75.3",
"version": "0.75.5",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
@@ -4,7 +4,7 @@ gson = "2.8.9"
guava = "31.0.1-jre"
javapoet = "1.13.0"
junit = "4.13.2"
kotlin = "1.9.24"
kotlin = "1.9.25"
assertj = "3.25.1"
[libraries]
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.75.3",
"version": "0.75.5",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
@@ -65,7 +65,8 @@ tasks.withType<KotlinCompile>().configureEach {
apiVersion = "1.6"
// See comment above on JDK 11 support
jvmTarget = "11"
allWarningsAsErrors = true
allWarningsAsErrors =
project.properties["enableWarningsAsErrors"]?.toString()?.toBoolean() ?: false
}
}
@@ -30,10 +30,19 @@ abstract class GeneratePackageListTask : DefaultTask() {
@TaskAction
fun taskAction() {
val model = JsonUtils.fromAutolinkingConfigJson(autolinkInputFile.get().asFile)
val model =
JsonUtils.fromAutolinkingConfigJson(autolinkInputFile.get().asFile)
?: error(
"""
RNGP - Autolinking: Could not parse autolinking config file:
${autolinkInputFile.get().asFile.absolutePath}
The file is either missing or not containing valid JSON so the build won't succeed.
"""
.trimIndent())
val packageName =
model?.project?.android?.packageName
model.project?.android?.packageName
?: error(
"RNGP - Autolinking: Could not find project.android.packageName in react-native config output! Could not autolink packages without this field.")
@@ -54,7 +54,8 @@ tasks.withType<KotlinCompile>().configureEach {
apiVersion = "1.6"
// See comment above on JDK 11 support
jvmTarget = "11"
allWarningsAsErrors = true
allWarningsAsErrors =
project.properties["enableWarningsAsErrors"]?.toString()?.toBoolean() ?: false
}
}
@@ -24,7 +24,8 @@ tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
apiVersion = "1.6"
jvmTarget = "11"
allWarningsAsErrors = true
allWarningsAsErrors =
project.properties["enableWarningsAsErrors"]?.toString()?.toBoolean() ?: false
}
}
@@ -29,7 +29,8 @@ tasks.withType<KotlinCompile>().configureEach {
kotlinOptions {
apiVersion = "1.6"
jvmTarget = "11"
allWarningsAsErrors = true
allWarningsAsErrors =
project.properties["enableWarningsAsErrors"]?.toString()?.toBoolean() ?: false
}
}
@@ -21,8 +21,23 @@ object JsonUtils {
}
fun fromAutolinkingConfigJson(input: File): ModelAutolinkingConfigJson? =
input.bufferedReader().use {
runCatching { gsonConverter.fromJson(it, ModelAutolinkingConfigJson::class.java) }
input.bufferedReader().use { reader ->
runCatching {
// We sanitize the output of the `config` command as it could contain debug logs
// such as:
//
// > AwesomeProject@0.0.1 npx
// > rnc-cli config
//
// which will render the JSON invalid.
val content =
reader
.readLines()
.filterNot { line -> line.startsWith(">") }
.joinToString("\n")
.trim()
gsonConverter.fromJson(content, ModelAutolinkingConfigJson::class.java)
}
.getOrNull()
}
}
@@ -185,6 +185,54 @@ class JsonUtilsTest {
assertEquals("implementation", parsed.project!!.android!!.dependencyConfiguration)
}
@Test
fun fromAutolinkingConfigJson_withInfoLogs_sanitizeAndParseIt() {
@Suppress("JsonStandardCompliance")
val validJson =
createJsonFile(
"""
> AwesomeProject@0.0.1 npx
> rnc-cli config
{
"reactNativeVersion": "1000.0.0",
"project": {
"ios": {
"sourceDir": "./packages/rn-tester",
"xcodeProject": {
"name": "RNTesterPods.xcworkspace",
"isWorkspace": true
},
"automaticPodsInstallation": false
},
"android": {
"sourceDir": "./packages/rn-tester",
"appName": "RN-Tester",
"packageName": "com.facebook.react.uiapp",
"applicationId": "com.facebook.react.uiapp",
"mainActivity": ".RNTesterActivity",
"watchModeCommandParams": [
"--mode HermesDebug"
],
"dependencyConfiguration": "implementation"
}
}
}
"""
.trimIndent())
val parsed = JsonUtils.fromAutolinkingConfigJson(validJson)!!
assertThat("./packages/rn-tester").isEqualTo(parsed.project!!.android!!.sourceDir)
assertThat("RN-Tester").isEqualTo(parsed.project!!.android!!.appName)
assertThat("com.facebook.react.uiapp").isEqualTo(parsed.project!!.android!!.packageName)
assertThat("com.facebook.react.uiapp").isEqualTo(parsed.project!!.android!!.applicationId)
assertThat(".RNTesterActivity").isEqualTo(parsed.project!!.android!!.mainActivity)
assertThat("--mode HermesDebug")
.isEqualTo(parsed.project!!.android!!.watchModeCommandParams!![0])
assertThat("implementation").isEqualTo(parsed.project!!.android!!.dependencyConfiguration)
}
@Test
fun fromAutolinkingConfigJson_withDependenciesSpecified_canParseIt() {
val validJson =
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-native-info",
"version": "0.75.3",
"version": "0.75.5",
"main": "build/index.js",
"license": "MIT",
"private": true,
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.75.3",
"version": "0.75.5",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -17,7 +17,7 @@
],
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.75.3"
"@react-native/codegen": "0.75.5"
},
"peerDependencies": {
"@types/react": "^18.2.6",
@@ -1,6 +1,6 @@
{
"name": "@react-native/oss-library-example",
"version": "0.75.3",
"version": "0.75.5",
"private": true,
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
"license": "MIT",
@@ -26,8 +26,8 @@
],
"devDependencies": {
"@babel/core": "^7.20.0",
"@react-native/babel-preset": "0.75.3",
"react-native": "0.75.3"
"@react-native/babel-preset": "0.75.5",
"react-native": "0.75.5"
},
"peerDependencies": {
"react": "*",
@@ -1,7 +1,7 @@
{
"name": "@react-native/test-renderer",
"private": true,
"version": "0.75.3",
"version": "0.75.5",
"description": "A Test rendering library for React Native",
"license": "MIT",
"devDependencies": {
@@ -72,9 +72,10 @@ RCT_EXPORT_METHOD(readAsDataURL
nil);
} else {
NSString *type = [RCTConvert NSString:blob[@"type"]];
NSString *text = [NSString stringWithFormat:@"data:%@;base64,%@",
type != nil && [type length] > 0 ? type : @"application/octet-stream",
[data base64EncodedStringWithOptions:0]];
NSString *text = [NSString
stringWithFormat:@"data:%@;base64,%@",
![type isEqual:[NSNull null]] && [type length] > 0 ? type : @"application/octet-stream",
[data base64EncodedStringWithOptions:0]];
resolve(text);
}
+1 -1
View File
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
}> = {
major: 0,
minor: 75,
patch: 3,
patch: 5,
prerelease: null,
};
@@ -470,7 +470,15 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, CGSize size, CGFloat scal
// Add missing png extension
if (request.URL.fileURL && request.URL.pathExtension.length == 0) {
mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"];
// Check if there exists a file with that url on disk already
// This should fix issue https://github.com/facebook/react-native/issues/46870
if ([[NSFileManager defaultManager] fileExistsAtPath:request.URL.path]) {
mutableRequest.URL = request.URL;
} else {
// This is the default behavior in case there is no file on disk with no extension.
// We assume that the extension is `png`.
mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"];
}
}
if (_redirectDelegate != nil) {
mutableRequest.URL = [_redirectDelegate redirectAssetsURL:mutableRequest.URL];
+11 -3
View File
@@ -28,6 +28,15 @@ type FormDataPart =
...
};
/**
* Encode a FormData filename compliant with RFC 2183
*
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition#directives
*/
function encodeFilename(filename: string): string {
return encodeURIComponent(filename.replace(/\//g, '_'));
}
/**
* Polyfill for XMLHttpRequest2 FormData API, allowing multipart POST requests
* with mixed data (string, native files) to be submitted via XMLHttpRequest.
@@ -82,9 +91,8 @@ class FormData {
// content type (cf. web Blob interface.)
if (typeof value === 'object' && !Array.isArray(value) && value) {
if (typeof value.name === 'string') {
headers['content-disposition'] += `; filename="${
value.name
}"; filename*=utf-8''${encodeURI(value.name)}`;
headers['content-disposition'] +=
`; filename="${encodeFilename(value.name)}"`;
}
if (typeof value.type === 'string') {
headers['content-type'] = value.type;
@@ -48,8 +48,7 @@ describe('FormData', function () {
type: 'image/jpeg',
name: 'photo.jpg',
headers: {
'content-disposition':
'form-data; name="photo"; filename="photo.jpg"; filename*=utf-8\'\'photo.jpg',
'content-disposition': 'form-data; name="photo"; filename="photo.jpg"',
'content-type': 'image/jpeg',
},
fieldName: 'photo',
@@ -70,7 +69,7 @@ describe('FormData', function () {
name: '测试photo.jpg',
headers: {
'content-disposition':
'form-data; name="photo"; filename="测试photo.jpg"; filename*=utf-8\'\'%E6%B5%8B%E8%AF%95photo.jpg',
'form-data; name="photo"; filename="%E6%B5%8B%E8%AF%95photo.jpg"',
'content-type': 'image/jpeg',
},
fieldName: 'photo',
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
__rnVersion = @{
RCTVersionMajor: @(0),
RCTVersionMinor: @(75),
RCTVersionPatch: @(3),
RCTVersionPatch: @(5),
RCTVersionPrerelease: [NSNull null],
};
});
@@ -119,6 +119,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : coder)
if (_isPresented) {
[_delegate dismissModalHostView:self withViewController:_modalViewController animated:[self hasAnimationType]];
_isPresented = NO;
[self setVisible:NO];
}
}
@@ -7732,6 +7732,7 @@ public class com/facebook/react/views/textinput/ReactEditText : androidx/appcomp
public fun setBorderStyle (Ljava/lang/String;)V
public fun setBorderWidth (IF)V
public fun setContentSizeWatcher (Lcom/facebook/react/views/textinput/ContentSizeWatcher;)V
public fun setContextMenuHidden (Z)V
public fun setDisableFullscreenUI (Z)V
public fun setFontFamily (Ljava/lang/String;)V
public fun setFontFeatureSettings (Ljava/lang/String;)V
@@ -1,4 +1,4 @@
VERSION_NAME=0.75.3
VERSION_NAME=0.75.5
react.internal.publishingGroup=com.facebook.react
android.useAndroidX=true
@@ -169,26 +169,25 @@ public class HeadlessJsTaskContext {
/**
* Finish a JS task. Doesn't actually stop the task on the JS side, only removes it from the list
* of active tasks and notifies listeners. A task can only be finished once.
* of active tasks and notifies listeners.
*
* @param taskId the unique id returned by {@link #startTask}.
*/
public synchronized void finishTask(final int taskId) {
Assertions.assertCondition(
mActiveTasks.remove(taskId), "Tried to finish non-existent task with id " + taskId + ".");
Assertions.assertCondition(
mActiveTaskConfigs.remove(taskId) != null,
"Tried to remove non-existent task config with id " + taskId + ".");
boolean removed = mActiveTasks.remove(taskId);
mActiveTaskConfigs.remove(taskId);
removeTimeout(taskId);
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override
public void run() {
for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
listener.onHeadlessJsTaskFinish(taskId);
if (removed) {
UiThreadUtil.runOnUiThread(
new Runnable() {
@Override
public void run() {
for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
listener.onHeadlessJsTaskFinish(taskId);
}
}
}
});
});
}
}
private void removeTimeout(int taskId) {
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 0,
"minor", 75,
"patch", 3,
"patch", 5,
"prerelease", null);
}
@@ -118,6 +118,7 @@ public class ReactEditText extends AppCompatEditText {
private int mFontWeight = ReactConstants.UNSET;
private int mFontStyle = ReactConstants.UNSET;
private boolean mAutoFocus = false;
private boolean mContextMenuHidden = false;
private boolean mDidAttachToWindow = false;
private @Nullable String mPlaceholder = null;
@@ -191,6 +192,9 @@ public class ReactEditText extends AppCompatEditText {
*/
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
if (mContextMenuHidden) {
return false;
}
menu.removeItem(android.R.id.pasteAsPlainText);
return true;
}
@@ -1031,12 +1035,18 @@ public class ReactEditText extends AppCompatEditText {
public void onAttachedToWindow() {
super.onAttachedToWindow();
int selectionStart = getSelectionStart();
int selectionEnd = getSelectionEnd();
// Used to ensure that text is selectable inside of removeClippedSubviews
// See https://github.com/facebook/react-native/issues/6805 for original
// fix that was ported to here.
super.setTextIsSelectable(true);
// Restore the selection since `setTextIsSelectable` changed it.
setSelection(selectionStart, selectionEnd);
if (mContainsImages) {
Spanned text = getText();
TextInlineImageSpan[] spans = text.getSpans(0, text.length(), TextInlineImageSpan.class);
@@ -1121,6 +1131,10 @@ public class ReactEditText extends AppCompatEditText {
mAutoFocus = autoFocus;
}
public void setContextMenuHidden(boolean contextMenuHidden) {
mContextMenuHidden = contextMenuHidden;
}
protected void applyTextAttributes() {
// In general, the `getEffective*` functions return `Float.NaN` if the
// property hasn't been set.
@@ -651,14 +651,7 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
@ReactProp(name = "contextMenuHidden", defaultBoolean = false)
public void setContextMenuHidden(ReactEditText view, boolean contextMenuHidden) {
final boolean _contextMenuHidden = contextMenuHidden;
view.setOnLongClickListener(
new View.OnLongClickListener() {
public boolean onLongClick(View v) {
return _contextMenuHidden;
}
;
});
view.setContextMenuHidden(contextMenuHidden);
}
@ReactProp(name = "selectTextOnFocus", defaultBoolean = false)
@@ -17,7 +17,7 @@ namespace facebook::react {
constexpr struct {
int32_t Major = 0;
int32_t Minor = 75;
int32_t Patch = 3;
int32_t Patch = 5;
std::string_view Prerelease = "";
} ReactNativeVersion;
@@ -582,6 +582,10 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
Around around{with_};
return RD::cloneSymbol(pv);
};
Runtime::PointerValue* cloneBigInt(const Runtime::PointerValue* pv) override {
Around around{with_};
return RD::cloneBigInt(pv);
};
Runtime::PointerValue* cloneString(const Runtime::PointerValue* pv) override {
Around around{with_};
return RD::cloneString(pv);
@@ -610,6 +614,10 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
Around around{with_};
return RD::createPropNameIDFromString(str);
};
PropNameID createPropNameIDFromSymbol(const Symbol& sym) override {
Around around{with_};
return RD::createPropNameIDFromSymbol(sym);
};
std::string utf8(const PropNameID& id) override {
Around around{with_};
return RD::utf8(id);
@@ -624,6 +632,31 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
return RD::symbolToString(sym);
};
BigInt createBigIntFromInt64(int64_t i) override {
Around around{with_};
return RD::createBigIntFromInt64(i);
};
BigInt createBigIntFromUint64(uint64_t i) override {
Around around{with_};
return RD::createBigIntFromUint64(i);
};
bool bigintIsInt64(const BigInt& bi) override {
Around around{with_};
return RD::bigintIsInt64(bi);
};
bool bigintIsUint64(const BigInt& bi) override {
Around around{with_};
return RD::bigintIsUint64(bi);
};
uint64_t truncate(const BigInt& bi) override {
Around around{with_};
return RD::truncate(bi);
};
String bigintToString(const BigInt& bi, int i) override {
Around around{with_};
return RD::bigintToString(bi, i);
};
String createStringFromAscii(const char* str, size_t length) override {
Around around{with_};
return RD::createStringFromAscii(str, length);
@@ -637,6 +670,11 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
return RD::utf8(s);
}
Value createValueFromJsonUtf8(const uint8_t* json, size_t length) override {
Around around{with_};
return RD::createValueFromJsonUtf8(json, length);
};
Object createObject() override {
Around around{with_};
return RD::createObject();
@@ -797,6 +835,11 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
Around around{with_};
return RD::strictEquals(a, b);
};
bool strictEquals(const BigInt& a, const BigInt& b) const override {
Around around{with_};
return RD::strictEquals(a, b);
};
bool strictEquals(const String& a, const String& b) const override {
Around around{with_};
return RD::strictEquals(a, b);
@@ -811,6 +854,12 @@ class WithRuntimeDecorator : public RuntimeDecorator<Plain, Base> {
return RD::instanceOf(o, f);
};
void setExternalMemoryPressure(const jsi::Object& obj, size_t amount)
override {
Around around{with_};
RD::setExternalMemoryPressure(obj, amount);
};
private:
// Wrap an RAII type around With& to guarantee after always happens.
struct Around {
@@ -794,10 +794,7 @@ LayoutAnimationKeyFrameManager::pullTransaction(
finalConflictingMutations.end(),
&shouldFirstComeBeforeSecondMutation);
std::stable_sort(
immediateMutations.begin(),
immediateMutations.end(),
&shouldFirstComeBeforeSecondRemovesOnly);
handleShouldFirstComeBeforeSecondRemovesOnly(immediateMutations);
animation.keyFrames = keyFramesToAnimate;
inflightAnimations_.push_back(std::move(animation));
@@ -24,6 +24,40 @@ static inline bool shouldFirstComeBeforeSecondRemovesOnly(
(lhs.index > rhs.index);
}
static inline void handleShouldFirstComeBeforeSecondRemovesOnly(
ShadowViewMutation::List& list) noexcept {
std::unordered_map<std::string, std::vector<ShadowViewMutation>>
removeMutationsByTag;
ShadowViewMutation::List finalList;
for (auto& mutation : list) {
if (mutation.type == ShadowViewMutation::Type::Remove) {
auto key = std::to_string(mutation.parentShadowView.tag);
removeMutationsByTag[key].push_back(mutation);
} else {
finalList.push_back(mutation);
}
}
if (removeMutationsByTag.size() == 0) {
return;
}
for (auto& mutationsPair : removeMutationsByTag) {
if (mutationsPair.second.size() > 1) {
std::stable_sort(
mutationsPair.second.begin(),
mutationsPair.second.end(),
&shouldFirstComeBeforeSecondRemovesOnly);
}
finalList.insert(
finalList.begin(),
mutationsPair.second.begin(),
mutationsPair.second.end());
}
list = finalList;
}
static inline bool shouldFirstComeBeforeSecondMutation(
const ShadowViewMutation& lhs,
const ShadowViewMutation& rhs) noexcept {
@@ -55,6 +89,17 @@ static inline bool shouldFirstComeBeforeSecondMutation(
lhs.type == ShadowViewMutation::Type::Insert) {
return false;
}
// Remove comes before Update
if (lhs.type == ShadowViewMutation::Type::Remove &&
rhs.type == ShadowViewMutation::Type::Update) {
return true;
}
if (rhs.type == ShadowViewMutation::Type::Remove &&
lhs.type == ShadowViewMutation::Type::Update) {
return false;
}
} else {
// Make sure that removes on the same level are sorted - highest indices
// must come first.
@@ -23,7 +23,7 @@ javax-annotation-api = "1.3.2"
javax-inject = "1"
jsr305 = "3.0.2"
junit = "4.13.2"
kotlin = "1.9.24"
kotlin = "1.9.25"
mockito = "3.12.4"
nexus-publish = "1.3.0"
okhttp = "4.9.2"
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "0.75.3",
"version": "0.75.5",
"description": "A framework for building native apps using React",
"license": "MIT",
"repository": {
@@ -112,13 +112,13 @@
"@react-native-community/cli": "14.1.0",
"@react-native-community/cli-platform-android": "14.1.0",
"@react-native-community/cli-platform-ios": "14.1.0",
"@react-native/assets-registry": "0.75.3",
"@react-native/codegen": "0.75.3",
"@react-native/community-cli-plugin": "0.75.3",
"@react-native/gradle-plugin": "0.75.3",
"@react-native/js-polyfills": "0.75.3",
"@react-native/normalize-colors": "0.75.3",
"@react-native/virtualized-lists": "0.75.3",
"@react-native/assets-registry": "0.75.5",
"@react-native/codegen": "0.75.5",
"@react-native/community-cli-plugin": "0.75.5",
"@react-native/gradle-plugin": "0.75.5",
"@react-native/js-polyfills": "0.75.5",
"@react-native/normalize-colors": "0.75.5",
"@react-native/virtualized-lists": "0.75.5",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"ansi-regex": "^5.0.0",
@@ -235,16 +235,9 @@ class ReactNativePodsUtils
if !file_manager.exist?("#{file_path}.local")
# When installing pods with a yarn alias, yarn creates a fake yarn and node executables
# in a temporary folder.
# Using `type -a` we are able to retrieve all the paths of an executable and we can
# exclude the temporary ones.
# Using `node --print "process.argv[0]";` we are able to retrieve the actual path from which node is running.
# see https://github.com/facebook/react-native/issues/43285 for more info
node_binary = `type -a node`.split("\n").map { |path|
path.gsub!("node is ", "")
}.select { |b|
!b.start_with?("/var")
}
node_binary = node_binary[0]
node_binary = `node --print "process.argv[0]";`
system("echo 'export NODE_BINARY=#{node_binary}' > #{file_path}.local")
end
end
@@ -92,6 +92,8 @@ fi
[ -z "$CLI_PATH" ] && CLI_PATH="$REACT_NATIVE_DIR/scripts/bundle.js"
[ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle"
[ -z "$COMPOSE_SOURCEMAP_PATH" ] && COMPOSE_SOURCEMAP_PATH="$REACT_NATIVE_DIR/scripts/compose-source-maps.js"
if [[ -z "$BUNDLE_CONFIG" ]]; then
@@ -141,7 +143,7 @@ fi
if [[ -n "$CONFIG_JSON" ]]; then
EXTRA_ARGS+=("--load-config" "$CONFIG_JSON")
elif [[ -n "$CONFIG_CMD" ]]; then
EXTRA_ARGS+=("--config-cmd" "$CONFIG_APP")
EXTRA_ARGS+=("--config-cmd" "$CONFIG_CMD")
else
EXTRA_ARGS+=("--config-cmd" "$NODE_BINARY $NODE_ARGS $REACT_NATIVE_DIR/cli.js config")
fi
@@ -149,7 +151,6 @@ fi
# shellcheck disable=SC2086
"$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \
$CONFIG_ARG \
--config-cmd "$CONFIG" \
--entry-file "$ENTRY_FILE" \
--platform "$BUNDLE_PLATFORM" \
--dev $DEV \
+1 -1
View File
@@ -1 +1 @@
hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b
hermes-2025-02-06-RNv0.75.5-53ff6df3af18e250c29a74f34273f50dbfa410dc
@@ -198,19 +198,7 @@ function create_universal_framework {
for i in "${!platforms[@]}"; do
local platform="${platforms[$i]}"
local hermes_framework_path="${platform}/hermes.framework"
local dSYM_path="$hermes_framework_path"
local dSYM_base_path="$HERMES_PATH/destroot/Library/Frameworks"
# If the dSYM rename has failed, the dSYM are generated as 0.dSYM
# (Apple default name) rather then hermes.framework.dSYM.
if [[ -e "$dSYM_base_path/${platform}/0.dSYM" ]]; then
dSYM_path="${platform}/0"
fi
args+="-framework $hermes_framework_path "
# Path to dSYM must be absolute
args+="-debug-symbols $dSYM_base_path/$dSYM_path.dSYM "
done
mkdir -p universal
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/tester-e2e",
"private": true,
"version": "0.75.3",
"version": "0.75.5",
"license": "MIT",
"description": "React Native E2E tester app.",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/rn-tester-e2e",
+2
View File
@@ -8,3 +8,5 @@ ruby ">= 2.6.10"
gem 'cocoapods', '>= 1.13', '< 1.15'
gem 'rexml'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
File diff suppressed because it is too large Load Diff
@@ -863,6 +863,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CC = "";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
@@ -893,6 +894,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CXX = "";
ENABLE_BITCODE = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -933,6 +935,8 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD = "";
LDPLUSPLUS = "";
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
@@ -964,6 +968,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CC = "";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++20";
CLANG_CXX_LIBRARY = "libc++";
@@ -994,6 +999,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CXX = "";
ENABLE_BITCODE = NO;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -1027,6 +1033,8 @@
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
);
IPHONEOS_DEPLOYMENT_TARGET = 13.4;
LD = "";
LDPLUSPLUS = "";
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = (
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/tester",
"version": "0.75.3",
"version": "0.75.5",
"private": true,
"description": "React Native tester app.",
"license": "MIT",
@@ -26,8 +26,8 @@
"flow-enums-runtime": "^0.0.6",
"invariant": "^2.2.4",
"nullthrows": "^1.1.1",
"@react-native/oss-library-example": "0.75.3",
"@react-native/popup-menu-android": "0.75.3"
"@react-native/oss-library-example": "0.75.5",
"@react-native/popup-menu-android": "0.75.5"
},
"peerDependencies": {
"react": "18.3.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/typescript-config",
"version": "0.75.3",
"version": "0.75.5",
"description": "Default TypeScript configuration for React Native apps",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/virtualized-lists",
"version": "0.75.3",
"version": "0.75.5",
"description": "Virtualized lists for React Native.",
"license": "MIT",
"repository": {