Compare commits

...
Author SHA1 Message Date
React Native Bot 465f49ea2a Release 0.78.0-rc.2
#publish-packages-to-npm&next
2025-01-28 13:44:52 +00:00
Riccardo CipolleschiandFabrizio Cucci 8207a09107 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-01-27 14:59:35 +00:00
Fabrizio Cucci 7e883be800 Update Podfile.lock
Changelog: [Internal]
2025-01-22 10:32:32 +00:00
React Native Bot 1f412d0826 Release 0.78.0-rc.1
#publish-packages-to-npm&next
2025-01-20 20:09:09 +00:00
Tim YungandFabrizio Cucci 3abb4cab7d Animated: Defer onAnimatedValueUpdate on Attach + Native (#48715)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48715

{D68154908} fixed a problem with the `onAnimatedValueUpdate` listener not being correctly attached if `__attach` were called before `__makeNative` (which sets `__isNative` to true).

We're potentially seeing production symptoms of stuttering interactions and user responsiveness, after queuing up many operations. Our hypothesis is that in scenarios where `ensureUpdateSubscriptionExists` is being called during `__makeNative` (instead of during `__attach`), a backup of operations occurs leading to these symptoms.

This diff attempts to validate and mitigate this hypothesis by deferring `ensureUpdateSubscriptionExists` to when an `AnimatedValue` instance has had both `__attach` and `__makeNative` invoked.

Changelog:
[Internal]

Differential Revision: D68236594

fbshipit-source-id: 2089100a773ebfc161fb5b567123eb58a893939f
2025-01-20 15:08:03 +00:00
Tim YungandFabrizio Cucci bb5f971389 Animated: Fix onUserDrivenAnimationEnded w/ Insertion Effects (#48678)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48678

While diagnosing a recent issue in which `AnimatedValue` instances were not being correctly updated as expected, the insertion effects feature flag was identified as a root cause.

Upon further investigation, it appears that this is because the `onUserDrivenAnimationEnded` listener was not implemented the same way in the two feature flag states:

- When `useInsertionEffectsForAnimations` is disabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in a passive effect, after all nodes have been attached.
- When `useInsertionEffectsForAnimations` is enabled, `useAnimatedProps` listens to `onUserDrivenAnimationEnded` in an insertion effect when attaching nodes.

The bugs occurs because `useAnimatedProps` checks whether native driver is employed to decide whether to listen to `onUserDrivenAnimationEnded`. However, we do not know whether native driver will be employed during the insertion effect. (Actually, we do not necessarily know that in a passive effect, either... but that is a separate matter.)

This fixes the bug when that occurs when `useInsertionEffectsForAnimations` is enabled, by moving the listening logic of `onUserDrivenAnimationEnded` into a passive effect. This is the same way that it is implemented when `useInsertionEffectsForAnimations` is disabled.

Changelog:
[Internal]

Reviewed By: javache, sammy-SC

Differential Revision: D68171721

fbshipit-source-id: 50b23348fd4641580581cacebc920959651f96a7
2025-01-20 15:07:52 +00:00
Samuel SuslaandFabrizio Cucci 36e2ae6a9c fix Pressable when transform style is animated (#48672)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48672

## Changelog:

[General] [Fixed] - Buttons becoming unresponsive when transform is animated

# The problem

D67872307 changes when `ensureUpdateSubscriptionExists`  is called to in `__attach`. This breaks the functionality because `__attach` is called before flag `__isNative` is set and subscriptions are never setup.

# Fix

The diff sets up subscriptions in `__makeNative` method.

Reviewed By: yungsters

Differential Revision: D68154908

fbshipit-source-id: e2ac108b064a66dda08902653d6bd20286f92458
2025-01-20 15:07:31 +00:00
Riccardo CipolleschiandFabrizio Cucci 5bff540ad3 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-01-20 15:07:09 +00:00
Riccardo CipolleschiandFabrizio Cucci ddfa8a780b Use RNTester App downloaded from CI instead of building (#48637)
Summary:
This change improves the E2E testing by downloading the iOS RNTesterApp that is built in CI instead of building it locally. This should let us save 10 to 20 minutes when we test a new release.

## Changelog:
[Internal] - Use the RNTester app built in CI for release testing on iOS

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

Test Plan:
- build the app in ci
- run `yarn test-e2e-local -c <my-token>` and `yarn test-e2e-local -h false -c <my-token>` and verify that the iOS app is not built, but run in the simulator

Reviewed By: cortinico

Differential Revision: D68161477

Pulled By: cipolleschi

fbshipit-source-id: 577d110f9ff0197a2d3348a08a60e60a4d0a752b
2025-01-20 15:06:52 +00:00
Riccardo CipolleschiandFabrizio Cucci 5c7823f32c Properly test JSC for template_app e2e tests (#48656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48656

While working on 0.78, I realize we were not testing the template app with JSC.

This change should fix this.

## Changelog:
[Internal] - Disable Hermes for the JSC E2E tests with Maestro

Reviewed By: cortinico, fabriziocucci

Differential Revision: D68147849

fbshipit-source-id: 4fbe005b5d04d6163a37041d1bd57fd48a9dfda8
2025-01-20 15:06:37 +00:00
React Native Bot b713f273b6 Release 0.78.0-rc.0
#publish-packages-to-npm&next
2025-01-15 08:40:26 +00:00
Nicola Corti 94b7082a46 Revert "Do not reset rn-artifacts-version on release branch (#48572)"
This reverts commit a28d3961bd.
2025-01-13 19:19:03 +00:00
Riccardo Cipolleschi 0c8e15e8bb [LOCAL] Bump Hermes 2025-01-13 15:57:54 +01:00
46 changed files with 487 additions and 420 deletions
-2
View File
@@ -20,8 +20,6 @@ runs:
- name: Set React Native Version
shell: bash
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
# We don't want to re-set the artifacts version if we're on the release branch.
if: ${{ !contains(github.ref, '-stable') }}
- name: Setup gradle
uses: ./.github/actions/setup-gradle
with:
+6 -1
View File
@@ -157,7 +157,7 @@ jobs:
react-native-version: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
test_ios_rntester:
runs-on: macos-13
runs-on: macos-13-large
needs:
[build_apple_slices_hermes, prepare_hermes_workspace, build_hermes_macos]
env:
@@ -369,6 +369,11 @@ jobs:
sed -i 's/newArchEnabled=true/newArchEnabled=false/' android/gradle.properties
fi
if [[ ${{matrix.jsengine}} == "JSC" ]]; then
echo "Using JSC instead of Hermes"
sed -i 's/hermesEnabled=true/hermesEnabled=false/' android/gradle.properties
fi
# Build
cd android
CAPITALIZED_FLAVOR=$(echo "${{ matrix.flavor }}" | awk '{print toupper(substr($0, 1, 1)) substr($0, 2)}')
+1
View File
@@ -6,3 +6,4 @@ ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
+2 -2
View File
@@ -49,8 +49,8 @@
"@babel/preset-flow": "^7.24.7",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.6.3",
"@react-native/metro-babel-transformer": "0.77.0-main",
"@react-native/metro-config": "0.77.0-main",
"@react-native/metro-babel-transformer": "0.78.0-rc.2",
"@react-native/metro-config": "0.78.0-rc.2",
"@tsconfig/node18": "1.0.1",
"@types/react": "^19.0.0",
"@typescript-eslint/parser": "^7.1.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"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.77.0-main",
"version": "0.78.0-rc.2",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.77.0-main"
"@react-native/codegen": "0.78.0-rc.2"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,8 +22,8 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.77.0-main",
"@react-native/metro-babel-transformer": "0.77.0-main",
"@react-native/dev-middleware": "0.78.0-rc.2",
"@react-native/metro-babel-transformer": "0.78.0-rc.2",
"chalk": "^4.0.0",
"debug": "^2.2.0",
"invariant": "^2.2.4",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"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.77.0-main",
"version": "0.78.0-rc.2",
"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.77.0-main",
"version": "0.78.0-rc.2",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,7 +23,7 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.77.0-main",
"@react-native/debugger-frontend": "0.78.0-rc.2",
"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.77.0-main",
"version": "0.78.0-rc.2",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@react-native/eslint-plugin": "0.77.0-main",
"@react-native/eslint-plugin": "0.78.0-rc.2",
"@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.77.0-main",
"version": "0.78.0-rc.2",
"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.77.0-main",
"version": "0.78.0-rc.2",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@react-native/codegen": "0.77.0-main",
"@react-native/codegen": "0.78.0-rc.2",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
+1
View File
@@ -5,3 +5,4 @@ ruby ">= 2.6.10"
gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "helloworld",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"private": true,
"scripts": {
"bootstrap": "node ./cli.js bootstrap",
@@ -13,16 +13,16 @@
},
"dependencies": {
"react": "19.0.0",
"react-native": "1000.0.0"
"react-native": "0.78.0-rc.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "0.77.0-main",
"@react-native/core-cli-utils": "0.77.0-main",
"@react-native/eslint-config": "0.77.0-main",
"@react-native/metro-config": "0.77.0-main",
"@react-native/babel-preset": "0.78.0-rc.2",
"@react-native/core-cli-utils": "0.78.0-rc.2",
"@react-native/eslint-config": "0.78.0-rc.2",
"@react-native/metro-config": "0.78.0-rc.2",
"chalk": "^4.1.2",
"commander": "^12.0.0",
"eslint": "^8.19.0",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,8 +26,8 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.77.0-main",
"@react-native/metro-babel-transformer": "0.77.0-main",
"@react-native/js-polyfills": "0.78.0-rc.2",
"@react-native/metro-babel-transformer": "0.78.0-rc.2",
"metro-config": "^0.81.0",
"metro-runtime": "^0.81.0"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "Babel preset for React Native applications",
"main": "src/index.js",
"repository": {
@@ -55,7 +55,7 @@
"@babel/plugin-transform-typescript": "^7.25.2",
"@babel/plugin-transform-unicode-regex": "^7.24.7",
"@babel/template": "^7.25.0",
"@react-native/babel-plugin-codegen": "0.77.0-main",
"@react-native/babel-plugin-codegen": "0.78.0-rc.2",
"babel-plugin-syntax-hermes-parser": "0.25.1",
"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.77.0-main",
"version": "0.78.0-rc.2",
"description": "Babel transformer for React Native applications.",
"main": "src/index.js",
"repository": {
@@ -16,7 +16,7 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.77.0-main",
"@react-native/babel-preset": "0.78.0-rc.2",
"hermes-parser": "0.25.1",
"nullthrows": "^1.1.1"
},
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@react-native/bots",
"description": "React Native Bots",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"private": true,
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"private": true,
"description": "TypeScript related unit test for @react-native/codegen",
"license": "MIT",
@@ -19,7 +19,7 @@
"prepare": "yarn run build"
},
"dependencies": {
"@react-native/codegen": "0.77.0-main"
"@react-native/codegen": "0.78.0-rc.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
+9 -9
View File
@@ -1,11 +1,11 @@
{
"name": "@react-native/fantom",
"private": true,
"version": "0.77.0-main",
"main": "src/index.js",
"description": "Internal integration testing and benchmarking tool for React Native",
"peerDependencies":{
"jest":"^29.7.0",
"jest-snapshot": "^29.7.0"
}
"name": "@react-native/fantom",
"private": true,
"version": "0.78.0-rc.2",
"main": "src/index.js",
"description": "Internal integration testing and benchmarking tool for React Native",
"peerDependencies": {
"jest": "^29.7.0",
"jest-snapshot": "^29.7.0"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-native-info",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"main": "build/index.js",
"license": "MIT",
"private": true,
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -17,7 +17,7 @@
],
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.77.0-main"
"@react-native/codegen": "0.78.0-rc.2"
},
"peerDependencies": {
"@types/react": "^19.0.0",
@@ -1,6 +1,6 @@
{
"name": "@react-native/oss-library-example",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"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.25.2",
"@react-native/babel-preset": "0.77.0-main",
"react-native": "1000.0.0"
"@react-native/babel-preset": "0.78.0-rc.2",
"react-native": "0.78.0-rc.2"
},
"peerDependencies": {
"react": "*",
@@ -9,6 +9,7 @@
*/
import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
import type {PlatformConfig} from '../AnimatedPlatformConfig';
import type Animation, {EndCallback} from '../animations/Animation';
import type {InterpolationConfigType} from './AnimatedInterpolation';
import type AnimatedNode from './AnimatedNode';
@@ -84,6 +85,7 @@ function _executeAsAnimatedBatch(id: string, operation: () => void) {
* See https://reactnative.dev/docs/animatedvalue
*/
export default class AnimatedValue extends AnimatedWithChildren {
#attached: boolean = false;
#updateSubscription: ?EventSubscription = null;
_value: number;
@@ -106,14 +108,8 @@ export default class AnimatedValue extends AnimatedWithChildren {
}
__attach(): void {
if (this.__isNative) {
// NOTE: In theory, we should only need to call this when any listeners
// are added. However, there is a global `onUserDrivenAnimationEnded`
// listener that relies on `onAnimatedValueUpdate` having fired to update
// the values in JavaScript. If that listener is removed, this could be
// re-optimized.
this.#ensureUpdateSubscriptionExists();
}
this.#attached = true;
this.#ensureUpdateSubscriptionExists();
}
__detach(): void {
@@ -125,16 +121,34 @@ export default class AnimatedValue extends AnimatedWithChildren {
}
this.stopAnimation();
super.__detach();
this.#attached = false;
}
__getValue(): number {
return this._value + this._offset;
}
__makeNative(platformConfig: ?PlatformConfig): void {
super.__makeNative(platformConfig);
this.#ensureUpdateSubscriptionExists();
}
/**
* NOTE: In theory, we should only need to call this when any listeners
* are added. However, there is a global `onUserDrivenAnimationEnded`
* listener that relies on `onAnimatedValueUpdate` having fired to update
* the values in JavaScript. If that listener is removed, this could be
* re-optimized.
*/
#ensureUpdateSubscriptionExists(): void {
if (this.#updateSubscription != null) {
return;
}
// The order in which `__attach` and `__makeNative` are called is not
// deterministic, and we only want to do this when both have occurred.
if (!this.#attached || !this.__isNative) {
return;
}
const nativeTag = this.__getNativeTag();
NativeAnimatedAPI.startListeningToAnimatedNodeValue(nativeTag);
const subscription: EventSubscription =
+14 -13
View File
@@ -276,6 +276,20 @@ function useAnimatedPropsLifecycle_insertionEffects(node: AnimatedProps): void {
// if the queue is empty. When multiple animated components are mounted at
// the same time. Only first component flushes the queue and the others will noop.
NativeAnimatedHelper.API.flushQueue();
let drivenAnimationEndedListener: ?EventSubscription = null;
if (node.__isNative) {
drivenAnimationEndedListener =
NativeAnimatedHelper.nativeEventEmitter.addListener(
'onUserDrivenAnimationEnded',
data => {
node.update();
},
);
}
return () => {
drivenAnimationEndedListener?.remove();
};
});
useInsertionEffect(() => {
@@ -287,17 +301,6 @@ function useAnimatedPropsLifecycle_insertionEffects(node: AnimatedProps): void {
useInsertionEffect(() => {
node.__attach();
let drivenAnimationEndedListener: ?EventSubscription = null;
if (node.__isNative) {
drivenAnimationEndedListener =
NativeAnimatedHelper.nativeEventEmitter.addListener(
'onUserDrivenAnimationEnded',
data => {
node.update();
},
);
}
if (prevNodeRef.current != null) {
const prevNode = prevNodeRef.current;
// TODO: Stop restoring default values (unless `reset` is called).
@@ -312,8 +315,6 @@ function useAnimatedPropsLifecycle_insertionEffects(node: AnimatedProps): void {
} else {
prevNodeRef.current = node;
}
drivenAnimationEndedListener?.remove();
};
}, [node]);
}
+3 -3
View File
@@ -14,10 +14,10 @@ const version: $ReadOnly<{
patch: number,
prerelease: string | null,
}> = {
major: 1000,
minor: 0,
major: 0,
minor: 78,
patch: 0,
prerelease: null,
prerelease: 'rc.2',
};
module.exports = {version};
@@ -477,7 +477,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];
@@ -1169,6 +1169,7 @@ declare export default class AnimatedValue extends AnimatedWithChildren {
__attach(): void;
__detach(): void;
__getValue(): number;
__makeNative(platformConfig: ?PlatformConfig): void;
setValue(value: number): void;
setOffset(offset: number): void;
flattenOffset(): void;
@@ -21,10 +21,10 @@ NSDictionary* RCTGetReactNativeVersion(void)
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^(void){
__rnVersion = @{
RCTVersionMajor: @(1000),
RCTVersionMinor: @(0),
RCTVersionMajor: @(0),
RCTVersionMinor: @(78),
RCTVersionPatch: @(0),
RCTVersionPrerelease: [NSNull null],
RCTVersionPrerelease: @"rc.2",
};
});
return __rnVersion;
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0
VERSION_NAME=0.78.0-rc.2
react.internal.publishingGroup=com.facebook.react
android.useAndroidX=true
@@ -15,8 +15,8 @@ import java.util.Map;
public class ReactNativeVersion {
public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
"major", 1000,
"minor", 0,
"major", 0,
"minor", 78,
"patch", 0,
"prerelease", null);
"prerelease", "rc.2");
}
@@ -15,10 +15,10 @@
namespace facebook::react {
constexpr struct {
int32_t Major = 1000;
int32_t Minor = 0;
int32_t Major = 0;
int32_t Minor = 78;
int32_t Patch = 0;
std::string_view Prerelease = "";
std::string_view Prerelease = "rc.2";
} ReactNativeVersion;
} // namespace facebook::react
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.78.0-rc.2",
"description": "A framework for building native apps using React",
"license": "MIT",
"repository": {
@@ -108,13 +108,13 @@
},
"dependencies": {
"@jest/create-cache-key-function": "^29.6.3",
"@react-native/assets-registry": "0.77.0-main",
"@react-native/codegen": "0.77.0-main",
"@react-native/community-cli-plugin": "0.77.0-main",
"@react-native/gradle-plugin": "0.77.0-main",
"@react-native/js-polyfills": "0.77.0-main",
"@react-native/normalize-colors": "0.77.0-main",
"@react-native/virtualized-lists": "0.77.0-main",
"@react-native/assets-registry": "0.78.0-rc.2",
"@react-native/codegen": "0.78.0-rc.2",
"@react-native/community-cli-plugin": "0.78.0-rc.2",
"@react-native/gradle-plugin": "0.78.0-rc.2",
"@react-native/js-polyfills": "0.78.0-rc.2",
"@react-native/normalize-colors": "0.78.0-rc.2",
"@react-native/virtualized-lists": "0.78.0-rc.2",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"ansi-regex": "^5.0.0",
@@ -0,0 +1 @@
hermes-2025-01-13-RNv0.78.0-a942ef374897d85da38e9c8904574f8376555388
+1
View File
@@ -9,3 +9,4 @@ gem 'cocoapods', '~> 1.13', '!= 1.15.0', '!= 1.15.1'
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
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/tester",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"private": true,
"description": "React Native tester app.",
"license": "MIT",
@@ -27,8 +27,8 @@
"e2e-test-ios": "./scripts/maestro-test-ios.sh"
},
"dependencies": {
"@react-native/oss-library-example": "0.77.0-main",
"@react-native/popup-menu-android": "0.77.0-main",
"@react-native/oss-library-example": "0.78.0-rc.2",
"@react-native/popup-menu-android": "0.78.0-rc.2",
"flow-enums-runtime": "^0.0.6",
"invariant": "^2.2.4",
"nullthrows": "^1.1.1"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/typescript-config",
"version": "0.77.0-main",
"version": "0.78.0-rc.2",
"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.77.0-main",
"version": "0.78.0-rc.2",
"description": "Virtualized lists for React Native.",
"license": "MIT",
"repository": {
+52 -26
View File
@@ -85,40 +85,66 @@ async function testRNTesterIOS(
} version of RNTester iOS with the new Architecture enabled`,
);
// if everything succeeded so far, we can launch Metro and the app
// start the Metro server in a separate window
launchPackagerInSeparateWindow(pwd().toString());
// remember that for this to be successful
// you should have run bundle install once
// in your local setup
if (argv.hermes === true && ciArtifacts != null) {
const hermesURL = await ciArtifacts.artifactURLHermesDebug();
const hermesZipPath = path.join(ciArtifacts.baseTmpPath(), 'hermes.zip');
// download hermes source code from manifold
ciArtifacts.downloadArtifact(hermesURL, hermesZipPath);
// GHA zips by default the artifacts.
const outputFolder = path.join(ciArtifacts.baseTmpPath(), 'hermes');
exec(`rm -rf ${outputFolder}`);
exec(`unzip ${hermesZipPath} -d ${outputFolder}`);
const hermesPath = path.join(outputFolder, 'hermes-ios-Debug.tar.gz');
console.info(`Downloaded Hermes in ${hermesPath}`);
exec(
`HERMES_ENGINE_TARBALL_PATH=${hermesPath} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`,
if (ciArtifacts != null) {
const appOutputFolder = path.join(
ciArtifacts.baseTmpPath(),
'RNTester.app',
);
exec(`rm -rf ${appOutputFolder}`);
if (argv.hermes === true) {
// download hermes App
const hermesAppUrl = await ciArtifacts.artifactURLForHermesRNTesterApp();
const hermesAppZipPath = path.join(
ciArtifacts.baseTmpPath(),
'RNTesterAppHermes.zip',
);
ciArtifacts.downloadArtifact(hermesAppUrl, hermesAppZipPath);
exec(`unzip ${hermesAppZipPath} -d ${appOutputFolder}`);
} else {
// download JSC app
const hermesAppUrl = await ciArtifacts.artifactURLForJSCRNTesterApp();
const hermesAppZipPath = path.join(
ciArtifacts.baseTmpPath(),
'RNTesterAppJSC.zip',
);
ciArtifacts.downloadArtifact(hermesAppUrl, hermesAppZipPath);
exec(`unzip ${hermesAppZipPath} -d ${appOutputFolder}`);
}
// boot device
const bootedDevice = String(
exec('xcrun simctl list | grep "iPhone 16 Pro" | grep Booted', {
silent: true,
}),
).trim();
if (!bootedDevice || bootedDevice.length === 0) {
exec('xcrun simctl boot "iPhone 16 Pro"');
}
// install app on device
exec(`xcrun simctl install booted ${appOutputFolder}`);
// launch the app on iOS simulator
exec('xcrun simctl launch booted com.meta.RNTester.localDevelopment');
} else {
exec(
`USE_HERMES=${
argv.hermes === true ? 1 : 0
} CI=${onReleaseBranch.toString()} RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --ansi`,
);
// launch the app on iOS simulator
exec(
'npx react-native run-ios --scheme RNTester --simulator "iPhone 15 Pro"',
);
}
// if everything succeeded so far, we can launch Metro and the app
// start the Metro server in a separate window
launchPackagerInSeparateWindow(pwd().toString());
// launch the app on iOS simulator
exec(
'npx react-native run-ios --scheme RNTester --simulator "iPhone 15 Pro"',
);
}
/**
@@ -201,7 +227,7 @@ async function testRNTesterAndroid(
* - @onReleaseBranch whether we are on a release branch or not
*/
async function testRNTester(
circleCIArtifacts /*:Unwrap<ReturnType<typeof setupGHAArtifacts>> */,
ciArtifacts /*:Unwrap<ReturnType<typeof setupGHAArtifacts>> */,
onReleaseBranch /*: boolean */,
) {
// FIXME: make sure that the commands retains colors
@@ -210,9 +236,9 @@ async function testRNTester(
pushd('packages/rn-tester');
if (argv.platform === 'ios') {
await testRNTesterIOS(circleCIArtifacts, onReleaseBranch);
await testRNTesterIOS(ciArtifacts, onReleaseBranch);
} else {
await testRNTesterAndroid(circleCIArtifacts);
await testRNTesterAndroid(ciArtifacts);
}
popd();
}
@@ -214,6 +214,14 @@ async function artifactURLForHermesRNTesterAPK(
return getArtifactURL('rntester-hermes-debug');
}
async function artifactURLForJSCRNTesterApp() /*: Promise<string> */ {
return getArtifactURL('RNTesterApp-NewArch-JSC-Debug');
}
async function artifactURLForHermesRNTesterApp() /*: Promise<string> */ {
return getArtifactURL('RNTesterApp-NewArch-Hermes-Debug');
}
async function artifactURLForMavenLocal() /*: Promise<string> */ {
return getArtifactURL('maven-local');
}
@@ -247,6 +255,8 @@ module.exports = {
downloadArtifact,
artifactURLForJSCRNTesterAPK,
artifactURLForHermesRNTesterAPK,
artifactURLForJSCRNTesterApp,
artifactURLForHermesRNTesterApp,
artifactURLForMavenLocal,
artifactURLHermesDebug,
artifactURLForReactNative,