From 9af7d4d6891b1e8f66d585d8902fdc029cb10db9 Mon Sep 17 00:00:00 2001 From: Hassan Khan Date: Sun, 17 Nov 2024 12:55:39 +0000 Subject: [PATCH] feat(expo): upgrade Expo to v52 --- packages/detox/migrations.json | 13 ++++ packages/detox/src/utils/versions.ts | 4 +- packages/expo/migrations.json | 77 +++++++++++++++++++ .../src/executors/install/install.impl.ts | 4 +- packages/expo/src/utils/versions.ts | 36 ++++----- packages/react-native/migrations.json | 73 ++++++++++++++++++ .../application/files/app/Gemfile.template | 8 +- .../app/android/app/build.gradle.template | 17 ++-- .../app/src/main/AndroidManifest.xml.template | 1 + .../MainApplication.kt.template | 13 ++-- .../files/app/android/build.gradle.template | 8 +- .../files/app/android/gradle.properties | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../application/files/app/android/gradlew.bat | 2 + .../files/app/android/gradlew.template | 7 +- .../app/android/settings.gradle.template | 4 +- .../files/base-vite/vite.config.ts__tmpl__ | 2 + .../base-webpack/webpack.config.js__tmpl__ | 4 + .../web-configuration/web-configuration.ts | 2 + .../src/utils/ensure-dependencies.ts | 5 ++ packages/react-native/src/utils/versions.ts | 31 ++++---- 21 files changed, 252 insertions(+), 65 deletions(-) diff --git a/packages/detox/migrations.json b/packages/detox/migrations.json index ac23a57d3b6a62..278e47ce55649b 100644 --- a/packages/detox/migrations.json +++ b/packages/detox/migrations.json @@ -35,6 +35,19 @@ "alwaysAddToPackageJson": false } } + }, + "20.2.0": { + "version": "20.2.0-beta.5", + "packages": { + "detox": { + "version": "~20.28.0", + "alwaysAddToPackageJson": false + }, + "@testing-library/jest-dom": { + "version": "~6.6.3", + "alwaysAddToPackageJson": false + } + } } } } diff --git a/packages/detox/src/utils/versions.ts b/packages/detox/src/utils/versions.ts index 4f95fe6622c2c8..b6a065c51c8382 100644 --- a/packages/detox/src/utils/versions.ts +++ b/packages/detox/src/utils/versions.ts @@ -1,5 +1,5 @@ export const nxVersion = require('../../package.json').version; -export const detoxVersion = '~20.18.1'; -export const testingLibraryJestDom = '~6.4.2'; +export const detoxVersion = '~20.28.0'; +export const testingLibraryJestDom = '~6.6.3'; export const configPluginsDetoxVersion = '~8.0.0'; // only required for expo diff --git a/packages/expo/migrations.json b/packages/expo/migrations.json index 2b968b5277fdb4..7bcf819d096b79 100644 --- a/packages/expo/migrations.json +++ b/packages/expo/migrations.json @@ -247,6 +247,83 @@ "alwaysAddToPackageJson": false } } + }, + "20.3.0": { + "version": "20.3.0-beta.0", + "packages": { + "expo": { + "version": "~52.0.11", + "alwaysAddToPackageJson": false + }, + "expo-splash-screen": { + "version": "~0.29.13", + "alwaysAddToPackageJson": false + }, + "expo-status-bar": { + "version": "~2.0.0", + "alwaysAddToPackageJson": false + }, + "@expo/cli": { + "version": "~0.21.8", + "alwaysAddToPackageJson": false + }, + "babel-preset-expo": { + "version": "~12.0.1", + "alwaysAddToPackageJson": false + }, + "react": { + "version": "~18.3.1", + "alwaysAddToPackageJson": false + }, + "react-dom": { + "version": "~18.3.1", + "alwaysAddToPackageJson": false + }, + "react-test-renderer": { + "version": "~18.3.1", + "alwaysAddToPackageJson": false + }, + "@types/react": { + "version": "~18.3.12", + "alwaysAddToPackageJson": false + }, + "react-native": { + "version": "~0.76.3", + "alwaysAddToPackageJson": false + }, + "react-native-web": { + "version": "~0.19.13", + "alwaysAddToPackageJson": false + }, + "@expo/metro-config": { + "version": "~0.19.4", + "alwaysAddToPackageJson": false + }, + "@expo/metro-runtime": { + "version": "~4.0.0", + "alwaysAddToPackageJson": false + }, + "react-native-svg-transformer": { + "version": "~1.5.0", + "alwaysAddToPackageJson": false + }, + "react-native-svg": { + "version": "~15.8.0", + "alwaysAddToPackageJson": false + }, + "@testing-library/react-native": { + "version": "~12.9.0", + "alwaysAddToPackageJson": false + }, + "jest-expo": { + "version": "~52.0.2", + "alwaysAddToPackageJson": false + }, + "@babel/runtime": { + "version": "7.26.0", + "alwaysAddToPackageJson": false + } + } } } } diff --git a/packages/expo/src/executors/install/install.impl.ts b/packages/expo/src/executors/install/install.impl.ts index 27f3006ac1ca1d..86d5ec8f12ebf0 100644 --- a/packages/expo/src/executors/install/install.impl.ts +++ b/packages/expo/src/executors/install/install.impl.ts @@ -44,10 +44,10 @@ export async function installAndUpdatePackageJson( await installAsync( packages, - createInstallOptions({ + { fix: options.fix, check: options.check, - }), + }, createInstallOptions({ force: options.force }) ); diff --git a/packages/expo/src/utils/versions.ts b/packages/expo/src/utils/versions.ts index 682fea62d5da8a..7c9746f2a29026 100644 --- a/packages/expo/src/utils/versions.ts +++ b/packages/expo/src/utils/versions.ts @@ -1,27 +1,27 @@ export const nxVersion = require('../../package.json').version; -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 expoVersion = '~52.0.11'; +export const expoSplashScreenVersion = '~0.29.13'; +export const expoStatusBarVersion = '~2.0.0'; +export const expoCliVersion = '~0.21.8'; // @expo/cli +export const babelPresetExpoVersion = '~12.0.1'; -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 reactVersion = '~18.3.1'; +export const reactDomVersion = '~18.3.1'; +export const reactTestRendererVersion = '~18.3.1'; +export const typesReactVersion = '~18.3.12'; -export const reactNativeVersion = '0.74.1'; -export const reactNativeWebVersion = '~0.19.11'; +export const reactNativeVersion = '0.76.3'; +export const reactNativeWebVersion = '~0.19.13'; -export const expoMetroConfigVersion = '~0.18.1'; -export const expoMetroRuntimeVersion = '~3.2.1'; +export const expoMetroConfigVersion = '~0.19.4'; +export const expoMetroRuntimeVersion = '~4.0.0'; -export const reactNativeSvgTransformerVersion = '1.3.0'; -export const reactNativeSvgVersion = '15.2.0'; +export const reactNativeSvgTransformerVersion = '~1.5.0'; +export const reactNativeSvgVersion = '~15.8.0'; -export const testingLibraryReactNativeVersion = '~12.5.0'; +export const testingLibraryReactNativeVersion = '~12.9.0'; export const testingLibraryJestNativeVersion = '~5.4.3'; -export const jestExpoVersion = '~51.0.2'; +export const jestExpoVersion = '~52.0.2'; -export const babelRuntimeVersion = '7.24.5'; +export const babelRuntimeVersion = '~7.26.0'; diff --git a/packages/react-native/migrations.json b/packages/react-native/migrations.json index 5b5d62a0500867..f2667fd12887c1 100644 --- a/packages/react-native/migrations.json +++ b/packages/react-native/migrations.json @@ -220,6 +220,79 @@ "alwaysAddToPackageJson": false } } + }, + "20.3.0": { + "version": "20.3.0-beta.0", + "packages": { + "react-native": { + "version": "~0.76.3", + "alwaysAddToPackageJson": false + }, + "@react-native-community/cli": { + "version": "~15.0.1", + "alwaysAddToPackageJson": true + }, + "@react-native-community/cli-platform-android": { + "version": "~15.0.1", + "alwaysAddToPackageJson": true + }, + "@react-native-community/cli-platform-ios": { + "version": "~15.0.1", + "alwaysAddToPackageJson": true + }, + "@react-native/babel-preset": { + "version": "~0.76.3", + "alwaysAddToPackageJson": false + }, + "@react-native/metro-config": { + "version": "~0.76.3", + "alwaysAddToPackageJson": false + }, + "react-native-web": { + "version": "~0.19.13", + "alwaysAddToPackageJson": false + }, + "react": { + "version": "~18.3.1", + "alwaysAddToPackageJson": false + }, + "react-dom": { + "version": "~18.3.1", + "alwaysAddToPackageJson": false + }, + "react-test-renderer": { + "version": "~18.3.1", + "alwaysAddToPackageJson": false + }, + "@types/react": { + "version": "~18.3.12", + "alwaysAddToPackageJson": false + }, + "@types/react-dom": { + "version": "~18.3.1", + "alwaysAddToPackageJson": false + }, + "@testing-library/react-native": { + "version": "~12.9.0", + "alwaysAddToPackageJson": false + }, + "react-native-svg-transformer": { + "version": "~1.5.0", + "alwaysAddToPackageJson": false + }, + "react-native-svg": { + "version": "~15.8.0", + "alwaysAddToPackageJson": false + }, + "react-native-svg-web": { + "version": "~1.0.9", + "addToPackageJson": "devDependencies" + }, + "@babel/runtime": { + "version": "~7.26.0", + "alwaysAddToPackageJson": false + } + } } } } diff --git a/packages/react-native/src/generators/application/files/app/Gemfile.template b/packages/react-native/src/generators/application/files/app/Gemfile.template index ec21e32c9a69ee..85d7f68286cc89 100644 --- a/packages/react-native/src/generators/application/files/app/Gemfile.template +++ b/packages/react-native/src/generators/application/files/app/Gemfile.template @@ -3,7 +3,7 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version ruby ">= 2.6.10" -# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper -# bound in the template on Cocoapods with next React Native release. -gem 'cocoapods', '>= 1.13', '< 1.15' -gem 'activesupport', '>= 6.1.7.5', '< 7.1.0' \ No newline at end of file +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '< 1.26.0' diff --git a/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template b/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template index 13834f396b969e..bc9d7d1510635d 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template +++ b/packages/react-native/src/generators/application/files/app/android/app/build.gradle.template @@ -8,13 +8,13 @@ apply plugin: "com.facebook.react" */ react { /* Folders */ - // The root of your project, i.e. where "package.json" lives. Default is '..' - // root = file("../") - // The folder where the react-native NPM package is. Default is <%= offsetFromRoot %>../../node_modules/react-native + // The root of your project, i.e. where "package.json" lives. Default is '../..' + // root = file("../../") + // The folder where the react-native NPM package is. Default is ../../node_modules/react-native reactNativeDir = file("<%= offsetFromRoot %>../../node_modules/react-native") - // The folder where the react-native Codegen package is. Default is <%= offsetFromRoot %>../../node_modules/@react-native/codegen + // The folder where the react-native Codegen package is. Default is ../../node_modules/@react-native/codegen codegenDir = file("<%= offsetFromRoot %>../../node_modules/@react-native/codegen") - // The cli.js file which is the React Native CLI entrypoint. Default is <%= offsetFromRoot %>../../node_modules/react-native/cli.js + // The cli.js file which is the React Native CLI entrypoint. Default is ../../node_modules/react-native/cli.js cliFile = file("<%= offsetFromRoot %>../../node_modules/react-native/cli.js") /* Variants */ @@ -45,10 +45,13 @@ react { /* Hermes Commands */ // The hermes compiler command to run. By default it is 'hermesc' - hermesCommand = "<%= offsetFromRoot %>node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc" + hermesCommand = "<%= offsetFromRoot %>../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc" // // The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map" // hermesFlags = ["-O", "-output-source-map"] + + /* Autolinking */ + autolinkLibrariesWithApp() } /** @@ -114,5 +117,3 @@ dependencies { implementation jscFlavor } } - -apply from: file("<%= offsetFromRoot %>../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template b/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template index f9fabb2492ab1c..095bdca4590761 100644 --- a/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template +++ b/packages/react-native/src/generators/application/files/app/android/app/src/main/AndroidManifest.xml.template @@ -9,6 +9,7 @@ android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/AppTheme" + android:supportsRtl="true" android:networkSecurityConfig="@xml/network_security_config"> { - // Packages that cannot be autolinked yet can be added manually here, for example: - // packages.add(new MyReactNativePackage()); - return PackageList(this).packages - } + override fun getPackages(): List = + PackageList(this).packages.apply { + // Packages that cannot be autolinked yet can be added manually here, for example: + // add(MyReactNativePackage()) + } override fun getJSMainModuleName(): String = "src/main" @@ -34,7 +35,7 @@ class MainApplication : Application(), ReactApplication { override fun onCreate() { super.onCreate() - SoLoader.init(this, false) + SoLoader.init(this, OpenSourceMergedSoMapping) if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { // If you opted-in for the New Architecture, we load the native entry point for this app. load() diff --git a/packages/react-native/src/generators/application/files/app/android/build.gradle.template b/packages/react-native/src/generators/application/files/app/android/build.gradle.template index f536a792016348..a9ea023695dabb 100644 --- a/packages/react-native/src/generators/application/files/app/android/build.gradle.template +++ b/packages/react-native/src/generators/application/files/app/android/build.gradle.template @@ -1,11 +1,11 @@ buildscript { ext { - buildToolsVersion = "34.0.0" - minSdkVersion = 23 - compileSdkVersion = 34 + buildToolsVersion = "35.0.0" + minSdkVersion = 24 + compileSdkVersion = 35 targetSdkVersion = 34 ndkVersion = "26.1.10909125" - kotlinVersion = "1.9.22" + kotlinVersion = "1.9.24" } repositories { google() diff --git a/packages/react-native/src/generators/application/files/app/android/gradle.properties b/packages/react-native/src/generators/application/files/app/android/gradle.properties index a46a5b90fad015..5e24e3aa8db431 100644 --- a/packages/react-native/src/generators/application/files/app/android/gradle.properties +++ b/packages/react-native/src/generators/application/files/app/android/gradle.properties @@ -21,8 +21,6 @@ org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=512m # Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true -# Automatically convert third-party libraries to use AndroidX -android.enableJetifier=true # Use this property to specify which architecture you want to build. # You can also override it from the CLI using @@ -34,7 +32,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=false +newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. diff --git a/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties b/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties index 2ea3535dc058bd..79eb9d003feaef 100644 --- a/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/react-native/src/generators/application/files/app/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/packages/react-native/src/generators/application/files/app/android/gradlew.bat b/packages/react-native/src/generators/application/files/app/android/gradlew.bat index 25da30dbdeee93..9d21a21834d519 100644 --- a/packages/react-native/src/generators/application/files/app/android/gradlew.bat +++ b/packages/react-native/src/generators/application/files/app/android/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## diff --git a/packages/react-native/src/generators/application/files/app/android/gradlew.template b/packages/react-native/src/generators/application/files/app/android/gradlew.template index 1aa94a42690741..f5feea6d6b116b 100755 --- a/packages/react-native/src/generators/application/files/app/android/gradlew.template +++ b/packages/react-native/src/generators/application/files/app/android/gradlew.template @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,8 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s +' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum diff --git a/packages/react-native/src/generators/application/files/app/android/settings.gradle.template b/packages/react-native/src/generators/application/files/app/android/settings.gradle.template index 465e513104b4a7..1a42214ffb845d 100644 --- a/packages/react-native/src/generators/application/files/app/android/settings.gradle.template +++ b/packages/react-native/src/generators/application/files/app/android/settings.gradle.template @@ -1,4 +1,6 @@ +pluginManagement { includeBuild("<%= offsetFromRoot %>../node_modules/@react-native/gradle-plugin") } +plugins { id("com.facebook.react.settings") } +extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } rootProject.name = '<%= className %>' -apply from: file("<%= offsetFromRoot %>../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) include ':app' includeBuild('<%= offsetFromRoot %>../node_modules/@react-native/gradle-plugin') diff --git a/packages/react-native/src/generators/web-configuration/files/base-vite/vite.config.ts__tmpl__ b/packages/react-native/src/generators/web-configuration/files/base-vite/vite.config.ts__tmpl__ index c7ebe41a52334e..948bd6f105ce9d 100644 --- a/packages/react-native/src/generators/web-configuration/files/base-vite/vite.config.ts__tmpl__ +++ b/packages/react-native/src/generators/web-configuration/files/base-vite/vite.config.ts__tmpl__ @@ -38,6 +38,8 @@ export default defineConfig({ extensions, alias: { 'react-native': 'react-native-web', + 'react-native-svg': 'react-native-svg-web', + '@react-native/assets-registry/registry': 'react-native-web/dist/modules/AssetRegistry/index', }, }, build: { diff --git a/packages/react-native/src/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ b/packages/react-native/src/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ index 606838513c0347..57cd85cc2cd5ba 100644 --- a/packages/react-native/src/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ +++ b/packages/react-native/src/generators/web-configuration/files/base-webpack/webpack.config.js__tmpl__ @@ -6,6 +6,8 @@ module.exports = { resolve: { alias: { 'react-native$': 'react-native-web', + 'react-native-svg': 'react-native-svg-web', + '@react-native/assets-registry/registry': 'react-native-web/dist/modules/AssetRegistry/index', }, extensions: ['.web.tsx', '.web.ts', '.web.jsx', '.web.js'] }, @@ -51,6 +53,8 @@ module.exports = composePlugins( config.resolve.alias = { ...config.resolve.alias ?? {}, 'react-native$': 'react-native-web', + 'react-native-svg': 'react-native-svg-web', + '@react-native/assets-registry/registry': 'react-native-web/dist/modules/AssetRegistry/index', }; config.resolve.extensions = [ '.web.tsx', diff --git a/packages/react-native/src/generators/web-configuration/web-configuration.ts b/packages/react-native/src/generators/web-configuration/web-configuration.ts index 4903940df5758c..517f268a699267 100644 --- a/packages/react-native/src/generators/web-configuration/web-configuration.ts +++ b/packages/react-native/src/generators/web-configuration/web-configuration.ts @@ -15,6 +15,7 @@ import { hasWebpackPlugin } from '@nx/react/src/utils/has-webpack-plugin'; import { nxVersion, reactNativeWebVersion, + reacttNativeSvgWebVersion, typesReactDomVersion, } from '../../utils/versions'; import { NormalizedSchema, normalizeSchema } from './lib/normalize-schema'; @@ -49,6 +50,7 @@ export async function webConfigurationGenerator( {}, { 'react-native-web': reactNativeWebVersion, + 'react-native-svg-web': reacttNativeSvgWebVersion, } ); tasks.push(installTask); diff --git a/packages/react-native/src/utils/ensure-dependencies.ts b/packages/react-native/src/utils/ensure-dependencies.ts index 59d26acd9361a3..a3db557c5ca231 100644 --- a/packages/react-native/src/utils/ensure-dependencies.ts +++ b/packages/react-native/src/utils/ensure-dependencies.ts @@ -12,7 +12,9 @@ import { babelRuntimeVersion, jestReactNativeVersion, reactNativeBabelPresetVersion, + reactNativeCommunityCliVersion, reactNativeCommunityCliPlatformAndroidVersion, + reactNativeCommunityCliPlatformIosVersion, reactNativeMetroConfigVersion, reactNativeSvgTransformerVersion, reactNativeSvgVersion, @@ -36,8 +38,11 @@ export function ensureDependencies(tree: Tree): GeneratorCallback { '@react-native/metro-config': reactNativeMetroConfigVersion, '@testing-library/react-native': testingLibraryReactNativeVersion, '@testing-library/jest-native': testingLibraryJestNativeVersion, + '@react-native-community/cli': reactNativeCommunityCliVersion, '@react-native-community/cli-platform-android': reactNativeCommunityCliPlatformAndroidVersion, + '@react-native-community/cli-platform-ios': + reactNativeCommunityCliPlatformIosVersion, 'jest-react-native': jestReactNativeVersion, 'react-test-renderer': reactTestRendererVersion, 'react-native-svg-transformer': reactNativeSvgTransformerVersion, diff --git a/packages/react-native/src/utils/versions.ts b/packages/react-native/src/utils/versions.ts index aefe1624744ccf..dea84f899f7b64 100644 --- a/packages/react-native/src/utils/versions.ts +++ b/packages/react-native/src/utils/versions.ts @@ -1,27 +1,30 @@ export const nxVersion = require('../../package.json').version; -export const reactNativeVersion = '0.74.1'; +export const reactNativeVersion = '~0.76.3'; export const typesNodeVersion = '18.16.9'; -export const reactNativeCommunityCliPlatformAndroidVersion = '~13.6.6'; // anddroid refers files from this package +export const reactNativeCommunityCliVersion = '~15.0.1'; +export const reactNativeCommunityCliPlatformAndroidVersion = '~15.0.1'; +export const reactNativeCommunityCliPlatformIosVersion = '~15.0.1'; -export const reactNativeBabelPresetVersion = '^0.74.83'; -export const reactNativeMetroConfigVersion = '^0.74.83'; -export const reactNativeWebVersion = '^0.19.11'; +export const reactNativeBabelPresetVersion = '~0.76.3'; +export const reactNativeMetroConfigVersion = '~0.76.3'; +export const reactNativeWebVersion = '~0.19.13'; -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 typesReactDomVersion = '18.3.0'; +export const reactVersion = '~18.3.1'; +export const reactDomVersion = '~18.3.1'; +export const reactTestRendererVersion = '~18.3.1'; +export const typesReactVersion = '~18.3.12'; +export const typesReactDomVersion = '~18.3.1'; -export const testingLibraryReactNativeVersion = '~12.5.0'; +export const testingLibraryReactNativeVersion = '~12.9.0'; export const testingLibraryJestNativeVersion = '~5.4.3'; export const jestReactNativeVersion = '18.0.0'; -export const reactNativeSvgTransformerVersion = '1.3.0'; -export const reactNativeSvgVersion = '15.3.0'; +export const reactNativeSvgTransformerVersion = '~1.5.0'; +export const reactNativeSvgVersion = '~15.8.0'; +export const reacttNativeSvgWebVersion = '~1.0.9'; -export const babelRuntimeVersion = '7.24.5'; +export const babelRuntimeVersion = '~7.26.0';