react-native 0.83.0 → 0.83.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt +11 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressRequestBody.kt +2 -17
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/package.json +8 -8
package/React/Base/RCTVersion.m
CHANGED
|
@@ -15,6 +15,7 @@ import com.facebook.react.bridge.Arguments
|
|
|
15
15
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
16
16
|
import com.facebook.react.bridge.WritableMap
|
|
17
17
|
import com.facebook.react.bridge.buildReadableArray
|
|
18
|
+
import com.facebook.react.common.build.ReactBuildConfig
|
|
18
19
|
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
|
|
19
20
|
import java.net.SocketTimeoutException
|
|
20
21
|
import okhttp3.Headers
|
|
@@ -30,13 +31,21 @@ internal object NetworkEventUtil {
|
|
|
30
31
|
fun onCreateRequest(devToolsRequestId: String, request: Request) {
|
|
31
32
|
if (ReactNativeFeatureFlags.enableNetworkEventReporting()) {
|
|
32
33
|
val headersMap = okHttpHeadersToMap(request.headers())
|
|
34
|
+
var requestBody = ""
|
|
35
|
+
|
|
36
|
+
if (ReactBuildConfig.DEBUG) {
|
|
37
|
+
// Debug build: Process request body for preview (CDP only)
|
|
38
|
+
requestBody =
|
|
39
|
+
(request.body() as? ProgressRequestBody)?.getBodyPreview()
|
|
40
|
+
?: request.body()?.toString().orEmpty()
|
|
41
|
+
}
|
|
42
|
+
|
|
33
43
|
InspectorNetworkReporter.reportRequestStart(
|
|
34
44
|
devToolsRequestId,
|
|
35
45
|
request.url().toString(),
|
|
36
46
|
request.method(),
|
|
37
47
|
headersMap,
|
|
38
|
-
|
|
39
|
-
?: request.body()?.toString().orEmpty(),
|
|
48
|
+
requestBody,
|
|
40
49
|
request.body()?.contentLength() ?: 0,
|
|
41
50
|
)
|
|
42
51
|
InspectorNetworkReporter.reportConnectionTiming(devToolsRequestId, headersMap)
|
package/ReactAndroid/src/main/java/com/facebook/react/modules/network/ProgressRequestBody.kt
CHANGED
|
@@ -23,10 +23,6 @@ internal class ProgressRequestBody(
|
|
|
23
23
|
) : RequestBody() {
|
|
24
24
|
private var contentLength = 0L
|
|
25
25
|
|
|
26
|
-
companion object {
|
|
27
|
-
private const val MAX_BODY_PREVIEW_SIZE = 1024 * 1024 // 1MB
|
|
28
|
-
}
|
|
29
|
-
|
|
30
26
|
override fun contentType(): MediaType? {
|
|
31
27
|
return requestBody.contentType()
|
|
32
28
|
}
|
|
@@ -84,18 +80,7 @@ internal class ProgressRequestBody(
|
|
|
84
80
|
}
|
|
85
81
|
|
|
86
82
|
fun getBodyPreview(): String {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
requestBody.writeTo(buffer)
|
|
90
|
-
val size = buffer.size()
|
|
91
|
-
if (size <= MAX_BODY_PREVIEW_SIZE) {
|
|
92
|
-
buffer.readUtf8()
|
|
93
|
-
} else {
|
|
94
|
-
buffer.readUtf8(MAX_BODY_PREVIEW_SIZE.toLong()) +
|
|
95
|
-
"\n... [truncated, showing $MAX_BODY_PREVIEW_SIZE of $size bytes]"
|
|
96
|
-
}
|
|
97
|
-
} catch (e: Exception) {
|
|
98
|
-
""
|
|
99
|
-
}
|
|
83
|
+
// TODO: Safely implement request body previews
|
|
84
|
+
return "[Preview unavailable]"
|
|
100
85
|
}
|
|
101
86
|
}
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
#define REACT_NATIVE_VERSION_MAJOR 0
|
|
16
16
|
#define REACT_NATIVE_VERSION_MINOR 83
|
|
17
|
-
#define REACT_NATIVE_VERSION_PATCH
|
|
17
|
+
#define REACT_NATIVE_VERSION_PATCH 1
|
|
18
18
|
|
|
19
19
|
namespace facebook::react {
|
|
20
20
|
|
|
21
21
|
constexpr struct {
|
|
22
22
|
int32_t Major = 0;
|
|
23
23
|
int32_t Minor = 83;
|
|
24
|
-
int32_t Patch =
|
|
24
|
+
int32_t Patch = 1;
|
|
25
25
|
std::string_view Prerelease = "";
|
|
26
26
|
} ReactNativeVersion;
|
|
27
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.1",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -160,13 +160,13 @@
|
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
162
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
163
|
-
"@react-native/assets-registry": "0.83.
|
|
164
|
-
"@react-native/codegen": "0.83.
|
|
165
|
-
"@react-native/community-cli-plugin": "0.83.
|
|
166
|
-
"@react-native/gradle-plugin": "0.83.
|
|
167
|
-
"@react-native/js-polyfills": "0.83.
|
|
168
|
-
"@react-native/normalize-colors": "0.83.
|
|
169
|
-
"@react-native/virtualized-lists": "0.83.
|
|
163
|
+
"@react-native/assets-registry": "0.83.1",
|
|
164
|
+
"@react-native/codegen": "0.83.1",
|
|
165
|
+
"@react-native/community-cli-plugin": "0.83.1",
|
|
166
|
+
"@react-native/gradle-plugin": "0.83.1",
|
|
167
|
+
"@react-native/js-polyfills": "0.83.1",
|
|
168
|
+
"@react-native/normalize-colors": "0.83.1",
|
|
169
|
+
"@react-native/virtualized-lists": "0.83.1",
|
|
170
170
|
"abort-controller": "^3.0.0",
|
|
171
171
|
"anser": "^1.4.9",
|
|
172
172
|
"ansi-regex": "^5.0.0",
|