Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-native): upgrade react native to 0.74 #26143

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/detox/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@
"alwaysAddToPackageJson": false
}
}
},
"19.2.0": {
"version": "19.2.0-beta.2",
"packages": {
"@config-plugins/detox": {
"version": "~8.0.0",
"alwaysAddToPackageJson": false
}
}
}
}
}
2 changes: 1 addition & 1 deletion packages/detox/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const nxVersion = require('../../package.json').version;

export const detoxVersion = '~20.18.1';
export const testingLibraryJestDom = '~6.4.2';
export const configPluginsDetoxVersion = '~7.0.0'; // only required for expo
export const configPluginsDetoxVersion = '~8.0.0'; // only required for expo
61 changes: 61 additions & 0 deletions packages/expo/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,67 @@
"alwaysAddToPackageJson": false
}
}
},
"19.2.0": {
"version": "19.2.0-beta.2",
"packages": {
"expo": {
"version": "~51.0.8",
"alwaysAddToPackageJson": false
},
"expo-splash-screen": {
"version": "~0.27.4",
"alwaysAddToPackageJson": false
},
"expo-status-bar": {
"version": "~1.12.1",
"alwaysAddToPackageJson": false
},
"@expo/cli": {
"version": "~0.18.13",
"alwaysAddToPackageJson": false
},
"babel-preset-expo": {
"version": "~11.0.0",
"alwaysAddToPackageJson": false
},
"react-native": {
"version": "0.74.1",
"alwaysAddToPackageJson": false
},
"react-native-web": {
"version": "~0.19.11",
"alwaysAddToPackageJson": false
},
"@expo/metro-config": {
"version": "~0.18.1",
"alwaysAddToPackageJson": false
},
"@expo/metro-runtime": {
"version": "~3.2.1",
"alwaysAddToPackageJson": false
},
"react-native-svg-transformer": {
"version": "1.3.0",
"alwaysAddToPackageJson": false
},
"react-native-svg": {
"version": "15.2.0",
"alwaysAddToPackageJson": false
},
"@testing-library/react-native": {
"version": "~12.5.0",
"alwaysAddToPackageJson": false
},
"jest-expo": {
"version": "~51.0.2",
"alwaysAddToPackageJson": false
},
"@babel/runtime": {
"version": "7.24.5",
"alwaysAddToPackageJson": false
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { assetExts, sourceExts } = defaultConfig.resolver;

/**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
* https://reactnative.dev/docs/metro
*
* @type {import('metro-config').MetroConfig}
*/
Expand Down

This file was deleted.

26 changes: 13 additions & 13 deletions packages/expo/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
export const nxVersion = require('../../package.json').version;

export const expoVersion = '~50.0.14';
export const expoSplashScreenVersion = '~0.26.4';
export const expoStatusBarVersion = '~1.11.1';
export const expoCliVersion = '~0.17.8'; // @expo/cli
export const babelPresetExpoVersion = '~10.0.1';
export const expoVersion = '~51.0.8';
export const expoSplashScreenVersion = '~0.27.4';
export const expoStatusBarVersion = '~1.12.1';
export const expoCliVersion = '~0.18.13'; // @expo/cli
export const babelPresetExpoVersion = '~11.0.0';

export const reactVersion = '18.2.0';
export const reactDomVersion = '18.2.0';
export const reactTestRendererVersion = '18.2.0';
export const typesReactVersion = '~18.2.45';

export const reactNativeVersion = '0.73.6';
export const reactNativeWebVersion = '~0.19.10';
export const reactNativeVersion = '0.74.1';
export const reactNativeWebVersion = '~0.19.11';

export const expoMetroConfigVersion = '~0.17.6';
export const expoMetroRuntimeVersion = '~3.1.3';
export const expoMetroConfigVersion = '~0.18.1';
export const expoMetroRuntimeVersion = '~3.2.1';

export const reactNativeSvgTransformerVersion = '1.3.0';
export const reactNativeSvgVersion = '15.1.0';
export const reactNativeSvgVersion = '15.2.0';

export const testingLibraryReactNativeVersion = '~12.4.5';
export const testingLibraryReactNativeVersion = '~12.5.0';
export const testingLibraryJestNativeVersion = '~5.4.3';
export const jestExpoVersion = '~50.0.4';
export const jestExpoVersion = '~51.0.2';

export const babelRuntimeVersion = '7.22.6';
export const babelRuntimeVersion = '7.24.5';
37 changes: 37 additions & 0 deletions packages/react-native/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,43 @@
"alwaysAddToPackageJson": false
}
}
},
"19.2.0": {
"version": "19.2.0-beta.2",
"packages": {
"react-native": {
"version": "0.74.1",
"alwaysAddToPackageJson": false
},
"@react-native-community/cli-platform-android": {
"version": "~13.6.6",
"alwaysAddToPackageJson": false
},
"@react-native/babel-preset": {
"version": "^0.74.83",
"alwaysAddToPackageJson": false
},
"@react-native/metro-config": {
"version": "^0.74.83",
"alwaysAddToPackageJson": false
},
"react-native-web": {
"version": "^0.19.11",
"alwaysAddToPackageJson": false
},
"@testing-library/react-native": {
"version": "~12.5.0",
"alwaysAddToPackageJson": false
},
"react-native-svg": {
"version": "15.2.0",
"alwaysAddToPackageJson": false
},
"@babel/runtime": {
"version": "7.24.5",
"alwaysAddToPackageJson": false
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")

if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.facebook.react.defaults.DefaultReactNativeHost
import com.facebook.react.flipper.ReactNativeFlipper
import com.facebook.soloader.SoLoader

class MainApplication : Application(), ReactApplication {
Expand All @@ -31,7 +30,7 @@ class MainApplication : Application(), ReactApplication {
}

override val reactHost: ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
get() = getDefaultReactHost(applicationContext, reactNativeHost)

override fun onCreate() {
super.onCreate()
Expand All @@ -40,6 +39,5 @@ class MainApplication : Application(), ReactApplication {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
kotlinVersion = "1.8.0"
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
}
repositories {
google()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Loading