Skip to content

chore: bump react-native to 0.73 #1098

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

Merged
merged 4 commits into from
Jun 5, 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
12 changes: 11 additions & 1 deletion .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
name: Setup project
description: Install required tools
inputs:
java-version:
description: Desired Java version
default: "17"
node-version:
required: false
description: node version to install
default: 20.10.0 # is already cached in Ubuntu 22.04 runner
# Use pre-installed Node version in Ubuntu 22.04 runner
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
default: 20.13.1
windows-fix:
required: false
description: https://github.com/actions/setup-node/issues/899#issuecomment-1837381044
default: "false"
runs:
using: composite
steps:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ inputs.java-version }}
- uses: actions/setup-node@v4
if: ${{ inputs.windows-fix == 'true' }}
name: (Windows fix) Setup node without cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/default-storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
working-directory: packages/default-storage
- name: Build
run: |
yarn react-native run-windows --release --arch x64 --logging --no-packager --no-launch --no-deploy --msbuildprops "BundleEntryFile=index.ts" --no-telemetry
yarn react-native run-windows --release --arch x64 --logging --no-packager --no-launch --no-deploy --msbuildprops "BundleEntryFile=index.ts,UseBundle=false" --no-telemetry
working-directory: packages/default-storage

release:
Expand Down
46 changes: 25 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
.DS_Store
.idea
.yarn
.gradle
node_modules/
npm-debug.log
yarn-error.log
.vscode/*
.expo
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.xcode.env
*.pbxuser
!default.pbxuser
*.hmap
*.iml
*.ipa
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.moved-aside
*.pbxuser
!default.pbxuser
*.perspectivev3
!default.perspectivev3
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
.DS_Store
.expo
.gradle
.idea
.vscode/*
.xcode.env
.yarn/*
!.yarn/patches/
!.yarn/plugins/
!.yarn/releases/
DerivedData
Pods
local.properties
*.iml
node_modules/
npm-debug.log
npm-debug.log*
yarn-debug.log*
yarn-error.log
yarn-error.log*

#workspaces
/packages/*/lib
.turbo
/packages/*/lib
build/
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.2.2.cjs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
enableGlobalCache: false
enableTelemetry: false
nodeLinker: node-modules
npmRegistryServer: "https://registry.npmjs.org"
logFilters:
- code: YN0007
level: discard
- code: YN0008
level: discard
- code: YN0013
level: discard

nodeLinker: node-modules
npmRegistryServer: "https://registry.npmjs.org"
packageExtensions:
"@expo/cli@*":
peerDependencies:
Expand All @@ -23,3 +22,4 @@ packageExtensions:
expo@*:
peerDependencies:
"@babel/core": ^7.0.0-0
yarnPath: .yarn/releases/yarn-4.2.2.cjs
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"workspaces": [
"packages/*"
],
"packageManager": "yarn@4.1.1",
"packageManager": "yarn@4.2.2",
"engines": {
"node": "v20.11.1"
},
Expand All @@ -25,15 +25,15 @@
"typescript": "^5.3.0"
},
"resolutions": {
"@react-native-community/cli": "^10.2.5",
"@react-native-community/cli-platform-android": "^10.2.0",
"@react-native-community/cli-platform-ios": "^10.2.5",
"@react-native-community/cli": "^12.3.0",
"@react-native-community/cli-platform-android": "^12.3.0",
"@react-native-community/cli-platform-ios": "^12.3.0",
"@react-native/babel-preset": "^0.73.0",
"@react-native/community-cli-plugin": "^0.73.0",
"@react-native/community-cli-plugin/@react-native-community/cli-server-api": "^12.3.0",
"@react-native/community-cli-plugin/@react-native-community/cli-tools": "^12.3.0",
"body-parser/qs": "^6.7.3",
"find-babel-config/json5": "^2.1.1",
"metro-react-native-babel-preset": "^0.73.10",
"metro-react-native-babel-transformer": "^0.73.10",
"metro-runtime": "^0.73.10",
"metro-source-map": "^0.73.10",
"uuid": "^9.0.0",
"ts-node": "^10.9.1",
"recursive-readdir/minimatch": "^3.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/default-storage/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ["module:metro-react-native-babel-preset"],
presets: ["module:@react-native/babel-preset"],
};
25 changes: 10 additions & 15 deletions packages/default-storage/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,16 @@ task fetchDependencies() {
}

buildscript {
def androidTestAppDir = "../../node_modules/react-native-test-app/android"
apply from: "$androidTestAppDir/dependencies.gradle"
apply(from: {
def searchDir = rootDir.toPath()
do {
def p = searchDir.resolve("node_modules/react-native-test-app/android/dependencies.gradle")
if (p.toFile().exists()) {
return p.toRealPath().toString()
}
} while (searchDir = searchDir.getParent())
throw new GradleException("Could not find `react-native-test-app`");
}())

// Mainly for Detox testing for using Next Storage
// when building next, force using next storage
Expand All @@ -50,14 +58,6 @@ buildscript {
}

allprojects {
// TODO: remove when https://github.com/facebook/react-native/issues/35495 is fixed
project.pluginManager.withPlugin("com.facebook.react") {
react {
reactNativeDir = rootProject.file("../../node_modules/react-native/")
codegenDir = rootProject.file("../../node_modules/react-native-codegen/")
}
}

afterEvaluate { project ->
def androidExtension = project.extensions.findByName('android')

Expand Down Expand Up @@ -86,11 +86,6 @@ allprojects {
matchingFallbacks = ["debug", "release"]
}
}

project.dependencies {
def hermesDir = file('../../node_modules/hermes-engine/android').absolutePath
nextImplementation files("$hermesDir/hermes-release.aar")
}
}
}
}
32 changes: 19 additions & 13 deletions packages/default-storage/example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,28 @@ org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryEr
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Version of Flipper to use with React Native. Default value is whatever React
# Native defaults to. To disable Flipper, set it to `false`.
#FLIPPER_VERSION=0.125.0

# Enable Fabric at runtime.
#USE_FABRIC=1

# Enable new architecture, i.e. Fabric + TurboModule - implies USE_FABRIC=1.
# Jetifier randomly fails on these libraries
android.jetifier.ignorelist=hermes-android

# Use this property to specify which architecture you want to build.
# You can also override it from the CLI using
# ./gradlew <task> -PreactNativeArchitectures=x86_64
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64

# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
# Note that this is incompatible with web debugging.
newArchEnabled=true
#bridgelessEnabled=true

# Uncomment the line below if building react-native from source
#ANDROID_NDK_VERSION=21.4.7075529
# Uncomment the line below to build React Native from source.
#react.buildFromSource=true

# Version of Android NDK to build against.
#ANDROID_NDK_VERSION=26.1.10909125

# Version of Kotlin to build against.
KOTLIN_VERSION=1.9.20
Expand All @@ -50,5 +58,3 @@ KOTLIN_VERSION=1.9.20
# Enable dedicated thread pool executor
AsyncStorage_dedicatedExecutor=true
AsyncStorage_useNextStorage=true

REACT_NATIVE_NODE_MODULES_DIR=../node_modules/react-native
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
35 changes: 22 additions & 13 deletions packages/default-storage/example/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

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

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
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=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=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi

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

# 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, 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
21 changes: 11 additions & 10 deletions packages/default-storage/example/android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -42,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 @@ -56,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
Loading
Loading