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.
@@ -28,7 +28,7 @@
28
28
  export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 83;
31
- static patch: number = 0;
31
+ static patch: number = 1;
32
32
  static prerelease: string | null = null;
33
33
 
34
34
  static getVersionString(): string {
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(83),
26
- RCTVersionPatch: @(0),
26
+ RCTVersionPatch: @(1),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.83.0
1
+ VERSION_NAME=0.83.1
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
  react.internal.hermesPublishingGroup=com.facebook.hermes
4
4
 
@@ -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
- (request.body() as? ProgressRequestBody)?.getBodyPreview()
39
- ?: request.body()?.toString().orEmpty(),
48
+ requestBody,
40
49
  request.body()?.contentLength() ?: 0,
41
50
  )
42
51
  InspectorNetworkReporter.reportConnectionTiming(devToolsRequestId, headersMap)
@@ -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
- return try {
88
- val buffer = okio.Buffer()
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,7 +14,7 @@ public object ReactNativeVersion {
14
14
  public val VERSION: Map<String, Any?> = mapOf(
15
15
  "major" to 0,
16
16
  "minor" to 83,
17
- "patch" to 0,
17
+ "patch" to 1,
18
18
  "prerelease" to null
19
19
  )
20
20
  }
@@ -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 0
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 = 0;
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.0",
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.0",
164
- "@react-native/codegen": "0.83.0",
165
- "@react-native/community-cli-plugin": "0.83.0",
166
- "@react-native/gradle-plugin": "0.83.0",
167
- "@react-native/js-polyfills": "0.83.0",
168
- "@react-native/normalize-colors": "0.83.0",
169
- "@react-native/virtualized-lists": "0.83.0",
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",