Skip to content

Commit 59235de

Browse files
authored
chore: bump react-native to 0.73 (#1098)
1 parent 2de07d0 commit 59235de

File tree

24 files changed

+1863
-2456
lines changed

24 files changed

+1863
-2456
lines changed

Diff for: .github/actions/setup-project/action.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
name: Setup project
22
description: Install required tools
33
inputs:
4+
java-version:
5+
description: Desired Java version
6+
default: "17"
47
node-version:
58
required: false
69
description: node version to install
7-
default: 20.10.0 # is already cached in Ubuntu 22.04 runner
10+
# Use pre-installed Node version in Ubuntu 22.04 runner
11+
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
12+
default: 20.13.1
813
windows-fix:
914
required: false
1015
description: https://github.com/actions/setup-node/issues/899#issuecomment-1837381044
1116
default: "false"
1217
runs:
1318
using: composite
1419
steps:
20+
- name: Set up JDK
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: temurin
24+
java-version: ${{ inputs.java-version }}
1525
- uses: actions/setup-node@v4
1626
if: ${{ inputs.windows-fix == 'true' }}
1727
name: (Windows fix) Setup node without cache

Diff for: .github/workflows/default-storage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ jobs:
138138
working-directory: packages/default-storage
139139
- name: Build
140140
run: |
141-
yarn react-native run-windows --release --arch x64 --logging --no-packager --no-launch --no-deploy --msbuildprops "BundleEntryFile=index.ts" --no-telemetry
141+
yarn react-native run-windows --release --arch x64 --logging --no-packager --no-launch --no-deploy --msbuildprops "BundleEntryFile=index.ts,UseBundle=false" --no-telemetry
142142
working-directory: packages/default-storage
143143

144144
release:

Diff for: .gitignore

+25-21
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
1-
.DS_Store
2-
.idea
3-
.yarn
4-
.gradle
5-
node_modules/
6-
npm-debug.log
7-
yarn-error.log
8-
.vscode/*
9-
.expo
10-
npm-debug.log*
11-
yarn-debug.log*
12-
yarn-error.log*
13-
.xcode.env
14-
*.pbxuser
15-
!default.pbxuser
1+
*.hmap
2+
*.iml
3+
*.ipa
164
*.mode1v3
175
!default.mode1v3
186
*.mode2v3
197
!default.mode2v3
8+
*.moved-aside
9+
*.pbxuser
10+
!default.pbxuser
2011
*.perspectivev3
2112
!default.perspectivev3
2213
*.xccheckout
23-
*.moved-aside
24-
DerivedData
25-
*.hmap
26-
*.ipa
2714
*.xcuserstate
15+
.DS_Store
16+
.expo
17+
.gradle
18+
.idea
19+
.vscode/*
20+
.xcode.env
21+
.yarn/*
22+
!.yarn/patches/
23+
!.yarn/plugins/
24+
!.yarn/releases/
25+
DerivedData
26+
Pods
2827
local.properties
29-
*.iml
28+
node_modules/
29+
npm-debug.log
30+
npm-debug.log*
31+
yarn-debug.log*
32+
yarn-error.log
33+
yarn-error.log*
3034

3135
#workspaces
32-
/packages/*/lib
3336
.turbo
37+
/packages/*/lib
3438
build/

Diff for: .yarn/releases/yarn-4.2.2.cjs

+894
Large diffs are not rendered by default.

Diff for: .yarnrc.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
enableGlobalCache: false
22
enableTelemetry: false
3-
nodeLinker: node-modules
4-
npmRegistryServer: "https://registry.npmjs.org"
53
logFilters:
64
- code: YN0007
75
level: discard
86
- code: YN0008
97
level: discard
108
- code: YN0013
119
level: discard
12-
10+
nodeLinker: node-modules
11+
npmRegistryServer: "https://registry.npmjs.org"
1312
packageExtensions:
1413
"@expo/cli@*":
1514
peerDependencies:
@@ -23,3 +22,4 @@ packageExtensions:
2322
expo@*:
2423
peerDependencies:
2524
"@babel/core": ^7.0.0-0
25+
yarnPath: .yarn/releases/yarn-4.2.2.cjs

Diff for: package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"workspaces": [
55
"packages/*"
66
],
7-
"packageManager": "yarn@4.1.1",
7+
"packageManager": "yarn@4.2.2",
88
"engines": {
99
"node": "v20.11.1"
1010
},
@@ -25,15 +25,15 @@
2525
"typescript": "^5.3.0"
2626
},
2727
"resolutions": {
28-
"@react-native-community/cli": "^10.2.5",
29-
"@react-native-community/cli-platform-android": "^10.2.0",
30-
"@react-native-community/cli-platform-ios": "^10.2.5",
28+
"@react-native-community/cli": "^12.3.0",
29+
"@react-native-community/cli-platform-android": "^12.3.0",
30+
"@react-native-community/cli-platform-ios": "^12.3.0",
31+
"@react-native/babel-preset": "^0.73.0",
32+
"@react-native/community-cli-plugin": "^0.73.0",
33+
"@react-native/community-cli-plugin/@react-native-community/cli-server-api": "^12.3.0",
34+
"@react-native/community-cli-plugin/@react-native-community/cli-tools": "^12.3.0",
3135
"body-parser/qs": "^6.7.3",
3236
"find-babel-config/json5": "^2.1.1",
33-
"metro-react-native-babel-preset": "^0.73.10",
34-
"metro-react-native-babel-transformer": "^0.73.10",
35-
"metro-runtime": "^0.73.10",
36-
"metro-source-map": "^0.73.10",
3737
"uuid": "^9.0.0",
3838
"ts-node": "^10.9.1",
3939
"recursive-readdir/minimatch": "^3.0.5",

Diff for: packages/default-storage/babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ["module:metro-react-native-babel-preset"],
2+
presets: ["module:@react-native/babel-preset"],
33
};

Diff for: packages/default-storage/example/android/build.gradle

+10-15
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@ task fetchDependencies() {
2626
}
2727

2828
buildscript {
29-
def androidTestAppDir = "../../node_modules/react-native-test-app/android"
30-
apply from: "$androidTestAppDir/dependencies.gradle"
29+
apply(from: {
30+
def searchDir = rootDir.toPath()
31+
do {
32+
def p = searchDir.resolve("node_modules/react-native-test-app/android/dependencies.gradle")
33+
if (p.toFile().exists()) {
34+
return p.toRealPath().toString()
35+
}
36+
} while (searchDir = searchDir.getParent())
37+
throw new GradleException("Could not find `react-native-test-app`");
38+
}())
3139

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

5260
allprojects {
53-
// TODO: remove when https://github.com/facebook/react-native/issues/35495 is fixed
54-
project.pluginManager.withPlugin("com.facebook.react") {
55-
react {
56-
reactNativeDir = rootProject.file("../../node_modules/react-native/")
57-
codegenDir = rootProject.file("../../node_modules/react-native-codegen/")
58-
}
59-
}
60-
6161
afterEvaluate { project ->
6262
def androidExtension = project.extensions.findByName('android')
6363

@@ -86,11 +86,6 @@ allprojects {
8686
matchingFallbacks = ["debug", "release"]
8787
}
8888
}
89-
90-
project.dependencies {
91-
def hermesDir = file('../../node_modules/hermes-engine/android').absolutePath
92-
nextImplementation files("$hermesDir/hermes-release.aar")
93-
}
9489
}
9590
}
9691
}

Diff for: packages/default-storage/example/android/gradle.properties

+19-13
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,28 @@ org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryEr
2626
android.useAndroidX=true
2727
# Automatically convert third-party libraries to use AndroidX
2828
android.enableJetifier=true
29-
30-
# Version of Flipper to use with React Native. Default value is whatever React
31-
# Native defaults to. To disable Flipper, set it to `false`.
32-
#FLIPPER_VERSION=0.125.0
33-
34-
# Enable Fabric at runtime.
35-
#USE_FABRIC=1
36-
37-
# Enable new architecture, i.e. Fabric + TurboModule - implies USE_FABRIC=1.
29+
# Jetifier randomly fails on these libraries
30+
android.jetifier.ignorelist=hermes-android
31+
32+
# Use this property to specify which architecture you want to build.
33+
# You can also override it from the CLI using
34+
# ./gradlew <task> -PreactNativeArchitectures=x86_64
35+
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
36+
37+
# Use this property to enable support to the new architecture.
38+
# This will allow you to use TurboModules and the Fabric render in
39+
# your application. You should enable this flag either if you want
40+
# to write custom TurboModules/Fabric components OR use libraries that
41+
# are providing them.
3842
# Note that this is incompatible with web debugging.
3943
newArchEnabled=true
44+
#bridgelessEnabled=true
4045

41-
# Uncomment the line below if building react-native from source
42-
#ANDROID_NDK_VERSION=21.4.7075529
46+
# Uncomment the line below to build React Native from source.
47+
#react.buildFromSource=true
48+
49+
# Version of Android NDK to build against.
50+
#ANDROID_NDK_VERSION=26.1.10909125
4351

4452
# Version of Kotlin to build against.
4553
KOTLIN_VERSION=1.9.20
@@ -50,5 +58,3 @@ KOTLIN_VERSION=1.9.20
5058
# Enable dedicated thread pool executor
5159
AsyncStorage_dedicatedExecutor=true
5260
AsyncStorage_useNextStorage=true
53-
54-
REACT_NATIVE_NODE_MODULES_DIR=../node_modules/react-native
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

Diff for: packages/default-storage/example/android/gradlew

+22-13
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
147+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148+
# shellcheck disable=SC2039,SC3045
146149
MAX_FD=$( ulimit -H -n ) ||
147150
warn "Could not query maximum file descriptor limit"
148151
esac
149152
case $MAX_FD in #(
150153
'' | soft) :;; #(
151154
*)
155+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156+
# shellcheck disable=SC2039,SC3045
152157
ulimit -n "$MAX_FD" ||
153158
warn "Could not set maximum file descriptor limit to $MAX_FD"
154159
esac
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
193198
done
194199
fi
195200

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
201210

202211
set -- \
203212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

Diff for: packages/default-storage/example/android/gradlew.bat

+11-10
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -42,11 +43,11 @@ set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
4344
if %ERRORLEVEL% equ 0 goto execute
4445

45-
echo.
46-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47-
echo.
48-
echo Please set the JAVA_HOME variable in your environment to match the
49-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5051

5152
goto fail
5253

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

5758
if exist "%JAVA_EXE%" goto execute
5859

59-
echo.
60-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61-
echo.
62-
echo Please set the JAVA_HOME variable in your environment to match the
63-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6465

6566
goto fail
6667

0 commit comments

Comments
 (0)